Skip to content
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

YJIT: Replace perf_fn! with a simpler macro #9971

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Feb 14, 2024

Follow-up on #9957

The perf_fn! macro was useful to make sure every such call is profiled. However, VSCode (rust-analyzer) doesn't support showing the function name when you're a inside a macro (perf_fn!), and that makes it harder to read code for me.

This PR adds perf_call! macro that needs to be used by the caller. It has the risk of leaving un-profiled calls, but we don't add calls of these functions that often, so I think it's acceptable. This macro is useful when you want to add a prefix too.

@matzbot matzbot requested a review from a team February 14, 2024 22:29
Copy link
Member

@XrXr XrXr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I was a bit worried about breaking IDE support too.

@k0kubun k0kubun merged commit beeee54 into ruby:master Feb 14, 2024
97 checks passed
@k0kubun k0kubun deleted the yjit-perf-fn branch February 14, 2024 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants