Merge pull request #97210 from AleksLitynski/object-snapshot-debugger
Add an ObjectDB Profiling Tool
This commit is contained in:
@ -3371,7 +3371,7 @@ void Node::_set_tree(SceneTree *p_tree) {
|
||||
#ifdef DEBUG_ENABLED
|
||||
static HashMap<ObjectID, List<String>> _print_orphan_nodes_map;
|
||||
|
||||
static void _print_orphan_nodes_routine(Object *p_obj) {
|
||||
static void _print_orphan_nodes_routine(Object *p_obj, void *p_user_data) {
|
||||
Node *n = Object::cast_to<Node>(p_obj);
|
||||
if (!n) {
|
||||
return;
|
||||
@ -3415,7 +3415,7 @@ void Node::print_orphan_nodes() {
|
||||
_print_orphan_nodes_map.clear();
|
||||
|
||||
// Collect and print information about orphan nodes.
|
||||
ObjectDB::debug_objects(_print_orphan_nodes_routine);
|
||||
ObjectDB::debug_objects(_print_orphan_nodes_routine, nullptr);
|
||||
|
||||
for (const KeyValue<ObjectID, List<String>> &E : _print_orphan_nodes_map) {
|
||||
print_line(itos(E.key) + " - Stray Node: " + E.value.get(0) + " (Type: " + E.value.get(1) + ") (Source:" + E.value.get(2) + ")");
|
||||
@ -3432,7 +3432,7 @@ TypedArray<int> Node::get_orphan_node_ids() {
|
||||
_print_orphan_nodes_map.clear();
|
||||
|
||||
// Collect and return information about orphan nodes.
|
||||
ObjectDB::debug_objects(_print_orphan_nodes_routine);
|
||||
ObjectDB::debug_objects(_print_orphan_nodes_routine, nullptr);
|
||||
|
||||
for (const KeyValue<ObjectID, List<String>> &E : _print_orphan_nodes_map) {
|
||||
ret.push_back(E.key);
|
||||
|
||||
Reference in New Issue
Block a user