Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / tools / perf / builtin-report.c
index 3ba0e9737dc578ad406ad65e88ff96d44ad36d89..62b285e32aa551093d9869798827a5be2cf3e1e5 100644 (file)
@@ -103,6 +103,9 @@ static int hist_iter__report_callback(struct hist_entry_iter *iter,
        if (!ui__has_annotation())
                return 0;
 
+       hist__account_cycles(iter->sample->branch_stack, al, iter->sample,
+                            rep->nonany_branch_mode);
+
        if (sort__mode == SORT_MODE__BRANCH) {
                bi = he->branch_info;
                err = addr_map_symbol__inc_samples(&bi->from, evsel->idx);
@@ -313,6 +316,11 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
        if (evname != NULL)
                ret += fprintf(fp, " of event '%s'", evname);
 
+       if (symbol_conf.show_ref_callgraph &&
+           strstr(evname, "call-graph=no")) {
+               ret += fprintf(fp, ", show reference callgraph");
+       }
+
        if (rep->mem_mode) {
                ret += fprintf(fp, "\n# Total weight : %" PRIu64, nr_events);
                ret += fprintf(fp, "\n# Sort order   : %s", sort_order ? : default_mem_sort_order);
@@ -735,6 +743,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
        OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts",
                            "Instruction Tracing options",
                            itrace_parse_synth_opts),
+       OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename,
+                       "Show full source file name path for source lines"),
+       OPT_BOOLEAN(0, "show-ref-call-graph", &symbol_conf.show_ref_callgraph,
+                   "Show callgraph from reference event"),
        OPT_END()
        };
        struct perf_data_file file = {