Skip to content

Commit

Permalink
ConcurrentGC Refactoring & SATB Tuning Methods
Browse files Browse the repository at this point in the history
These changes are to generalize the ConcurrentGC Collector Class so that
it can be used for both IncrementalUpdate and SATB style of Concurrent
Marking. They are a pre-req to introducing SATB since the existing
concurrent collector class is closely tied to Incremental Update
approach. CM enabling functionality needs to be abstracted - card
table/cleaning cards must be extracted to the derived IncrementalUpdate
class. Since there hasn't been any other implementation prior to SATB,
ConcurrentGC has acted as Incremental Update Concurrent Collector, much
of the components (e.g state machine, Initing, Tuning/adaptive
parameters, concurrent state/phases, verbose logging, etc) can be reused
with this rework by extracting card/barrier specific code.

- ConcurrentGC class is now an Abstract Class _(removed newInstance
function)_
- Card cleaning specific adaptive params/factors moved to Incremental
Update
- Common (Generalized) logic & vars given Protected access in Concurrent
GC
- New methods introduced to help common up shared logic
  - signalThreadsToActivateWriteBarrierInternal
  - updateTuningStatisticsInternal
  - resetConcurrentParameters
  - preCompleteConcurrentCycle
  - finalConcurrentPrecollect
  - getTraceTarget

- External WB Entry points now call new collector specific handlers
  - J9ConcurrentWriteBarrierBatchStoreHandler
  - J9ConcurrentWriteBarrierStoreHandler

**Tuning logic Implemented for SATB**
- adjustTraceTarget
- tuneToHeap

Signed-off-by: Salman Rana <salman.rana@ibm.com>
  • Loading branch information
RSalman committed Nov 6, 2021
1 parent d3053f9 commit 3d87347
Show file tree
Hide file tree
Showing 11 changed files with 2,766 additions and 2,316 deletions.
2 changes: 1 addition & 1 deletion gc/base/standard/ConcurrentFinalCleanCardsTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#if defined(OMR_GC_MODRON_CONCURRENT_MARK)

#include "ConcurrentGC.hpp"
#include "ConcurrentGCIncrementalUpdate.hpp"

#include "ConcurrentFinalCleanCardsTask.hpp"

Expand Down
6 changes: 3 additions & 3 deletions gc/base/standard/ConcurrentFinalCleanCardsTask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "CycleState.hpp"
#include "ParallelTask.hpp"

class MM_ConcurrentGC;
class MM_ConcurrentGCIncrementalUpdate;
class MM_EnvironmentBase;
class MM_ParallelDispatcher;

Expand All @@ -45,7 +45,7 @@ class MM_ParallelDispatcher;
class MM_ConcurrentFinalCleanCardsTask : public MM_ParallelTask
{
private:
MM_ConcurrentGC *_collector;
MM_ConcurrentGCIncrementalUpdate *_collector;
MM_CycleState *_cycleState; /**< Collection cycle state active for the task */

public:
Expand All @@ -58,7 +58,7 @@ class MM_ConcurrentFinalCleanCardsTask : public MM_ParallelTask
/**
* Create a ConcurrentFinalCleanCardsTask object
*/
MM_ConcurrentFinalCleanCardsTask(MM_EnvironmentBase *env, MM_ParallelDispatcher *dispatcher, MM_ConcurrentGC *collector, MM_CycleState *cycleState) :
MM_ConcurrentFinalCleanCardsTask(MM_EnvironmentBase *env, MM_ParallelDispatcher *dispatcher, MM_ConcurrentGCIncrementalUpdate *collector, MM_CycleState *cycleState) :
MM_ParallelTask(env, dispatcher)
,_collector(collector)
,_cycleState(cycleState)
Expand Down
Loading

0 comments on commit 3d87347

Please sign in to comment.