perf map: Move structs and prototypes for map groups to a separate header
Subsystems (2)
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 41f30914fc33116cfd0fd0982c8effe435d97698 Gitweb: https://git.kernel.org/tip/41f30914fc33116cfd0fd0982c8effe435d97698 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Sun, 27 Jan 2019 13:44:29 +0100 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 6 Feb 2019 10:00:38 -0300
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 <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/arch/arm/tests/dwarf-unwind.c | 1 + tools/perf/arch/arm64/tests/dwarf-unwind.c | 1 + tools/perf/arch/powerpc/tests/dwarf-unwind.c | 1 + tools/perf/arch/x86/tests/dwarf-unwind.c | 1 + tools/perf/ui/stdio/hist.c | 1 + tools/perf/util/machine.h | 2 +- tools/perf/util/map.c | 6 ++ tools/perf/util/map.h | 87 +------------------------- tools/perf/util/map_groups.h | 91 ++++++++++++++++++++++++++++ tools/perf/util/probe-event.c | 1 + tools/perf/util/symbol-elf.c | 1 + 11 files changed, 106 insertions(+), 87 deletions(-)
tools/perf/arch/arm/tests/dwarf-unwind.c +1 -0
@@ -3,6 +3,7 @@#include "perf_regs.h" #include "thread.h" #include "map.h" +#include "map_groups.h" #include "event.h" #include "debug.h" #include "tests/tests.h"
tools/perf/arch/arm64/tests/dwarf-unwind.c +1 -0
@@ -3,6 +3,7 @@#include "perf_regs.h" #include "thread.h" #include "map.h" +#include "map_groups.h" #include "event.h" #include "debug.h" #include "tests/tests.h"
tools/perf/arch/powerpc/tests/dwarf-unwind.c +1 -0
@@ -3,6 +3,7 @@#include "perf_regs.h" #include "thread.h" #include "map.h" +#include "map_groups.h" #include "event.h" #include "debug.h" #include "tests/tests.h"
tools/perf/arch/x86/tests/dwarf-unwind.c +1 -0
@@ -3,6 +3,7 @@#include "perf_regs.h" #include "thread.h" #include "map.h" +#include "map_groups.h" #include "event.h" #include "debug.h" #include "tests/tests.h"
tools/perf/ui/stdio/hist.c +1 -0
@@ -5,6 +5,7 @@#include "../../util/util.h" #include "../../util/hist.h" #include "../../util/map.h" +#include "../../util/map_groups.h" #include "../../util/sort.h" #include "../../util/evsel.h" #include "../../util/srcline.h"
tools/perf/util/machine.h +1 -1
@@ -4,7 +4,7 @@#include <sys/types.h> #include <linux/rbtree.h> -#include "map.h" +#include "map_groups.h" #include "dso.h" #include "event.h" #include "rwsem.h"
tools/perf/util/map.c +6 -0
@@ -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;
tools/perf/util/map.h +1 -86
112 lines not on this page · raw message
tools/perf/util/map_groups.h new file +91 -0
91 lines not on this page · raw message
tools/perf/util/probe-event.c +1 -0
@@ -42,6 +42,7 @@#include "cache.h" #include "color.h" #include "map.h" +#include "map_groups.h" #include "symbol.h" #include "thread.h" #include <api/fs/fs.h>
tools/perf/util/symbol-elf.c +1 -0
@@ -7,6 +7,7 @@#include <inttypes.h> #include "map.h" +#include "map_groups.h" #include "symbol.h" #include "demangle-java.h" #include "demangle-rust.h"