void sgen_bridge_processing_finish (int generation) { bridge_processor.processing_build_callback_data (generation); if (compare_bridge_processors ()) compare_to_bridge_processor.processing_build_callback_data (generation); if (bridge_processor.num_sccs == 0) { g_assert (bridge_processor.num_xrefs == 0); goto after_callback; } bridge_callbacks.cross_references (bridge_processor.num_sccs, bridge_processor.api_sccs, bridge_processor.num_xrefs, bridge_processor.api_xrefs); if (compare_bridge_processors ()) sgen_compare_bridge_processor_results (&bridge_processor, &compare_to_bridge_processor); null_weak_links_to_dead_objects (&bridge_processor, generation); free_callback_data (&bridge_processor); if (compare_bridge_processors ()) free_callback_data (&compare_to_bridge_processor); after_callback: bridge_processor.processing_after_callback (generation); if (compare_bridge_processors ()) compare_to_bridge_processor.processing_after_callback (generation); bridge_processing_in_progress = FALSE; }
void sgen_bridge_register_finalized_object (GCObject *obj) { bridge_processor.register_finalized_object (obj); if (compare_bridge_processors ()) compare_to_bridge_processor.register_finalized_object (obj); }
/* Dispatch wrappers */ void sgen_bridge_reset_data (void) { bridge_processor.reset_data (); if (compare_bridge_processors ()) compare_to_bridge_processor.reset_data (); }
void sgen_bridge_processing_finish (int generation) { bridge_processor.processing_build_callback_data (generation); if (compare_bridge_processors ()) compare_to_bridge_processor.processing_build_callback_data (generation); if (bridge_processor.num_sccs == 0) { g_assert (bridge_processor.num_xrefs == 0); goto after_callback; } bridge_callbacks.cross_references (bridge_processor.num_sccs, bridge_processor.api_sccs, bridge_processor.num_xrefs, bridge_processor.api_xrefs); if (compare_bridge_processors ()) sgen_compare_bridge_processor_results (&bridge_processor, &compare_to_bridge_processor); null_weak_links_to_dead_objects (&bridge_processor, generation); free_callback_data (&bridge_processor); if (compare_bridge_processors ()) free_callback_data (&compare_to_bridge_processor); after_callback: bridge_processor.processing_after_callback (generation); if (compare_bridge_processors ()) compare_to_bridge_processor.processing_after_callback (generation); mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "GC_BRIDGE: Complete, was running for %.2fms", mono_time_since_last_stw () / 10000.0f); bridge_processing_in_progress = FALSE; }
void sgen_bridge_processing_stw_step (void) { /* * bridge_processing_in_progress must be set with the world * stopped. If not there would be race conditions. */ bridge_processing_in_progress = TRUE; bridge_processor.processing_stw_step (); if (compare_bridge_processors ()) compare_to_bridge_processor.processing_stw_step (); }
gboolean sgen_bridge_handle_gc_debug (const char *opt) { if (g_str_has_prefix (opt, "bridge=")) { opt = strchr (opt, '=') + 1; register_test_bridge_callbacks (g_strdup (opt)); } else if (!strcmp (opt, "enable-bridge-accounting")) { bridge_processor.enable_accounting (); } else if (g_str_has_prefix (opt, "bridge-dump=")) { char *prefix = strchr (opt, '=') + 1; set_dump_prefix (prefix); } else if (g_str_has_prefix (opt, "bridge-compare-to=")) { const char *name = strchr (opt, '=') + 1; if (init_bridge_processor (&compare_to_bridge_processor, name)) { if (compare_to_bridge_processor.reset_data == bridge_processor.reset_data) { g_warning ("Cannot compare bridge implementation to itself - ignoring."); memset (&compare_to_bridge_processor, 0, sizeof (SgenBridgeProcessor)); } } else { g_warning ("Invalid bridge implementation to compare against - ignoring."); } } else { return FALSE; } return TRUE; }
static void set_dump_prefix (const char *prefix) { if (!bridge_processor.set_dump_prefix) { fprintf (stderr, "Warning: Bridge implementation does not support dumping - ignoring.\n"); return; } bridge_processor.set_dump_prefix (prefix); }
void sgen_bridge_processing_finish (int generation) { unsigned long step_8; SGEN_TV_DECLARE (atv); SGEN_TV_DECLARE (btv); bridge_processor.processing_build_callback_data (generation); if (compare_bridge_processors ()) compare_to_bridge_processor.processing_build_callback_data (generation); if (bridge_processor.num_sccs == 0) { g_assert (bridge_processor.num_xrefs == 0); goto after_callback; } bridge_callbacks.cross_references (bridge_processor.num_sccs, bridge_processor.api_sccs, bridge_processor.num_xrefs, bridge_processor.api_xrefs); if (compare_bridge_processors ()) sgen_compare_bridge_processor_results (&bridge_processor, &compare_to_bridge_processor); SGEN_TV_GETTIME (btv); null_weak_links_to_dead_objects (&bridge_processor, generation); free_callback_data (&bridge_processor); if (compare_bridge_processors ()) free_callback_data (&compare_to_bridge_processor); SGEN_TV_GETTIME (atv); step_8 = SGEN_TV_ELAPSED (btv, atv); after_callback: bridge_processor.processing_after_callback (generation); if (compare_bridge_processors ()) compare_to_bridge_processor.processing_after_callback (generation); bridge_processing_in_progress = FALSE; }
void sgen_bridge_describe_pointer (GCObject *obj) { if (bridge_processor.describe_pointer) bridge_processor.describe_pointer (obj); }
MonoGCBridgeObjectKind sgen_bridge_class_kind (MonoClass *klass) { return bridge_processor.class_kind (klass); }