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

Add warning for perf_event_paranoid >= 3 #40

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

topolarity
Copy link
Member

@topolarity topolarity commented Sep 11, 2024

Paranoia settings this high don't allow even user-level perf monitoring of your own process.

That documentation can be hard to find online so this adds a warning to nudge the user in the right direction:

julia> bench = make_bench([LinuxPerf.EventType(:hw, :instructions)])
┌ Warning: try to adjust /proc/sys/kernel/perf_event_paranoid to a value <= 2 or run with the CAP_PERFMON capability
└ @ LinuxPerf ~/.julia/dev/LinuxPerf/src/LinuxPerf.jl:301
ERROR: perf_event_open error : Permission denied

Paranoia settings this high don't allow even user-level perf monitoring
of your own process, but that documentation can be hard to find online
so this adds a warning to nudge the user in the right direction.
@vchuravy vchuravy merged commit ec2d084 into JuliaPerf:master Sep 11, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants