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

elf: try to use perf_event_open syscall to create kprobe/uprobes #277

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

Conversation

bom-d-van
Copy link

The solution is ported from bcc/src/cc/libbpf.c:bpf_try_perf_event_open_with_probe

Kernel API with e12f03d ("perf/core: Implement the 'perf_kprobe' PMU") allows
creating [k,u]probe with perf_event_open, which makes it easier to clean up
the [k,u]probe. This function tries to create pfd with the perf_kprobe PMU.

The solution is ported from bcc/src/cc/libbpf.c:bpf_try_perf_event_open_with_probe

> Kernel API with e12f03d ("perf/core: Implement the 'perf_kprobe' PMU") allows
> creating [k,u]probe with perf_event_open, which makes it easier to clean up
> the [k,u]probe. This function tries to create pfd with the perf_kprobe PMU.
@bom-d-van bom-d-van force-pushed the try_perf_event_open_with_probe branch from 73a015a to ca81722 Compare February 16, 2021 21:01
@bom-d-van bom-d-van changed the title Try to use perf_event_open syscall to create kprobe/uprobes elf: try to use perf_event_open syscall to create kprobe/uprobes Feb 16, 2021
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.

None yet

1 participant