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

[Profiling] Integrate rv-profile tool into X-HEEP #685

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Vincenzo-Petrolo
Copy link
Contributor

@Vincenzo-Petrolo Vincenzo-Petrolo commented Mar 27, 2025

Hi,
This PR has the goal to bring rv-profile into X-HEEP.

Graphic example of a FlameGraph

This is an example of what is generated after running the FFT example in X-HEEP.
FlameGraph

Features

  • All the CPUs currently supported by X-HEEP are also supported by rv-profile
  • Generation of interactive FlameGraphs. Use the example here

TODO

Among the things missing I see (feel free to edit and add more):

  • Adding a page to the doc

@davidmallasen
Copy link
Member

Hello @Vincenzo-Petrolo. Could you move profile to util/profile? I prefer not having a new top-level directory. Then, you can also keep the script in the same profile directory to avoid having it scattered in two different places

@Vincenzo-Petrolo
Copy link
Contributor Author

Hi @davidmallasen, I did it.

Please let me know If anything else needs to be addressed.

@davidmallasen
Copy link
Member

Thanks @Vincenzo-Petrolo. Then I think we're just missing the docs page documenting it. I would suggest adding a profiling page under how to. If you need more guidance let me know

@Vincenzo-Petrolo
Copy link
Contributor Author

Hi @davidmallasen, I added the page "Profiling" under "How To" 👍🏻.

@davidmallasen
Copy link
Member

Hello @Vincenzo-Petrolo. I tried running this with the information from the docs and I run into this:

usage: rv_profile [-h] --elf ELF --fst FST --cfg CFG [--out OUT]
rv_profile: error: argument --fst: expected one argument

So I believe something is missing. For example, I didn't know if I had to add a specific compile/execution flag or what simulator I had to use. I tried compiling and running the example_matadd with verilator.

@Vincenzo-Petrolo
Copy link
Contributor Author

Hi @davidmallasen,

I replicated your issue, it is because wal-lang (the module I use to analyze waveforms) only accepts FSTs if they have .fst extension in the name. I fixed it with last commit.

Verilator should be fine for simulation.

@davidmallasen
Copy link
Member

Hello @Vincenzo-Petrolo. It is still not working for me.

⠏ Reading the waveforms
>>>>> WAL Runtime error! <<<<<

Is it enough to just rename the vcd to fst? I imagine they are two different formats

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants