lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 5 May 2015 20:20:48 -0700 From: tip-bot for Namhyung Kim <tipbot@...or.com> To: linux-tip-commits@...r.kernel.org Cc: mingo@...nel.org, tglx@...utronix.de, namhyung@...nel.org, a.p.zijlstra@...llo.nl, hpa@...or.com, acme@...hat.com, acme@...nel.org, linux-kernel@...r.kernel.org, dsahern@...il.com, jolsa@...nel.org Subject: [tip:perf/core] perf hists browser: Save hist_browser_timer pointer in hist_browser Commit-ID: c2a51ab802d17c572cd0a940fd97538b75aa7889 Gitweb: http://git.kernel.org/tip/c2a51ab802d17c572cd0a940fd97538b75aa7889 Author: Namhyung Kim <namhyung@...nel.org> AuthorDate: Wed, 22 Apr 2015 16:18:15 +0900 Committer: Arnaldo Carvalho de Melo <acme@...hat.com> CommitDate: Tue, 5 May 2015 18:13:14 -0300 perf hists browser: Save hist_browser_timer pointer in hist_browser The struct hist_browser_timer is to carry perf-top related info throughout the hist browser code. So it'd be better to keep in the struct hist_browser. This is a preparation to later change. Suggested-by: Arnaldo Carvalho de Melo <acme@...nel.org> Signed-off-by: Namhyung Kim <namhyung@...nel.org> Acked-by: Jiri Olsa <jolsa@...nel.org> Cc: David Ahern <dsahern@...il.com> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl> Link: http://lkml.kernel.org/r/1429687101-4360-5-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com> --- tools/perf/ui/browsers/hists.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 0972d47..0847623 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -25,6 +25,7 @@ struct hist_browser { struct hists *hists; struct hist_entry *he_selection; struct map_symbol *selection; + struct hist_browser_timer *hbt; int print_seq; bool show_dso; bool show_headers; @@ -406,11 +407,11 @@ static void ui_browser__warn_lost_events(struct ui_browser *browser) "Or reduce the sampling frequency."); } -static int hist_browser__run(struct hist_browser *browser, - struct hist_browser_timer *hbt) +static int hist_browser__run(struct hist_browser *browser) { int key; char title[160]; + struct hist_browser_timer *hbt = browser->hbt; int delay_secs = hbt ? hbt->refresh : 0; browser->b.entries = &browser->hists->entries; @@ -1195,7 +1196,8 @@ static int hist_browser__dump(struct hist_browser *browser) return 0; } -static struct hist_browser *hist_browser__new(struct hists *hists) +static struct hist_browser *hist_browser__new(struct hists *hists, + struct hist_browser_timer *hbt) { struct hist_browser *browser = zalloc(sizeof(*browser)); @@ -1206,6 +1208,7 @@ static struct hist_browser *hist_browser__new(struct hists *hists) browser->b.seek = ui_browser__hists_seek; browser->b.use_navkeypressed = true; browser->show_headers = symbol_conf.show_hist_headers; + browser->hbt = hbt; } return browser; @@ -1421,7 +1424,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, struct perf_session_env *env) { struct hists *hists = evsel__hists(evsel); - struct hist_browser *browser = hist_browser__new(hists); + struct hist_browser *browser = hist_browser__new(hists, hbt); struct branch_info *bi; struct pstack *fstack; #define MAX_OPTIONS 16 @@ -1499,7 +1502,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, nr_options = 0; - key = hist_browser__run(browser, hbt); + key = hist_browser__run(browser); if (browser->he_selection != NULL) { thread = hist_browser__selected_thread(browser); -- 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