diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-02-15 13:26:30 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-02-16 18:25:57 +0100 |
commit | 8c7f1bb37b29f140e08175132f3abb4d5ad229fc (patch) | |
tree | 49903596bb07b75ed158e94b264ea8c79096a74b /tools/perf/util/machine.h | |
parent | perf machine: Free root_dir in machine__init() error path (diff) | |
download | linux-8c7f1bb37b29f140e08175132f3abb4d5ad229fc.tar.xz linux-8c7f1bb37b29f140e08175132f3abb4d5ad229fc.zip |
perf machine: Move kernel mmap name into struct machine
It simplifies and centralizes the code. The kernel mmap name is set for
machine type, which we know from the beginning, so there's no reason to
generate it every time we need it.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180215122635.24029-5-jolsa@kernel.org
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 | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index 5ce860b64c74..cb0a20f3a96b 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h @@ -43,6 +43,7 @@ struct machine { bool comm_exec; bool kptr_restrict_warned; char *root_dir; + char *mmap_name; struct threads threads[THREADS__TABLE_SIZE]; struct vdso_info *vdso_info; struct perf_env *env; @@ -142,8 +143,6 @@ struct machine *machines__find(struct machines *machines, pid_t pid); struct machine *machines__findnew(struct machines *machines, pid_t pid); void machines__set_id_hdr_size(struct machines *machines, u16 id_hdr_size); -char *machine__mmap_name(struct machine *machine, char *bf, size_t size); - void machines__set_comm_exec(struct machines *machines, bool comm_exec); struct machine *machine__new_host(void); |