opentelemetry-java-instrume.../dd-java-agent
dougqh fb871611b5 Replacing ID generation with WeakReference reuse
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.
2020-01-27 12:03:44 -05:00
..
agent-bootstrap Merge pull request #1179 from DataDog/landerson/internal-jar-memory 2020-01-16 10:51:42 -05:00
agent-jmxfetch Remove logging config from jmxfetch setup 2020-01-13 15:23:04 -05:00
agent-tooling Replacing ID generation with WeakReference reuse 2020-01-27 12:03:44 -05:00
benchmark Upgradle to gradle 6.0 2019-11-12 16:26:46 -05:00
benchmark-integration Change shell script to work with play 2018-12-14 11:19:17 -05:00
instrumentation WeakMap computeIfAbsent 2020-01-15 12:26:15 -05:00
load-generator simple load generator tool 2019-11-07 16:50:23 -05:00
src Fix typo in test name 2020-01-23 10:40:48 -05:00
testing Add Builder to DDTracer 2020-01-14 17:44:34 -08:00
README.md Update documentation (#67) 2017-07-27 21:08:35 +02:00
dd-java-agent.gradle Upgradle to gradle 6.0 2019-11-12 16:26:46 -05:00

README.md

Datadog Java Agent for APM