Skip to content

Commit 5fdc7f3

Browse files
committed
PR #4631: fix(ebpf): profile only common events
fix(ebpf): profile only common events (#4631) commit: main@a43ec17a6, cherry-pick
1 parent c290b18 commit 5fdc7f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/ebpf/perf_count.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ func (t *Tracee) countPerfEventSubmissions(ctx context.Context) {
3030

3131
evtStatZero := eventStatsValues{}
3232
for _, id := range t.policyManager.EventsToSubmit() {
33+
if id >= events.MaxCommonID {
34+
continue
35+
}
36+
3337
key := uint32(id)
3438
err := evtsCountsBPFMap.Update(unsafe.Pointer(&key), unsafe.Pointer(&evtStatZero))
3539
if err != nil {

0 commit comments

Comments
 (0)