Commit 4c9f6605 authored by Brendan Gregg's avatar Brendan Gregg

profile: -p should match user PID

parent bf442eb6
...@@ -132,7 +132,7 @@ BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE) ...@@ -132,7 +132,7 @@ BPF_STACK_TRACE(stack_traces, STACK_STORAGE_SIZE)
// This code gets a bit complex. Probably not suitable for casual hacking. // This code gets a bit complex. Probably not suitable for casual hacking.
int do_perf_event(struct bpf_perf_event_data *ctx) { int do_perf_event(struct bpf_perf_event_data *ctx) {
u32 pid = bpf_get_current_pid_tgid(); u32 pid = bpf_get_current_pid_tgid() >> 32;
if (!(THREAD_FILTER)) if (!(THREAD_FILTER))
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment