diff options
author | Yabin Cui <yabinc@google.com> | 2016-06-13 18:03:47 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2016-06-17 17:57:36 -0700 |
commit | 877751bbae11e009070e036ee1cd16e88135fff5 (patch) | |
tree | e0c795052ab4055a2d9bb0d2d2282305ff3b649d /simpleperf/cpu_hotplug_test.cpp | |
parent | 90d56472a6981cbbeba5adfc293f920004cd9a22 (diff) | |
download | extras-877751bbae11e009070e036ee1cd16e88135fff5.tar.gz |
simpleperf: support event group.
Kernel supports monitoring several events as a group, so they are
scheduled on and out at the same time. Add --group option to
stat command and record command.
Adjust the method to calculate miss rate in stat command: limit
the matched events in the same group or with scale == 1.0.
Bug: 29213742
Change-Id: I899aba207f1e3357307541e81f97526f5a2913c3
Diffstat (limited to 'simpleperf/cpu_hotplug_test.cpp')
-rw-r--r-- | simpleperf/cpu_hotplug_test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/simpleperf/cpu_hotplug_test.cpp b/simpleperf/cpu_hotplug_test.cpp index 2cc9a0e0..56962b16 100644 --- a/simpleperf/cpu_hotplug_test.cpp +++ b/simpleperf/cpu_hotplug_test.cpp @@ -232,7 +232,7 @@ TEST(cpu_offline, offline_while_recording) { size_t iterations = 0; while (std::chrono::steady_clock::now() < end_time) { - std::unique_ptr<EventFd> event_fd = EventFd::OpenEventFile(attr, -1, test_cpu, false); + std::unique_ptr<EventFd> event_fd = EventFd::OpenEventFile(attr, -1, test_cpu, nullptr, false); if (event_fd == nullptr) { // Failed to open because the test_cpu is offline. continue; @@ -273,7 +273,7 @@ TEST(cpu_offline, offline_while_ioctl_enable) { size_t iterations = 0; while (std::chrono::steady_clock::now() < end_time) { - std::unique_ptr<EventFd> event_fd = EventFd::OpenEventFile(attr, -1, test_cpu, false); + std::unique_ptr<EventFd> event_fd = EventFd::OpenEventFile(attr, -1, test_cpu, nullptr, false); if (event_fd == nullptr) { // Failed to open because the test_cpu is offline. continue; @@ -310,11 +310,11 @@ TEST(cpu_offline, offline_while_recording_on_another_cpu) { for (size_t i = 0; i < TEST_ITERATION_COUNT; ++i) { int record_cpu = 0; ASSERT_TRUE(SetCpuOnline(test_cpu, true)); - std::unique_ptr<EventFd> event_fd = EventFd::OpenEventFile(attr, getpid(), record_cpu); + std::unique_ptr<EventFd> event_fd = EventFd::OpenEventFile(attr, getpid(), record_cpu, nullptr); ASSERT_TRUE(event_fd != nullptr); ASSERT_TRUE(SetCpuOnline(test_cpu, false)); event_fd = nullptr; - event_fd = EventFd::OpenEventFile(attr, getpid(), record_cpu); + event_fd = EventFd::OpenEventFile(attr, getpid(), record_cpu, nullptr); ASSERT_TRUE(event_fd != nullptr); } } |