From 31cd10414e7ae9b11f46264db14829e1a80a7606 Mon Sep 17 00:00:00 2001 From: Brendan Gregg Date: Sat, 6 Feb 2016 17:19:59 -0800 Subject: [PATCH] simplify --- tools/biosnoop.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/biosnoop.py b/tools/biosnoop.py index 51a8f6a7c770..37ee3f9cb401 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); }