aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 28c86e21fad9..5549cee61680 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1108,6 +1108,7 @@ struct syscall {
1108 struct event_format *tp_format; 1108 struct event_format *tp_format;
1109 const char *name; 1109 const char *name;
1110 bool filtered; 1110 bool filtered;
1111 bool is_exit;
1111 struct syscall_fmt *fmt; 1112 struct syscall_fmt *fmt;
1112 size_t (**arg_scnprintf)(char *bf, size_t size, struct syscall_arg *arg); 1113 size_t (**arg_scnprintf)(char *bf, size_t size, struct syscall_arg *arg);
1113 void **arg_parm; 1114 void **arg_parm;
@@ -1473,6 +1474,8 @@ static int trace__read_syscall_info(struct trace *trace, int id)
1473 if (sc->tp_format == NULL) 1474 if (sc->tp_format == NULL)
1474 return -1; 1475 return -1;
1475 1476
1477 sc->is_exit = !strcmp(name, "exit_group") || !strcmp(name, "exit");
1478
1476 return syscall__set_arg_fmts(sc); 1479 return syscall__set_arg_fmts(sc);
1477} 1480}
1478 1481
@@ -1643,7 +1646,7 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,
1643 printed += syscall__scnprintf_args(sc, msg + printed, 1024 - printed, 1646 printed += syscall__scnprintf_args(sc, msg + printed, 1024 - printed,
1644 args, trace, thread); 1647 args, trace, thread);
1645 1648
1646 if (!strcmp(sc->name, "exit_group") || !strcmp(sc->name, "exit")) { 1649 if (sc->is_exit) {
1647 if (!trace->duration_filter && !trace->summary_only) { 1650 if (!trace->duration_filter && !trace->summary_only) {
1648 trace__fprintf_entry_head(trace, thread, 1, sample->time, trace->output); 1651 trace__fprintf_entry_head(trace, thread, 1, sample->time, trace->output);
1649 fprintf(trace->output, "%-70s\n", ttrace->entry_str); 1652 fprintf(trace->output, "%-70s\n", ttrace->entry_str);