mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +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:
parent
9dd6c4dbac
commit
acefbbbbcd
11 changed files with 201 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue