summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/machine.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-07-31 09:00:45 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-08-13 19:23:21 -0300
commitcfe1c41405fe9a559f8b3c24c904b2bb42d4a6e8 (patch)
treed0e4b647610f87702beb71287ba09dc998243ad5 /tools/perf/util/machine.h
parent65de51f93ebf9305ec011da59c0b5fe29429d1b9 (diff)
perf machine: Add machine__thread_exec_comm()
Add machine__thread_exec_comm() to return the comm that matches the last exec, if the comm_exec flag is present, or the last comm otherwise. 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/1406786474-9306-3-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/machine.h')
-rw-r--r--tools/perf/util/machine.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index b972824e6294..61216e028319 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -26,6 +26,7 @@ struct machine {
struct rb_node rb_node;
pid_t pid;
u16 id_hdr_size;
+ bool comm_exec;
char *root_dir;
struct rb_root threads;
struct list_head dead_threads;
@@ -47,6 +48,8 @@ struct map *machine__kernel_map(struct machine *machine, enum map_type type)
struct thread *machine__find_thread(struct machine *machine, pid_t pid,
pid_t tid);
+struct comm *machine__thread_exec_comm(struct machine *machine,
+ struct thread *thread);
int machine__process_comm_event(struct machine *machine, union perf_event *event,
struct perf_sample *sample);
@@ -88,6 +91,7 @@ char *machine__mmap_name(struct machine *machine, char *bf, size_t size);
void machines__set_symbol_filter(struct machines *machines,
symbol_filter_t symbol_filter);
+void machines__set_comm_exec(struct machines *machines, bool comm_exec);
struct machine *machine__new_host(void);
int machine__init(struct machine *machine, const char *root_dir, pid_t pid);