aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2009-10-06 02:09:50 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-06 09:04:45 -0400
commit26a50744b21fff65bd754874072857bee8967f4d (patch)
tree4819820f0841090232fcd2525f496f787fd411c7 /include/trace
parentd9b2002c406011164f245de7a81304625989f1c9 (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 'include/trace')
-rw-r--r--include/trace/ftrace.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index cc0d9667e182..c9bbcab95fbe 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -120,9 +120,10 @@
120#undef __field 120#undef __field
121#define __field(type, item) \ 121#define __field(type, item) \
122 ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \ 122 ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \
123 "offset:%u;\tsize:%u;\n", \ 123 "offset:%u;\tsize:%u;\tsigned:%u;\n", \
124 (unsigned int)offsetof(typeof(field), item), \ 124 (unsigned int)offsetof(typeof(field), item), \
125 (unsigned int)sizeof(field.item)); \ 125 (unsigned int)sizeof(field.item), \
126 (unsigned int)is_signed_type(type)); \
126 if (!ret) \ 127 if (!ret) \
127 return 0; 128 return 0;
128 129
@@ -132,19 +133,21 @@
132#undef __array 133#undef __array
133#define __array(type, item, len) \ 134#define __array(type, item, len) \
134 ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \ 135 ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \
135 "offset:%u;\tsize:%u;\n", \ 136 "offset:%u;\tsize:%u;\tsigned:%u;\n", \
136 (unsigned int)offsetof(typeof(field), item), \ 137 (unsigned int)offsetof(typeof(field), item), \
137 (unsigned int)sizeof(field.item)); \ 138 (unsigned int)sizeof(field.item), \
139 (unsigned int)is_signed_type(type)); \
138 if (!ret) \ 140 if (!ret) \
139 return 0; 141 return 0;
140 142
141#undef __dynamic_array 143#undef __dynamic_array
142#define __dynamic_array(type, item, len) \ 144#define __dynamic_array(type, item, len) \
143 ret = trace_seq_printf(s, "\tfield:__data_loc " #type "[] " #item ";\t"\ 145 ret = trace_seq_printf(s, "\tfield:__data_loc " #type "[] " #item ";\t"\
144 "offset:%u;\tsize:%u;\n", \ 146 "offset:%u;\tsize:%u;\tsigned:%u;\n", \
145 (unsigned int)offsetof(typeof(field), \ 147 (unsigned int)offsetof(typeof(field), \
146 __data_loc_##item), \ 148 __data_loc_##item), \
147 (unsigned int)sizeof(field.__data_loc_##item)); \ 149 (unsigned int)sizeof(field.__data_loc_##item), \
150 (unsigned int)is_signed_type(type)); \
148 if (!ret) \ 151 if (!ret) \
149 return 0; 152 return 0;
150 153