Commit b8d33cb6 authored by Brendan Gregg's avatar Brendan Gregg

Merge pull request #427 from markdrayton/stacksnoop-filter

Fix stacksnoop PID filter
parents ee793635 ab133d2d
......@@ -93,7 +93,7 @@ void trace_stack(struct pt_regs *ctx) {
if args.pid:
bpf_text = bpf_text.replace('FILTER',
('u32 pid; pid = bpf_get_current_pid_tgid(); ' +
'if (pid != %s) { return 0; }') % (args.pid))
'if (pid != %s) { return; }') % (args.pid))
else:
bpf_text = bpf_text.replace('FILTER', '')
if debug:
......
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