tracing: probeevent: Return consumed bytes of dynamic area
Cleanup string fetching routine so that returns the consumed bytes of dynamic area and store the string information as data_loc format instead of data_rloc. This simplifies the fetcharg loop. Link: http://lkml.kernel.org/r/152465874163.26224.12125143907501289031.stgit@devbox Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
这个提交包含在:

提交者
Steven Rostedt (VMware)

父节点
f451bc89d8
当前提交
9178412ddf
@@ -54,29 +54,15 @@
|
||||
#define TP_FLAG_PROFILE 2
|
||||
#define TP_FLAG_REGISTERED 4
|
||||
|
||||
/* data_loc: data location, compatible with u32 */
|
||||
#define make_data_loc(len, offs) \
|
||||
(((u32)(len) << 16) | ((u32)(offs) & 0xffff))
|
||||
#define get_loc_len(dl) ((u32)(dl) >> 16)
|
||||
#define get_loc_offs(dl) ((u32)(dl) & 0xffff)
|
||||
|
||||
/* data_rloc: data relative location, compatible with u32 */
|
||||
#define make_data_rloc(len, roffs) \
|
||||
(((u32)(len) << 16) | ((u32)(roffs) & 0xffff))
|
||||
#define get_rloc_len(dl) ((u32)(dl) >> 16)
|
||||
#define get_rloc_offs(dl) ((u32)(dl) & 0xffff)
|
||||
|
||||
/*
|
||||
* Convert data_rloc to data_loc:
|
||||
* data_rloc stores the offset from data_rloc itself, but data_loc
|
||||
* stores the offset from event entry.
|
||||
*/
|
||||
#define convert_rloc_to_loc(dl, offs) ((u32)(dl) + (offs))
|
||||
|
||||
static nokprobe_inline void *get_rloc_data(u32 *dl)
|
||||
{
|
||||
return (u8 *)dl + get_rloc_offs(*dl);
|
||||
}
|
||||
|
||||
/* For data_loc conversion */
|
||||
static nokprobe_inline void *get_loc_data(u32 *dl, void *ent)
|
||||
{
|
||||
return (u8 *)ent + get_rloc_offs(*dl);
|
||||
return (u8 *)ent + get_loc_offs(*dl);
|
||||
}
|
||||
|
||||
/* Printing function type */
|
||||
|
在新工单中引用
屏蔽一个用户