Commit 37f7fef2 authored by Paul Chaignon's avatar Paul Chaignon Committed by yonghong-song

profile: remove unnecessary bpf_probe_read call (#1822)

parent 69728067
......@@ -153,9 +153,7 @@ int do_perf_event(struct bpf_perf_event_data *ctx) {
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment