Etherlink/RISC-V: Instrument kernel to produce traces
Relates to RV-759.
What
This MR:
- Adds a
tracingfeature to the kernel, which allows it to be instrumented using thetracinglibrary in order to produce execution traces. - Instruments the kernel to produce execution traces which highlight store access patterns when applying a transaction.
Why
To better understand Etherlink execution in order to inform requirements for its migration to the RISC-V PVM.
How
In order to keep instrumentation lightweight, the use of the instrument attribute is not guarded behind the tracing feature flag on every use. Instead, it is exported everywhere and its implementations is replaced with a no op proc macro when the tracing feature is disabled.
Manually Testing
See the corresponding PR in tezos/riscv-pvm for testing the tracing feature.
Tasks for the Author
-
Link all Linear issues related to this MR using magic words (e.g. part of, relates to, closes). -
Eliminate dead code and other spurious artefacts introduced in your changes. -
Document new public functions, methods and types. -
Make sure the documentation for updated functions, methods, and types is correct. -
Add tests for bugs that have been fixed. -
Put in reasonable effort to ensure that CI will pass. make -C src/riscvdune test src/lib_riscvdune build src/rust_deps
-
If applicable, trigger the tezt-riscv-slow-sequentialtest job. -
Write commit messages to reflect the changes they're about. -
Self-review your changes to ensure they are high-quality. -
Complete all of the above before assigning this MR to reviewers.
Edited by Victor Dumitrescu