Class StringDeduplicationRule
- All Implemented Interfaces:
IRule
The rule can only give guidance, it is up to the user to measure changes memory consumption after enabling string deduplication. It can still be that the amount of memory used to hold metadata of the deduplicated strings is more than the saved heap space.
Rule uses the ObjectCount event if available, otherwise the TLAB events. Uncertainties in the calculations comes both from the statistical issues that the AllocationInNewTLAB event provides, and also from the fact that it is hard to know which of the char/byte arrays that actually are the internal string arrays. Looking at the allocation stack trace can help a bit, but allocations can be missed. If using the ObjectCount event, the statistics are better, but it is impossible to know which arrays to count.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypedResult<org.openjdk.jmc.common.unit.IQuantity>
static final TypedResult<String>
static final TypedResult<org.openjdk.jmc.common.unit.IQuantity>
Fields inherited from class org.openjdk.jmc.flightrecorder.rules.AbstractRule
evaluationTask
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IResult
getResult
(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.util.IPreferenceValueProvider vp, IResultValueProvider rp) Methods inherited from class org.openjdk.jmc.flightrecorder.rules.AbstractRule
createEvaluation, getConfigurationAttributes, getId, getName, getRequiredEvents, getResults, getTopic
-
Field Details
-
HEAP_USAGE
-
STRING_HEAP_RATIO
-
INTERNAL_STRING_TYPE
-
-
Constructor Details
-
StringDeduplicationRule
public StringDeduplicationRule()
-
-
Method Details
-
getResult
protected IResult getResult(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.util.IPreferenceValueProvider vp, IResultValueProvider rp) - Specified by:
getResult
in classAbstractRule
-