-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FATAL src/PerfCounters.cc:404:check_for_ioc_period_bug() errno: EINVAL] ioctl(PERF_EVENT_IOC_PERIOD) failed #3848
Comments
Later on, when debugging an application in GDB (using
|
I've never seen any restriction like that before. This is a pretty old CPU --- mobile Haswell variant. Can you try setting the period to a minimum of 32 in both places we call |
I run the tests. I first I tried with no changes, but the first 500 or so tests all failed, so I canceled it. The second is with only the change I mentioned previously, only changing diff --git a/src/PerfCounters.cc b/src/PerfCounters.cc
index 400dadff..a64e7bdf 100644
--- a/src/PerfCounters.cc
+++ b/src/PerfCounters.cc
@@ -328,7 +328,7 @@ static void check_for_ioc_period_bug(perf_event_attrs &perf_attr) {
attr.exclude_kernel = 1;
ScopedFd bug_fd = start_counter(0, -1, &attr);
- uint64_t new_period = 1;
+ uint64_t new_period = 32;
if (ioctl(bug_fd, PERF_EVENT_IOC_PERIOD, &new_period)) {
FATAL() << "ioctl(PERF_EVENT_IOC_PERIOD) failed";
}
@@ -636,6 +636,8 @@ void PerfCounters::reset(Ticks ticks_period) {
// PERF_EVENT_IOC_PERIOD so just turn 0 into a very big number.
ticks_period = uint64_t(1) << 60;
}
+
+ if (ticks_period < 32) ticks_period = 32;
if (!started) {
LOG(debug) << "Recreating counters with period " << ticks_period; Test 2: LastTest.log Test 3: |
When I tried to run
rr record ls
(or for any other program) I get the following error:In
src/PerfCounters.cc:404
the overflow period is being changed to 1, but that appears to not be a valid period in my machine. Changing the code to:I can check that the minimum period my machine supports is 32:
So changing the period to 32 make it work correctly.
System Info
Not sure which information is useful, but below is the kernel version and CPU info.
The text was updated successfully, but these errors were encountered: