Skip to content

Commit

Permalink
uregs: Minor cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
euloh authored and kvanhees committed May 25, 2023
1 parent f915d03 commit 500773f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libdtrace/dt_cg.c
Original file line number Diff line number Diff line change
Expand Up @@ -4293,8 +4293,8 @@ dt_cg_uregs(unsigned int idx, dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp
emit(dlp, BPF_MOV_REG(BPF_REG_1, BPF_REG_0));
emit(dlp, BPF_CALL_HELPER(BPF_FUNC_task_pt_regs));
dt_regset_free_args(drp);
emit(dlp, BPF_ALU64_IMM(BPF_ADD, BPF_REG_0, idx * sizeof(uint64_t)));
emit(dlp, BPF_LOAD(BPF_DW, dnp->dn_reg, BPF_REG_0, 0));
/* The BPF verifier allows this load since it tracks %r0 as "ptr_pt_regs". */
emit(dlp, BPF_LOAD(BPF_DW, dnp->dn_reg, BPF_REG_0, idx * sizeof(uint64_t)));
dt_regset_free(drp, BPF_REG_0);
}

Expand Down

0 comments on commit 500773f

Please sign in to comment.