Skip to content

Commit

Permalink
Merge pull request #5469 from 0dvictor/cleanup
Browse files Browse the repository at this point in the history
Code cleanup related to new read/write barrier kind
  • Loading branch information
vijaysun-omr authored Apr 18, 2019
2 parents 4fc7cc5 + 5d43774 commit b433fbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 41 deletions.
31 changes: 2 additions & 29 deletions runtime/compiler/control/J9Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1091,32 +1091,15 @@ J9::Options::fePreProcess(void * base)
TR::Compiler->host.setSMP(true);
TR::Compiler->target.setSMP(true);

TR_WriteBarrierKind wrtbarMode = TR_WrtbarOldCheck;

J9MemoryManagerFunctions * mmf = vm->memoryManagerFunctions;
#if defined(J9VM_GC_HEAP_CARD_TABLE)
if (!fe->isAOT_DEPRECATED_DO_NOT_USE())
{
switch (mmf->j9gc_modron_getWriteBarrierType(vm))
{
case j9gc_modron_wrtbar_none: wrtbarMode = TR_WrtbarNone; break;
case j9gc_modron_wrtbar_always: wrtbarMode = TR_WrtbarAlways; break;
case j9gc_modron_wrtbar_oldcheck: wrtbarMode = TR_WrtbarOldCheck; break;
case j9gc_modron_wrtbar_cardmark: wrtbarMode = TR_WrtbarCardMark; break;
case j9gc_modron_wrtbar_cardmark_and_oldcheck: wrtbarMode = TR_WrtbarCardMarkAndOldCheck; break;
case j9gc_modron_wrtbar_cardmark_incremental: wrtbarMode = TR_WrtbarCardMarkIncremental; break;
case j9gc_modron_wrtbar_satb:
case j9gc_modron_wrtbar_satb_and_oldcheck: wrtbarMode = TR_WrtbarRealTime; break;
}

#if defined(J9VM_GC_HEAP_CARD_TABLE)
self()->setGcCardSize(mmf->j9gc_concurrent_getCardSize(vm));
self()->setHeapBase(mmf->j9gc_concurrent_getHeapBase(vm));
self()->setHeapTop(mmf->j9gc_concurrent_getHeapBase(vm) + mmf->j9gc_get_initial_heap_size(vm));
#endif

}

self()->setGcMode(wrtbarMode);
#endif

uintptr_t value;

Expand All @@ -1132,16 +1115,6 @@ J9::Options::fePreProcess(void * base)
value = mmf->j9gc_modron_getConfigurationValueForKey(vm, j9gc_modron_configuration_heapAddressToCardAddressShift, &value) ? value : 0;
self()->setHeapAddressToCardAddressShift(value);

#if 0
// DMDM: MOVED TO ObjectModel
uintptr_t result = mmf->j9gc_modron_getConfigurationValueForKey(vm, j9gc_modron_configuration_discontiguousArraylets, &value);
if (result == 0)
self()->setUsesDiscontiguousArraylets(false);
else
self()->setUsesDiscontiguousArraylets((value == 1) ? true : false);
#endif


// Pull the constant heap parameters from a VMThread (it doesn't matter which one).
//
J9VMThread *vmThread = jitConfig->javaVM->internalVMFunctions->currentVMThread(jitConfig->javaVM);
Expand Down
12 changes: 0 additions & 12 deletions runtime/compiler/env/J9ObjectModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,6 @@ class ObjectModel : public OMR::ObjectModelConnector
*/
MM_GCWriteBarrierType writeBarrierType() { return _writeBarrierType; }

/**
* \brief: Determines whether the code generator should generate read barriers for loads of object references from the heap
*
* Instead of reaching into the VM each time, for the performance' sake,
* this value is cached here once at the JIT startup
* (since it does not change throughout the lifetime of the JIT).
*
* \return
* true if concurrent scavenge of objects during garbage collection is enabled.
*/
bool shouldGenerateReadBarriersForFieldLoads() { return _readBarrierType != gc_modron_wrtbar_none; }

/**
* \brief Determine whether to replace guarded loads with software read barrier sequence
*
Expand Down

0 comments on commit b433fbc

Please sign in to comment.