diff options
author | Yabin Cui <yabinc@google.com> | 2016-04-01 20:22:35 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2016-04-05 16:52:47 -0700 |
commit | 2d6efe4b167da4e6b77f168b1820239ee65599e2 (patch) | |
tree | 631aced5c7cb30b3c93345c55e67fe329fdf1d1a /simpleperf/cmd_report_test.cpp | |
parent | 96e12e78722988e912664b7323341799fdd12b9b (diff) | |
download | extras-2d6efe4b167da4e6b77f168b1820239ee65599e2.tar.gz |
simpleperf: support reporting more than one event type.
When sampling kernel trace points, it is like to sample more than
one even type. Like `simpleperf record -e kmem:mm_page_alloc,kmem:mm_page_free`.
1. change record command to dump event_id for all records.
2. change report command and record reader to support multiple
event attrs.
3. hide record_cache inside EventSelectionSet.
4. add test to report multiple event types.
Bug: 27403614
Change-Id: Ic22a5527d68e7a843e3cf95e85381f8ad6bcb196
Diffstat (limited to 'simpleperf/cmd_report_test.cpp')
-rw-r--r-- | simpleperf/cmd_report_test.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp index a4bd6f39..4c2b4978 100644 --- a/simpleperf/cmd_report_test.cpp +++ b/simpleperf/cmd_report_test.cpp @@ -267,6 +267,13 @@ TEST_F(ReportCommandTest, report_symbols_of_nativelib_in_apk) { ASSERT_NE(content.find("Func2"), std::string::npos); } +TEST_F(ReportCommandTest, report_more_than_one_event_types) { + Report(PERF_DATA_WITH_TWO_EVENT_TYPES); + ASSERT_TRUE(success); + ASSERT_NE(content.find("cpu-cycles"), std::string::npos); + ASSERT_NE(content.find("cpu-clock"), std::string::npos); +} + #if defined(__linux__) static std::unique_ptr<Command> RecordCmd() { |