diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2014-07-22 16:17:25 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-07-23 11:35:43 -0300 |
commit | b9d266baac0429f70df3f9cf751b045730d612e3 (patch) | |
tree | d4625908c8f0d9e972a489da208725f460048e4a /tools/perf/util/machine.h | |
parent | bf49c35f630452d85c9cd7205a72df841e8d99b9 (diff) | |
download | linux-stable-b9d266baac0429f70df3f9cf751b045730d612e3.tar.gz linux-stable-b9d266baac0429f70df3f9cf751b045730d612e3.tar.bz2 linux-stable-b9d266baac0429f70df3f9cf751b045730d612e3.zip |
perf machine: Add ability to record the current tid for each cpu
Add an array to struct machine to store the current tid running on each
cpu.
Add machine functions to get / set the tid for a cpu.
This will be used to determine the tid when decoding a per-cpu
Instruction Trace.
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/1406035081-14301-17-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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index c8c74a119398..8771d0cbe9cb 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h @@ -33,6 +33,7 @@ struct machine { struct map_groups kmaps; struct map *vmlinux_maps[MAP__NR_TYPES]; symbol_filter_t symbol_filter; + pid_t *current_tid; }; static inline @@ -191,4 +192,8 @@ int machine__synthesize_threads(struct machine *machine, struct target *target, perf_event__process, data_mmap); } +pid_t machine__get_current_tid(struct machine *machine, int cpu); +int machine__set_current_tid(struct machine *machine, int cpu, pid_t pid, + pid_t tid); + #endif /* __PERF_MACHINE_H */ |