Skip to content

Commit f2e14cd

Browse files
committed
perf top: Lift restriction on using callchains without "sym" in --sort
This restriction is not present in 'perf report' and since 'perf top' uses the same hists browser, remove it from it as well. With this we create per event buckets with callchain trees, so that # perf top --sort dso -g --no-children Bucketizes samples by DSO and below it shows the callchains leading to functions in this DSO. Try also: # perf top -e sched:*switch -g --no-children To see the callchains leading to sched switches, pressing 'E' to expand all one can quickly see the most common scheduler switches and what leads to them, for instance, calls to IO, futexes, etc. Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Link: https://lkml.kernel.org/r/20190107140854.GA28965@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 9231967 commit f2e14cd

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎tools/perf/builtin-top.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,12 +1028,7 @@ static int perf_top__start_counters(struct perf_top *top)
10281028

10291029
static int callchain_param__setup_sample_type(struct callchain_param *callchain)
10301030
{
1031-
if (!perf_hpp_list.sym) {
1032-
if (callchain->enabled) {
1033-
ui__error("Selected -g but \"sym\" not present in --sort/-s.");
1034-
return -EINVAL;
1035-
}
1036-
} else if (callchain->mode != CHAIN_NONE) {
1031+
if (callchain->mode != CHAIN_NONE) {
10371032
if (callchain_register_param(callchain) < 0) {
10381033
ui__error("Can't register callchain params.\n");
10391034
return -EINVAL;

0 commit comments

Comments
 (0)