GCInfo

class GCInfo(val epoch: Long, val startTimeNs: Long, val endTimeNs: Long, val firstPauseRequestTimeNs: Long, val firstPauseStartTimeNs: Long, val firstPauseEndTimeNs: Long, val secondPauseRequestTimeNs: Long?, val secondPauseStartTimeNs: Long?, val secondPauseEndTimeNs: Long?, val postGcCleanupTimeNs: Long?, val rootSet: RootSetStatistics, val markedCount: Long, val sweepStatistics: Map<String, SweepStatistics>, val memoryUsageBefore: Map<String, MemoryUsage>, val memoryUsageAfter: Map<String, MemoryUsage>)(source)

This class represents statistics about the single run of the garbage collector. It is supposed to be used for testing and debugging purposes only.

Since Kotlin

1.9

Constructors

Link copied to clipboard
constructor(epoch: Long, startTimeNs: Long, endTimeNs: Long, firstPauseRequestTimeNs: Long, firstPauseStartTimeNs: Long, firstPauseEndTimeNs: Long, secondPauseRequestTimeNs: Long?, secondPauseStartTimeNs: Long?, secondPauseEndTimeNs: Long?, postGcCleanupTimeNs: Long?, rootSet: RootSetStatistics, markedCount: Long, sweepStatistics: Map<String, SweepStatistics>, memoryUsageBefore: Map<String, MemoryUsage>, memoryUsageAfter: Map<String, MemoryUsage>)

Properties

Link copied to clipboard

Time, when garbage collector run is ended, measured by kotlin.system.getTimeNanos. After this point, most of the memory is reclaimed, and a new garbage collector run can start.

Since Kotlin 1.9
Link copied to clipboard
val epoch: Long

ID of garbage collector run.

Since Kotlin 1.9
Link copied to clipboard

Time, when mutator threads are unsuspended for the first time, mesured by kotlin.system.getTimeNanos.

Since Kotlin 1.9
Link copied to clipboard

Time, when the garbage collector thread requested suspension of mutator threads for the first time, mesured by kotlin.system.getTimeNanos.

Since Kotlin 1.9
Link copied to clipboard

Time, when mutator threads are suspended for the first time, mesured by kotlin.system.getTimeNanos.

Since Kotlin 1.9
Link copied to clipboard

How many objects were processed during marking phase.

Since Kotlin 1.9
Link copied to clipboard

Memory usage at the start of garbage collector run, separated by memory pools. The set of memory pools depends on the collector implementation. Can be empty, if collection is in progress.

Since Kotlin 1.9
Link copied to clipboard

Memory usage at the end of garbage collector run, separated by memory pools. The set of memory pools depends on the collector implementation. Can be empty, if collection is in progress.

Since Kotlin 1.9
Link copied to clipboard

Time, when all memory is reclaimed, measured by kotlin.system.getTimeNanos. If null, memory reclamation is still in progress.

Since Kotlin 1.9
Link copied to clipboard

The number of objects in each root set pool. Check RootSetStatistics doc for details.

Since Kotlin 1.9
Link copied to clipboard

Time, when mutator threads are unsuspended for the second time, mesured by kotlin.system.getTimeNanos.

Since Kotlin 1.9
Link copied to clipboard

Time, when the garbage collector thread requested suspension of mutator threads for the second time, mesured by kotlin.system.getTimeNanos.

Since Kotlin 1.9
Link copied to clipboard

Time, when mutator threads are suspended for the second time, mesured by kotlin.system.getTimeNanos.

Since Kotlin 1.9
Link copied to clipboard

Time, when garbage collector run is started, meausered by kotlin.system.getTimeNanos.

Since Kotlin 1.9
Link copied to clipboard

Sweeping statistics separated by memory pools. The set of memory pools depends on the collector implementation. Can be empty, if collection is in progress.

Since Kotlin 1.9