diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-01-27 15:44:29 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-02-06 16:00:38 +0300 |
commit | 41f30914fc33116cfd0fd0982c8effe435d97698 (patch) | |
tree | 205c38e17e6b81c56950906d56dcf13daeb71596 /tools/perf/util/map.c | |
parent | 1101f69af5335a863765100d1df1999fd1e8c5bf (diff) | |
download | linux-41f30914fc33116cfd0fd0982c8effe435d97698.tar.xz |
perf map: Move structs and prototypes for map groups to a separate header
And since machine.h only needs what is in there, make it stop including
map.h and instead include this newly introduced map_groups.h instead.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-dbob25fv5rp2rjpwlnterf38@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r-- | tools/perf/util/map.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index cf407cc9d915..fbeb0c6efaa6 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -557,6 +557,12 @@ void map_groups__init(struct map_groups *mg, struct machine *machine) refcount_set(&mg->refcnt, 1); } +void map_groups__insert(struct map_groups *mg, struct map *map) +{ + maps__insert(&mg->maps, map); + map->groups = mg; +} + static void __maps__purge(struct maps *maps) { struct rb_root *root = &maps->entries; |