[PATCH 5/5] perf trace: Add beautifier for clock_gettime's clk_id argument - v2
Before: 0.030 ( 0.002 ms): 2571 clock_gettime(which_clock: 1, tp: 0x7f3b45729cd0 ) = 0 After: 0.030 ( 0.002 ms): 2571 clock_gettime(which_clock: MONOTONIC, tp: 0x7f3b45729cd0 ) = 0 v2: Update to use the STRARRAY option Signed-off-by: David Ahern Cc: Adrian Hunter Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian --- tools/perf/builtin-trace.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index f61c968..636a506 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -280,6 +280,12 @@ static DEFINE_STRARRAY(rlimit_resources); static const char *sighow[] = { "BLOCK", "UNBLOCK", "SETMASK", }; static DEFINE_STRARRAY(sighow); +static const char *clockid[] = { + "REALTIME", "MONOTONIC", "PROCESS_CPUTIME_ID", "THREAD_CPUTIME_ID", + "MONOTONIC_RAW", "REALTIME_COARSE", "MONOTONIC_COARSE", +}; +static DEFINE_STRARRAY(clockid); + static const char *socket_families[] = { "UNSPEC", "LOCAL", "INET", "AX25", "IPX", "APPLETALK", "NETROM", "BRIDGE", "ATMPVC", "X25", "INET6", "ROSE", "DECnet", "NETBEUI", @@ -566,6 +572,7 @@ static struct syscall_fmt { { .name = "arch_prctl", .errmsg = true, .alias = "prctl", }, { .name = "brk",.hexret = true, .arg_scnprintf = { [0] = SCA_HEX, /* brk */ }, }, + { .name = "clock_gettime", .errmsg = true, STRARRAY(0, clk_id, clockid), }, { .name = "connect",.errmsg = true, }, { .name = "epoll_ctl", .errmsg = true, STRARRAY(1, op, epoll_ctl_ops), }, { .name = "eventfd2", .errmsg = true, -- 1.7.10.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 5/5] perf trace: Add beautifier for clock_gettime's clk_id argument - v2
Before: 0.030 ( 0.002 ms): 2571 clock_gettime(which_clock: 1, tp: 0x7f3b45729cd0 ) = 0 After: 0.030 ( 0.002 ms): 2571 clock_gettime(which_clock: MONOTONIC, tp: 0x7f3b45729cd0 ) = 0 v2: Update to use the STRARRAY option Signed-off-by: David Ahern dsah...@gmail.com Cc: Adrian Hunter adrian.hun...@intel.com Cc: Frederic Weisbecker fweis...@gmail.com Cc: Jiri Olsa jo...@redhat.com Cc: Mike Galbraith efa...@gmx.de Cc: Paul Mackerras pau...@samba.org Cc: Peter Zijlstra pet...@infradead.org Cc: Stephane Eranian eran...@google.com --- tools/perf/builtin-trace.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index f61c968..636a506 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -280,6 +280,12 @@ static DEFINE_STRARRAY(rlimit_resources); static const char *sighow[] = { BLOCK, UNBLOCK, SETMASK, }; static DEFINE_STRARRAY(sighow); +static const char *clockid[] = { + REALTIME, MONOTONIC, PROCESS_CPUTIME_ID, THREAD_CPUTIME_ID, + MONOTONIC_RAW, REALTIME_COARSE, MONOTONIC_COARSE, +}; +static DEFINE_STRARRAY(clockid); + static const char *socket_families[] = { UNSPEC, LOCAL, INET, AX25, IPX, APPLETALK, NETROM, BRIDGE, ATMPVC, X25, INET6, ROSE, DECnet, NETBEUI, @@ -566,6 +572,7 @@ static struct syscall_fmt { { .name = arch_prctl, .errmsg = true, .alias = prctl, }, { .name = brk,.hexret = true, .arg_scnprintf = { [0] = SCA_HEX, /* brk */ }, }, + { .name = clock_gettime, .errmsg = true, STRARRAY(0, clk_id, clockid), }, { .name = connect,.errmsg = true, }, { .name = epoll_ctl, .errmsg = true, STRARRAY(1, op, epoll_ctl_ops), }, { .name = eventfd2, .errmsg = true, -- 1.7.10.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/