Skip to content

Commit

Permalink
profile: remove unnecessary bpf_probe_read call (iovisor#1822)
Browse files Browse the repository at this point in the history
  • Loading branch information
pchaigno authored and yonghong-song committed Jun 14, 2018
1 parent 6972806 commit 37f7fef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ def stack_id_err(stack_id):
if (key.kernel_stack_id >= 0) {
// populate extras to fix the kernel stack
struct pt_regs regs = {};
bpf_probe_read(&regs, sizeof(regs), (void *)&ctx->regs);
u64 ip = PT_REGS_IP(&regs);
u64 ip = PT_REGS_IP(&ctx->regs);
u64 page_offset;
// if ip isn't sane, leave key ips as zero for later checking
Expand Down

0 comments on commit 37f7fef

Please sign in to comment.