* [PATCH 0/5] perf tool: Various fixes and version 2 on clock_gettime
@ 2013-09-23 1:44 David Ahern
2013-09-23 1:44 ` [PATCH 1/5] perf trace: Handle MSG_WAITFORONE not defined David Ahern
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: David Ahern @ 2013-09-23 1:44 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: David Ahern
Arnaldo:
Various bug fixes hit working on the mmap write change and version 2 on the
clock_gettime beautifier. One other problem I was not able to resolve is
with perf-trace not displaying comms when processing files. eg.,
0.025 ( 0.000 ms): :7137/7137 ... [continued]: ioctl()) = 0
0.045 ( 0.014 ms): :7137/7137 ioctl(fd: 14, cmd: 44672 ) = 0
0.055 ( 0.008 ms): :7137/7137 ioctl(fd: 14, cmd: 44672
Other commands like perf-script display comms just fine, so it is something
about perf-trace.
David Ahern (5):
perf trace: Handle MSG_WAITFORONE not defined
perf tool: Explicitly add libdl dependency
perf trace: Add mmap2 handler
perf tool: Add default handler for mmap2 events
perf trace: Add beautifier for clock_gettime's clk_id argument - v2
tools/perf/builtin-trace.c | 11 +++++++++++
tools/perf/config/Makefile | 2 +-
tools/perf/util/session.c | 2 ++
3 files changed, 14 insertions(+), 1 deletion(-)
--
1.7.10.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/5] perf trace: Handle MSG_WAITFORONE not defined
2013-09-23 1:44 [PATCH 0/5] perf tool: Various fixes and version 2 on clock_gettime David Ahern
@ 2013-09-23 1:44 ` David Ahern
2013-10-15 5:28 ` [tip:perf/core] " tip-bot for David Ahern
2013-09-23 1:44 ` [PATCH 2/5] perf tool: Explicitly add libdl dependency David Ahern
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: David Ahern @ 2013-09-23 1:44 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: David Ahern
Needed for compiles on Fedora 12 for example.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/perf/builtin-trace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index f869c87..9c7f017 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -340,6 +340,9 @@ static size_t syscall_arg__scnprintf_socket_type(char *bf, size_t size,
#ifndef MSG_PROBE
#define MSG_PROBE 0x10
#endif
+#ifndef MSG_WAITFORONE
+#define MSG_WAITFORONE 0x10000
+#endif
#ifndef MSG_SENDPAGE_NOTLAST
#define MSG_SENDPAGE_NOTLAST 0x20000
#endif
--
1.7.10.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/5] perf tool: Explicitly add libdl dependency
2013-09-23 1:44 [PATCH 0/5] perf tool: Various fixes and version 2 on clock_gettime David Ahern
2013-09-23 1:44 ` [PATCH 1/5] perf trace: Handle MSG_WAITFORONE not defined David Ahern
@ 2013-09-23 1:44 ` David Ahern
2013-09-25 13:00 ` David Ahern
2013-09-25 18:31 ` [tip:perf/urgent] perf tools: " tip-bot for David Ahern
2013-09-23 1:44 ` [PATCH 3/5] perf trace: Add mmap2 handler David Ahern
` (2 subsequent siblings)
4 siblings, 2 replies; 14+ messages in thread
From: David Ahern @ 2013-09-23 1:44 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: David Ahern
Fixes compile failure on Fedora 12.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/perf/config/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 6850529..85fc870 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -87,7 +87,7 @@ CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -std=gnu99
-EXTLIBS = -lelf -lpthread -lrt -lm
+EXTLIBS = -lelf -lpthread -lrt -lm -ldl
ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
CFLAGS += -fstack-protector-all
--
1.7.10.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/5] perf trace: Add mmap2 handler
2013-09-23 1:44 [PATCH 0/5] perf tool: Various fixes and version 2 on clock_gettime David Ahern
2013-09-23 1:44 ` [PATCH 1/5] perf trace: Handle MSG_WAITFORONE not defined David Ahern
2013-09-23 1:44 ` [PATCH 2/5] perf tool: Explicitly add libdl dependency David Ahern
@ 2013-09-23 1:44 ` David Ahern
2013-09-24 0:22 ` David Ahern
2013-09-25 18:30 ` [tip:perf/urgent] " tip-bot for David Ahern
2013-09-23 1:44 ` [PATCH 4/5] perf tool: Add default handler for mmap2 events David Ahern
2013-09-23 1:45 ` [PATCH 5/5] perf trace: Add beautifier for clock_gettime's clk_id argument - v2 David Ahern
4 siblings, 2 replies; 14+ messages in thread
From: David Ahern @ 2013-09-23 1:44 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: David Ahern
5c5e854b changed perf_event__synthesize_mmap_events to generate MMAP2
events. Since perf-trace does not have a handler for it it dies with a
segfault when trying to process files:
perf trace -i /tmp/perf.data
Segmentation fault
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/perf/builtin-trace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 9c7f017..f61c968 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1383,6 +1383,7 @@ static int trace__replay(struct trace *trace)
trace->tool.sample = trace__process_sample;
trace->tool.mmap = perf_event__process_mmap;
+ trace->tool.mmap2 = perf_event__process_mmap2;
trace->tool.comm = perf_event__process_comm;
trace->tool.exit = perf_event__process_exit;
trace->tool.fork = perf_event__process_fork;
--
1.7.10.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/5] perf tool: Add default handler for mmap2 events
2013-09-23 1:44 [PATCH 0/5] perf tool: Various fixes and version 2 on clock_gettime David Ahern
` (2 preceding siblings ...)
2013-09-23 1:44 ` [PATCH 3/5] perf trace: Add mmap2 handler David Ahern
@ 2013-09-23 1:44 ` David Ahern
2013-10-08 10:40 ` [tip:perf/urgent] perf tools: " tip-bot for David Ahern
2013-09-23 1:45 ` [PATCH 5/5] perf trace: Add beautifier for clock_gettime's clk_id argument - v2 David Ahern
4 siblings, 1 reply; 14+ messages in thread
From: David Ahern @ 2013-09-23 1:44 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: David Ahern
Commands that do not implement an mmap2 handler should at least
not die with a segfault when processing files with MMAP2 events.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/perf/util/session.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 78646da..6c1d444 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -256,6 +256,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
tool->sample = process_event_sample_stub;
if (tool->mmap == NULL)
tool->mmap = process_event_stub;
+ if (tool->mmap2 == NULL)
+ tool->mmap2 = process_event_stub;
if (tool->comm == NULL)
tool->comm = process_event_stub;
if (tool->fork == NULL)
--
1.7.10.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/5] perf trace: Add beautifier for clock_gettime's clk_id argument - v2
2013-09-23 1:44 [PATCH 0/5] perf tool: Various fixes and version 2 on clock_gettime David Ahern
` (3 preceding siblings ...)
2013-09-23 1:44 ` [PATCH 4/5] perf tool: Add default handler for mmap2 events David Ahern
@ 2013-09-23 1:45 ` David Ahern
2013-10-15 5:27 ` [tip:perf/core] perf trace: Add beautifier for clock_gettime' s clk_id argument tip-bot for David Ahern
4 siblings, 1 reply; 14+ messages in thread
From: David Ahern @ 2013-09-23 1:45 UTC (permalink / raw)
To: acme, linux-kernel
Cc: David Ahern, Adrian Hunter, Frederic Weisbecker, Jiri Olsa,
Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian
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 <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@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
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/5] perf trace: Add mmap2 handler
2013-09-23 1:44 ` [PATCH 3/5] perf trace: Add mmap2 handler David Ahern
@ 2013-09-24 0:22 ` David Ahern
2013-09-24 17:16 ` Arnaldo Carvalho de Melo
2013-09-25 18:30 ` [tip:perf/urgent] " tip-bot for David Ahern
1 sibling, 1 reply; 14+ messages in thread
From: David Ahern @ 2013-09-24 0:22 UTC (permalink / raw)
To: acme; +Cc: linux-kernel
Arnaldo:
I see this is you perf core tree; the problem exists in Linus' tree so
it is needed in your urgent tree as well.
David
On 9/22/13 7:44 PM, David Ahern wrote:
> 5c5e854b changed perf_event__synthesize_mmap_events to generate MMAP2
> events. Since perf-trace does not have a handler for it it dies with a
> segfault when trying to process files:
>
> perf trace -i /tmp/perf.data
> Segmentation fault
>
> Signed-off-by: David Ahern <dsahern@gmail.com>
> ---
> tools/perf/builtin-trace.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index 9c7f017..f61c968 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -1383,6 +1383,7 @@ static int trace__replay(struct trace *trace)
>
> trace->tool.sample = trace__process_sample;
> trace->tool.mmap = perf_event__process_mmap;
> + trace->tool.mmap2 = perf_event__process_mmap2;
> trace->tool.comm = perf_event__process_comm;
> trace->tool.exit = perf_event__process_exit;
> trace->tool.fork = perf_event__process_fork;
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/5] perf trace: Add mmap2 handler
2013-09-24 0:22 ` David Ahern
@ 2013-09-24 17:16 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-09-24 17:16 UTC (permalink / raw)
To: David Ahern; +Cc: linux-kernel
Em Mon, Sep 23, 2013 at 06:22:37PM -0600, David Ahern escreveu:
> Arnaldo:
>
> I see this is you perf core tree; the problem exists in Linus' tree
> so it is needed in your urgent tree as well.
Sure, reproduced the segfault, cherry picked this patch from perf/core,
segfault fixes, thanks.
- Arnaldo
> David
>
> On 9/22/13 7:44 PM, David Ahern wrote:
> >5c5e854b changed perf_event__synthesize_mmap_events to generate MMAP2
> >events. Since perf-trace does not have a handler for it it dies with a
> >segfault when trying to process files:
> >
> >perf trace -i /tmp/perf.data
> >Segmentation fault
> >
> >Signed-off-by: David Ahern <dsahern@gmail.com>
> >---
> > tools/perf/builtin-trace.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> >diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> >index 9c7f017..f61c968 100644
> >--- a/tools/perf/builtin-trace.c
> >+++ b/tools/perf/builtin-trace.c
> >@@ -1383,6 +1383,7 @@ static int trace__replay(struct trace *trace)
> >
> > trace->tool.sample = trace__process_sample;
> > trace->tool.mmap = perf_event__process_mmap;
> >+ trace->tool.mmap2 = perf_event__process_mmap2;
> > trace->tool.comm = perf_event__process_comm;
> > trace->tool.exit = perf_event__process_exit;
> > trace->tool.fork = perf_event__process_fork;
> >
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/5] perf tool: Explicitly add libdl dependency
2013-09-23 1:44 ` [PATCH 2/5] perf tool: Explicitly add libdl dependency David Ahern
@ 2013-09-25 13:00 ` David Ahern
2013-09-25 18:31 ` [tip:perf/urgent] perf tools: " tip-bot for David Ahern
1 sibling, 0 replies; 14+ messages in thread
From: David Ahern @ 2013-09-25 13:00 UTC (permalink / raw)
To: acme; +Cc: linux-kernel
Arnaldo:
I am not seeing this one in your tree. Any objections to it? It is
required to fix static compiles. e.g.,
make LDFLAGS=-static NO_LIBPYTHON=1 NO_LIBPERL=1
David
On 9/22/13 7:44 PM, David Ahern wrote:
> Fixes compile failure on Fedora 12.
>
> Signed-off-by: David Ahern <dsahern@gmail.com>
> ---
> tools/perf/config/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
> index 6850529..85fc870 100644
> --- a/tools/perf/config/Makefile
> +++ b/tools/perf/config/Makefile
> @@ -87,7 +87,7 @@ CFLAGS += -Wall
> CFLAGS += -Wextra
> CFLAGS += -std=gnu99
>
> -EXTLIBS = -lelf -lpthread -lrt -lm
> +EXTLIBS = -lelf -lpthread -lrt -lm -ldl
>
> ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
> CFLAGS += -fstack-protector-all
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [tip:perf/urgent] perf trace: Add mmap2 handler
2013-09-23 1:44 ` [PATCH 3/5] perf trace: Add mmap2 handler David Ahern
2013-09-24 0:22 ` David Ahern
@ 2013-09-25 18:30 ` tip-bot for David Ahern
1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for David Ahern @ 2013-09-25 18:30 UTC (permalink / raw)
To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, dsahern, tglx
Commit-ID: 384c671e33a7ddf905f2c60b433b9883f0e5a605
Gitweb: http://git.kernel.org/tip/384c671e33a7ddf905f2c60b433b9883f0e5a605
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Sun, 22 Sep 2013 19:44:58 -0600
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 24 Sep 2013 14:15:51 -0300
perf trace: Add mmap2 handler
5c5e854b changed perf_event__synthesize_mmap_events to generate MMAP2
events. Since perf-trace does not have a handler for it it dies with a
segfault when trying to process files:
perf trace -i /tmp/perf.data
Segmentation fault
Signed-off-by: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1379900700-5186-4-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-trace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index fd48534..71aa3e3 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1055,6 +1055,7 @@ static int trace__replay(struct trace *trace)
trace->tool.sample = trace__process_sample;
trace->tool.mmap = perf_event__process_mmap;
+ trace->tool.mmap2 = perf_event__process_mmap2;
trace->tool.comm = perf_event__process_comm;
trace->tool.exit = perf_event__process_exit;
trace->tool.fork = perf_event__process_fork;
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [tip:perf/urgent] perf tools: Explicitly add libdl dependency
2013-09-23 1:44 ` [PATCH 2/5] perf tool: Explicitly add libdl dependency David Ahern
2013-09-25 13:00 ` David Ahern
@ 2013-09-25 18:31 ` tip-bot for David Ahern
1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for David Ahern @ 2013-09-25 18:31 UTC (permalink / raw)
To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, dsahern, tglx
Commit-ID: 6d19912c9bc0ae0ba5f7dd32c714ea7cc3339c81
Gitweb: http://git.kernel.org/tip/6d19912c9bc0ae0ba5f7dd32c714ea7cc3339c81
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Sun, 22 Sep 2013 19:44:57 -0600
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 25 Sep 2013 12:39:27 -0300
perf tools: Explicitly add libdl dependency
Fixes compile failure on Fedora 12.
Signed-off-by: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1379900700-5186-3-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/config/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 346ee92..5f6f9b3 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -87,7 +87,7 @@ CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -std=gnu99
-EXTLIBS = -lelf -lpthread -lrt -lm
+EXTLIBS = -lelf -lpthread -lrt -lm -ldl
ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
CFLAGS += -fstack-protector-all
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [tip:perf/urgent] perf tools: Add default handler for mmap2 events
2013-09-23 1:44 ` [PATCH 4/5] perf tool: Add default handler for mmap2 events David Ahern
@ 2013-10-08 10:40 ` tip-bot for David Ahern
0 siblings, 0 replies; 14+ messages in thread
From: tip-bot for David Ahern @ 2013-10-08 10:40 UTC (permalink / raw)
To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, dsahern, tglx
Commit-ID: 6adb0b0ae26fcc35cfec068d71f13863faac5b44
Gitweb: http://git.kernel.org/tip/6adb0b0ae26fcc35cfec068d71f13863faac5b44
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Sun, 22 Sep 2013 19:44:59 -0600
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 4 Oct 2013 15:16:04 -0300
perf tools: Add default handler for mmap2 events
Commands that do not implement an mmap2 handler should at least not die
with a segfault when processing files with MMAP2 events.
Signed-off-by: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1379900700-5186-5-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/session.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 70ffa41..37c4718 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -256,6 +256,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
tool->sample = process_event_sample_stub;
if (tool->mmap == NULL)
tool->mmap = process_event_stub;
+ if (tool->mmap2 == NULL)
+ tool->mmap2 = process_event_stub;
if (tool->comm == NULL)
tool->comm = process_event_stub;
if (tool->fork == NULL)
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [tip:perf/core] perf trace: Add beautifier for clock_gettime' s clk_id argument
2013-09-23 1:45 ` [PATCH 5/5] perf trace: Add beautifier for clock_gettime's clk_id argument - v2 David Ahern
@ 2013-10-15 5:27 ` tip-bot for David Ahern
0 siblings, 0 replies; 14+ messages in thread
From: tip-bot for David Ahern @ 2013-10-15 5:27 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, eranian, paulus, hpa, mingo, peterz, efault,
jolsa, fweisbec, dsahern, adrian.hunter, tglx
Commit-ID: 4f8c1b74c5fdac35ee4480685d42030446724848
Gitweb: http://git.kernel.org/tip/4f8c1b74c5fdac35ee4480685d42030446724848
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Sun, 22 Sep 2013 19:45:00 -0600
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 9 Oct 2013 17:41:42 -0300
perf trace: Add beautifier for clock_gettime's clk_id argument
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 <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1379900700-5186-6-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 76d9427..39a947a 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -297,6 +297,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",
@@ -603,6 +609,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,
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [tip:perf/core] perf trace: Handle MSG_WAITFORONE not defined
2013-09-23 1:44 ` [PATCH 1/5] perf trace: Handle MSG_WAITFORONE not defined David Ahern
@ 2013-10-15 5:28 ` tip-bot for David Ahern
0 siblings, 0 replies; 14+ messages in thread
From: tip-bot for David Ahern @ 2013-10-15 5:28 UTC (permalink / raw)
To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, dsahern, tglx
Commit-ID: b6e8f8f4674be5a32f78027ec6e432f5ea33921e
Gitweb: http://git.kernel.org/tip/b6e8f8f4674be5a32f78027ec6e432f5ea33921e
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Sun, 22 Sep 2013 19:44:56 -0600
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 9 Oct 2013 17:42:37 -0300
perf trace: Handle MSG_WAITFORONE not defined
Needed for compiles on Fedora 12 for example.
Signed-off-by: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1379900700-5186-2-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-trace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 39a947a..3ca6a85 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -363,6 +363,9 @@ static size_t syscall_arg__scnprintf_socket_type(char *bf, size_t size,
#ifndef MSG_PROBE
#define MSG_PROBE 0x10
#endif
+#ifndef MSG_WAITFORONE
+#define MSG_WAITFORONE 0x10000
+#endif
#ifndef MSG_SENDPAGE_NOTLAST
#define MSG_SENDPAGE_NOTLAST 0x20000
#endif
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2013-10-15 5:28 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-23 1:44 [PATCH 0/5] perf tool: Various fixes and version 2 on clock_gettime David Ahern
2013-09-23 1:44 ` [PATCH 1/5] perf trace: Handle MSG_WAITFORONE not defined David Ahern
2013-10-15 5:28 ` [tip:perf/core] " tip-bot for David Ahern
2013-09-23 1:44 ` [PATCH 2/5] perf tool: Explicitly add libdl dependency David Ahern
2013-09-25 13:00 ` David Ahern
2013-09-25 18:31 ` [tip:perf/urgent] perf tools: " tip-bot for David Ahern
2013-09-23 1:44 ` [PATCH 3/5] perf trace: Add mmap2 handler David Ahern
2013-09-24 0:22 ` David Ahern
2013-09-24 17:16 ` Arnaldo Carvalho de Melo
2013-09-25 18:30 ` [tip:perf/urgent] " tip-bot for David Ahern
2013-09-23 1:44 ` [PATCH 4/5] perf tool: Add default handler for mmap2 events David Ahern
2013-10-08 10:40 ` [tip:perf/urgent] perf tools: " tip-bot for David Ahern
2013-09-23 1:45 ` [PATCH 5/5] perf trace: Add beautifier for clock_gettime's clk_id argument - v2 David Ahern
2013-10-15 5:27 ` [tip:perf/core] perf trace: Add beautifier for clock_gettime' s clk_id argument tip-bot for David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).