perf/urgent fixes
Arnaldo Carvalho de Melo
maintainerHi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit 8cc67c3b9366699b35775912e0bb91b4f845a57a:
Merge tag 'perf-urgent-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2015-05-01 08:30:26 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
for you to fetch changes up to e59d29e88f7b7e3d1231202b0203d0af6f15a440:
perf probe: Fix segfault if passed with ''. (2015-05-05 12:26:52 -0300)
----------------------------------------------------------------
perf/urgent fixes:
- Fix 'perf probe -a' segfault if passed with '' (Wang Nan)
- Fix report -T/--threads option (Namhyung Kim)
----------------------------------------------------------------
Namhyung Kim (1):
perf report: Fix -T/--threads option to work again
Wang Nan (1):
perf probe: Fix segfault if passed with ''.
tools/perf/builtin-report.c | 2 +- tools/perf/util/probe-event.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
Arnaldo Carvalho de Melo
maintainerPATCH 1/2 perf report: Fix -T/--threads option to work again
From: Namhyung Kim <[email protected]>
The commit 512ae1bd6acb ("perf tools: Consolidate management of default sort orders") changed default value of the 'sort_order' variable to NULL indicating that users don't set any sort keys on the command line.
However it missed to update a check in perf_evlist__tty_browse_hists() so that 'perf report -T' cannot show the per-thread values after the normal output. This patch fixes it to work again.
Note that the -T option only works on --stdio and neither --sort nor --parent option was given.
--- tools/perf/builtin-report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-report.c +1 -1
@@ -329,7 +329,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,fprintf (stdout,"\n\n" ); } -if (sort_order == default_sort_order && +if (sort_order ==NULL && parent_pattern == default_parent_pattern) {fprintf (stdout,"#\n# (%s)\n#\n" , help);
Signature · 1 line
2.1.0
Arnaldo Carvalho de Melo
maintainerPATCH 2/2 perf probe: Fix segfault if passed with ''.
In reply to Arnaldo Carvalho de MeloFrom: Wang Nan <[email protected]>
Since parse_perf_probe_point() deals with a user passed argument, we should not assume it to be a valid string.
Without this patch, if pass '' to perf probe, a segfault raises:
$ perf probe -a '' Segmentation fault
This patch checks argument of parse_perf_probe_point() before string processing.
After this patch:
$ perf probe -a ''
usage: perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]
or: perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]
...--- tools/perf/util/probe-event.c | 2 ++ 1 file changed, 2 insertions(+)
tools/perf/util/probe-event.c +2 -0
@@ -1084,6 +1084,8 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)* * TODO:Group name support */ +if (!arg) +return -EINVAL ; ptr =strpbrk (arg,";=@+%" );if (ptr && *ptr =='=' ) {/* Event name */
Signature · 1 line
2.1.0
Quoted 31 lines · Arnaldo Carvalho de Melo
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit
8cc67c3b9366699b35775912e0bb91b4f845a57a:Merge tag 'perf-urgent-for-mingo-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linuxinto perf/urgent (2015-05-01 08:30:26 +0200)are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.gittags/perf-urgent-for-mingofor you to fetch changes up to
e59d29e88f7b7e3d1231202b0203d0af6f15a440:perf probe: Fix segfault if passed with ''. (2015-05-05 12:26:52 -0300)
----------------------------------------------------------------
perf/urgent fixes:- Fix 'perf probe -a' segfault if passed with '' (Wang Nan)
- Fix report -T/--threads option (Namhyung Kim)
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>----------------------------------------------------------------
Namhyung Kim (1):
perf report: Fix -T/--threads option to work again
Quoted 6 lines
Wang Nan (1):
perf probe: Fix segfault if passed with ''.tools/perf/builtin-report.c | 2 +- tools/perf/util/probe-event.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
Pulled, thanks Arnaldo!
Ingo