mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Add profiler option to SCons builds.
Add `tracy` option to `profiler`. If set, a tracy profiling client will be injected into the Godot binary. # Conflicts: # platform/linuxbsd/godot_linuxbsd.cpp
This commit is contained in:
parent
6fd949a6dc
commit
e80194e31f
14 changed files with 266 additions and 0 deletions
|
|
@ -49,6 +49,7 @@
|
|||
#include "core/config/project_settings.h"
|
||||
#include "core/input/input.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "main/main.h"
|
||||
#include "servers/rendering/rendering_server.h"
|
||||
|
||||
|
|
@ -151,6 +152,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHei
|
|||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jclass clazz, jobject p_godot_instance, jobject p_asset_manager, jobject p_godot_io, jobject p_net_utils, jobject p_directory_access_handler, jobject p_file_access_handler, jboolean p_use_apk_expansion) {
|
||||
godot_init_profiler();
|
||||
|
||||
JavaVM *jvm;
|
||||
env->GetJavaVM(&jvm);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#import "os_ios.h"
|
||||
|
||||
#include "core/profiling/profiling.h"
|
||||
#import "drivers/apple_embedded/godot_app_delegate.h"
|
||||
#import "drivers/apple_embedded/main_utilities.h"
|
||||
#include "main/main.h"
|
||||
|
|
@ -55,6 +56,8 @@ int apple_embedded_main(int argc, char **argv) {
|
|||
char *fargv[64];
|
||||
argc = process_args(argc, argv, fargv);
|
||||
|
||||
godot_init_profiler();
|
||||
|
||||
Error err = Main::setup(fargv[0], argc - 1, &fargv[1], false);
|
||||
|
||||
if (err != OK) {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "os_linuxbsd.h"
|
||||
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "main/main.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
@ -93,6 +94,8 @@ int main(int argc, char *argv[]) {
|
|||
setrlimit(RLIMIT_STACK, &stack_lim);
|
||||
#endif
|
||||
|
||||
godot_init_profiler();
|
||||
|
||||
OS_LinuxBSD os;
|
||||
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#import "godot_application.h"
|
||||
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "main/main.h"
|
||||
|
||||
#if defined(SANITIZERS_ENABLED)
|
||||
|
|
@ -39,6 +40,8 @@
|
|||
#endif
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
godot_init_profiler();
|
||||
|
||||
#if defined(VULKAN_ENABLED)
|
||||
setenv("MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE", "1", 1); // MoltenVK - enable full component swizzling support.
|
||||
setenv("MVK_CONFIG_SWAPCHAIN_MIN_MAG_FILTER_USE_NEAREST", "0", 1); // MoltenVK - use linear surface scaling. TODO: remove when full DPI scaling is implemented.
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
#include "core/crypto/crypto_core.h"
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "core/version_generated.gen.h"
|
||||
#include "drivers/apple/os_log_logger.h"
|
||||
#include "main/main.h"
|
||||
|
|
@ -1080,6 +1081,8 @@ static void handle_interrupt(int sig) {
|
|||
}
|
||||
|
||||
void OS_MacOS_NSApp::start_main() {
|
||||
godot_init_profiler();
|
||||
|
||||
Error err;
|
||||
@autoreleasepool {
|
||||
err = Main::setup(execpath, argc, argv);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#import "os_visionos.h"
|
||||
|
||||
#include "core/profiling/profiling.h"
|
||||
#import "drivers/apple_embedded/godot_app_delegate.h"
|
||||
#import "drivers/apple_embedded/main_utilities.h"
|
||||
#include "main/main.h"
|
||||
|
|
@ -50,6 +51,8 @@ int apple_embedded_main(int argc, char **argv) {
|
|||
char *fargv[64];
|
||||
argc = process_args(argc, argv, fargv);
|
||||
|
||||
godot_init_profiler();
|
||||
|
||||
Error err = Main::setup(fargv[0], argc - 1, &fargv[1], false);
|
||||
|
||||
if (err != OK) {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "core/config/engine.h"
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "main/main.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/main/window.h" // SceneTree only forward declares it.
|
||||
|
|
@ -126,6 +127,8 @@ void print_web_header() {
|
|||
|
||||
/// When calling main, it is assumed FS is setup and synced.
|
||||
extern EMSCRIPTEN_KEEPALIVE int godot_web_main(int argc, char *argv[]) {
|
||||
godot_init_profiler();
|
||||
|
||||
os = new OS_Web();
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
|
|
|||
|
|
@ -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, "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue