First pass at replacing ID generation with WeakReference reuse In this first version, the Cache<ClassLoader, ID> was replaced with Cache<ClassLoader, WeakReference<ClassLoader>>. The core cache is still of Cache<TypeCacheKey, TypePool.Resolution> and TypeCacheKey logically remains a composite key of ClassLoader, class name. The removal of ID assignment means ID exhaustion is no longer na issue, so there's never a need to rebuild the cache. For that reason, CacheInstance has removed and the core caching logic has been moved into DDCachingPoolStrategy. While TypeCacheKey remains conceptually the same, the internals have changed somewhat. The TypeCacheKey now has 3 core fields... - loaderHash - loadeRef - class name Since loader refs are recycled, the fast path for key equivalence can use reference equivalence of the reference objects. This change ripples through the CacheProvider-s which also have to store loaderHash and loaderRef. It may be worth going a step further and switching to a Cache<Loader, TypePool> as well. That still avoid the creation of many WeakReference-s, since the underlying CacheProvider will hold a canonical WeakReference per ClassLoader. |
||
|---|---|---|
| .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