From 6464a4d907b68722746453df9091b4a8623ca18f Mon Sep 17 00:00:00 2001 From: gray Date: Tue, 9 Jul 2024 18:30:55 +0800 Subject: [PATCH] Abort if runtime.GOARCH is not amd64 Signed-off-by: gray --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index fa9ba525..430df737 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,7 @@ import ( "log" "os" "os/signal" + "runtime" "syscall" "time" @@ -36,6 +37,11 @@ func main() { fmt.Printf("pwru %s\n", pwru.Version) os.Exit(0) } + if flags.FilterTrackBpfHelpers { + if runtime.GOARCH != "amd64" { + log.Fatalf("BPF helpers tracking is only supported on amd64") + } + } if err := unix.Setrlimit(unix.RLIMIT_NOFILE, &unix.Rlimit{ Cur: 8192,