Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#16696 from dmitripivkine/master
Browse files Browse the repository at this point in the history
Cleanup after Scavenger instantiation refactoring
  • Loading branch information
amicic authored Feb 10, 2023
2 parents 3d8126a + 0cfecf9 commit 66871c2
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 37 deletions.
9 changes: 0 additions & 9 deletions runtime/gc_base/GCExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,6 @@ MM_GCExtensions::getContinuationObjectListsExternal(J9VMThread *vmThread)
}


void
MM_GCExtensions::registerScavenger(MM_Scavenger *scavenger)
{
MM_GCExtensionsBase::registerScavenger(scavenger);
Assert_MM_true(isStandardGC());
Assert_MM_true(isScavengerEnabled());
((MM_StandardAccessBarrier *)accessBarrier)->registerScavenger(scavenger);
}

void
MM_GCExtensions::releaseNativesForContinuationObject(MM_EnvironmentBase* env, j9object_t objectPtr)
{
Expand Down
2 changes: 0 additions & 2 deletions runtime/gc_base/GCExtensions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ class MM_GCExtensions : public MM_GCExtensionsBase {

void computeDefaultMaxHeapForJava(bool enableOriginalJDK8HeapSizeCompatibilityOption);

virtual void registerScavenger(MM_Scavenger *scavenger);

MMINLINE J9HookInterface** getHookInterface() { return J9_HOOK_INTERFACE(hookInterface); };

/**
Expand Down
7 changes: 0 additions & 7 deletions runtime/gc_modron_standard/StandardAccessBarrier.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ class MM_StandardAccessBarrier : public MM_ObjectAccessBarrier
_typeId = __FUNCTION__;
}

void registerScavenger(MM_Scavenger *scavenger)
{
#if defined(J9VM_GC_GENERATIONAL)
_scavenger = scavenger;
#endif /* J9VM_GC_GENERATIONAL */
}

virtual J9Object* asConstantPoolObject(J9VMThread *vmThread, J9Object* toConvert, UDATA allocationFlags);

virtual void rememberObjectImpl(MM_EnvironmentBase *env, J9Object* object);
Expand Down
2 changes: 1 addition & 1 deletion runtime/gc_modron_startup/mminit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ j9gc_initialize_heap(J9JavaVM *vm, IDATA *memoryParameterTable, UDATA heapBytesR
GC_OMRVMInterface::initializeExtensions(extensions);

/* Initialize the global collector */
globalCollector = extensions->configuration->createGlobalCollector(&env);
globalCollector = extensions->configuration->createCollectors(&env);
if (NULL == globalCollector) {
if(MM_GCExtensionsBase::HEAP_INITIALIZATION_FAILURE_REASON_METRONOME_DOES_NOT_SUPPORT_4BIT_SHIFT == extensions->heapInitializationFailureReason) {
j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTION_OVERFLOW, displayXmxOrMaxRAMPercentage(memoryParameterTable));
Expand Down
6 changes: 0 additions & 6 deletions runtime/gc_realtime/ConfigurationRealtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,6 @@ MM_ConfigurationRealtime::newInstance(MM_EnvironmentBase *env)
return configuration;
}

MM_GlobalCollector *
MM_ConfigurationRealtime::createGlobalCollector(MM_EnvironmentBase *env)
{
return MM_RealtimeGC::newInstance(env);
}

MM_GlobalCollector *
MM_ConfigurationRealtime::createCollectors(MM_EnvironmentBase *env)
{
Expand Down
1 change: 0 additions & 1 deletion runtime/gc_realtime/ConfigurationRealtime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class MM_ConfigurationRealtime : public MM_Configuration

/* Methods */
public:
virtual MM_GlobalCollector *createGlobalCollector(MM_EnvironmentBase *env);
virtual MM_GlobalCollector *createCollectors(MM_EnvironmentBase *env);
virtual MM_Heap *createHeapWithManager(MM_EnvironmentBase *env, uintptr_t heapBytesRequested, MM_HeapRegionManager *regionManager);
virtual MM_HeapRegionManager *createHeapRegionManager(MM_EnvironmentBase *env);
Expand Down
10 changes: 0 additions & 10 deletions runtime/gc_vlhgc/ConfigurationIncrementalGenerational.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,6 @@ MM_ConfigurationIncrementalGenerational::newInstance(MM_EnvironmentBase *env)
/**
* Create the global collector for a Tarok configuration
*/
MM_GlobalCollector *
MM_ConfigurationIncrementalGenerational::createGlobalCollector(MM_EnvironmentBase *envBase)
{
MM_GCExtensionsBase *extensions = envBase->getExtensions();
MM_EnvironmentVLHGC *env = MM_EnvironmentVLHGC::getEnvironment(envBase);
MM_HeapRegionManager *heapRegionManager = extensions->heapRegionManager;

return MM_IncrementalGenerationalGC::newInstance(env, heapRegionManager);
}

MM_GlobalCollector *
MM_ConfigurationIncrementalGenerational::createCollectors(MM_EnvironmentBase *envBase)
{
Expand Down
1 change: 0 additions & 1 deletion runtime/gc_vlhgc/ConfigurationIncrementalGenerational.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class MM_ConfigurationIncrementalGenerational : public MM_Configuration
public:
static MM_Configuration *newInstance(MM_EnvironmentBase *env);

virtual MM_GlobalCollector *createGlobalCollector(MM_EnvironmentBase *env);
virtual MM_GlobalCollector *createCollectors(MM_EnvironmentBase *env);
virtual MM_Heap *createHeapWithManager(MM_EnvironmentBase *env, UDATA heapBytesRequested, MM_HeapRegionManager *regionManager);
virtual MM_HeapRegionManager *createHeapRegionManager(MM_EnvironmentBase *env);
Expand Down

0 comments on commit 66871c2

Please sign in to comment.