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

API to emit zone with static name string #770

Open
eclazi opened this issue Apr 12, 2024 · 2 comments
Open

API to emit zone with static name string #770

eclazi opened this issue Apr 12, 2024 · 2 comments

Comments

@eclazi
Copy link
Sponsor

eclazi commented Apr 12, 2024

I'm working on integrating Tracy into an existing codebase that has its own equivalent of ___tracy_source_location_data, but without line and file (really just a static string literal) that marks zones. Would it make sense to add a version of ___tracy_emit_zone_begin that takes only a single const char* ptr?

I have successfully integrated with ___tracy_alloc_srcloc_name but would like to avoid the allocation and memcpy this adds.

@wolfpld
Copy link
Owner

wolfpld commented Apr 12, 2024

I don't think there is anything that would require you to provide a valid file/line data in ___tracy_source_location_data. Just set these to an empty string and zero.

@eclazi
Copy link
Sponsor Author

eclazi commented Apr 12, 2024

Its more that I need to create a ___tracy_source_location_data instance somewhere and manage the lifetime of that somehow (since the API takes a pointer to that). Basically I can't create static ___tracy_source_location_data anywhere

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