-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: perf_event_open error : unknown architecture
on riscv64
#55
Comments
https://jborza.com/post/2021-05-11-riscv-linux-syscalls/ says SYS_perf_event_open is 241 (search perf_event_open) and for |
Thanks, I got to that table a few minutes after opening the ticket! However with diff --git a/src/LinuxPerf.jl b/src/LinuxPerf.jl
index 7326cb3..fd6c17c 100644
--- a/src/LinuxPerf.jl
+++ b/src/LinuxPerf.jl
@@ -167,6 +167,9 @@ elseif Sys.ARCH === :arm
Clong(364)
elseif Sys.ARCH === :powerpc64le || Sys.ARCH === :ppc64le
Clong(319)
+elseif Sys.ARCH === :riscv64 || Sys.ARCH === :rv64
+ # See syscalls table at https://jborza.com/post/2021-05-11-riscv-linux-syscalls/
+ Clong(241)
else
Clong(-1) # sentinel for unknown syscall ID
end
@@ -350,6 +353,9 @@ elseif Sys.ARCH === :arm
Clong(172)
elseif Sys.ARCH === :powerpc64le || Sys.ARCH === :ppc64le
Clong(171)
+elseif Sys.ARCH === :riscv64 || Sys.ARCH === :rv64
+ # See syscalls table at https://jborza.com/post/2021-05-11-riscv-linux-syscalls/
+ Clong(167)
else
Clong(-1) # sentinel for unknown syscall ID
end I get
This may be due to the kernel I'm using on this machine? It's $ uname -a
Linux rvc23 5.15.0-starfive #1 SMP Mon Dec 19 07:56:37 EST 2022 riscv64 GNU/Linux It's a bit old, I have access to another board with a much newer kernel v6.6.36, but I can't use |
Yeah, it's probably a kernel issue, on a different machine it works:
🥳 |
I guess that's because of
LinuxPerf.jl/src/LinuxPerf.jl
Lines 160 to 172 in e7dfcbd
Where are those magic numbers coming from?
The text was updated successfully, but these errors were encountered: