mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
tracing: Add '__rel_loc' using trace event macros
Add '__rel_loc' using trace event macros. These macros are usually not used in the kernel, except for testing purpose. This also add "rel_" variant of macros for dynamic_array string, and bitmask. Link: https://lkml.kernel.org/r/163757342119.510314.816029622439099016.stgit@devnote2 Cc: Beau Belgrave <beaub@linux.microsoft.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Tom Zanussi <zanussi@kernel.org> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (VMware)
parent
05770dd0ad
commit
55de2c0b56
@@ -21,6 +21,22 @@
|
||||
#undef __get_bitmask
|
||||
#define __get_bitmask(field) (char *)__get_dynamic_array(field)
|
||||
|
||||
#undef __get_rel_dynamic_array
|
||||
#define __get_rel_dynamic_array(field) \
|
||||
((void *)(&__entry->__rel_loc_##field) + \
|
||||
sizeof(__entry->__rel_loc_##field) + \
|
||||
(__entry->__rel_loc_##field & 0xffff))
|
||||
|
||||
#undef __get_rel_dynamic_array_len
|
||||
#define __get_rel_dynamic_array_len(field) \
|
||||
((__entry->__rel_loc_##field >> 16) & 0xffff)
|
||||
|
||||
#undef __get_rel_str
|
||||
#define __get_rel_str(field) ((char *)__get_rel_dynamic_array(field))
|
||||
|
||||
#undef __get_rel_bitmask
|
||||
#define __get_rel_bitmask(field) (char *)__get_rel_dynamic_array(field)
|
||||
|
||||
#undef __perf_count
|
||||
#define __perf_count(c) (c)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user