lkml.org 
[lkml]   [2012]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 15/15] perf report: Add --cumulate option
Date
From: Namhyung Kim <namhyung.kim@lge.com>

When --cumulate option is given, it will print accumulated hist stat
information. It requires callchain information.

Cc: Arun Sharma <asharma@fb.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/builtin-report.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 97b2e6300f4c..92da05c2151f 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -282,6 +282,12 @@ static int perf_report__setup_sample_type(struct perf_report *rep)
}
}

+ if (!symbol_conf.use_callchain && symbol_conf.cumulate_callchain) {
+ ui__error("Selected --cumulate but no callchain data. "
+ "Did you call 'perf record' without -g?\n");
+ return -1;
+ }
+
return 0;
}

@@ -641,6 +647,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, "cumulate", &symbol_conf.cumulate_callchain,
+ "Accumulate period along the callchain"),
OPT_END()
};

--
1.7.11.4


\
 
 \ /
  Last update: 2012-09-13 10:41    [W:0.154 / U:1.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site