#include <stdlib.h>
#include <errno.h>
-#include "sgen-gc.h"
-#include "sgen-bridge.h"
-#include "sgen-hash-table.h"
-#include "sgen-qsort.h"
+#include "sgen/sgen-gc.h"
+#include "sgen-bridge-internal.h"
+#include "sgen/sgen-hash-table.h"
+#include "sgen/sgen-qsort.h"
+#include "sgen/sgen-client.h"
#include "tabledefs.h"
#include "utils/mono-logger-internal.h"
-#include "utils/mono-time.h"
-#include "utils/mono-compiler.h"
//#define NEW_XREFS
#ifdef NEW_XREFS
#undef HANDLE_PTR
#define HANDLE_PTR(ptr,obj) do { \
- MonoObject *dst = (MonoObject*)*(ptr); \
+ GCObject *dst = (GCObject*)*(ptr); \
if (dst && object_needs_expansion (&dst)) { \
++num_links; \
dyn_array_ptr_push (&dfs_stack, obj_entry); \
if (!obj_entry->v.dfs1.is_visited) {
int num_links = 0;
- mword desc = sgen_obj_get_descriptor_safe (start);
+ mword desc = sgen_obj_get_descriptor_safe (obj);
obj_entry->v.dfs1.is_visited = 1;
dyn_array_ptr_push (&dfs_stack, obj_entry);
dyn_array_ptr_push (&dfs_stack, NULL);
-#include "sgen-scan-object.h"
+#include "sgen/sgen-scan-object.h"
/*
* We can remove non-bridge objects with a single outgoing
fprintf (file, "<nodes>\n");
SGEN_HASH_TABLE_FOREACH (&hash_table, obj, entry) {
- MonoVTable *vt = (MonoVTable*) SGEN_LOAD_VTABLE (obj);
+ MonoVTable *vt = SGEN_LOAD_VTABLE (obj);
fprintf (file, "<node id=\"%p\"><attvalues><attvalue for=\"0\" value=\"%s.%s\"/><attvalue for=\"1\" value=\"%s\"/></attvalues></node>\n",
obj, vt->klass->name_space, vt->klass->name, entry->is_bridge ? "true" : "false");
} SGEN_HASH_TABLE_FOREACH_END;
static int max_sccs_links = 0;
static void
-register_finalized_object (MonoObject *obj)
+register_finalized_object (GCObject *obj)
{
g_assert (sgen_need_bridge_processing ());
dyn_array_ptr_push (®istered_bridges, obj);
HashEntryWithAccounting *entry = (HashEntryWithAccounting*)all_entries [i];
if (entry->entry.is_bridge) {
MonoObject *obj = sgen_hash_table_key_for_value_pointer (entry);
- MonoClass *klass = ((MonoVTable*)SGEN_LOAD_VTABLE (obj))->klass;
+ MonoClass *klass = SGEN_LOAD_VTABLE (obj)->klass;
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "OBJECT %s::%s (%p) weight %f", klass->name_space, klass->name, obj, entry->weight);
}
}
if (bridge_accounting_enabled) {
for (i = 0; i < num_sccs; ++i) {
- for (j = 0; j < api_sccs [i]->num_objs; ++j)
+ for (j = 0; j < api_sccs [i]->num_objs; ++j) {
+ GCVTable vtable = SGEN_LOAD_VTABLE (api_sccs [i]->objs [j]);
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC,
"OBJECT %s (%p) SCC [%d] %s",
- sgen_safe_name (api_sccs [i]->objs [j]), api_sccs [i]->objs [j],
+ sgen_client_vtable_get_namespace (vtable), sgen_client_vtable_get_name (vtable), api_sccs [i]->objs [j],
i,
api_sccs [i]->is_alive ? "ALIVE" : "DEAD");
+ }
}
}
}
static void
-describe_pointer (MonoObject *obj)
+describe_pointer (GCObject *obj)
{
HashEntry *entry;
int i;