You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
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:
@@ -129,6 +129,7 @@ static void _terminate(JNIEnv *env, bool p_restart = false) {
|
||||
NetSocketAndroid::terminate();
|
||||
|
||||
cleanup_android_class_loader();
|
||||
godot_cleanup_profiler();
|
||||
|
||||
if (godot_java) {
|
||||
godot_java->on_godot_terminating(env);
|
||||
|
||||
@@ -74,5 +74,6 @@ int apple_embedded_main(int argc, char **argv) {
|
||||
|
||||
void apple_embedded_finish() {
|
||||
Main::cleanup();
|
||||
godot_cleanup_profiler();
|
||||
delete os;
|
||||
}
|
||||
|
||||
@@ -131,5 +131,6 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
free(cwd);
|
||||
|
||||
godot_cleanup_profiler();
|
||||
return os.get_exit_code();
|
||||
}
|
||||
|
||||
@@ -151,5 +151,6 @@ int main(int argc, char **argv) {
|
||||
|
||||
memdelete(os);
|
||||
|
||||
godot_cleanup_profiler();
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -69,5 +69,6 @@ int apple_embedded_main(int argc, char **argv) {
|
||||
|
||||
void apple_embedded_finish() {
|
||||
Main::cleanup();
|
||||
godot_cleanup_profiler();
|
||||
delete os;
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ void exit_callback() {
|
||||
int exit_code = OS_Web::get_singleton()->get_exit_code();
|
||||
memdelete(os);
|
||||
os = nullptr;
|
||||
godot_cleanup_profiler();
|
||||
emscripten_force_exit(exit_code); // Exit runtime.
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ int widechar_main(int argc, wchar_t **argv) {
|
||||
}
|
||||
delete[] argv_utf8;
|
||||
|
||||
godot_cleanup_profiler();
|
||||
return os.get_exit_code();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user