ANDROID: vendor_hooks: add vendor hook in blk_mq_alloc_rqs()
This vendor hook let us attach oem data as payload to the request.
The payload is used by oem driver for debugging purpose.
Bug: 188749221
Change-Id: Iac598bd9cce836dac0efe9198a3e7752928f351a
Signed-off-by: Yang Yang <yang.yang@vivo.com>
(cherry picked from commit eecc725a8e)
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
#include "blk-mq-sched.h"
|
||||
#include "blk-rq-qos.h"
|
||||
|
||||
#include <trace/hooks/block.h>
|
||||
|
||||
static DEFINE_PER_CPU(struct llist_head, blk_cpu_done);
|
||||
|
||||
static void blk_mq_poll_stats_start(struct request_queue *q);
|
||||
@@ -2459,6 +2461,7 @@ int blk_mq_alloc_rqs(struct blk_mq_tag_set *set, struct blk_mq_tags *tags,
|
||||
*/
|
||||
rq_size = round_up(sizeof(struct request) + set->cmd_size,
|
||||
cache_line_size());
|
||||
trace_android_vh_blk_alloc_rqs(&rq_size, set, tags);
|
||||
left = rq_size * depth;
|
||||
|
||||
for (i = 0; i < depth; ) {
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <trace/hooks/preemptirq.h>
|
||||
#include <trace/hooks/ftrace_dump.h>
|
||||
#include <trace/hooks/ufshcd.h>
|
||||
#include <trace/hooks/block.h>
|
||||
#include <trace/hooks/cgroup.h>
|
||||
#include <trace/hooks/sys.h>
|
||||
#include <trace/hooks/iommu.h>
|
||||
@@ -301,3 +302,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_force_compatible_post);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_regmap_update);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dma_buf_release);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_check_status);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_blk_alloc_rqs);
|
||||
|
||||
24
include/trace/hooks/block.h
Normal file
24
include/trace/hooks/block.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM block
|
||||
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
|
||||
#if !defined(_TRACE_HOOK_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_BLOCK_H
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
struct blk_mq_tag_set;
|
||||
struct blk_mq_tags;
|
||||
|
||||
DECLARE_HOOK(android_vh_blk_alloc_rqs,
|
||||
TP_PROTO(size_t *rq_size, struct blk_mq_tag_set *set,
|
||||
struct blk_mq_tags *tags),
|
||||
TP_ARGS(rq_size, set, tags));
|
||||
|
||||
#endif /* _TRACE_HOOK_BLOCK_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
Reference in New Issue
Block a user