[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-6422184b087ff4355951d72e0bb320f52e107185@git.kernel.org>
Date: Tue, 5 May 2015 20:22:29 -0700
From: tip-bot for Namhyung Kim <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: namhyung@...nel.org, jolsa@...hat.com, dsahern@...il.com,
mingo@...nel.org, acme@...hat.com, hpa@...or.com,
a.p.zijlstra@...llo.nl, tglx@...utronix.de,
linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf hists browser:
Simplify zooming code using pstack_peek()
Commit-ID: 6422184b087ff4355951d72e0bb320f52e107185
Gitweb: http://git.kernel.org/tip/6422184b087ff4355951d72e0bb320f52e107185
Author: Namhyung Kim <namhyung@...nel.org>
AuthorDate: Fri, 24 Apr 2015 10:15:33 +0900
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 5 May 2015 18:13:23 -0300
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: Namhyung Kim <namhyung@...nel.org>
Acked-by: Jiri Olsa <jolsa@...hat.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1429838133-14001-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/ui/browsers/hists.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 9bd7b38..8733d57 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1860,19 +1860,17 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
goto out_free_stack;
continue;
}
- top = pstack__pop(browser->pstack);
+ top = pstack__peek(browser->pstack);
if (top == &browser->hists->dso_filter) {
- perf_hpp__set_elide(HISTC_DSO, false);
- browser->hists->dso_filter = NULL;
- hists__filter_by_dso(browser->hists);
- }
- if (top == &browser->hists->thread_filter) {
- perf_hpp__set_elide(HISTC_THREAD, false);
- thread__zput(browser->hists->thread_filter);
- hists__filter_by_thread(browser->hists);
+ /*
+ * No need to set actions->dso here since
+ * it's just to remove the current filter.
+ * Ditto for thread below.
+ */
+ do_zoom_dso(browser, actions);
}
- ui_helpline__pop();
- hist_browser__reset(browser);
+ if (top == &browser->hists->thread_filter)
+ do_zoom_thread(browser, actions);
continue;
}
case K_ESC:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists