Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Switch internal instrumentation macros to use profiling crate instead, allowing instrumentation with different profilers #5150
base: master
Are you sure you want to change the base?
Switch internal instrumentation macros to use profiling crate instead, allowing instrumentation with different profilers #5150
Changes from 17 commits
5d7060c
7e38bb4
96a64e6
ba0fb95
65ed0d8
6f44f71
8c1fe36
0775067
a5dec2c
f327f85
f177a29
d21a5c7
b08c82b
5777057
c023e83
3cccf8a
c981259
ad4dc3b
383dc6e
b16593f
b1309d7
e866c67
23c15a7
4e37c17
a6dc835
b7dbd7a
c51b193
088161c
051b3ba
13e2db6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proc-macros like these have a tendency to increase build-times. Luckily we can opt-out of them by disabling the default features of the
profiling
crateThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a fair point. I don't think the
profiling
crates currently implements another abstraction that would callpuffin::profile_function!
under the hood though. So I think we have 3 options here:profiling::function!()
macro upstream which would callpuffin::profile_function!()
egui::profile_function!()
macro which callsprofiling::scope!()
with similar internal code to figure out the calling function name as puffin does internally in it's macro.profiling::scope!()
and manually type the function name.Let me know if you have any thoughts on this. I'll have a look and see how feasible option 1 would be tonight