Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
link: don't treat EINVAL from perf_event_open as ENOENT
Running TestUprobeExtWithOpts on arm64 currently gives a weird error: uprobe_test.go:101: creating perf_uprobe PMU: symbol 'open+0x1' not found: file does not exist Investigating via strace shows that perf_event_open returns EINVAL: perf_event_open({type=0x7 /* PERF_TYPE_??? */, size=PERF_ATTR_SIZE_VER1, ...}, -1, 0, -1, PERF_FLAG_FD_CLOEXEC) = -1 EINVAL (Invalid argument) We map this to ENOENT since older kernels don't return a useful error when the target function doesn't exist. The example above shows that this is too broad. Stop mapping EINVAL to ENOENT.
- Loading branch information