Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Feb 7, 2016
1 parent f6e92c9 commit 31cd104
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/biosnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 31cd104

Please sign in to comment.