You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add an ObjectDB Profiling Tool
A new tab is added to the debugger that can help profile a game's memory usage. Specifically, this lets you save a snapshot of all the objects in a running game's ObjectDB to disk. It then lets you view the snapshot and diff two snapshots against each other. This is meant to work similarly to Chrome's heap snapshot tool or Unity's memory profiler.
This commit is contained in:
committed by
Mikael Hermansson
parent
4d1f26e1fd
commit
78f1543e35
20
modules/objectdb_profiler/SCsub
Normal file
20
modules/objectdb_profiler/SCsub
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
from misc.utility.scons_hints import *
|
||||
|
||||
Import("env")
|
||||
Import("env_modules")
|
||||
|
||||
env_mp = env_modules.Clone()
|
||||
|
||||
module_obj = []
|
||||
|
||||
# Only include in editor and debug builds.
|
||||
if env_mp.debug_features:
|
||||
env_mp.add_source_files(module_obj, "*.cpp")
|
||||
|
||||
# Only the editor needs these files, don't include them in the game.
|
||||
if env.editor_build:
|
||||
env_mp.add_source_files(module_obj, "editor/*.cpp")
|
||||
env_mp.add_source_files(module_obj, "editor/data_viewers/*.cpp")
|
||||
|
||||
env.modules_sources += module_obj
|
||||
Reference in New Issue
Block a user