aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/ui/browsers/hists.c5
-rw-r--r--tools/perf/util/hist.c8
-rw-r--r--tools/perf/util/sort.h1
3 files changed, 1 insertions, 13 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index ebd9d3afe2d6..c37e70ae0b20 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1731,12 +1731,7 @@ do_annotate:
1731 if (!notes->src) 1731 if (!notes->src)
1732 continue; 1732 continue;
1733 1733
1734 /*
1735 * Don't let this be freed, say, by hists__decay_entry.
1736 */
1737 he->used = true;
1738 err = hist_entry__tui_annotate(he, evsel, hbt); 1734 err = hist_entry__tui_annotate(he, evsel, hbt);
1739 he->used = false;
1740 /* 1735 /*
1741 * offer option to annotate the other branch source or target 1736 * offer option to annotate the other branch source or target
1742 * (if they exists) when returning from annotate 1737 * (if they exists) when returning from annotate
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index d9a6d35eda17..cc22b9158b93 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -263,15 +263,9 @@ void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel)
263 while (next) { 263 while (next) {
264 n = rb_entry(next, struct hist_entry, rb_node); 264 n = rb_entry(next, struct hist_entry, rb_node);
265 next = rb_next(&n->rb_node); 265 next = rb_next(&n->rb_node);
266 /*
267 * We may be annotating this, for instance, so keep it here in
268 * case some it gets new samples, we'll eventually free it when
269 * the user stops browsing and it agains gets fully decayed.
270 */
271 if (((zap_user && n->level == '.') || 266 if (((zap_user && n->level == '.') ||
272 (zap_kernel && n->level != '.') || 267 (zap_kernel && n->level != '.') ||
273 hists__decay_entry(hists, n)) && 268 hists__decay_entry(hists, n))) {
274 !n->used) {
275 hists__delete_entry(hists, n); 269 hists__delete_entry(hists, n);
276 } 270 }
277 } 271 }
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index c03e4ff8beff..9c01b83eebca 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -102,7 +102,6 @@ struct hist_entry {
102 102
103 bool init_have_children; 103 bool init_have_children;
104 char level; 104 char level;
105 bool used;
106 u8 filtered; 105 u8 filtered;
107 char *srcline; 106 char *srcline;
108 struct symbol *parent; 107 struct symbol *parent;