perf trace: Fix summary_only option
PATCH 1/1 perf trace: Fix summary_only option
The intent of the -s/--summary-only option is to just show a summary of the system calls and statistics without any of the individual events. Commit e596663ebb2 broke that by showing the interrupted lines:
perf trace -i perf.data -s
...
0.741 ( 0.000 ms): sleep/31316 fstat(fd: 4, statbuf: 0x7ffc75ceb830 ) ...
0.744 ( 0.000 ms): sleep/31316 mmap(len: 100244, prot: READ, flags: PRIVATE, fd: 4 ) ...
0.747 ( 0.000 ms): perf/31315 write(fd: 3, buf: 0x7d4bb0, count: 8 ) ......
Fix by checking for the summary only option.
--- tools/perf/builtin-trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/builtin-trace.c +2 -1
@@ -1724,7 +1724,8 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,return -1 ; } - printed +=trace__printf_interrupted_entry (trace, sample); +if (!trace->summary_only) + printed +=trace__printf_interrupted_entry (trace, sample); ttrace->entry_time = sample->time; msg = ttrace->entry_str;
Signature · 1 line
2.2.1
Em Thu, Mar 19, 2015 at 12:23:03PM -0600, David Ahern escreveu:
Quoted 4 lines
The intent of the -s/--summary-only option is to just show a summary of the system calls and statistics without any of the individual events. Commit
e596663ebb2broke that by showing the interrupted lines:
Quoted 8 lines
perf trace -i perf.data -s
...0.741 ( 0.000 ms): sleep/31316 fstat(fd: 4, statbuf: 0x7ffc75ceb830 ) ... 0.744 ( 0.000 ms): sleep/31316 mmap(len: 100244, prot: READ, flags: PRIVATE, fd: 4 ) ... 0.747 ( 0.000 ms): perf/31315 write(fd: 3, buf: 0x7d4bb0, count: 8 ) ......
Fix by checking for the summary only option.
Thanks, applied.
- Arnaldo
tip-bot for David Ahern
merge botperf trace: Fix summary_only option
Commit-ID: 13f22a2d4a5359867aa05562fc922f1ca24873a5 Gitweb: http://git.kernel.org/tip/13f22a2d4a5359867aa05562fc922f1ca24873a5 Author: David Ahern <[email protected]> AuthorDate: Thu, 19 Mar 2015 12:23:03 -0600 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Sat, 21 Mar 2015 14:53:31 -0300
perf trace: Fix summary_only option
The intent of the -s/--summary-only option is to just show a summary of the system calls and statistics without any of the individual events. Commit e596663ebb2 broke that by showing the interrupted lines:
perf trace -i perf.data -s
...
0.741 ( 0.000 ms): sleep/31316 fstat(fd: 4, statbuf: 0x7ffc75ceb830 ) ...
0.744 ( 0.000 ms): sleep/31316 mmap(len: 100244, prot: READ, flags: PRIVATE, fd: 4 ) ...
0.747 ( 0.000 ms): perf/31315 write(fd: 3, buf: 0x7d4bb0, count: 8 ) ......
Fix by checking for the summary only option.
--- tools/perf/builtin-trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/builtin-trace.c +2 -1
@@ -1724,7 +1724,8 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,return -1 ; } - printed +=trace__printf_interrupted_entry (trace, sample); +if (!trace->summary_only) + printed +=trace__printf_interrupted_entry (trace, sample); ttrace->entry_time = sample->time; msg = ttrace->entry_str;