perf hists: Remove hist_entry->used, not used anymore

Since hist_entry__delete() nowadays doesn't actually frees anything that
may be in use by the annotation code.

Eventually we will solve this for good by reference counting struct
symbol.

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-uldtgljymtrkns0knpiso5op@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 446fb96c
...@@ -1731,12 +1731,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, ...@@ -1731,12 +1731,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
if (!notes->src) if (!notes->src)
continue; continue;
/*
* Don't let this be freed, say, by hists__decay_entry.
*/
he->used = true;
err = hist_entry__tui_annotate(he, evsel, hbt); err = hist_entry__tui_annotate(he, evsel, hbt);
he->used = false;
/* /*
* offer option to annotate the other branch source or target * offer option to annotate the other branch source or target
* (if they exists) when returning from annotate * (if they exists) when returning from annotate
......
...@@ -263,15 +263,9 @@ void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel) ...@@ -263,15 +263,9 @@ void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel)
while (next) { while (next) {
n = rb_entry(next, struct hist_entry, rb_node); n = rb_entry(next, struct hist_entry, rb_node);
next = rb_next(&n->rb_node); next = rb_next(&n->rb_node);
/*
* We may be annotating this, for instance, so keep it here in
* case some it gets new samples, we'll eventually free it when
* the user stops browsing and it agains gets fully decayed.
*/
if (((zap_user && n->level == '.') || if (((zap_user && n->level == '.') ||
(zap_kernel && n->level != '.') || (zap_kernel && n->level != '.') ||
hists__decay_entry(hists, n)) && hists__decay_entry(hists, n))) {
!n->used) {
hists__delete_entry(hists, n); hists__delete_entry(hists, n);
} }
} }
......
...@@ -102,7 +102,6 @@ struct hist_entry { ...@@ -102,7 +102,6 @@ struct hist_entry {
bool init_have_children; bool init_have_children;
char level; char level;
bool used;
u8 filtered; u8 filtered;
char *srcline; char *srcline;
struct symbol *parent; struct symbol *parent;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment