Skip to content
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

RISC-V support #705

Open
dendibakh opened this issue Mar 21, 2025 · 1 comment
Open

RISC-V support #705

dendibakh opened this issue Mar 21, 2025 · 1 comment

Comments

@dendibakh
Copy link

Are there any plans to support RISC-V?

I tried hotspot on SiFive P550 and see the following:

// dump file collected with simple `perf record -e branches -- <my app>`
feature not properly read PerfHeader::CACHE 8 0
feature not properly read PerfHeader::SAMPLE_TIME 16 0
feature not properly read PerfHeader::BPF_BTF 4 0
1 528384 6 1 0
feature not properly read PerfHeader::BPF_PROG_INFO 4 0
feature not properly read PerfHeader::CPU_TOPOLOGY 380 348
feature not properly read PerfHeader::CPU_PMU_CAPS 4 0
Linux version "6.6.21" detected. Switching to automatic buffering.
No information about CPU architecture found. Cannot unwind.
"The hotspot-perfparser binary exited with code 6 (invalid perf data file)."

An estimate of how hard it would be to add the RISC-V support would also be great.
Thank you for considering.

@milianw
Copy link
Member

milianw commented Mar 24, 2025

Can you record some data on a small test binary compiled statically for RISC-V, then attach the static binary and the accompanying perf.data file?

An estimate of how hard it would be to add the RISC-V support would also be great.

Potentially trivial, assuming elfutils already supports that arch. we'd first need to extend perfregisterinfo.h/cpp based on info we can hopefully copy from the linux kernel and then hope for the best. then there might be arch specifics we might need to take into account, but that is only possible with someone who knows the details on that platform, i.e. do we need to adjust the instruction pointer address in a similar fashion as we do for ARM?

@milianw milianw added help wanted needs_info not enough info labels Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants