diff options
author | Tom Zanussi <tzanussi@gmail.com> | 2009-04-28 04:04:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-29 08:06:03 -0400 |
commit | a118e4d1402f1349fe3d953493e4168a300a752d (patch) | |
tree | bd4c2fccee4528bf7d1536e33218516953904740 /kernel/trace/trace_events.c | |
parent | 30e673b230f9d556eb81ef68a7b1a08c8b3b142c (diff) |
tracing/filters: distinguish between signed and unsigned fields
The new filter comparison ops need to be able to distinguish between
signed and unsigned field types, so add an is_signed flag/param to the
event field struct/trace_define_fields(). Also define a simple macro,
is_signed_type() to determine the signedness at compile time, used in the
trace macros. If the is_signed_type() macro won't work with a specific
type, a new slightly modified version of TRACE_FIELD() called
TRACE_FIELD_SIGN(), allows the signedness to be set explicitly.
[ Impact: extend trace-filter code for new feature ]
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: fweisbec@gmail.com
Cc: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <1240905893.6416.120.camel@tropicana>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 1cd1f37373dd..bbbea7479371 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -26,7 +26,7 @@ static DEFINE_MUTEX(event_mutex); | |||
26 | LIST_HEAD(ftrace_events); | 26 | LIST_HEAD(ftrace_events); |
27 | 27 | ||
28 | int trace_define_field(struct ftrace_event_call *call, char *type, | 28 | int trace_define_field(struct ftrace_event_call *call, char *type, |
29 | char *name, int offset, int size) | 29 | char *name, int offset, int size, int is_signed) |
30 | { | 30 | { |
31 | struct ftrace_event_field *field; | 31 | struct ftrace_event_field *field; |
32 | 32 | ||
@@ -44,6 +44,7 @@ int trace_define_field(struct ftrace_event_call *call, char *type, | |||
44 | 44 | ||
45 | field->offset = offset; | 45 | field->offset = offset; |
46 | field->size = size; | 46 | field->size = size; |
47 | field->is_signed = is_signed; | ||
47 | list_add(&field->link, &call->fields); | 48 | list_add(&field->link, &call->fields); |
48 | 49 | ||
49 | return 0; | 50 | return 0; |