tracy icon indicating copy to clipboard operation
tracy copied to clipboard

Profiler: Custom namespace delimiter for zone name shortening

Open nixxquality opened this issue 10 months ago • 2 comments

Relevant function: https://github.com/wolfpld/tracy/blob/d1300c491ca50962b5ba4d5b7d5a56b34b9e99ad/profiler/src/profiler/TracyUtility.cpp#L19

The shortening feature is very useful, but I was wondering if it could be extended to handle other namespace delimiters, either on a per-trace basis or as a profiler setting.

This would mostly be useful for instances where Tracy is integrated with other languages, like Lua where the delimiter is ..

nixxquality avatar Apr 24 '24 14:04 nixxquality

Do you have a trace that would show where this is a problem?

wolfpld avatar May 04 '24 11:05 wolfpld

Absolutely, here is a very simple trace: love2d_overusing_newImage.zip It's from a proof of concept of adding Tracy instrumentation to the LÖVE engine. That engine mostly runs in Lua so it would make sense to show functions with their Lua names where they are "namespaced" into tables rather than the C++ namespaces. In this case, it might make sense to add some code during engine startup to tell the Tracy server that for this trace, please consider . a namespace separator. As I said, this is just a proof of concept, and there's really no rush. The actual developers of the engine haven't gotten back to me about how they feel about this integration. I mostly wanted to know your thoughts on it.

nixxquality avatar May 04 '24 20:05 nixxquality