Skip to content

Commit

Permalink
Remove unused ts field in val_t in opensnoop.py. (iovisor#1981)
Browse files Browse the repository at this point in the history
Note this allows us to eliminate the `bpf_ktime_get_ns()`
call from `trace_entry()`.
  • Loading branch information
bolinfest authored and yonghong-song committed Sep 21, 2018
1 parent f7b1fb3 commit 89aefcc
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tools/opensnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
struct val_t {
u64 id;
u64 ts;
char comm[TASK_COMM_LEN];
const char *fname;
};
Expand All @@ -87,7 +86,6 @@
FILTER
if (bpf_get_current_comm(&val.comm, sizeof(val.comm)) == 0) {
val.id = id;
val.ts = bpf_ktime_get_ns();
val.fname = filename;
infotmp.update(&id, &val);
}
Expand Down

0 comments on commit 89aefcc

Please sign in to comment.