-
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
Support riscv64 #56
Support riscv64 #56
Conversation
Yes, if you want a slightly lower overhead. |
src/LinuxPerf.jl
Outdated
@@ -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/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this is a nicer table as a reference, it has all architectures: https://gpages.juszkiewicz.com.pl/syscalls-table/syscalls.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely
src/LinuxPerf.jl
Outdated
Clong(336) | ||
elseif Sys.ARCH === :aarch64 | ||
# See also https://arm64.syscall.sh/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and risc use the generic syscall table in the kernel btw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did find https://github.com/torvalds/linux/blob/b62cef9a5c673f1b8083159f5dc03c1c5daced2f/arch/arm64/tools/syscall_64.tbl (while I didn't find any symlink at all for riscv64), I was a bit hesitant to link here a generic table, but I guess that's what it is. Ok, I'll update the reference later.
Fix #55.
I can confirm tests pass locally:
Question: I presume it'd be nicer to add the llvmcall in
LinuxPerf.jl/src/LinuxPerf.jl
Lines 359 to 384 in e7dfcbd