summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-07-14 13:02:27 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-07-16 17:57:34 -0300
commit022c50d09c2c2bc31506ad16c4bcba7fb418ce34 (patch)
treef732b094fec0a6dc6e27e16bc42c4326229704b3 /tools/perf/util/event.c
parent1fcb8768636d38cb6fdfeef83a5ee596c4bd9c56 (diff)
downloadtalos-obmc-linux-022c50d09c2c2bc31506ad16c4bcba7fb418ce34.tar.gz
talos-obmc-linux-022c50d09c2c2bc31506ad16c4bcba7fb418ce34.zip
perf script: Display PERF_RECORD_MISC_COMM_EXEC flag
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1405332185-4050-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r--tools/perf/util/event.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index d0281bdfa582..198c4cc313a1 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -603,7 +603,14 @@ int perf_event__synthesize_kernel_mmap(struct perf_tool *tool,
size_t perf_event__fprintf_comm(union perf_event *event, FILE *fp)
{
- return fprintf(fp, ": %s:%d\n", event->comm.comm, event->comm.tid);
+ const char *s;
+
+ if (event->header.misc & PERF_RECORD_MISC_COMM_EXEC)
+ s = " exec";
+ else
+ s = "";
+
+ return fprintf(fp, "%s: %s:%d\n", s, event->comm.comm, event->comm.tid);
}
int perf_event__process_comm(struct perf_tool *tool __maybe_unused,
OpenPOWER on IntegriCloud