Skip to content

Commit

Permalink
Treat single CPU as if -Xgc:noConcurrentMark were set
Browse files Browse the repository at this point in the history
There is little expected benefit with concurrentmark if you are running on a single-CPU machine/environment. On the other hand, you could gain some benefits with noConcurrentMark: 1) no interference from background marking thread; 2) shorter write-barrier path-length: for certain workloads, this provides substantial performance benefits (e.g. Spark TPC-DS q72 in particular).

Fix missing portLib declaration ...

Signed-off-by: Julian <[email protected]>
  • Loading branch information
zl-wang committed Jul 25, 2024
1 parent 157a0ef commit c283cad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion runtime/gc_modron_startup/mminit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2842,6 +2842,8 @@ configurateGCWithPolicyAndOptionsStandard(MM_EnvironmentBase *env)
MM_Configuration *
configurateGCWithPolicyAndOptions(OMR_VM* omrVM)
{
J9JavaVM *vm = (J9JavaVM*) omrVM->_language_vm;
PORT_ACCESS_FROM_JAVAVM(vm);
MM_Configuration *result = NULL;
MM_GCExtensions *extensions = MM_GCExtensions::getExtensions(omrVM);
MM_EnvironmentBase env(omrVM);
Expand All @@ -2867,7 +2869,9 @@ configurateGCWithPolicyAndOptions(OMR_VM* omrVM)
extensions->gcModeString = "-Xgcpolicy:gencon";
omrVM->gcPolicy = J9_GC_POLICY_GENCON;
/* scavenge, concurrentMark, noConcurrentSweep, loa */
setDefaultConfigOptions(extensions, true, true, false, true);
setDefaultConfigOptions(extensions, true,
(1 != j9sysinfo_get_number_CPUs_by_type(J9PORT_CPU_TARGET)),
false, true);
result = configurateGCWithPolicyAndOptionsStandard(&env);
break;

Expand Down

0 comments on commit c283cad

Please sign in to comment.