Add support for profiling GDScript with tracy.

This adds macro `GodotProfileZoneGroupedFirstScript`, and uses interning for speedy lookups.

Co-authored-by: Samuel Nicholas <nicholas.samuel@gmail.com>
This commit is contained in:
Lukas Tenbrink 2025-11-28 15:10:58 +01:00
parent 9dd6c4dbac
commit acefbbbbcd
11 changed files with 201 additions and 1 deletions

View file

@ -151,5 +151,6 @@ int main(int argc, char **argv) {
memdelete(os);
godot_cleanup_profiler();
return exit_code;
}

View file

@ -1147,6 +1147,8 @@ void OS_MacOS_NSApp::start_main() {
}
void OS_MacOS_NSApp::terminate() {
godot_cleanup_profiler();
if (pre_wait_observer) {
CFRunLoopRemoveObserver(CFRunLoopGetCurrent(), pre_wait_observer, kCFRunLoopCommonModes);
CFRelease(pre_wait_observer);