diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-11-02 14:50:05 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-11-05 14:03:58 -0300 |
commit | 9783adf777a445a1e9d0db4857a3a896a9f42d4a (patch) | |
tree | 0d3256acbcdba290afa018cce86456f21febe58b /tools/perf/builtin-top.c | |
parent | 48ed0ece1b8063313284812ef048b26c3c4250af (diff) | |
download | linux-3.10-9783adf777a445a1e9d0db4857a3a896a9f42d4a.tar.gz linux-3.10-9783adf777a445a1e9d0db4857a3a896a9f42d4a.tar.bz2 linux-3.10-9783adf777a445a1e9d0db4857a3a896a9f42d4a.zip |
perf tools: Introduce struct hist_browser_timer
Currently various hist browser functions receive 3 arguments for
refreshing histogram but only used from a few places. Also it's only
for perf top command so that it can be NULL for other (and probably
most) cases. Pack them into a struct in order to reduce number of those
unused arguments.
This is a mechanical change and does not intend a functional change.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Irina Tirdea <irina.tirdea@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1351835406-15208-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index f2ecd498c72..102b43c9905 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -582,6 +582,11 @@ static void *display_thread_tui(void *arg) struct perf_evsel *pos; struct perf_top *top = arg; const char *help = "For a higher level overview, try: perf top --sort comm,dso"; + struct hist_browser_timer hbt = { + .timer = perf_top__sort_new_samples, + .arg = top, + .refresh = top->delay_secs, + }; perf_top__sort_new_samples(top); @@ -593,9 +598,7 @@ static void *display_thread_tui(void *arg) list_for_each_entry(pos, &top->evlist->entries, node) pos->hists.uid_filter_str = top->target.uid_str; - perf_evlist__tui_browse_hists(top->evlist, help, - perf_top__sort_new_samples, - top, top->delay_secs); + perf_evlist__tui_browse_hists(top->evlist, help, &hbt); exit_browser(0); exit(0); |