* [PATCH 01/10] trace_kprobe: shows signs of fields in format files
@ 2009-12-09 7:15 Lai Jiangshan
2009-12-09 15:05 ` Masami Hiramatsu
0 siblings, 1 reply; 4+ messages in thread
From: Lai Jiangshan @ 2009-12-09 7:15 UTC (permalink / raw)
To: Ingo Molnar, Steven Rostedt, Frederic Weisbecker,
Masami Hiramatsu, Jason Baron, LKML
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 <laijs@cn.fujitsu.com>
---
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index e3c80e9..3ef66d4 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 01/10] trace_kprobe: shows signs of fields in format files
2009-12-09 7:15 [PATCH 01/10] trace_kprobe: shows signs of fields in " Lai Jiangshan
@ 2009-12-09 15:05 ` Masami Hiramatsu
0 siblings, 0 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2009-12-09 15:05 UTC (permalink / raw)
To: Lai Jiangshan
Cc: Ingo Molnar, Steven Rostedt, Frederic Weisbecker, Jason Baron,
LKML
Lai Jiangshan wrote:
>
> 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<laijs@cn.fujitsu.com>
Thanks Lai!
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
> ---
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index e3c80e9..3ef66d4 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -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)
>
>
>
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 01/10] trace_kprobe: shows signs of fields in format files
@ 2009-12-15 7:39 Lai Jiangshan
2009-12-30 18:36 ` [tip:tracing/urgent] tracing/kprobe: Show sign of fields in trace_kprobe " tip-bot for Lai Jiangshan
0 siblings, 1 reply; 4+ messages in thread
From: Lai Jiangshan @ 2009-12-15 7:39 UTC (permalink / raw)
To: Ingo Molnar, Steven Rostedt, Frederic Weisbecker,
Masami Hiramatsu, Jason Baron, LKML
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 <laijs@cn.fujitsu.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
---
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index e3c80e9..3ef66d4 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:tracing/urgent] tracing/kprobe: Show sign of fields in trace_kprobe format files
2009-12-15 7:39 [PATCH 01/10] trace_kprobe: shows signs of fields in format files Lai Jiangshan
@ 2009-12-30 18:36 ` tip-bot for Lai Jiangshan
0 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Lai Jiangshan @ 2009-12-30 18:36 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, rostedt, tglx, mhiramat, laijs
Commit-ID: 79b408210885b9f7f0b067b07a09d68f4da3a700
Gitweb: http://git.kernel.org/tip/79b408210885b9f7f0b067b07a09d68f4da3a700
Author: Lai Jiangshan <laijs@cn.fujitsu.com>
AuthorDate: Tue, 15 Dec 2009 15:39:19 +0800
Committer: Steven Rostedt <rostedt@goodmis.org>
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 <laijs@cn.fujitsu.com>
LKML-Reference: <4B273D27.5040009@cn.fujitsu.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_kprobe.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 7ecab06..83f1e6e 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-30 18:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15 7:39 [PATCH 01/10] trace_kprobe: shows signs of fields in format files Lai Jiangshan
2009-12-30 18:36 ` [tip:tracing/urgent] tracing/kprobe: Show sign of fields in trace_kprobe " tip-bot for Lai Jiangshan
-- strict thread matches above, loose matches on Subject: below --
2009-12-09 7:15 [PATCH 01/10] trace_kprobe: shows signs of fields in " Lai Jiangshan
2009-12-09 15:05 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox