-
Notifications
You must be signed in to change notification settings - Fork 721
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
kprobe: fall back to tracefs if kernel doesn't support dots in PMU symbol #605
Conversation
74037f8
to
9570ff3
Compare
@chenhengqi how does the centos kernel fail when |
The version of kernel shipped in CentOS 8 Linux is 4.18. In 4.18, the kernel don't allow dot in symbol name in kprobe PMU case: Can we always fallback to tracefs interface ? Or check the error against EINVAL ? |
No need for feature detection IMO, falling back under a specific error like Lorenz suggested sounds like the best option to me. Is this possible? |
9570ff3
to
570d306
Compare
OK, just updated the code as you suggest. |
Since we allow `.` in symbol names, we need to sanitize those symbols to please tracefs. Signed-off-by: Hengqi Chen <[email protected]>
Centos 8 (with kernel 4.18) has kprobe PMU support, but don't allow `.` in symbol name. Detect such cases and fallback to tracefs interface. Signed-off-by: Hengqi Chen <[email protected]>
570d306
to
fccc6c0
Compare
…g dots These are all local symbols that visible in /proc/kallsyms and traceable by kprobes. Make sure the library supports attaching to these. Signed-off-by: Timo Beckers <[email protected]>
fccc6c0
to
5f13ae3
Compare
I've added a missing call to I've also converted |
Thanks. |
Centos 8 (kernel 4.18) has kprobe PMU, but don't allow
.
in symbol name,add a new option to workaround this.