Skip to content

feat: allow to profile inline functions #2260

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

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

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