diff options
author | Tom Zanussi <tzanussi@gmail.com> | 2009-10-06 02:09:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-06 09:04:45 -0400 |
commit | 26a50744b21fff65bd754874072857bee8967f4d (patch) | |
tree | 4819820f0841090232fcd2525f496f787fd411c7 /kernel/trace/trace_events.c | |
parent | d9b2002c406011164f245de7a81304625989f1c9 (diff) |
tracing/events: Add 'signed' field to format files
The sign info used for filters in the kernel is also useful to
applications that process the trace stream. Add it to the format
files and make it available to userspace.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: rostedt@goodmis.org
Cc: lizf@cn.fujitsu.com
Cc: hch@infradead.org
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1254809398-8078-2-git-send-email-tzanussi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index d128f65778e6..cf3cabf6ce14 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -507,7 +507,7 @@ extern char *__bad_type_size(void); | |||
507 | #define FIELD(type, name) \ | 507 | #define FIELD(type, name) \ |
508 | sizeof(type) != sizeof(field.name) ? __bad_type_size() : \ | 508 | sizeof(type) != sizeof(field.name) ? __bad_type_size() : \ |
509 | #type, "common_" #name, offsetof(typeof(field), name), \ | 509 | #type, "common_" #name, offsetof(typeof(field), name), \ |
510 | sizeof(field.name) | 510 | sizeof(field.name), is_signed_type(type) |
511 | 511 | ||
512 | static int trace_write_header(struct trace_seq *s) | 512 | static int trace_write_header(struct trace_seq *s) |
513 | { | 513 | { |
@@ -515,17 +515,17 @@ static int trace_write_header(struct trace_seq *s) | |||
515 | 515 | ||
516 | /* struct trace_entry */ | 516 | /* struct trace_entry */ |
517 | return trace_seq_printf(s, | 517 | return trace_seq_printf(s, |
518 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" | 518 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n" |
519 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" | 519 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n" |
520 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" | 520 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n" |
521 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" | 521 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n" |
522 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\n" | 522 | "\tfield:%s %s;\toffset:%zu;\tsize:%zu;\tsigned:%u;\n" |
523 | "\n", | 523 | "\n", |
524 | FIELD(unsigned short, type), | 524 | FIELD(unsigned short, type), |
525 | FIELD(unsigned char, flags), | 525 | FIELD(unsigned char, flags), |
526 | FIELD(unsigned char, preempt_count), | 526 | FIELD(unsigned char, preempt_count), |
527 | FIELD(int, pid), | 527 | FIELD(int, pid), |
528 | FIELD(int, lock_depth)); | 528 | FIELD(int, lock_depth)); |
529 | } | 529 | } |
530 | 530 | ||
531 | static ssize_t | 531 | static ssize_t |