ASoC: samsung: i2s: Move core clk to the driver common data structure
[platform/kernel/linux-exynos.git] / tools / perf / builtin-report.c
index f9dff65..4ddb072 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-report.c
  *
@@ -161,12 +162,28 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter,
        struct hist_entry *he = iter->he;
        struct report *rep = arg;
        struct branch_info *bi;
+       struct perf_sample *sample = iter->sample;
+       struct perf_evsel *evsel = iter->evsel;
+       int err;
+
+       if (!ui__has_annotation())
+               return 0;
+
+       hist__account_cycles(sample->branch_stack, al, sample,
+                            rep->nonany_branch_mode);
 
        bi = he->branch_info;
+       err = addr_map_symbol__inc_samples(&bi->from, sample, evsel->idx);
+       if (err)
+               goto out;
+
+       err = addr_map_symbol__inc_samples(&bi->to, sample, evsel->idx);
+
        branch_type_count(&rep->brtype_stat, &bi->flags,
                          bi->from.addr, bi->to.addr);
 
-       return 0;
+out:
+       return err;
 }
 
 static int process_sample_event(struct perf_tool *tool,
@@ -311,9 +328,10 @@ static int report__setup_sample_type(struct report *rep)
 
        if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) {
                if ((sample_type & PERF_SAMPLE_REGS_USER) &&
-                   (sample_type & PERF_SAMPLE_STACK_USER))
+                   (sample_type & PERF_SAMPLE_STACK_USER)) {
                        callchain_param.record_mode = CALLCHAIN_DWARF;
-               else if (sample_type & PERF_SAMPLE_BRANCH_STACK)
+                       dwarf_callchain_users = true;
+               } else if (sample_type & PERF_SAMPLE_BRANCH_STACK)
                        callchain_param.record_mode = CALLCHAIN_LBR;
                else
                        callchain_param.record_mode = CALLCHAIN_FP;