diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-25 14:30:09 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-27 19:27:16 -0400 |
commit | facf3f0621b2e11957af1aae9085730ea78ccf85 (patch) | |
tree | d898cea7cc764ce699c7da383310ed9c28b0bf3b /tools/perf/builtin-annotate.c | |
parent | 6a2ffcddad22ead7ce75c5773e87895b91e7cca7 (diff) |
perf tools: Check if a map is still in use when deleting it
I.e. match RB_CLEAR_NODE() with RB_EMPTY_NODE(), to check that it isn't
in a rb tree at the time of its deletion.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-vumvhird765id11zbx00d2r8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index b57a027fb200..c434e1264087 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -59,6 +59,10 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel, | |||
59 | (al->sym == NULL || | 59 | (al->sym == NULL || |
60 | strcmp(ann->sym_hist_filter, al->sym->name) != 0)) { | 60 | strcmp(ann->sym_hist_filter, al->sym->name) != 0)) { |
61 | /* We're only interested in a symbol named sym_hist_filter */ | 61 | /* We're only interested in a symbol named sym_hist_filter */ |
62 | /* | ||
63 | * FIXME: why isn't this done in the symbol_filter when loading | ||
64 | * the DSO? | ||
65 | */ | ||
62 | if (al->sym != NULL) { | 66 | if (al->sym != NULL) { |
63 | rb_erase(&al->sym->rb_node, | 67 | rb_erase(&al->sym->rb_node, |
64 | &al->map->dso->symbols[al->map->type]); | 68 | &al->map->dso->symbols[al->map->type]); |