aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-trace.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 9e23660d96eb..b2038fdefca1 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -22,13 +22,18 @@ static struct syscall_fmt {
22 const char *alias; 22 const char *alias;
23 bool errmsg; 23 bool errmsg;
24 bool timeout; 24 bool timeout;
25 bool hexret;
25} syscall_fmts[] = { 26} syscall_fmts[] = {
26 { .name = "access", .errmsg = true, }, 27 { .name = "access", .errmsg = true, },
27 { .name = "arch_prctl", .errmsg = true, .alias = "prctl", }, 28 { .name = "arch_prctl", .errmsg = true, .alias = "prctl", },
29 { .name = "brk", .hexret = true, },
30 { .name = "mmap", .hexret = true, },
28 { .name = "connect", .errmsg = true, }, 31 { .name = "connect", .errmsg = true, },
29 { .name = "fstat", .errmsg = true, .alias = "newfstat", }, 32 { .name = "fstat", .errmsg = true, .alias = "newfstat", },
30 { .name = "fstatat", .errmsg = true, .alias = "newfstatat", }, 33 { .name = "fstatat", .errmsg = true, .alias = "newfstatat", },
31 { .name = "futex", .errmsg = true, }, 34 { .name = "futex", .errmsg = true, },
35 { .name = "mmap", .hexret = true, },
36 { .name = "mremap", .hexret = true, },
32 { .name = "open", .errmsg = true, }, 37 { .name = "open", .errmsg = true, },
33 { .name = "poll", .errmsg = true, .timeout = true, }, 38 { .name = "poll", .errmsg = true, .timeout = true, },
34 { .name = "ppoll", .errmsg = true, .timeout = true, }, 39 { .name = "ppoll", .errmsg = true, .timeout = true, },
@@ -475,6 +480,8 @@ signed_print:
475 fprintf(trace->output, ") = -1 %s %s", e, emsg); 480 fprintf(trace->output, ") = -1 %s %s", e, emsg);
476 } else if (ret == 0 && sc->fmt->timeout) 481 } else if (ret == 0 && sc->fmt->timeout)
477 fprintf(trace->output, ") = 0 Timeout"); 482 fprintf(trace->output, ") = 0 Timeout");
483 else if (sc->fmt->hexret)
484 fprintf(trace->output, ") = %#x", ret);
478 else 485 else
479 goto signed_print; 486 goto signed_print;
480 487