This change overhauls the core type cache The new approach aims to achieve several things... 1 - cache is strictly bounded -- no variance for number of classes of ClassLoaders 2 - cache is significantly smaller 3 - cache doesn't compromise start-up time 4 - primary eviction policy isn't driven by time 5 - primary eviction policy isn't driven by GC There are some slight compromises here. In practice, start-up does increase slightly in a memory rich environment; however, start-up improves considerably in a memory poor environment. The basic approcach is to have a single unified Guava cache for all ClassLoaders -- nominally keyed a composite of ClassLoader & class name The ByteBuddy CacheProvider are simply thin wrappers around the Guava cache associated to a particular ClassLoader However rather than having a large number of WeakReferences floating around. The cache assigns an ID to each ClassLoader. To further avoid, consuming memory the cache only preserves a small map of Loader / ID assignments. This means a ClassLoader may have more than one active ID. This introduce the possibility for ID exhaustion. That unlikely case is handle by retiring the internal CacheInstance and starting anew. |
||
---|---|---|
.circleci | ||
.github | ||
buildSrc | ||
dd-java-agent | ||
dd-smoke-tests | ||
dd-trace-api | ||
dd-trace-ot | ||
gradle | ||
tooling | ||
utils | ||
.editorconfig | ||
.gitignore | ||
.gitmodules | ||
CONTRIBUTING.md | ||
LICENSE | ||
LICENSE-3rdparty.csv | ||
NOTICE | ||
README.md | ||
dd-trace-java.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
settings.gradle |
README.md
Datadog Java APM
To use and configure Datadog Java APM, see https://docs.datadoghq.com/tracing/languages/java