-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add profiler #333
Add profiler #333
Conversation
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.
Check #189 (comment) carefully. You should implement some of the following:
- Allow Linux perf to profile JITted code as QEMU.
- Generate profiling logs and use report program to view as mono does.
- Display in tree-based view as vmprof does.
It is important to provide interactive ways to browse profiling data with external tools. See All my favorite tracing tools: eBPF, QEMU, Perfetto, new ones I built and more.
This runtime profiler serves as a trigger for the tier-1 JIT compiler. Do you mean we should provide a log mode for users to dump the profiling information? |
If you are going to close #189, you should consolidate the profiling facilities. |
16adbc9
to
473babf
Compare
1b0be9d
to
49938f0
Compare
Currently, we only support for providing the information about branch, branch-untaken, and IRs of a basic block. I think we can create another issue for supporting visualizing graph IR. |
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.
- Separate the processes of generating and rendering profiling data. Specifically, rv32emu (activated with the
-p
option) will be responsible for generating profiling data, while the rendering will be handled by the newly added toolrv_profile
. - Ensure that block information, including the instructions (referencing ELF files for disassembly as needed), is captured as part of the profiling data. This approach will make the data more informative and valuable for analysis.
- The proposed changes aim to equip the system with adequate capabilities for depicting runtime profiling information, a crucial aspect for ongoing JIT development.
49938f0
to
6bf43c3
Compare
The rationale behind segregating the generation and rendering of profiling data includes:
|
6bf43c3
to
1ef4680
Compare
|
1ef4680
to
b8b8db8
Compare
Yes, you can write a Python-based renderer for profiling data.
No, you can specify the start/stop address for |
Does you means this function supports for providing the instruction sequence of a basic block starting from address |
It depends on the format/layout of profiling data recorded during the execution of RISC-V programs. You can simply record the entry/exit address of each block, so that you can consult binutils. |
4cb78b9
to
ecd2ef6
Compare
Based on our observation, a high percentage of true hotspots involve loops or backward jumps, but the number of IR is unstable within these true hotspots. Therefore, we believe our profiler can use three indices to detect hotspots: 1. Backward jump 2. Loop 3. Used frequency Close: sysprog21#189
ecd2ef6
to
61a9152
Compare
61a9152
to
ee8ac93
Compare
Based on our observation, a high percentage of true hotspots involve loops or backward jumps, but the number of IR is unstable within these true hotspots.
Therefore, we believe our profiler can use three indices to detect hotspots:
Close: #189