@@ -231,7 +231,9 @@ For example, if you want to read the register x10 (a0), then run the following c
231
231
$ build/rv32emu -d - -q out.elf | jq .x10
232
232
```
233
233
234
- ## RISC-V Instructions/Registers Usage Statistics
234
+ ## Usage Statistics
235
+
236
+ ### RISC-V Instructions/Registers
235
237
236
238
This is a static analysis tool for assessing the usage of RV32 instructions/registers
237
239
in a given target program.
@@ -255,21 +257,27 @@ _Example Instructions Histogram_
255
257
_ Example Registers Histogram_
256
258
![ Registers Hisrogram Example] ( docs/histogram-reg.png )
257
259
258
- ## RISC-V Basic Block Usage Statistics
260
+ ### Basic Block
259
261
260
- To install [ lolviz] ( https://github.com/parrt/lolviz )
262
+ To install [ lolviz] ( https://github.com/parrt/lolviz ) , use the following command:
261
263
``` shell
262
264
$ pip install lolviz
263
265
```
264
- For macOS users, installing might be required:
266
+
267
+ For macOS users, it might be necessary to install additional dependencies:
265
268
``` shell
266
269
$ brew install graphviz
267
270
```
268
- First, user need to crate the directory ` prof ` and build profiling data through executing ` rv32emu `
269
271
272
+ First, users need to create a directory named prof and then build the profiling data by executing ` rv32emu ` .
273
+ This can be done as follows:
274
+ ``` shell
275
+ $ build/rv32emu -p build/[test_program].elf
276
+ ```
277
+
278
+ To analyze the profiling data, use the ` rv_profiler ` tool with the desired options:
270
279
``` shell
271
- $ ./build/rv32emu -p ./build/[test_program].elf
272
- $ ./tools/rv_profiler [--start-address| --stop-address| --graph-ir] [test_program]
280
+ $ tools/rv_profiler [--start-address| --stop-address| --graph-ir] [test_program]
273
281
```
274
282
275
283
## Contributing
0 commit comments