Does new Godot4 .6 Tracy Profiler Support works with GDExtension DLLs?

Godot Version

4.6

Question

Can you add tracy markers in your cpp GDExtension?

I was using 4.4 and custom engine build with tracy, But you have to build and link tracy.dll to be able to link it to both engine and your gdextensions dll.

I want to switch to 4.6 and dont know if I can use builtin tracy support or should I continue using my in order to be able to trace gdextension dlls.

Anyone knows?

section 2.8.1 of the tracy documentation describes the setup for multi-dll projects, and given the way @Ivorius setup the integration I believe it points to a shared library, so if you build your extension so that it dynamically links to that same shared library you should be good? I haven’t tested directly though so ymmv.

Perhaps @Ivorius has already tested and can respond here :slight_smile:

section 2.8.1 of tracy documentation? Yeah. Thats how I was using it before. In my custom godot 4.4 build.

Are you saying godot builds dll and stores it somewhere? I thought it links it statically.

just tried it: compiles tracy as a static library.

So is there a way to use it from godot-cpp gdextension?

I’m not aware of a way to do it. I haven’t tested with GDExtension.

It would be possible to expose profiling methods through GDExtension, but that might be too much overhead for a tracing profiler.

It might be possible to find some other strategy to make it work, but I have no ideas off the top of my head. Using a self-contained tracy instance from GDExtension could of course work, but that would mean you can’t use the builtin profiling zones.