Godot Engine – Multi-platform 2D and 3D game engine
Add support for Tracy client address override
Mikhail Zolotukhin933325534e26
diff --git a/SConstruct b/SConstructindex cae5b97938a..54a42630243 100644--- a/SConstruct+++ b/SConstruct@@ -229,6 +229,11 @@ opts.Add(True,))+opts.Add((+ "profiler_broadcast_address",+ "The broadcast IP address used for announcing the profiler application. In Tracy this configures TRACY_CLIENT_ADDRESS.",+ "",+))# Advanced optionsdiff --git a/core/profiling/SCsub b/core/profiling/SCsubindex f9084449b9d..94b7eeaaec9 100644--- a/core/profiling/SCsub+++ b/core/profiling/SCsub@@ -54,6 +54,8 @@ if env["profiler"]:print("profiler_track_memory ignored. Please configure memory tracking in Instruments instead.")if env["profiler_record_on_demand"]:print("profiler_record_on_demand ignored. Instruments is always recording.")+ if env["profiler_broadcast_address"]:+ print("profiler_broadcast_address ignored. Instruments does not support broadcast address configuration.")elif env["profiler"] == "tracy":if not env["profiler_path"]:print("profiler_path must be set when using the tracy profiler. Aborting.")@@ -75,6 +77,8 @@ if env["profiler"]:env_tracy.Append(CPPDEFINES=["GODOT_PROFILER_TRACK_MEMORY"])if env["profiler_record_on_demand"]:env_tracy.Append(CPPDEFINES=["TRACY_ON_DEMAND"])+ if env["profiler_broadcast_address"]:+ env_tracy.Append(CPPDEFINES=[("TRACY_CLIENT_ADDRESS", '"' + env["profiler_broadcast_address"] + '"')])env_tracy.disable_warnings()env_tracy.add_source_files(env.core_sources, str((profiler_path / "TracyClient.cpp").absolute()))elif env["profiler"] == "perfetto":@@ -97,6 +101,8 @@ if env["profiler"]:Exit(255)if env["profiler_record_on_demand"]:print("profiler_record_on_demand ignored. Perfetto is always recording.")+ if env["profiler_broadcast_address"]:+ print("profiler_broadcast_address ignored. Perfetto does not support broadcast address configuration.")env_perfetto.disable_warnings()env_perfetto.Prepend(CPPPATH=[str(profiler_path.absolute())])env_perfetto.add_source_files(env.core_sources, str((profiler_path / "perfetto.cc").absolute()))