trace_kprobe: shows signs of fields in format files
PATCH 1/10 trace_kprobe: shows signs of fields in format files
format files of trace_kprobe don't shows signs, it is different from all other format files, incorrect API to user.
Signed-off-by Lai Jiangshan <[email protected]>
Acked-by Masami Hiramatsu <[email protected]>
---
kernel/trace/trace_kprobe.c +4 -3
@@ -1163,10 +1163,11 @@ static int __probe_event_show_format(struct trace_seq *s,#undef SHOW_FIELD#define SHOW_FIELD (type, item, name) \ do { \ - ret = trace_seq_printf(s, "\tfield: " #type " %s;\t" \ - "offset:%u;\tsize:%u;\n", name, \ + ret = trace_seq_printf(s, "\tfield:" #type " %s;\t" \ + "offset:%u;\tsize:%u;\tsigned:%d;\n", name,\ (unsigned int)offsetof(typeof(field), item),\ - (unsigned int)sizeof(type)); \ + (unsigned int)sizeof(type), \ + is_signed_type(type)); \ if (!ret) \ return 0; \ } while (0)
[tip:tracing/urgent] tracing/kprobe: Show sign of fields in trace_kprobe format files
Commit-ID: 79b408210885b9f7f0b067b07a09d68f4da3a700 Gitweb: http://git.kernel.org/tip/79b408210885b9f7f0b067b07a09d68f4da3a700 Author: Lai Jiangshan <[email protected]> AuthorDate: Tue, 15 Dec 2009 15:39:19 +0800 Committer: Steven Rostedt <[email protected]> CommitDate: Wed, 30 Dec 2009 10:27:03 -0500
tracing/kprobe: Show sign of fields in trace_kprobe format files
The format files of trace_kprobe do not show the sign of the fields. The other format files show the field signed type of the fields and this patch makes the trace_kprobe formats consistent with the others.
Signed-off-by Lai Jiangshan <[email protected]>
LKML-Reference: <[email protected]>
Acked-by Masami Hiramatsu <[email protected]>
Signed-off-by Steven Rostedt <[email protected]>
--- kernel/trace/trace_kprobe.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
kernel/trace/trace_kprobe.c +4 -3
@@ -1182,10 +1182,11 @@ static int __probe_event_show_format(struct trace_seq *s,#undef SHOW_FIELD#define SHOW_FIELD (type, item, name) \ do { \ - ret = trace_seq_printf(s, "\tfield: " #type " %s;\t" \ - "offset:%u;\tsize:%u;\n", name, \ + ret = trace_seq_printf(s, "\tfield:" #type " %s;\t" \ + "offset:%u;\tsize:%u;\tsigned:%d;\n", name,\ (unsigned int)offsetof(typeof(field), item),\ - (unsigned int)sizeof(type)); \ + (unsigned int)sizeof(type), \ + is_signed_type(type)); \ if (!ret) \ return 0; \ } while (0)