Skip to content

Only the main thread is targeted with --pid #3

Description

@bobrik

Currently perf_event_open targets a single PID:

ebpf-bolt/ebpf-bolt.cc

Lines 138 to 139 in 8527320

for (i = 0; i < nr_cpus; i++) {
fd = syscall(__NR_perf_event_open, &attr, env.pid, i, -1, 0);

Unfortunately, this actually means TID, so if you have a multithreaded program, you are missing out on quite a bit.

I think the right thing to do here is to pass the PID via BSS and do filtering in ebpf.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions