[PATCH 15/15] perf report: Add --cumulate option

From: Namhyung Kim
Date: Thu Sep 13 2012 - 03:27:57 EST


From: Namhyung Kim <namhyung.kim@xxxxxxx>

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

Cc: Arun Sharma <asharma@xxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/