sp1 icon indicating copy to clipboard operation
sp1 copied to clipboard

feat: allow to profile inline functions

Open leruaa opened this issue 8 months ago • 1 comments

Motivation

It's sometimes useful to be able to have inlines function shown in the call stack when profiling a program

Solution

  • Add a new TRACE_INLINE_FUNCTION env variable to enable inline functions tracking
  • Load inline functions metadata using the DWARF
  • Uses JAL and JALR opcodes to correctly handle recursive functions

PR Checklist

  • [ ] Added Tests
  • [ ] Added Documentation
  • [ ] Breaking changes

leruaa avatar Apr 25 '25 15:04 leruaa

Thanks for this improvement! Profiling inline functions seems very useful for understanding performance bottlenecks more precisely. Just curious do you see any impact on compilation time or binary size with this change?

quietBlockchain avatar Jul 22 '25 22:07 quietBlockchain