diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-21 11:48:49 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-21 11:48:49 +0300 |
| commit | e05a19f5847693600f0c424b699d94594306c2d7 (patch) | |
| tree | f6c5593e153d02fa143ce2c50cd6133d23811111 /internal/tracepoints | |
| parent | 8bd5f17ae2cd662b21fcd45a849c4b701a3aa40f (diff) | |
i7 classify memory P3 syscalls as mem kind
Diffstat (limited to 'internal/tracepoints')
| -rw-r--r-- | internal/tracepoints/dimension_selector_test.go | 15 | ||||
| -rw-r--r-- | internal/tracepoints/generated_tracepoints.go | 14 |
2 files changed, 22 insertions, 7 deletions
diff --git a/internal/tracepoints/dimension_selector_test.go b/internal/tracepoints/dimension_selector_test.go index 0a332b5..388ec12 100644 --- a/internal/tracepoints/dimension_selector_test.go +++ b/internal/tracepoints/dimension_selector_test.go @@ -78,6 +78,21 @@ func TestParseSelectorWithDimensionsEventfdKindIncludesEpollCreate(t *testing.T) } } +func TestParseSelectorWithDimensionsMemKindIncludesMlock(t *testing.T) { + sel, err := ParseSelectorWithDimensions("", "", DimensionSelectorConfig{ + TraceKinds: "mem", + }) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if !sel.ShouldAttach("sys_enter_mlock") { + t.Fatal("expected mlock to be attached for mem kind") + } + if sel.ShouldAttach("sys_enter_nanosleep") { + t.Fatal("expected nanosleep to be excluded when only mem kind is enabled") + } +} + func TestParseSelectorWithDimensionsSyscallOnly(t *testing.T) { sel, err := ParseSelectorWithDimensions("", "", DimensionSelectorConfig{ TraceSyscalls: "openat", diff --git a/internal/tracepoints/generated_tracepoints.go b/internal/tracepoints/generated_tracepoints.go index c45f6d2..b4fb1b0 100644 --- a/internal/tracepoints/generated_tracepoints.go +++ b/internal/tracepoints/generated_tracepoints.go @@ -1265,19 +1265,19 @@ var syscallKinds = map[string]string{ "lsm_list_modules": "null", "lsm_set_self_attr": "null", "madvise": "null", - "map_shadow_stack": "null", + "map_shadow_stack": "mem", "mbind": "null", "membarrier": "null", "memfd_create": "eventfd", "memfd_secret": "eventfd", "migrate_pages": "null", - "mincore": "null", + "mincore": "mem", "mkdir": "pathname", "mkdirat": "pathname", "mknod": "pathname", "mknodat": "pathname", - "mlock": "null", - "mlock2": "null", + "mlock": "mem", + "mlock2": "mem", "mlockall": "null", "mmap": "fd", "modify_ldt": "null", @@ -1293,13 +1293,13 @@ var syscallKinds = map[string]string{ "mq_timedsend": "fd", "mq_unlink": "pathname", "mremap": "mem", - "mseal": "null", + "mseal": "mem", "msgctl": "null", "msgget": "null", "msgrcv": "null", "msgsnd": "null", "msync": "null", - "munlock": "null", + "munlock": "mem", "munlockall": "null", "munmap": "mem", "name_to_handle_at": "pathname", @@ -1354,7 +1354,7 @@ var syscallKinds = map[string]string{ "recvfrom": "fd", "recvmmsg": "fd", "recvmsg": "fd", - "remap_file_pages": "null", + "remap_file_pages": "mem", "removexattr": "pathname", "removexattrat": "pathname", "rename": "name", |
