Skip to content
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

Profiler: Custom namespace delimiter for zone name shortening #777

Open
nixxquality opened this issue Apr 24, 2024 · 2 comments
Open

Profiler: Custom namespace delimiter for zone name shortening #777

nixxquality opened this issue Apr 24, 2024 · 2 comments

Comments

@nixxquality
Copy link

Relevant function:

const char* ShortenZoneName( ShortenName type, const char* name, ImVec2& tsz, float zsz )

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 ..

@wolfpld
Copy link
Owner

wolfpld commented May 4, 2024

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

@nixxquality
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants