-
Notifications
You must be signed in to change notification settings - Fork 166
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
generated dot files are unusable #222
Comments
Honestly, I am surprised that it generated any output at all. Usually, one would only feed in a few methods at a time, not disassemble the entire program graphically. Also, there are many dot file engines with different parametrizations and getting such big inputs to be even somewhat readable is always an exercise in tuning. Anyway, you tried it, so I guess there is a use-case beyond curiosity for you. Maybe you can go a bit deeper into what you want to achieve? Then we might be able to find a workable solution or plan future features accordingly. |
how I did itthe graph above was generated using following command
how would you do it?based on the bpfi-cli usage how would you feed in only a few methods?
use-caseHave a look at https://go.dev/blog/pprof. While that example can't be translated 1:1 to solana programs, the goal is usually to visualise control flow and I am not sure to what extend rbpf emulates the operation that occurs within the runtime in a solana cluster, but since the solana runtime has a uniq set of rules, optimisation and debugging of solana programs will benefit from a good profiler. |
This crate (RBPF) does not emulate the solana program runtime, it is what the solana program runtime depends on.
Yes, we are definitely lacking good tooling on this end. Currently there is no way to restrict the DOT output to specific functions or to only show the profiling at function level (not at instruction level). What you can do right now is manually either cut parts from the input binary file, or the output dot file. Do you just need any kind of profile (would a textual trace suffice?) or do you specifically want to see the heat / color coded CFG visually? |
I am using https://github.com/solana-labs/solana/tree/master/rbpf-cli but if you look at https://github.com/solana-labs/solana/blob/3c5f505d3e3ded8b3110b44bc458d01701b93e4d/rbpf-cli/Cargo.toml#L19 you see it pulls this repo as a dependency, therefor I opened the issue here. I think what I am really looking for would be:
|
generated dot files of even the most simple solana programs are completely unusable:
example of a control flow graph:
The text was updated successfully, but these errors were encountered: