File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 3737#include "vm_core.h"
3838#include "ractor_core.h"
3939
40+ #ifdef USE_THIRD_PARTY_HEAP
41+ #include "mmtk.h"
42+ #endif
43+
4044#define MAX_POSBUF 128
4145
4246#define VM_CFP_CNT (ec , cfp ) \
@@ -1189,6 +1193,16 @@ rb_vm_bugreport(const void *ctx)
11891193 }
11901194#endif
11911195 }
1196+
1197+ #ifdef USE_THIRD_PARTY_HEAP
1198+ fprintf (stderr , "* MMTk:\n\n" );
1199+ fprintf (stderr , " mmtk_free_bytes: %zu\n" , mmtk_free_bytes ());
1200+ fprintf (stderr , " mmtk_total_bytes: %zu\n" , mmtk_total_bytes ());
1201+ fprintf (stderr , " mmtk_used_bytes: %zu\n" , mmtk_used_bytes ());
1202+ fprintf (stderr , " mmtk_starting_heap_address: 0x%zx\n" , (size_t ) mmtk_starting_heap_address ());
1203+ fprintf (stderr , " mmtk_last_heap_address: 0x%zx\n" , (size_t ) mmtk_last_heap_address ());
1204+ fprintf (stderr , "\n" );
1205+ #endif
11921206}
11931207
11941208void
You can’t perform that action at this time.
0 commit comments