perf report: Set proper sort__mode for the branch option
[muen/linux.git] / tools / perf / builtin-report.c
index b9e0fcac4d71ed1266107eeba3754635d4e0e4f7..3da59a87ec7c483795db56d380595d2a846536fe 100644 (file)
@@ -730,7 +730,7 @@ repeat:
        has_br_stack = perf_header__has_feat(&session->header,
                                             HEADER_BRANCH_STACK);
 
        has_br_stack = perf_header__has_feat(&session->header,
                                             HEADER_BRANCH_STACK);
 
-       if (branch_mode == -1 && has_br_stack) {
+       if ((branch_mode == -1 && has_br_stack) || branch_mode == 1) {
                sort__mode = SORT_MODE__BRANCH;
                symbol_conf.cumulate_callchain = false;
        }
                sort__mode = SORT_MODE__BRANCH;
                symbol_conf.cumulate_callchain = false;
        }