@@ -361,6 +361,7 @@ MM_RealtimeGC::internalPreCollect(MM_EnvironmentBase *env, MM_MemorySubSpace *su
361
361
env->_cycleState ->_gcCode = MM_GCCode (gcCode);
362
362
env->_cycleState ->_type = _cycleType;
363
363
env->_cycleState ->_activeSubSpace = subSpace;
364
+ env->_cycleState ->_collectionStatistics = &_collectionStatistics;
364
365
365
366
/* If we are in an excessiveGC level beyond normal then an aggressive GC is
366
367
* conducted to free up as much space as possible
@@ -387,6 +388,7 @@ MM_RealtimeGC::internalPreCollect(MM_EnvironmentBase *env, MM_MemorySubSpace *su
387
388
}
388
389
/* we are about to collect so generate the appropriate cycle start and increment start events */
389
390
reportGCCycleStart (rtEnv);
391
+ reportGCIncrementStart (rtEnv);
390
392
_sched->reportStartGCIncrement (rtEnv);
391
393
}
392
394
@@ -447,6 +449,7 @@ MM_RealtimeGC::internalPostCollect(MM_EnvironmentBase *env, MM_MemorySubSpace *s
447
449
* the METRONOME_INCREMENT_START/END events become out of order and verbose GC will fail.
448
450
*/
449
451
reportGCCycleFinalIncrementEnding (env);
452
+ reportGCIncrementEnd (env);
450
453
451
454
MM_EnvironmentRealtime *rtEnv = MM_EnvironmentRealtime::getEnvironment (env);
452
455
_sched->reportStopGCIncrement (rtEnv, true );
@@ -613,6 +616,24 @@ MM_RealtimeGC::reportGCCycleEnd(MM_EnvironmentBase *env)
613
616
omrthread_monitor_exit (env->getOmrVM ()->_gcCycleOnMonitor );
614
617
}
615
618
619
+ void
620
+ MM_RealtimeGC::reportGCIncrementStart (MM_EnvironmentBase *env)
621
+ {
622
+ PORT_ACCESS_FROM_ENVIRONMENT (env);
623
+ MM_CollectionStatistics *stats = (MM_CollectionStatistics *)env->_cycleState ->_collectionStatistics ;
624
+ stats->_startTime = j9time_hires_clock ();
625
+ }
626
+
627
+ void
628
+ MM_RealtimeGC::reportGCIncrementEnd (MM_EnvironmentBase *env)
629
+ {
630
+ PORT_ACCESS_FROM_ENVIRONMENT (env);
631
+ MM_CollectionStatistics *stats = (MM_CollectionStatistics *)env->_cycleState ->_collectionStatistics ;
632
+
633
+ stats->_endTime = j9time_hires_clock ();
634
+ stats->processPauseDuration ();
635
+ }
636
+
616
637
/* *
617
638
* @todo Provide method documentation
618
639
* @ingroup GC_Metronome methodGroup
0 commit comments