diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-21 11:45:09 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-21 11:45:09 +0300 |
| commit | 8bd5f17ae2cd662b21fcd45a849c4b701a3aa40f (patch) | |
| tree | 338b145f35995aa5db1726f93f862a79a9de7a2a /internal/tracepoints | |
| parent | c58aa139f5e7252aefb1bcacb5fa8b9ea8cdcdef (diff) | |
g7 classify fd-from-air eventfd users
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 da88954..0a332b5 100644 --- a/internal/tracepoints/dimension_selector_test.go +++ b/internal/tracepoints/dimension_selector_test.go @@ -63,6 +63,21 @@ func TestParseSelectorWithDimensionsPidfdKindOnly(t *testing.T) { } } +func TestParseSelectorWithDimensionsEventfdKindIncludesEpollCreate(t *testing.T) { + sel, err := ParseSelectorWithDimensions("", "", DimensionSelectorConfig{ + TraceKinds: "eventfd", + }) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if !sel.ShouldAttach("sys_enter_epoll_create1") { + t.Fatal("expected epoll_create1 to be attached for eventfd kind") + } + if sel.ShouldAttach("sys_enter_epoll_wait") { + t.Fatal("expected epoll_wait to be excluded when only eventfd 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 060a779..c45f6d2 100644 --- a/internal/tracepoints/generated_tracepoints.go +++ b/internal/tracepoints/generated_tracepoints.go @@ -1143,8 +1143,8 @@ var syscallKinds = map[string]string{ "dup": "fd", "dup2": "fd", "dup3": "dup3", - "epoll_create": "null", - "epoll_create1": "null", + "epoll_create": "eventfd", + "epoll_create1": "eventfd", "epoll_ctl": "epoll-ctl", "epoll_pwait": "fd", "epoll_pwait2": "fd", @@ -1159,7 +1159,7 @@ var syscallKinds = map[string]string{ "faccessat2": "pathname", "fadvise64": "fd", "fallocate": "fd", - "fanotify_init": "null", + "fanotify_init": "eventfd", "fanotify_mark": "pathname", "fchdir": "fd", "fchmod": "fd", @@ -1180,7 +1180,7 @@ var syscallKinds = map[string]string{ "fsconfig": "fd", "fsetxattr": "fd", "fsmount": "eventfd", - "fsopen": "null", + "fsopen": "eventfd", "fspick": "pathname", "fstatfs": "fd", "fsync": "fd", @@ -1223,8 +1223,8 @@ var syscallKinds = map[string]string{ "getxattrat": "pathname", "init_module": "null", "inotify_add_watch": "fd", - "inotify_init": "null", - "inotify_init1": "null", + "inotify_init": "eventfd", + "inotify_init1": "eventfd", "inotify_rm_watch": "fd", "io_cancel": "null", "io_destroy": "null", @@ -1246,7 +1246,7 @@ var syscallKinds = map[string]string{ "keyctl": "keyctl", "kill": "null", "landlock_add_rule": "null", - "landlock_create_ruleset": "null", + "landlock_create_ruleset": "eventfd", "landlock_restrict_self": "null", "lchown": "pathname", "lgetxattr": "pathname", |
