commit | 4d57da10826ca7b3baf49943dc8fcb837ad9032e | [log] [tgz] |
---|---|---|
author | Brendan Gregg <brendan.d.gregg@gmail.com> | Tue Jan 19 00:55:12 2016 -0800 |
committer | Brendan Gregg <brendan.d.gregg@gmail.com> | Tue Jan 19 00:55:12 2016 -0800 |
tree | cee98b932fb477c7a4b231393b9fd80b09cbb225 | |
parent | 38cef486483d0b828fa01f0a22f49c1be3d85527 [diff] [blame] |
stack walker typo and improvement
diff --git a/tools/stackcount b/tools/stackcount index b6cc3b6..7b4aa43 100755 --- a/tools/stackcount +++ b/tools/stackcount
@@ -86,10 +86,10 @@ 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;