Skip to content

Commit

Permalink
[mono] Remove "old" sgen bridge (#67957)
Browse files Browse the repository at this point in the history
We default to the tarjan bridge for quite a while now, so remove the "old" bridge. We decided to keep the "new" bridge since there are still a few usecases for it (some Xamarin.Android customers use it). If a user selects the "old" bridge we'll use the "new" bridge instead and print a warning.
  • Loading branch information
akoeplinger committed Apr 13, 2022
1 parent 12dd2ab commit c59e1c4
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 948 deletions.
1 change: 0 additions & 1 deletion src/mono/mono/metadata/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ if(MONO_GC STREQUAL "sgen")
set(metadata_gc_sources
sgen-bridge.c
sgen-bridge-internals.h
sgen-old-bridge.c
sgen-new-bridge.c
sgen-tarjan-bridge.c
sgen-toggleref.c
Expand Down
1 change: 0 additions & 1 deletion src/mono/mono/metadata/sgen-bridge-internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ typedef struct {
MonoGCBridgeXRef *api_xrefs;
} SgenBridgeProcessor;

void sgen_old_bridge_init (SgenBridgeProcessor *collector);
void sgen_new_bridge_init (SgenBridgeProcessor *collector);
void sgen_tarjan_bridge_init (SgenBridgeProcessor *collector);
void sgen_set_bridge_implementation (const char *name);
Expand Down
9 changes: 3 additions & 6 deletions src/mono/mono/metadata/sgen-bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

typedef enum {
BRIDGE_PROCESSOR_INVALID,
BRIDGE_PROCESSOR_OLD,
BRIDGE_PROCESSOR_NEW,
BRIDGE_PROCESSOR_TARJAN,
BRIDGE_PROCESSOR_DEFAULT = BRIDGE_PROCESSOR_TARJAN
Expand Down Expand Up @@ -93,7 +92,8 @@ static BridgeProcessorSelection
bridge_processor_name (const char *name)
{
if (!strcmp ("old", name)) {
return BRIDGE_PROCESSOR_OLD;
g_warning ("The 'old' bridge processor implementation is no longer supported, falling back to the 'new' bridge.");
return BRIDGE_PROCESSOR_NEW;
} else if (!strcmp ("new", name)) {
return BRIDGE_PROCESSOR_NEW;
} else if (!strcmp ("tarjan", name)) {
Expand All @@ -116,9 +116,6 @@ init_bridge_processor (SgenBridgeProcessor *processor, BridgeProcessorSelection
memset (processor, 0, sizeof (SgenBridgeProcessor));

switch (selection) {
case BRIDGE_PROCESSOR_OLD:
sgen_old_bridge_init (processor);
break;
case BRIDGE_PROCESSOR_NEW:
sgen_new_bridge_init (processor);
break;
Expand Down Expand Up @@ -179,7 +176,7 @@ sgen_set_bridge_implementation (const char *name)
BridgeProcessorSelection selection = bridge_processor_name (name);

if (selection == BRIDGE_PROCESSOR_INVALID)
g_warning ("Invalid value for bridge processor implementation, valid values are: 'new', 'old' and 'tarjan'.");
g_warning ("Invalid value for bridge processor implementation, valid values are: 'new' or 'tarjan'.");
else if (bridge_processor_started ())
g_warning ("Cannot set bridge processor implementation once bridge has already started");
else
Expand Down
Loading

0 comments on commit c59e1c4

Please sign in to comment.