Skip to content

Commit

Permalink
Merge pull request iovisor#315 from brendangregg/master
Browse files Browse the repository at this point in the history
stack walker typo and improvement
  • Loading branch information
drzaeus77 committed Jan 19, 2016
2 parents 2be9123 + 7d7eb0c commit d940b29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/offcputime
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static u64 get_frame(u64 *bp) {
if (bpf_probe_read(&ret, sizeof(ret), (void *)(*bp+8)))
return 0;
if (bpf_probe_read(bp, sizeof(*bp), (void *)*bp))
bp = 0;
*bp = 0;
if (ret < __START_KERNEL_map)
return 0;
return ret;
Expand Down
6 changes: 3 additions & 3 deletions tools/stackcount
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ static u64 get_frame(u64 *bp) {
u64 ret = 0;
if (bpf_probe_read(&ret, sizeof(ret), (void *)(*bp+8)))
return 0;
if (!ret || ret < __START_KERNEL_map)
return 0;
if (bpf_probe_read(bp, sizeof(*bp), (void *)*bp))
bp = 0;
*bp = 0;
if (ret < __START_KERNEL_map)
return 0;
return ret;
}
return 0;
Expand Down
2 changes: 1 addition & 1 deletion tools/stacksnoop
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static int print_frame(u64 *bp, int *depth) {
u64 ret = 0;
if (bpf_probe_read(&ret, sizeof(ret), (void *)(*bp+8)))
return 0;
if (!ret || ret < __START_KERNEL_map)
if (ret < __START_KERNEL_map)
return 0;
bpf_trace_printk("r%d: %llx\\n", *depth, ret);
if (bpf_probe_read(bp, sizeof(*bp), (void *)*bp))
Expand Down

0 comments on commit d940b29

Please sign in to comment.