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

configure: Check /proc/sys/kernel/perf_event_paranoid #1847

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kangtegong
Copy link
Contributor

@kangtegong kangtegong commented Nov 15, 2023

In order to get kernel information with uftrace without any problem, I think /proc/sys/kernel/perf_event_paranoid should be 2 or less. But many distros nowadays set this value to more than 3 as default.

I wanted to inform users about this in the docs, but it's so general that it's unclear which docs to leave this information in.

So this commit suggests checking this information
when configuring uftrace.

Closes: #1424

@kangtegong
Copy link
Contributor Author

If there's any better idea, please let me know.

@kangtegong kangtegong changed the title configure: Check /proc/sys/kernel/perf_event_paranoid configure: Check /proc/sys/kernel/perf_event_paranoid when configuring Nov 15, 2023
@kangtegong kangtegong changed the title configure: Check /proc/sys/kernel/perf_event_paranoid when configuring configure: Check /proc/sys/kernel/perf_event_paranoid Nov 15, 2023
In order to get kernel information with uftrace without any problem,
I think /proc/sys/kernel/perf_event_paranoid should be 2 or less.
But many distros nowadays set this value to more than 3 as default.

I wanted to inform users about this in the docs, but it's
so general that it's unclear which docs to leave this information in.

So this commit suggests checking this information
when configuring uftrace.

Closes: namhyung#1424

Signed-off-by: Kang Minchul <[email protected]>
@namhyung
Copy link
Owner

Showing the value when configure runs is not ideal because it may be far from users actually run uftrace.

I think it'd be better if uftrace info could show such information. Maybe we can have --system option to display various system information related to uftrace like this one. Additionally it can display the same thing in the "system information" section in the uftrace info output. Something like this?

$ uftrace info --system
cpu info            : 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
number of cpus      : 8 / 8 (online / possible)
memory info         : 4.3 / 31.0 GB (free / total)
kernel version      : Linux 6.1.25-1rodete1-amd64
hostname            : bangji
distro              : "Debian GNU/Linux rodete"
perf_event_paranoid : 3
kptr_restrict       : 1

@honggyukim
Copy link
Collaborator

I think uftrace info --features might be better and we can show all the feature info in this option as follows.

I would like it to have compile time and run time feature tests separately.

@kangtegong
Copy link
Contributor Author

Thank you for your detailed feedbacks,
I will send you a revised PR reflecting your feedback shortly :)

@namhyung
Copy link
Owner

Maybe --features can be for compile time feature tests then. But I'm not sure how much difference it can get from uftrace --version.

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.

inform users about /proc/sys/kernel/perf_event_paranoid value in docs
3 participants