Class GcInvertedParallelismRule
java.lang.Object
org.openjdk.jmc.flightrecorder.rules.jdk.memory.GcInvertedParallelismRule
- All Implemented Interfaces:
IRule
Rule that checks for "Inverted Parallelism", as described by the Garbagecat GC log analysis tool.
Checks if the parallel collection performance is less than serial (single-threaded). See:
https://github.com/mgm3746/garbagecat/blob/main/src/main/java/org/eclipselabs/garbagecat/util/jdk/JdkMath.java#L365
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TypedResult<org.openjdk.jmc.common.unit.IQuantity>
static final TypedResult<Long>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
calcParallelism
(long timeUser, long timeSys, long timeReal) Calculate parallelism, the ratio of user + sys to wall (real) time.createEvaluation
(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.util.IPreferenceValueProvider valueProvider, IResultValueProvider resultProvider) Collection<org.openjdk.jmc.common.util.TypedPreference<?>>
getId()
getName()
getTopic()
static boolean
isInvertedParallelism
(int parallelism)
-
Field Details
-
GC_CPU_TIME_EVENT_COUNT
-
INVERTED_PARALLELISM_COUNT
-
-
Constructor Details
-
GcInvertedParallelismRule
public GcInvertedParallelismRule()
-
-
Method Details
-
createEvaluation
public RunnableFuture<IResult> createEvaluation(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.util.IPreferenceValueProvider valueProvider, IResultValueProvider resultProvider) - Specified by:
createEvaluation
in interfaceIRule
-
calcParallelism
public static int calcParallelism(long timeUser, long timeSys, long timeReal) Calculate parallelism, the ratio of user + sys to wall (real) time.- Parameters:
timeUser
- The user (non-kernel) time.timeSys
- The sys (kernel) time.timeReal
- The wall (clock) time.- Returns:
- Percent user:real time rounded up the the nearest whole number.
-
isInvertedParallelism
public static boolean isInvertedParallelism(int parallelism) - Parameters:
parallelism
- The parallelism percent (ratio or user to wall (real time).- Returns:
- True if the parallelism is "inverted", false otherwise. Inverted parallelism is less than 100. In other words, the parallel collection performance is less than serial (single-threaded).
-
getConfigurationAttributes
- Specified by:
getConfigurationAttributes
in interfaceIRule
-
getId
-
getName
-
getTopic
-
getRequiredEvents
- Specified by:
getRequiredEvents
in interfaceIRule
-
getResults
- Specified by:
getResults
in interfaceIRule
-