-
Notifications
You must be signed in to change notification settings - Fork 168
feat(profiling): Integrate Tracy profiler #2202
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
base: main
Are you sure you want to change the base?
Changes from all commits
dcdeca1
2d06e07
8081dad
393f850
860c892
a36e02c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,19 @@ | |
| // Proxy header for profile module | ||
| ////////////////////////////////////////////////////////////////////////////// | ||
|
|
||
| # pragma once | ||
| #pragma once | ||
|
|
||
| #ifdef TRACY_ENABLE | ||
| #include <tracy/Tracy.hpp> | ||
| #define TRACY_FRAMEIMAGE_SIZE 256 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this value come to be? I see in Tracy docsthat max image size is 256 KB and recommended resolution of images is around 320 x 180. |
||
| #else | ||
| #include "../../Source/profile/profile.h" | ||
| #define ZoneScopedN(name) ((void)0) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use abstracted names for profiler functions, so that we would be able to plugin different kinds of Profilers behind the same macros. Find example here:
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah OK will check that out |
||
| #define ZoneScopedNC(name, color) ((void)0) | ||
| #define TracyPlot(name, value) ((void)0) | ||
| #define FrameMark ((void)0) | ||
| #define FrameMarkNamed(name) ((void)0) | ||
| #define FrameImage(image, width, height, offset, flip) ((void)0) | ||
| #define TracyMessage(txt, size) ((void)0) | ||
| #define TracyIsConnected false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use MACRO_CASE for macros
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We could do MACRO_CASE like this (but you will get the ones emitted by Tracy too) |
||
| #endif | ||
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.
Makes it easier to plugin new ones later.