aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-report.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 97b2e6300f4c..b6696dd51cb0 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -93,7 +93,7 @@ static int perf_report__add_branch_hist_entry(struct perf_tool *tool,
93 struct annotation *notes; 93 struct annotation *notes;
94 err = -ENOMEM; 94 err = -ENOMEM;
95 bx = he->branch_info; 95 bx = he->branch_info;
96 if (bx->from.sym && use_browser > 0) { 96 if (bx->from.sym && use_browser == 1 && sort__has_sym) {
97 notes = symbol__annotation(bx->from.sym); 97 notes = symbol__annotation(bx->from.sym);
98 if (!notes->src 98 if (!notes->src
99 && symbol__alloc_hist(bx->from.sym) < 0) 99 && symbol__alloc_hist(bx->from.sym) < 0)
@@ -107,7 +107,7 @@ static int perf_report__add_branch_hist_entry(struct perf_tool *tool,
107 goto out; 107 goto out;
108 } 108 }
109 109
110 if (bx->to.sym && use_browser > 0) { 110 if (bx->to.sym && use_browser == 1 && sort__has_sym) {
111 notes = symbol__annotation(bx->to.sym); 111 notes = symbol__annotation(bx->to.sym);
112 if (!notes->src 112 if (!notes->src
113 && symbol__alloc_hist(bx->to.sym) < 0) 113 && symbol__alloc_hist(bx->to.sym) < 0)
@@ -162,7 +162,7 @@ static int perf_evsel__add_hist_entry(struct perf_evsel *evsel,
162 * so we don't allocated the extra space needed because the stdio 162 * so we don't allocated the extra space needed because the stdio
163 * code will not use it. 163 * code will not use it.
164 */ 164 */
165 if (he->ms.sym != NULL && use_browser > 0) { 165 if (he->ms.sym != NULL && use_browser == 1 && sort__has_sym) {
166 struct annotation *notes = symbol__annotation(he->ms.sym); 166 struct annotation *notes = symbol__annotation(he->ms.sym);
167 167
168 assert(evsel != NULL); 168 assert(evsel != NULL);
@@ -692,12 +692,14 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
692 else 692 else
693 use_browser = 0; 693 use_browser = 0;
694 694
695 setup_sorting(report_usage, options);
696
695 /* 697 /*
696 * Only in the newt browser we are doing integrated annotation, 698 * Only in the newt browser we are doing integrated annotation,
697 * so don't allocate extra space that won't be used in the stdio 699 * so don't allocate extra space that won't be used in the stdio
698 * implementation. 700 * implementation.
699 */ 701 */
700 if (use_browser > 0) { 702 if (use_browser == 1 && sort__has_sym) {
701 symbol_conf.priv_size = sizeof(struct annotation); 703 symbol_conf.priv_size = sizeof(struct annotation);
702 report.annotate_init = symbol__annotate_init; 704 report.annotate_init = symbol__annotate_init;
703 /* 705 /*
@@ -720,8 +722,6 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
720 if (symbol__init() < 0) 722 if (symbol__init() < 0)
721 goto error; 723 goto error;
722 724
723 setup_sorting(report_usage, options);
724
725 if (parent_pattern != default_parent_pattern) { 725 if (parent_pattern != default_parent_pattern) {
726 if (sort_dimension__add("parent") < 0) 726 if (sort_dimension__add("parent") < 0)
727 goto error; 727 goto error;