Skip to content

Conversation

@r1viollet
Copy link
Collaborator

@r1viollet r1viollet commented Dec 11, 2023

What does this PR do?

Capture perf events and unwind in kernel space.

Motivation

Removing stack copies.

Additional Notes

There is much more work left!

How to test the change?

The native profiler requires elevated permissions to use the eBPF capability

sudo ./ddprof -u 20 -l debug -S r1-laptop --preset cpu_only BadBoggleSolver_run 5


for (size_t k = 0; k < pevent_hdr->bpf_pes.size(); ++k) {
pevent_hdr->bpf_pes[k].link =
bpf_program__attach_perf_event(skel->progs.process_sample, pevent_hdr->bpf_pes[k].fd);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates the link between the perf event file descriptor and the bpf program.

@r1viollet r1viollet changed the title R1viollet/ebpf proto [prototype] eBPF stack unwinding Dec 12, 2023
@r1viollet r1viollet changed the title [prototype] eBPF stack unwinding [PROF-9088][prototype] eBPF stack unwinding Mar 25, 2024
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