public class StringDeduplicationRule extends AbstractRule
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.
| Modifier and Type | Field and Description |
|---|---|
static TypedResult<IQuantity> |
HEAP_USAGE |
static TypedResult<String> |
INTERNAL_STRING_TYPE |
static TypedResult<IQuantity> |
STRING_HEAP_RATIO |
evaluationTask| Constructor and Description |
|---|
StringDeduplicationRule() |
| Modifier and Type | Method and Description |
|---|---|
protected IResult |
getResult(IItemCollection items,
IPreferenceValueProvider vp,
IResultValueProvider rp) |
createEvaluation, getConfigurationAttributes, getId, getName, getRequiredEvents, getResults, getTopicpublic static final TypedResult<IQuantity> HEAP_USAGE
public static final TypedResult<IQuantity> STRING_HEAP_RATIO
public static final TypedResult<String> INTERNAL_STRING_TYPE
protected IResult getResult(IItemCollection items, IPreferenceValueProvider vp, IResultValueProvider rp)
getResult in class AbstractRule JDK Mission Control v 8.0.1
Copyright © 2018-2021, Oracle and/or its affiliates. All rights reserved. Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl