| 119 | } |
| 120 | |
| 121 | void gc_root::gc_report() const { |
| 122 | DAS_FATAL_LOG("gc_root %p: count=%" PRIu64 "\n", (const void *)this, gc_count); |
| 123 | char atbuf[256]; |
| 124 | auto node = gc_first; |
| 125 | while ( node ) { |
| 126 | atbuf[0] = 0; |
| 127 | if ( gc_node_describe_hook ) gc_node_describe_hook(node, atbuf, (int)sizeof(atbuf)); |
| 128 | DAS_FATAL_LOG(" node %p: id=%" PRIu64 " type=%s magic=0x%08x %s\n", |
| 129 | (const void *)node, node->gc_id, node->gc_type_name(), node->gc_magic, atbuf); |
| 130 | node = node->gc_next; |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | // ---- gc_node debug break ---- |
| 135 | // Set gc_break_on_id via debugger or env DAS_GC_BREAK_ON_ID to break |