aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 72f6eb7b4173..67bdb9f14ad6 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -231,7 +231,7 @@ static void perf_top__show_details(struct perf_top *top)
231 printf("Showing %s for %s\n", perf_evsel__name(top->sym_evsel), symbol->name); 231 printf("Showing %s for %s\n", perf_evsel__name(top->sym_evsel), symbol->name);
232 printf(" Events Pcnt (>=%d%%)\n", top->sym_pcnt_filter); 232 printf(" Events Pcnt (>=%d%%)\n", top->sym_pcnt_filter);
233 233
234 more = symbol__annotate_printf(symbol, he->ms.map, top->sym_evsel->idx, 234 more = symbol__annotate_printf(symbol, he->ms.map, top->sym_evsel,
235 0, top->sym_pcnt_filter, top->print_entries, 4); 235 0, top->sym_pcnt_filter, top->print_entries, 4);
236 if (top->zero) 236 if (top->zero)
237 symbol__annotate_zero_histogram(symbol, top->sym_evsel->idx); 237 symbol__annotate_zero_histogram(symbol, top->sym_evsel->idx);
@@ -251,7 +251,8 @@ static struct hist_entry *perf_evsel__add_hist_entry(struct perf_evsel *evsel,
251{ 251{
252 struct hist_entry *he; 252 struct hist_entry *he;
253 253
254 he = __hists__add_entry(&evsel->hists, al, NULL, sample->period); 254 he = __hists__add_entry(&evsel->hists, al, NULL, sample->period,
255 sample->weight);
255 if (he == NULL) 256 if (he == NULL)
256 return NULL; 257 return NULL;
257 258
@@ -1088,7 +1089,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
1088 OPT_INCR('v', "verbose", &verbose, 1089 OPT_INCR('v', "verbose", &verbose,
1089 "be more verbose (show counter open errors, etc)"), 1090 "be more verbose (show counter open errors, etc)"),
1090 OPT_STRING('s', "sort", &sort_order, "key[,key2...]", 1091 OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
1091 "sort by key(s): pid, comm, dso, symbol, parent"), 1092 "sort by key(s): pid, comm, dso, symbol, parent, weight, local_weight"),
1092 OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples, 1093 OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples,
1093 "Show a column with the number of samples"), 1094 "Show a column with the number of samples"),
1094 OPT_CALLBACK_DEFAULT('G', "call-graph", &top.record_opts, 1095 OPT_CALLBACK_DEFAULT('G', "call-graph", &top.record_opts,
@@ -1116,7 +1117,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
1116 NULL 1117 NULL
1117 }; 1118 };
1118 1119
1119 top.evlist = perf_evlist__new(NULL, NULL); 1120 top.evlist = perf_evlist__new();
1120 if (top.evlist == NULL) 1121 if (top.evlist == NULL)
1121 return -ENOMEM; 1122 return -ENOMEM;
1122 1123