diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-05-13 22:09:01 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-28 09:23:59 -0400 |
commit | 3a5714f8b58913ded4d9e90abdd30e7e5993f863 (patch) | |
tree | 9fb715107ffd82613bb7f2732239845c8a700ea2 /tools/perf/builtin-top.c | |
parent | 6f29097f45f6c375f2f6a76c589577575c7feb52 (diff) |
perf top: Get rid of *_threaded() functions
Those _threaded() functions are needed to make hist tree handling
thread-safe, but AFAICS the only thing it does is forcing it to use
the intermediate 'collapsed' tree.
This can be acheived by setting sort__need_collapse to 1 in cmd_top() so
no need to keep those _threaded() variants.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1368497347-9628-4-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 | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 81adcafbac8f..5cd41ec43ce1 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -284,11 +284,11 @@ static void perf_top__print_sym_table(struct perf_top *top) | |||
284 | return; | 284 | return; |
285 | } | 285 | } |
286 | 286 | ||
287 | hists__collapse_resort_threaded(&top->sym_evsel->hists); | 287 | hists__collapse_resort(&top->sym_evsel->hists); |
288 | hists__output_resort_threaded(&top->sym_evsel->hists); | 288 | hists__output_resort(&top->sym_evsel->hists); |
289 | hists__decay_entries_threaded(&top->sym_evsel->hists, | 289 | hists__decay_entries(&top->sym_evsel->hists, |
290 | top->hide_user_symbols, | 290 | top->hide_user_symbols, |
291 | top->hide_kernel_symbols); | 291 | top->hide_kernel_symbols); |
292 | hists__output_recalc_col_len(&top->sym_evsel->hists, | 292 | hists__output_recalc_col_len(&top->sym_evsel->hists, |
293 | top->print_entries - printed); | 293 | top->print_entries - printed); |
294 | putchar('\n'); | 294 | putchar('\n'); |
@@ -549,11 +549,11 @@ static void perf_top__sort_new_samples(void *arg) | |||
549 | if (t->evlist->selected != NULL) | 549 | if (t->evlist->selected != NULL) |
550 | t->sym_evsel = t->evlist->selected; | 550 | t->sym_evsel = t->evlist->selected; |
551 | 551 | ||
552 | hists__collapse_resort_threaded(&t->sym_evsel->hists); | 552 | hists__collapse_resort(&t->sym_evsel->hists); |
553 | hists__output_resort_threaded(&t->sym_evsel->hists); | 553 | hists__output_resort(&t->sym_evsel->hists); |
554 | hists__decay_entries_threaded(&t->sym_evsel->hists, | 554 | hists__decay_entries(&t->sym_evsel->hists, |
555 | t->hide_user_symbols, | 555 | t->hide_user_symbols, |
556 | t->hide_kernel_symbols); | 556 | t->hide_kernel_symbols); |
557 | } | 557 | } |
558 | 558 | ||
559 | static void *display_thread_tui(void *arg) | 559 | static void *display_thread_tui(void *arg) |
@@ -1126,6 +1126,9 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1126 | if (setup_sorting() < 0) | 1126 | if (setup_sorting() < 0) |
1127 | usage_with_options(top_usage, options); | 1127 | usage_with_options(top_usage, options); |
1128 | 1128 | ||
1129 | /* display thread wants entries to be collapsed in a different tree */ | ||
1130 | sort__need_collapse = 1; | ||
1131 | |||
1129 | if (top.use_stdio) | 1132 | if (top.use_stdio) |
1130 | use_browser = 0; | 1133 | use_browser = 0; |
1131 | else if (top.use_tui) | 1134 | else if (top.use_tui) |