tracing: convert some seq_print_ip_sym to %pf
cover tracing: convert some seq_print_ip_sym to %pf
Hi,
I've replaced some seq_print_ip_sym by the %pf format. I also wanted to convert seq_ip_print_sym() internals too, but it relies on kprobes checks, so I'm not sure what to do there.
Thanks,
Frederic.
The following changes since commit ddc1637af217dbd8bc51f30e6d24e84476a869a6:
Li Zefan (1):
kmemtrace: Print binary output only if 'bin' option is set
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git ..BRANCH.NOT.VERIFIED..
Frederic Weisbecker (2):
tracing/function-graph-tracer: Use the %pf format tracing/kmemtrace: Use the %pf format
kernel/trace/kmemtrace.c | 25 +++++-------------------- kernel/trace/trace_functions_graph.c | 12 ++---------- 2 files changed, 7 insertions(+), 30 deletions(-)
PATCH 1/2 tracing/function-graph-tracer: Use the %pf format
Remove the obsolete seq_print_ip_sym() usage and replace it by the %pf format in order to print function symbols.
--- kernel/trace/trace_functions_graph.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-)
kernel/trace/trace_functions_graph.c +2 -10
@@ -565,11 +565,7 @@ print_graph_entry_leaf(struct trace_iterator *iter,return TRACE_TYPE_PARTIAL_LINE ; } - ret =seq_print_ip_sym (s, call->func,0 ); -if (!ret) -return TRACE_TYPE_PARTIAL_LINE ; - - ret =trace_seq_printf (s,"();\n" ); + ret =trace_seq_printf (s,"%pf();\n" , (void *)call->func);if (!ret)return TRACE_TYPE_PARTIAL_LINE ;
@@ -612,11 +608,7 @@ print_graph_entry_nested(struct trace_iterator *iter,return TRACE_TYPE_PARTIAL_LINE ; } - ret =seq_print_ip_sym (s, call->func,0 ); -if (!ret) -return TRACE_TYPE_PARTIAL_LINE ; - - ret =trace_seq_printf (s,"() {\n" ); + ret =trace_seq_printf (s,"%pf() {\n" , (void *)call->func);if (!ret)return TRACE_TYPE_PARTIAL_LINE ;
Signature · 1 line
1.6.2.3
Re: [PATCH 1/2] tracing/function-graph-tracer: Use the %pf format
Quoted 4 lines · Frederic Weisbecker
Remove the obsolete
seq_print_ip_sym()usage and replace it by the %pf format in order to print function symbols.Signed-off-by Frederic Weisbecker <[email protected]>
Quoted 6 lines
Cc Steven Rostedt <[email protected]>Cc Li Zefan <[email protected]>Cc Lai Jiangshan <[email protected]>--- kernel/trace/trace_functions_graph.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-)
[tip:tracing/core] tracing/function-graph-tracer: Use the %pf format
In reply to Frederic WeisbeckerCommit-ID: 68baafcfc46074c4bb4e4c3115c2c76a8a85f37d Gitweb: http://git.kernel.org/tip/68baafcfc46074c4bb4e4c3115c2c76a8a85f37d Author: Frederic Weisbecker <[email protected]> AuthorDate: Thu, 9 Jul 2009 04:46:29 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 10 Jul 2009 12:07:19 +0200
tracing/function-graph-tracer: Use the %pf format
Remove the obsolete seq_print_ip_sym() usage and replace it by the %pf format in order to print function symbols.
LKML-Reference: <[email protected]>
--- kernel/trace/trace_functions_graph.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-)
kernel/trace/trace_functions_graph.c +2 -10
@@ -565,11 +565,7 @@ print_graph_entry_leaf(struct trace_iterator *iter,return TRACE_TYPE_PARTIAL_LINE ; } - ret =seq_print_ip_sym (s, call->func,0 ); -if (!ret) -return TRACE_TYPE_PARTIAL_LINE ; - - ret =trace_seq_printf (s,"();\n" ); + ret =trace_seq_printf (s,"%pf();\n" , (void *)call->func);if (!ret)return TRACE_TYPE_PARTIAL_LINE ;
@@ -612,11 +608,7 @@ print_graph_entry_nested(struct trace_iterator *iter,return TRACE_TYPE_PARTIAL_LINE ; } - ret =seq_print_ip_sym (s, call->func,0 ); -if (!ret) -return TRACE_TYPE_PARTIAL_LINE ; - - ret =trace_seq_printf (s,"() {\n" ); + ret =trace_seq_printf (s,"%pf() {\n" , (void *)call->func);if (!ret)return TRACE_TYPE_PARTIAL_LINE ;
PATCH 2/2 tracing/kmemtrace: Use the %pf format
In reply to Frederic WeisbeckerRemove the obsolete seq_print_ip_sym() usage and replace it by the %pf format in order to print function symbols.
--- kernel/trace/kmemtrace.c | 25 +++++-------------------- 1 files changed, 5 insertions(+), 20 deletions(-)
kernel/trace/kmemtrace.c +5 -20
@@ -389,19 +389,12 @@ kmemtrace_print_alloc_compress(struct trace_iterator *iter)if (!ret)return TRACE_TYPE_PARTIAL_LINE ; -/* Node */ - ret =trace_seq_printf (s,"%4d " , entry->node); +/* Node and call site*/ + ret =trace_seq_printf (s,"%4d %pf\n" , entry->node, + (void *)entry->call_site);if (!ret)return TRACE_TYPE_PARTIAL_LINE ; -/* Call site */ - ret =seq_print_ip_sym (s, entry->call_site,0 ); -if (!ret) -return TRACE_TYPE_PARTIAL_LINE ; - -if (!trace_seq_printf (s,"\n" )) -return TRACE_TYPE_PARTIAL_LINE ; -return TRACE_TYPE_HANDLED ; }
@@ -447,19 +440,11 @@ kmemtrace_print_free_compress(struct trace_iterator *iter)if (!ret)return TRACE_TYPE_PARTIAL_LINE ; -/* Skip node */ - ret =trace_seq_printf (s," " ); +/* Skip node and print call site*/ + ret =trace_seq_printf (s," %pf\n" , (void *)entry->call_site);if (!ret)return TRACE_TYPE_PARTIAL_LINE ; -/* Call site */ - ret =seq_print_ip_sym (s, entry->call_site,0 ); -if (!ret) -return TRACE_TYPE_PARTIAL_LINE ; - -if (!trace_seq_printf (s,"\n" )) -return TRACE_TYPE_PARTIAL_LINE ; -return TRACE_TYPE_HANDLED ; }
Signature · 1 line
1.6.2.3
Re: [PATCH 2/2] tracing/kmemtrace: Use the %pf format
Quoted 4 lines · Frederic Weisbecker
Remove the obsolete
seq_print_ip_sym()usage and replace it by the %pf format in order to print function symbols.Signed-off-by Frederic Weisbecker <[email protected]>
...
kernel/trace/kmemtrace.c kmemtrace_print_free_compress(struct trace_iterator *iter) · line 443
Quoted 3 lines
kernel/trace/kmemtrace.c +1
-2-/* Skip node */ - ret =trace_seq_printf (s," " ); +/* Skip node and print call site*/
a nitpick:
missing a space before '*/'
Quoted 1 line
kernel/trace/kmemtrace.c +1
-0+ ret =trace_seq_printf (s," %pf\n" , (void *)entry->call_site);
[tip:tracing/core] tracing/kmemtrace: Use the %pf format
In reply to Frederic WeisbeckerCommit-ID: 6a167c655858cbec4175532fd00417661c87f149 Gitweb: http://git.kernel.org/tip/6a167c655858cbec4175532fd00417661c87f149 Author: Frederic Weisbecker <[email protected]> AuthorDate: Thu, 9 Jul 2009 04:46:30 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 10 Jul 2009 12:07:20 +0200
tracing/kmemtrace: Use the %pf format
Remove the obsolete seq_print_ip_sym() usage and replace it by the %pf format in order to print function symbols.
LKML-Reference: <[email protected]>
--- kernel/trace/kmemtrace.c | 25 +++++-------------------- 1 files changed, 5 insertions(+), 20 deletions(-)
kernel/trace/kmemtrace.c +5 -20
@@ -389,19 +389,12 @@ kmemtrace_print_alloc_compress(struct trace_iterator *iter)if (!ret)return TRACE_TYPE_PARTIAL_LINE ; -/* Node */ - ret =trace_seq_printf (s,"%4d " , entry->node); +/* Node and call site*/ + ret =trace_seq_printf (s,"%4d %pf\n" , entry->node, + (void *)entry->call_site);if (!ret)return TRACE_TYPE_PARTIAL_LINE ; -/* Call site */ - ret =seq_print_ip_sym (s, entry->call_site,0 ); -if (!ret) -return TRACE_TYPE_PARTIAL_LINE ; - -if (!trace_seq_printf (s,"\n" )) -return TRACE_TYPE_PARTIAL_LINE ; -return TRACE_TYPE_HANDLED ; }
@@ -447,19 +440,11 @@ kmemtrace_print_free_compress(struct trace_iterator *iter)if (!ret)return TRACE_TYPE_PARTIAL_LINE ; -/* Skip node */ - ret =trace_seq_printf (s," " ); +/* Skip node and print call site*/ + ret =trace_seq_printf (s," %pf\n" , (void *)entry->call_site);if (!ret)return TRACE_TYPE_PARTIAL_LINE ; -/* Call site */ - ret =seq_print_ip_sym (s, entry->call_site,0 ); -if (!ret) -return TRACE_TYPE_PARTIAL_LINE ; - -if (!trace_seq_printf (s,"\n" )) -return TRACE_TYPE_PARTIAL_LINE ; -return TRACE_TYPE_HANDLED ; }