Skip to content

Commit

Permalink
Use the right register type in arm64
Browse files Browse the repository at this point in the history
As we were using thhe x86 one, `bpf_user_pt_regs_t` is defined in
vmlinux as:

```
typedef struct pt_regs bpf_user_pt_regs_t;
```

in x86 and:

```
typedef struct user_pt_regs bpf_user_pt_regs_t;
```

in arm64

Test Plan
=========

Tested on my x86 and arm64 machines.
  • Loading branch information
javierhonduco committed Apr 29, 2024
1 parent a932078 commit 0f61958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bpf/profiler.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ int dwarf_unwind(struct bpf_perf_event_data *ctx) {
}

// Set up the initial unwinding state.
static __always_inline bool set_initial_state(unwind_state_t *unwind_state, struct pt_regs *regs) {
static __always_inline bool set_initial_state(unwind_state_t *unwind_state, bpf_user_pt_regs_t *regs) {
unwind_state->stack.len = 0;
unwind_state->tail_calls = 0;

Expand Down

0 comments on commit 0f61958

Please sign in to comment.