summaryrefslogtreecommitdiff
path: root/internal/ioriotng.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-28 01:17:48 +0200
committerPaul Buetow <paul@buetow.org>2024-02-28 01:17:48 +0200
commit42f8733fc7c3fe23543d9da258b7ec91e11c9a63 (patch)
treefb323dc36d11011570b25ba1d86d64e9515d0810 /internal/ioriotng.go
parent105ee65a32d8c2ab456d7b246d3e8808b07880c4 (diff)
no need of debugfs package.
older kernels may not have some of the tracepoints.
Diffstat (limited to 'internal/ioriotng.go')
-rw-r--r--internal/ioriotng.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/internal/ioriotng.go b/internal/ioriotng.go
index d252030..46cc0e5 100644
--- a/internal/ioriotng.go
+++ b/internal/ioriotng.go
@@ -5,7 +5,6 @@ import "C"
import (
"fmt"
- "ioriotng/internal/debugfs"
"ioriotng/internal/flags"
"ioriotng/internal/generated/tracepoints"
@@ -21,7 +20,9 @@ func attachTracepoints(bpfModule *bpf.Module) error {
fmt.Println("Attached prog handle_" + name)
if _, err = prog.AttachTracepoint("syscalls", name); err != nil {
- return fmt.Errorf("Failed to attach to %s tracepoint: %v", name, err)
+ // OK, older Kernel versions may not have this tracepoint!
+ fmt.Println(fmt.Errorf("Failed to attach to %s tracepoint: %v", name, err))
+ continue
}
fmt.Println("Attached tracepoint " + name)
}
@@ -30,9 +31,6 @@ func attachTracepoints(bpfModule *bpf.Module) error {
}
func Run(flags flags.Flags) {
- // Print out tracepoints with fd to consider for implementation!
- fmt.Println(debugfs.TracepointsWithFd())
-
bpfModule, err := bpf.NewModuleFromFile("ioriotng.bpf.o")
if err != nil {
panic(err)