commit | 31cd10414e7ae9b11f46264db14829e1a80a7606 | [log] [tgz] |
---|---|---|
author | Brendan Gregg <brendan.d.gregg@gmail.com> | Sat Feb 06 17:19:59 2016 -0800 |
committer | Brendan Gregg <brendan.d.gregg@gmail.com> | Sat Feb 06 17:19:59 2016 -0800 |
tree | f66cf2036be477d949a6006230a15137f34bce15 | |
parent | f6e92c9756c560924de2614efb38f3c42e9a4b9f [diff] |
simplify
diff --git a/tools/biosnoop.py b/tools/biosnoop.py index 51a8f6a..37ee3f9 100755 --- a/tools/biosnoop.py +++ b/tools/biosnoop.py
@@ -31,12 +31,10 @@ // cache PID and comm by-req int trace_pid_start(struct pt_regs *ctx, struct request *req) { - u32 pid; struct val_t val = {}; - pid = bpf_get_current_pid_tgid(); if (bpf_get_current_comm(&val.name, sizeof(val.name)) == 0) { - val.pid = pid; + val.pid = bpf_get_current_pid_tgid(); infobyreq.update(&req, &val); }