mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add feature to profile memory allocation with Tracy
This commit is contained in:
parent
8827d40660
commit
c4ec279121
@ -28,6 +28,7 @@ hot-reloading = ["common/hot-reloading"]
|
||||
singleplayer = ["server"]
|
||||
simd = ["vek/platform_intrinsics"]
|
||||
tracy = ["profiling", "profiling/profile-with-tracy", "common-frontend/tracy", "client/tracy"]
|
||||
tracy-memory = ["tracy"] # enables heap profiling with tracy
|
||||
plugins = ["client/plugins"]
|
||||
egui-ui = ["voxygen-egui", "egui", "egui_wgpu_backend", "egui_winit_platform"]
|
||||
|
||||
|
@ -2,6 +2,12 @@
|
||||
#![feature(bool_to_option)]
|
||||
#![recursion_limit = "2048"]
|
||||
|
||||
// Allow profiling allocations with Tracy
|
||||
#[cfg_attr(feature = "tracy-memory", global_allocator)]
|
||||
#[cfg(feature = "tracy-memory")]
|
||||
static GLOBAL: common_base::tracy_client::ProfiledAllocator<std::alloc::System> =
|
||||
common_base::tracy_client::ProfiledAllocator::new(std::alloc::System, 128);
|
||||
|
||||
use i18n::{self, LocalizationHandle};
|
||||
use veloren_voxygen::{
|
||||
audio::AudioFrontend,
|
||||
|
Loading…
Reference in New Issue
Block a user