Merge pull request #104851 from Ivorforce/tracy

Add `profiler` option to `SCons` builds, with support for `tracy` and `perfetto`.
This commit is contained in:
Thaddeus Crews
2025-11-12 11:24:15 -06:00
25 changed files with 375 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include "os_windows.h"
#include "core/profiling/profiling.h"
#include "main/main.h"
#include <clocale>
@ -66,6 +67,8 @@ char *wc_to_utf8(const wchar_t *wc) {
}
int widechar_main(int argc, wchar_t **argv) {
godot_init_profiler();
OS_Windows os(nullptr);
setlocale(LC_CTYPE, "");

View File

@ -39,6 +39,7 @@
#include "core/debugger/script_debugger.h"
#include "core/io/marshalls.h"
#include "core/os/main_loop.h"
#include "core/profiling/profiling.h"
#include "core/version_generated.gen.h"
#include "drivers/windows/dir_access_windows.h"
#include "drivers/windows/file_access_windows.h"
@ -2329,6 +2330,8 @@ void OS_Windows::run() {
main_loop->initialize();
while (true) {
GodotProfileFrameMark;
GodotProfileZone("OS_Windows::run");
DisplayServer::get_singleton()->process_events(); // get rid of pending events
if (Main::iteration()) {
break;