Skip to content
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

syscall failing #106

Open
mortenfc opened this issue Jan 30, 2024 · 1 comment
Open

syscall failing #106

mortenfc opened this issue Jan 30, 2024 · 1 comment

Comments

@mortenfc
Copy link

I added this to debug the syscall

auto fd = static_cast(syscall(__NR_perf_event_open, &pea, pid, cpu, mFd, flags));
std::cout << "errno after syscall: " << errno << std::endl;
if (-1 == fd) {
perror("Error occurred");
return false;
}

And I get

errno after syscall: 22
Error occurred: Invalid argument
errno after syscall: 2
Error occurred: No such file or directory

Why?

@mortenfc
Copy link
Author

It turns out my vm did not have virtualized performance counters enabled, so only the SW events are working. I can't enable those performance counters for some CPU/bios reason. It would be good to print an error if HW performance counters can't be measured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant