Skip to content

Commit

Permalink
fixup: add map to helpers
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
  • Loading branch information
florianl committed Nov 11, 2024
1 parent d823d2f commit d9e3727
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion processmanager/ebpf/ebpf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/ebpf-profiler/support"
)

func TestMapID(t *testing.T) {
Expand All @@ -38,6 +39,6 @@ func TestMapID(t *testing.T) {
})
}

_, err := getMapID(1 << 24)
_, err := getMapID(1 << (support.StackDeltaBucketLargest + 1))
require.Error(t, err)
}
3 changes: 2 additions & 1 deletion tools/coredump/ebpfhelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ func __bpf_map_lookup_elem(id C.u64, mapdef *C.bpf_map_def, keyptr unsafe.Pointe
&C.exe_id_to_11_stack_deltas, &C.exe_id_to_12_stack_deltas, &C.exe_id_to_13_stack_deltas,
&C.exe_id_to_14_stack_deltas, &C.exe_id_to_15_stack_deltas, &C.exe_id_to_16_stack_deltas,
&C.exe_id_to_17_stack_deltas, &C.exe_id_to_18_stack_deltas, &C.exe_id_to_19_stack_deltas,
&C.exe_id_to_20_stack_deltas, &C.exe_id_to_21_stack_deltas:
&C.exe_id_to_20_stack_deltas, &C.exe_id_to_21_stack_deltas, &C.exe_id_to_22_stack_deltas,
&C.exe_id_to_23_stack_deltas:
ctx.stackDeltaFileID = *(*C.u64)(keyptr)
return unsafe.Pointer(stackDeltaInnerMap)
case &C.unwind_info_array:
Expand Down

0 comments on commit d9e3727

Please sign in to comment.