tracing: Add print_fmt field

This is part of a patch set that removes the show_format method
in the ftrace event macros.

The print_fmt field is added to hold the string that shows
the print_fmt in the event format files. This patch only adds
the field but it is currently not used. Later patches will use
this field to enable us to remove the show_format field
and function.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4B273D3E.2000704@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
Lai Jiangshan
2009-12-15 15:39:42 +08:00
committed by Steven Rostedt
parent 809826a389
commit 509e760cd9
3 changed files with 35 additions and 1 deletions

View File

@@ -203,6 +203,9 @@ static int ftrace_raw_init_event(struct ftrace_event_call *call)
return 0;
}
#undef __entry
#define __entry REC
#undef __field
#define __field(type, item)
@@ -218,6 +221,9 @@ static int ftrace_raw_init_event(struct ftrace_event_call *call)
#undef __dynamic_array
#define __dynamic_array(type, item)
#undef F_printk
#define F_printk(fmt, args...) #fmt ", " __stringify(args)
#undef FTRACE_ENTRY
#define FTRACE_ENTRY(call, struct_name, type, tstruct, print) \
\
@@ -228,6 +234,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
.id = type, \
.system = __stringify(TRACE_SYSTEM), \
.raw_init = ftrace_raw_init_event, \
.print_fmt = print, \
.show_format = ftrace_format_##call, \
.define_fields = ftrace_define_fields_##call, \
}; \