Skip to content

Commit

Permalink
Modified the docs and example to make a fix for iovisor#139
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelnair committed Sep 2, 2017
1 parent d9641be commit e7a5bdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/tutorial_bcc_python_developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ b = BPF(text="""
BPF_HASH(last);
void do_trace(struct pt_regs *ctx) {
int do_trace(struct pt_regs *ctx) {
u64 ts, *tsp, delta, key = 0;
// attempt to read stored timestamp
Expand All @@ -140,6 +140,7 @@ void do_trace(struct pt_regs *ctx) {
// update stored timestamp
ts = bpf_ktime_get_ns();
last.update(&key, &ts);
return 0;
}
""")

Expand Down
3 changes: 2 additions & 1 deletion examples/tracing/sync_timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
BPF_HASH(last);
void do_trace(struct pt_regs *ctx) {
int do_trace(struct pt_regs *ctx) {
u64 ts, *tsp, delta, key = 0;
// attempt to read stored timestamp
Expand All @@ -35,6 +35,7 @@
// update stored timestamp
ts = bpf_ktime_get_ns();
last.update(&key, &ts);
return 0;
}
""")

Expand Down

0 comments on commit e7a5bdc

Please sign in to comment.