summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report_test.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2017-04-19 11:48:44 -0700
committerYabin Cui <yabinc@google.com>2017-04-19 11:57:11 -0700
commit0c093f3cc0dbced581c9d430e0ed8cd12def61ce (patch)
treeb184869d2dfa85632e4bf4b3da15e2a3f4d8b891 /simpleperf/cmd_report_test.cpp
parentfaa89a17fd652dcfc02a614667ee8915da2379f7 (diff)
downloadextras-0c093f3cc0dbced581c9d430e0ed8cd12def61ce.tar.gz
simpleperf: add --brief-callgraph option for report cmd.
Remove duplicated callgraphs (which appears as a sub graph in another place) in --brief-callgraph mode. Accept brief callgraph in report.py. Add unit test for --brief-callgraph option. Bug: http://b/37444055 Test: run simpleperf_unit_test. Test: manually run report.py. Change-Id: I41977762552ec66807f394558352da6cbefaec2e
Diffstat (limited to 'simpleperf/cmd_report_test.cpp')
-rw-r--r--simpleperf/cmd_report_test.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp
index e29c8d87..15530e5c 100644
--- a/simpleperf/cmd_report_test.cpp
+++ b/simpleperf/cmd_report_test.cpp
@@ -464,6 +464,12 @@ TEST_F(ReportCommandTest, raw_period_option) {
ASSERT_EQ(content.find("%"), std::string::npos);
}
+TEST_F(ReportCommandTest, brief_callgraph_option) {
+ Report(CALLGRAPH_FP_PERF_DATA, {"-g", "--brief-callgraph"});
+ ASSERT_TRUE(success);
+ ASSERT_NE(content.find("skipped in brief callgraph mode"), std::string::npos);
+}
+
#if defined(__linux__)
#include "event_selection_set.h"