projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb6186a
)
perf map: Remove map from 'names' tree in __maps__remove()
author
Changbin Du
<
[email protected]
>
Sat, 16 Mar 2019 08:05:50 +0000
(16:05 +0800)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Tue, 19 Mar 2019 19:52:05 +0000
(16:52 -0300)
There are two trees for each map inserted by maps__insert(), so remove
it from the 'names' tree in __maps__remove().
Detected with gcc's ASan.
Signed-off-by: Changbin Du <
[email protected]
>
Reviewed-by: Jiri Olsa <
[email protected]
>
Cc: Alexei Starovoitov <
[email protected]
>
Cc: Daniel Borkmann <
[email protected]
>
Cc: Eric Saint-Etienne <
[email protected]
>
Cc: Namhyung Kim <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Steven Rostedt (VMware) <
[email protected]
>
Fixes: 1e6285699b30 ("perf symbols: Fix slowness due to -ffunction-section")
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/util/map.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/map.c
b/tools/perf/util/map.c
index fbeb0c6efaa6e5ea05383e7a9227798b313379d4..64bea5eb8bf624fd541243d021df2d0539cd7a9b 100644
(file)
--- a/
tools/perf/util/map.c
+++ b/
tools/perf/util/map.c
@@
-917,6
+917,9
@@
static void __maps__remove(struct maps *maps, struct map *map)
{
rb_erase_init(&map->rb_node, &maps->entries);
map__put(map);
+
+ rb_erase_init(&map->rb_node_name, &maps->names);
+ map__put(map);
}
void maps__remove(struct maps *maps, struct map *map)