Skip to content

Conversation

leruaa
Copy link
Contributor

@leruaa leruaa commented Apr 25, 2025

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 leruaa marked this pull request as draft April 25, 2025 15:47
@leruaa leruaa marked this pull request as ready for review April 28, 2025 15:27
@ratankaliani ratankaliani requested a review from ctian1 April 30, 2025 01:12
@leruaa leruaa force-pushed the aurelien/gro2-498-add-inlined-functions-to-profiler branch from 16c175a to be86da1 Compare May 1, 2025 12:46
@quietBlockchain
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants