aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-10-18 10:28:32 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-26 02:24:35 -0500
commit567eea578016f181968f76f9e81bc98ecf231ae9 (patch)
tree335614dcd9264ee8d72807dff53e9290dcc423de /tools
parentd622b626270ae58c0d40c55a97170ac464c9063a (diff)
perf trace: Use the syscall raw_syscalls:sys_enter timestamp
commit ecf1e2253ea79c6204f4d6a5e756e8fb4aed5a7e upstream. Instead of the one when another syscall takes place while another is being processed (in another CPU, but we show it serialized, so need to "interrupt" the other), and also when finally showing the sys_enter + sys_exit + duration, where we were showing the sample->time for the sys_exit, duh. Before: # perf trace sleep 1 <SNIP> 0.373 ( 0.001 ms): close(fd: 3 ) = 0 1000.626 (1000.211 ms): nanosleep(rqtp: 0x7ffd6ddddfb0) = 0 1000.653 ( 0.003 ms): close(fd: 1 ) = 0 1000.657 ( 0.002 ms): close(fd: 2 ) = 0 1000.667 ( 0.000 ms): exit_group( ) # After: # perf trace sleep 1 <SNIP> 0.336 ( 0.001 ms): close(fd: 3 ) = 0 0.373 (1000.086 ms): nanosleep(rqtp: 0x7ffe303e9550) = 0 1000.481 ( 0.002 ms): close(fd: 1 ) = 0 1000.485 ( 0.001 ms): close(fd: 2 ) = 0 1000.494 ( 0.000 ms): exit_group( ) [root@jouet linux]# Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-ecbzgmu2ni6glc6zkw8p1zmx@git.kernel.org Fixes: 752fde44fd1c ("perf trace: Support interrupted syscalls") Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-trace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index c298bd3e1d90..21f8a81797a0 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1452,7 +1452,7 @@ static int trace__printf_interrupted_entry(struct trace *trace, struct perf_samp
1452 1452
1453 duration = sample->time - ttrace->entry_time; 1453 duration = sample->time - ttrace->entry_time;
1454 1454
1455 printed = trace__fprintf_entry_head(trace, trace->current, duration, sample->time, trace->output); 1455 printed = trace__fprintf_entry_head(trace, trace->current, duration, ttrace->entry_time, trace->output);
1456 printed += fprintf(trace->output, "%-70s) ...\n", ttrace->entry_str); 1456 printed += fprintf(trace->output, "%-70s) ...\n", ttrace->entry_str);
1457 ttrace->entry_pending = false; 1457 ttrace->entry_pending = false;
1458 1458
@@ -1499,7 +1499,7 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,
1499 1499
1500 if (sc->is_exit) { 1500 if (sc->is_exit) {
1501 if (!(trace->duration_filter || trace->summary_only || trace->min_stack)) { 1501 if (!(trace->duration_filter || trace->summary_only || trace->min_stack)) {
1502 trace__fprintf_entry_head(trace, thread, 1, sample->time, trace->output); 1502 trace__fprintf_entry_head(trace, thread, 1, ttrace->entry_time, trace->output);
1503 fprintf(trace->output, "%-70s)\n", ttrace->entry_str); 1503 fprintf(trace->output, "%-70s)\n", ttrace->entry_str);
1504 } 1504 }
1505 } else { 1505 } else {
@@ -1592,7 +1592,7 @@ static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,
1592 if (trace->summary_only) 1592 if (trace->summary_only)
1593 goto out; 1593 goto out;
1594 1594
1595 trace__fprintf_entry_head(trace, thread, duration, sample->time, trace->output); 1595 trace__fprintf_entry_head(trace, thread, duration, ttrace->entry_time, trace->output);
1596 1596
1597 if (ttrace->entry_pending) { 1597 if (ttrace->entry_pending) {
1598 fprintf(trace->output, "%-70s", ttrace->entry_str); 1598 fprintf(trace->output, "%-70s", ttrace->entry_str);