summaryrefslogtreecommitdiff
path: root/internal/generate/classify.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-21 13:59:39 +0200
committerPaul Buetow <paul@buetow.org>2026-02-21 13:59:39 +0200
commitb5792f8e23d1599dcce49bc83e5d128abee484f3 (patch)
treeef07039e4e05b23a6b41adf6b663abd0109a436b /internal/generate/classify.go
parent114f0cb9e6e5487fccaafb7d7065b611c8c14402 (diff)
Enable name_to_handle_at and io_uring fd attribution
Amp-Thread-ID: https://ampcode.com/threads/T-019c7fec-eec9-706a-8338-3ce674802680 Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'internal/generate/classify.go')
-rw-r--r--internal/generate/classify.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/generate/classify.go b/internal/generate/classify.go
index 75a12fe..c55e46f 100644
--- a/internal/generate/classify.go
+++ b/internal/generate/classify.go
@@ -28,7 +28,7 @@ const (
type ClassificationResult struct {
Kind TracepointKind
- PathnameField string // for KindPathname: "pathname", "path", or "filename"
+ PathnameField string // for KindPathname: "pathname", "path", "filename", or "name"
}
// ClassifyFormat determines the tracepoint kind for a parsed format section.
@@ -103,6 +103,10 @@ func classifyNameOnly(name string) (ClassificationResult, bool) {
switch name {
case "sys_enter_open_by_handle_at":
return ClassificationResult{Kind: KindOpenByHandleAt}, true
+ case "sys_enter_io_uring_enter":
+ return ClassificationResult{Kind: KindFd}, true
+ case "sys_enter_io_uring_register":
+ return ClassificationResult{Kind: KindFd}, true
case "sys_enter_fcntl":
return ClassificationResult{Kind: KindFcntl}, true
case "sys_enter_syslog":
@@ -132,6 +136,10 @@ func classifyNameAndField(name, fieldType, fieldName string) (ClassificationResu
if fieldType == "unsigned int" && fieldName == "oldfd" {
return ClassificationResult{Kind: KindDup3}, true
}
+ case "sys_enter_name_to_handle_at":
+ if fieldType == "const char *" && fieldName == "name" {
+ return ClassificationResult{Kind: KindPathname, PathnameField: "name"}, true
+ }
}
if strings.HasPrefix(name, "sys_enter") &&