perf tools: Add support for weight v7 (modified)
[deliverable/linux.git] / tools / perf / builtin-report.c
index 96b5a7fee4bbe45a0f2558fb243e706ad65b8567..e31f070abe2fe1d146f3a85ebbf0972067e66dc0 100644 (file)
@@ -13,7 +13,6 @@
 #include "util/annotate.h"
 #include "util/color.h"
 #include <linux/list.h>
-#include "util/cache.h"
 #include <linux/rbtree.h>
 #include "util/symbol.h"
 #include "util/callchain.h"
@@ -99,7 +98,7 @@ static int perf_report__add_branch_hist_entry(struct perf_tool *tool,
                 * and not events sampled. Thus we use a pseudo period of 1.
                 */
                he = __hists__add_branch_entry(&evsel->hists, al, parent,
-                               &bi[i], 1);
+                               &bi[i], 1, 1);
                if (he) {
                        struct annotation *notes;
                        err = -ENOMEM;
@@ -157,7 +156,8 @@ static int perf_evsel__add_hist_entry(struct perf_evsel *evsel,
                        return err;
        }
 
-       he = __hists__add_entry(&evsel->hists, al, parent, sample->period);
+       he = __hists__add_entry(&evsel->hists, al, parent, sample->period,
+                                       sample->weight);
        if (he == NULL)
                return -ENOMEM;
 
@@ -314,7 +314,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *self,
        char buf[512];
        size_t size = sizeof(buf);
 
-       if (symbol_conf.event_group && evsel->nr_members > 1) {
+       if (perf_evsel__is_group_event(evsel)) {
                struct perf_evsel *pos;
 
                perf_evsel__group_desc(evsel, buf, size);
@@ -645,7 +645,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
                    "Use the stdio interface"),
        OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
                   "sort by key(s): pid, comm, dso, symbol, parent, cpu, srcline,"
-                  " dso_to, dso_from, symbol_to, symbol_from, mispredict"),
+                  " dso_to, dso_from, symbol_to, symbol_from, mispredict,"
+                  " weight, local_weight"),
        OPT_BOOLEAN(0, "showcpuutilization", &symbol_conf.show_cpu_utilization,
                    "Show sample percentage for different cpu modes"),
        OPT_STRING('p', "parent", &parent_pattern, "regex",
@@ -693,6 +694,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
                    "use branch records for histogram filling", parse_branch_mode),
        OPT_STRING(0, "objdump", &objdump_path, "path",
                   "objdump binary to use for disassembly and annotations"),
+       OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle,
+                   "Disable symbol demangling"),
        OPT_END()
        };
 
This page took 0.024089 seconds and 5 git commands to generate.