From 877751bbae11e009070e036ee1cd16e88135fff5 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Mon, 13 Jun 2016 18:03:47 -0700 Subject: 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 --- simpleperf/cpu_hotplug_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'simpleperf/cpu_hotplug_test.cpp') 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 event_fd = EventFd::OpenEventFile(attr, -1, test_cpu, false); + std::unique_ptr 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 event_fd = EventFd::OpenEventFile(attr, -1, test_cpu, false); + std::unique_ptr 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 event_fd = EventFd::OpenEventFile(attr, getpid(), record_cpu); + std::unique_ptr 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); } } -- cgit v1.2.3