perf probe usability related fixes.
PATCH 1/1 perf probe usability related fixes.
From: Srikar Dronamraju <[email protected]>
Ingo pointed out few perf probe usability related errors during his review of uprobes.
Since these issues are independent of uprobes, fixing them in a separate patch.
--- tools/perf/util/probe-event.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/util/probe-event.c +3 -3
@@ -1825,7 +1825,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev, } ret =0 ; -printf ("Add new event%s\n" , (ntevs >1 ) ?"s:" :":" ); +printf ("Added new event%s\n" , (ntevs >1 ) ?"s:" :":" );for (i =0 ; i < ntevs; i++) { tev = &tevs[i];if (pev->event)
@@ -1880,7 +1880,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,if (ret >=0 ) {/* Show how to use the event. */ -printf ("\nYou can now use it on all perf tools, such as:\n\n" ); +printf ("\nYou can now use it in all perf tools, such as:\n\n" );printf ("\tperf record -e %s:%s -aR sleep 1\n\n" , tev->group, tev->event); }
@@ -2063,7 +2063,7 @@ static int __del_trace_probe_event(int fd, struct str_node *ent) goto error; } -printf ("Remove event: %s\n" , ent->s); +printf ("Removed event: %s\n" , ent->s);return 0 ; error:pr_warning ("Failed to delete event: %s\n" ,strerror (-ret));
Quoted 19 lines · Srikar Dronamraju
From: Srikar Dronamraju <[email protected]>
Ingo pointed out few perf probe usability related errors during his review of uprobes.
Since these issues are independent of uprobes, fixing them in a separate patch.
Suggested-by Ingo Molnar <[email protected]>Signed-off-by Srikar Dronamraju <[email protected]>--- tools/perf/util/probe-event.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)tools/perf/util/probe-event.c +0
-0
tools/perf/util/probe-event.c static int __add_probe_trace_events(struct perf_probe_event *pev, · line 1828
Quoted 5 lines
tools/perf/util/probe-event.c +1
-1@@ -1825,7 +1825,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev, } ret =0 ; -printf ("Add new event%s\n" , (ntevs >1 ) ?"s:" :":" ); +printf ("Added new event%s\n" , (ntevs >1 ) ?"s:" :":" );
It's not past tense until after write_probe_trace_event() right? Where the message is now you can get an error message after that printf.
David
Quoted 10 lines · Srikar Dronamraju
From: Srikar Dronamraju <[email protected]>
Ingo pointed out few perf probe usability related errors during his review of uprobes.
Since these issues are independent of uprobes, fixing them in a separate patch.
Suggested-by Ingo Molnar <[email protected]>Signed-off-by Srikar Dronamraju <[email protected]>
Thanks!
Quoted 36 lines
--- tools/perf/util/probe-event.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)tools/perf/util/probe-event.c +3
-3@@ -1825,7 +1825,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev, } ret =0 ; -printf ("Add new event%s\n" , (ntevs >1 ) ?"s:" :":" ); +printf ("Added new event%s\n" , (ntevs >1 ) ?"s:" :":" );for (i =0 ; i < ntevs; i++) { tev = &tevs[i];if (pev->event)@@ -1880,7 +1880,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,if (ret >=0 ) {/* Show how to use the event. */ -printf ("\nYou can now use it on all perf tools, such as:\n\n" ); +printf ("\nYou can now use it in all perf tools, such as:\n\n" );printf ("\tperf record -e %s:%s -aR sleep 1\n\n" , tev->group, tev->event); }@@ -2063,7 +2063,7 @@ static int __del_trace_probe_event(int fd, struct str_node *ent) goto error; } -printf ("Remove event: %s\n" , ent->s); +printf ("Removed event: %s\n" , ent->s);return 0 ; error:pr_warning ("Failed to delete event: %s\n" ,strerror (-ret));
Signature · 4 lines
Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: [email protected]
[tip:perf/core] perf probe: Usability fixes
In reply to Srikar DronamrajuCommit-ID: a844d1ef09872a8b8c66d431edd1b8a943e51c7a Gitweb: http://git.kernel.org/tip/a844d1ef09872a8b8c66d431edd1b8a943e51c7a Author: Srikar Dronamraju <[email protected]> AuthorDate: Fri, 20 Jan 2012 17:43:54 +0530 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 24 Jan 2012 20:31:02 -0200
perf probe: Usability fixes
Ingo pointed out few perf probe usability related errors during his review of uprobes.
Since these issues are independent of uprobes, fixing them in a separate patch.
--- tools/perf/util/probe-event.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/util/probe-event.c +3 -3
@@ -1729,7 +1729,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev, } ret =0 ; -printf ("Add new event%s\n" , (ntevs >1 ) ?"s:" :":" ); +printf ("Added new event%s\n" , (ntevs >1 ) ?"s:" :":" );for (i =0 ; i < ntevs; i++) { tev = &tevs[i];if (pev->event)
@@ -1784,7 +1784,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,if (ret >=0 ) {/* Show how to use the event. */ -printf ("\nYou can now use it on all perf tools, such as:\n\n" ); +printf ("\nYou can now use it in all perf tools, such as:\n\n" );printf ("\tperf record -e %s:%s -aR sleep 1\n\n" , tev->group, tev->event); }
@@ -1959,7 +1959,7 @@ static int __del_trace_probe_event(int fd, struct str_node *ent) goto error; } -printf ("Remove event: %s\n" , ent->s); +printf ("Removed event: %s\n" , ent->s);return 0 ; error:pr_warning ("Failed to delete event: %s\n" ,strerror (-ret));