Skip to content

-Yprofile-trace properly report macro splicing source #23488

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

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

smarter
Copy link
Member

@smarter smarter commented Jul 8, 2025

Previously when we had some code like:

def userCode: Unit =
...
val x = myExpensiveMacro()
...

The profiler reported the time spent executing the macro as «method userCode» which is misleading. This commit changes it to be reported as «method myExpensiveMacro». This is particularly useful in bottom-up profiling to find which macros we spend the most amount of time in.

Previously when we had some code like:

def userCode: Unit =
  ...
  val x = myExpensiveMacro()
  ...

The profiler reported the time spent executing the macro as `«method userCode»`
which is misleading. This commit changes it to be reported as `«method
myExpensiveMacro»`. This is particularly useful in bottom-up profiling to find
which macros we spend the most amount of time in.
@smarter smarter merged commit 2660b09 into scala:main Jul 8, 2025
29 checks passed
@smarter smarter deleted the profile-macros branch July 8, 2025 12:07
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.

2 participants