Commit 6422184b authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf hists browser: Simplify zooming code using pstack_peek()

Now LEFT key press action can just use do_zoom_dso/thread() code to get
out of the current filter.
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429838133-14001-2-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c8539e3f
...@@ -1860,19 +1860,17 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, ...@@ -1860,19 +1860,17 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
goto out_free_stack; goto out_free_stack;
continue; continue;
} }
top = pstack__pop(browser->pstack); top = pstack__peek(browser->pstack);
if (top == &browser->hists->dso_filter) { if (top == &browser->hists->dso_filter) {
perf_hpp__set_elide(HISTC_DSO, false); /*
browser->hists->dso_filter = NULL; * No need to set actions->dso here since
hists__filter_by_dso(browser->hists); * it's just to remove the current filter.
} * Ditto for thread below.
if (top == &browser->hists->thread_filter) { */
perf_hpp__set_elide(HISTC_THREAD, false); do_zoom_dso(browser, actions);
thread__zput(browser->hists->thread_filter);
hists__filter_by_thread(browser->hists);
} }
ui_helpline__pop(); if (top == &browser->hists->thread_filter)
hist_browser__reset(browser); do_zoom_thread(browser, actions);
continue; continue;
} }
case K_ESC: case K_ESC:
......
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