-
-
Notifications
You must be signed in to change notification settings - Fork 712
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
Simplify API by decreasing a number of entry points #957
Simplify API by decreasing a number of entry points #957
Conversation
Can you show disassembly of the code that would use functions you have changed? I don't really want the if depth > 0 check to be present, if it's known at compile time it's not needed. |
I do not know how to show it in a good way... Anyway, there is a relatively simple example: https://godbolt.org/z/5h7jz5dzz I have inserted |
7e9aa97
to
31eeb84
Compare
I have removed most of TRACY_HAS_CALLSTACK in C/C++ public headers with implementing related constexpr (if possible) checks in functions' implementations.
I have also set TRACY_CALLSTACK to zero if it is not set. It is set to zero, stack will not be collected. I hope compiler will be able to determine that corresponding branches are always false and remove related code.
Note: only C/C++ headers are updated. I did not touch other APIs which can be also reduced in the same way.
Fixes #954