Skip to content

Conversation

@mihe
Copy link
Contributor

@mihe mihe commented Dec 9, 2025

Relates to (but does not necessarily fix) #113805.

This introduces a new profiler_track_memory build option, which lets you disable (no-op) the GodotProfileAlloc and GodotProfileFree macros, in order to omit whatever overhead those macros bring with them.

This is mostly meant to be a stop-gap solution, to allow people to mitigate the rampant memory allocations that seem to be happening when using Tracy at the moment.

If this actually makes it to release somehow, we should probably have this new option be False by default, but I've left it as True so that people actually do run into this bug and can maybe provide more information and/or an MRP, assuming it isn't in fact unique to the project I'm working with for some odd reason.

Note that this also fixes a build correctness issue with the generated profiling.gen.h, where it wasn't being re-generated if you changed the value of profiler_sample_callstack, due to its value not being passed in to CommandNoCache.

Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mihe mihe force-pushed the optional-memory-profiling branch from 2882965 to 393daf6 Compare December 9, 2025 16:59
@mihe mihe force-pushed the optional-memory-profiling branch from 393daf6 to 74ffb69 Compare December 9, 2025 18:11
@akien-mga akien-mga merged commit e6a5a52 into godotengine:master Dec 9, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants