diff options
author | Yabin Cui <yabinc@google.com> | 2016-12-09 14:51:04 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2016-12-09 15:16:22 -0800 |
commit | 18385c4b52c25f14475645172a2ce5dfd3fb1e9a (patch) | |
tree | f00fc38ce979c4e4eeaee912314b1857e5cb0fbd /simpleperf/cmd_report_test.cpp | |
parent | 6c26bba8a918b366bc2fe81f950baf6020de96eb (diff) | |
download | extras-18385c4b52c25f14475645172a2ce5dfd3fb1e9a.tar.gz |
simpleperf: Improve Callgraph.
1. Reduce columns used by callgraph by reducing spaces between
entries from 11 to 4. This helps to show more entries in the limited screen width.
2. Add [hit-in-function] line for each entry, so we know the percentage
of samples hit in the function and samples hit in the children functions.
3. Add --kallsyms option for report command.
After all, The callgraph is changed like below.
Before change:
|--99.08%-- java.lang.Thread.run
| void com.example.cyb.tappydefender.TDView.run()
| |
| | |--95.63%-- void com.example.cyb.tappydefender.TDView.draw()
After change:
|--98.85%-- java.lang.Thread.run
| void com.example.cyb.tappydefender.TDView.run()
| |--0.09%-- [hit in function]
| |
| |--95.54%-- void com.example.cyb.tappydefender.TDView.draw()
Bug: http://b/33356538
Test: run simpleperf_unit_test.
Test: run simpleperf report -g manually.
Change-Id: Ifc1846d4ee7469cadbcc727cae6bf59552d919d5
Diffstat (limited to 'simpleperf/cmd_report_test.cpp')
-rw-r--r-- | simpleperf/cmd_report_test.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp index f34be5ca..16b2f69d 100644 --- a/simpleperf/cmd_report_test.cpp +++ b/simpleperf/cmd_report_test.cpp @@ -437,6 +437,12 @@ TEST_F(ReportCommandTest, max_stack_and_percent_limit_option) { ASSERT_NE(content.find("89.03"), std::string::npos); } +TEST_F(ReportCommandTest, kallsyms_option) { + Report(PERF_DATA, {"--kallsyms", GetTestData("kallsyms")}); + ASSERT_TRUE(success); + ASSERT_NE(content.find("FakeKernelSymbol"), std::string::npos); +} + #if defined(__linux__) #include "event_selection_set.h" |