Skip to content

Commit

Permalink
opensnoop: Remove 'delta' and 'cont' variables
Browse files Browse the repository at this point in the history
... since they are unused.

Signed-off-by: KarimAllah Ahmed <[email protected]>
  • Loading branch information
KarimAllah committed Sep 10, 2016
1 parent 63656c2 commit 0eb81fd
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tools/opensnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
struct data_t {
u32 pid;
u64 ts;
u64 delta;
int ret;
char comm[TASK_COMM_LEN];
char fname[NAME_MAX];
Expand Down Expand Up @@ -95,7 +94,6 @@
bpf_probe_read(&data.comm, sizeof(data.comm), valp->comm);
bpf_probe_read(&data.fname, sizeof(data.fname), (void *)valp->fname);
data.pid = valp->pid;
data.delta = tsp - valp->ts;
data.ts = tsp / 1000;
data.ret = PT_REGS_RC(ctx);
Expand Down Expand Up @@ -126,7 +124,6 @@ class Data(ct.Structure):
_fields_ = [
("pid", ct.c_ulonglong),
("ts", ct.c_ulonglong),
("delta", ct.c_ulonglong),
("ret", ct.c_int),
("comm", ct.c_char * TASK_COMM_LEN),
("fname", ct.c_char * NAME_MAX)
Expand All @@ -147,7 +144,6 @@ def print_event(cpu, data, size):
global start_ts
global prev_ts
global delta
global cont

# split return value into FD and errno columns
if event.ret >= 0:
Expand Down

0 comments on commit 0eb81fd

Please sign in to comment.