Integrate Tracy profiler #224
Replies: 10 comments
-
love love love tracy. I am using it in our custom godot fork. Couldn't get vulkan working, but instrumenting the cpu side is amazing. If you're going to use tracy, there's almost a ton of instrumentation you'll want alongside in the engine core itself (mem alloc & dealloc for example). The frame marker's itself, I actually mark with timestamps provided by the platforms presentation layer (depends on platform, but say CADisplayLink for iOS), not necessarily say, main::iteration(). Thoughts on that? |
Beta Was this translation helpful? Give feedback.
-
I guess I'm saying, it seems really limiting to only add tracy instrumentation to just the godex module. I'm not sure what the solution is, or if there is one from a pure module standpoint. But there's just an absolute ton of other stuff in engine core that you'll want to be able to view alongside. |
Beta Was this translation helpful? Give feedback.
-
The other caveat is, adding tracy is going to add yet another compile target. Basically you'll want a release+optimized build, but compiled WITH the tracy instrumentation so you can actually profile an optimized build. And then you'll want the actual production build, to be a release+optimized build with the tracy instrumentation removed. |
Beta Was this translation helpful? Give feedback.
-
Yes, for sure have it in the entire engine is much much more useful. Thought, I would start using it in Godex. Later, we can always extend its usage across the entire engine (In a way or the other). Godex doesn't use the Godot objects, so Tracy would be able to fully profile Godex. Later, we can see what takes to include Tracy in Godot and write a proposal, showing what we can see in Godex and proving its benefits. Regarding the build target, my idea is to wrap all the Tracy APIs around functions and macros that allow to easily turn it on and off using #ifdef TRACY_ENABLED
#define TRACY_API_1
#define TRACY_API_2
#define TRACY_API_3
...
#endif So we could control the
But I don't know tracy, so I'm not 100% sure it's doable. What do you think? |
Beta Was this translation helpful? Give feedback.
-
Sure Tracy could profile godex just itself, but as a powerful frame profiler you kinda want the whole package. If you are more or less just interested in basic profiling of godex, is there a specific reason you're interested in tracy as opposed to the profiling utilities that are already built into godot? With regards to the macro, tracy's pretty much already setup like that. Basically if TRACY_ENABLED is not defined all of the client instrumentation is not compiled in. But ya, it would be a command line argument. This is what I'm doing now for example. Just pointing it out if you pla any sort of binary distribution of the module, you would want to include another optimized binary specifically to be used for profiling via tracy. I've considered doing a proposal for it, but my guess would be the core devs would feel it's probably not necessary as they have already built out their own internal profiling utilities. But I could be wrong. |
Beta Was this translation helpful? Give feedback.
-
Godot built-in profiler is not great and powerful like Tracy. From what I saw, Tracy provides a lot of tools that really allow to assess performance issues and establish a plan to fix it. So, I prefer to add it or still use If you really do a proposal for Godot, I would sign it too and if the other core devs accept it, I would really like to use it in Godex via Godot. Definitely it would be much much better! So, I'm looking forward for the proposal :) |
Beta Was this translation helpful? Give feedback.
-
tracy won't substitute a cpu sampler performance tool. cpu sampler based tools like Perhaps I will do a proposal for tracy in godot upstream. If it does end up being a configurable module there, it would be pretty easy to integrate into godex or anywhere else really. |
Beta Was this translation helpful? Give feedback.
-
hah, well i stand corrected. Tracy, via libbacktrace, totally has callstack sampling. ( just not on my platform OSX) 😞 😞 😞 |
Beta Was this translation helpful? Give feedback.
-
That's nice! Thought, I'm sorry it doesn't work on OSX, thanks for the updated. |
Beta Was this translation helpful? Give feedback.
-
Moving the proposal to discussions to keep the issue just for things to fix. |
Beta Was this translation helpful? Give feedback.
-
Add Tracy profiler to godex https://github.com/wolfpld/tracy
Beta Was this translation helpful? Give feedback.
All reactions