diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2009-12-15 08:39:38 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-12-30 16:27:06 +0100 |
commit | fb7ae981cb9fe8665b9da97e8734745e030c151d (patch) | |
tree | 7b127c1bd4c0457c30f57d0f9c6ceacf69ab88c2 /include/trace/ftrace.h | |
parent | tracing/syscalls: Fix typo in SYSCALL_DEFINE0 (diff) | |
download | linux-fb7ae981cb9fe8665b9da97e8734745e030c151d.tar.xz linux-fb7ae981cb9fe8665b9da97e8734745e030c151d.zip |
tracing: Fix sign fields in ftrace_define_fields_##call()
Add is_signed_type() call to trace_define_field() in ftrace macros.
The code previously just passed in 0 (false), disregarding whether
or not the field was actually a signed type.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4B273D3A.6020007@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r-- | include/trace/ftrace.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 73523151a731..c6fe03e902ca 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h @@ -414,7 +414,8 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ ret = trace_define_field(event_call, #type "[" #len "]", #item, \ offsetof(typeof(field), item), \ - sizeof(field.item), 0, FILTER_OTHER); \ + sizeof(field.item), \ + is_signed_type(type), FILTER_OTHER); \ if (ret) \ return ret; @@ -422,8 +423,8 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ #define __dynamic_array(type, item, len) \ ret = trace_define_field(event_call, "__data_loc " #type "[]", #item, \ offsetof(typeof(field), __data_loc_##item), \ - sizeof(field.__data_loc_##item), 0, \ - FILTER_OTHER); + sizeof(field.__data_loc_##item), \ + is_signed_type(type), FILTER_OTHER); #undef __string #define __string(item, src) __dynamic_array(char, item, -1) |