Commit Graph

3893 Commits

Author SHA1 Message Date
Brian Devins-Suresh 3b78d4593f Don't need to collect mismatches in the critical path 2020-02-25 09:36:00 -05:00
Nikolay Martynov 50793e5244 Make sure that same classloaders get same weak ref 2020-02-25 14:32:35 +01:00
Nikolay Martynov aefcc477cb Simplify TypePoolCacheKey equals
We have to check string equivalence regardless of classloader state
2020-02-25 11:58:18 +01:00
Nikolay Martynov 31b5652d10 Remove reference check from TypeCacheKey 2020-02-25 10:19:47 +01:00
Nikolay Martynov 41db97ea0f Merge branch 'master' into mar-kolya/improve-hash-calclulation-cache-pool 2020-02-25 10:18:25 +01:00
Brian Devins-Suresh 5ebc13cafa Increase performance on java 8 2020-02-24 17:10:41 -05:00
Brian Devins-Suresh af67dfa720 Need to cache the boolean. The list can be taken later as debug is expected to be slower 2020-02-24 14:39:17 -05:00
Brian Devins-Suresh 75af71584c Refactor an agent usage, and fix logic issue 2020-02-24 14:39:17 -05:00
Brian Devins-Suresh e65177a143 Fail fast in the matcher, let the debug outputs use the cache 2020-02-24 14:39:17 -05:00
Tyler Benson 39e577ad97
Merge pull request #1250 from DataDog/tyler/test-matchers
Move matchers around and add unit tests.
2020-02-24 09:14:31 -08:00
Tyler Benson c13cb2e60f Move a few other classes. 2020-02-24 08:35:19 -08:00
Tyler Benson 3559ffb21c Add unit tests for matchers 2020-02-24 08:35:19 -08:00
Tyler Benson bd82166b58 Rename methods that don't require disambiguation. 2020-02-24 08:35:19 -08:00
Tyler Benson f70c35842d Move matchers to separate package and split matcher classes out 2020-02-24 08:31:12 -08:00
Nikolay Martynov 833f67816e
Merge pull request #1248 from DataDog/mar-kolya/reduce-superclass-matcher-exposure
Avoid calling superclass matcher where possible
2020-02-21 21:16:52 -05:00
Tyler Benson b27b30d913
Merge pull request #1247 from DataDog/tyler/bb-raw
Set ByteBuddy raw setting at startup
2020-02-21 16:30:24 -08:00
Nikolay Martynov b6d374e3a0 Avoid calling superclass matcher where possible
Saves about 100ms of startup time on test app
2020-02-21 15:08:39 -05:00
Tyler Benson ecf9bcc655
Make sure CallDepthThreadLocalMap is always reset (#1227)
Make sure CallDepthThreadLocalMap is always reset
2020-02-21 11:03:51 -08:00
Tyler Benson faccb0d483 Set ByteBuddy raw setting at startup
This reduces the complexity of TypeDefinitions.
```
Benchmark                                                             Mode  Cnt   Score   Error  Units
ClassRetransformingBenchmark.WithAgent.testTracedRetransform          avgt       22.450          ms/op
ClassRetransformingBenchmark.WithAgent.testUntracedRetransform        avgt        6.842          ms/op
ClassRetransformingBenchmark.WithAgentMaster.testTracedRetransform    avgt       23.188          ms/op
ClassRetransformingBenchmark.WithAgentMaster.testUntracedRetransform  avgt        7.009          ms/op
```
It also improved startup time by about 1 sec.
2020-02-21 10:35:20 -08:00
Nikolay Martynov 1f8acafc42
Merge pull request #1245 from DataDog/mar-kolya/single-ignores-matcher
Single ignores matcher
2020-02-21 12:42:18 -05:00
Tyler Benson e4d29e37ef
Update JMH benchmarks (#1242)
Update JMH benchmarks
2020-02-21 09:38:34 -08:00
Nikolay Martynov 00c268e6d8 Add equivalence check to TypeCacheKey 2020-02-21 12:24:53 -05:00
Nikolay Martynov d4c6d86e6d Do not use zero for hashcode
Seems like this may have odd sideeffects
2020-02-21 12:24:09 -05:00
Nikolay Martynov f736c425ff TypeCacheKey are different if hash codes are different
And this is very easy to check
2020-02-21 12:23:41 -05:00
Nikolay Martynov 9d7682f776 Fix hashcode calculation in TypeCacheKey
Using potentially very large number for a mod is probably not very effective
2020-02-21 12:22:51 -05:00
Nikolay Martynov 27842d8479 Ignore cglib packaged with springboot 2020-02-21 11:56:45 -05:00
Nikolay Martynov 0c659770cc Collect all ignore matchers into one
This should allow us to optimize this as a single function later
2020-02-21 11:48:40 -05:00
Nikolay Martynov b1d314aff1 Specify types in jaxrs mtcher to help Idea with type inference 2020-02-21 11:34:25 -05:00
dougqh cda3d6bbe3 Merge branch 'lpriima/ClassLoaderMatcherGuavaCache' 2020-02-21 10:44:14 -05:00
Nikolay Martynov e92d326052
Merge pull request #1236 from DataDog/mar-kolya/determine-agent-url-on-first-call
Determine agent URL version on first upload call
2020-02-21 07:04:49 -05:00
Lev Priima 37bcb4e288 ClassLoaderMatcher switch to Guava Cache 2020-02-21 03:58:02 -08:00
Lev Priima 51ca429915
Merge pull request #1235 from DataDog/lpriima/SkipClassLoaderMatcher#shouldSkipClass_by_switch
string-switch in SkipClassLoaderMatcher#shouldSkipClass(ClassLoader)
2020-02-20 21:20:06 -08:00
Lev Priima 52e0eb9d37 SkipClassLoaderMatcher use str-switch in shouldSkipClass(ClassLoader) 2020-02-20 21:02:42 -08:00
Tyler Benson 352469afde
Tomcat 10.0.0-M1 release seems to have some issues (#1243)
Tomcat 10.0.0-M1 release seems to have some issues
2020-02-20 20:51:05 -08:00
Tyler Benson a4f34f4088 Latest tomcat release seems to have some issues
Instrumentation muzzled: [jsp, jsp-compile] -- datadog.trace.instrumentation.jsp.JasperJSPCompilationContextInstrumentation on jdk.internal.loader.ClassLoaders$AppClassLoader@2c13da15
-- datadog.trace.instrumentation.jsp.JSPDecorator:39 Missing method getServletContext#()Ljavax/servlet/ServletContext;
2020-02-20 20:35:25 -08:00
Tyler Benson 5e37ca02f1
Merge pull request #1240 from DataDog/tyler/executor-matcher-reorder
Reorder java-concurrent matchers
2020-02-20 17:54:39 -08:00
Tyler Benson 660921517c
Remove costly matchers from ignore list (#1233)
Remove costly matchers from ignore list
2020-02-20 17:52:43 -08:00
Tyler Benson e1964e526e Update JMH benchmarks
Benchmark is run with `./gradlew :dd-java-agent:benchmark:jmh` -- after updating the absolute paths to the various agents in `ClassRetransformingBenchmark`.  Unfortunately I was unable to have it launch correctly with a relative path.
2020-02-20 17:30:36 -08:00
Trask Stalnaker 8949d6c05f Make sure CallDepthThreadLocalMap is always reset 2020-02-20 16:53:57 -08:00
Tyler Benson b805bf5994
Cache the result of toString in BigInteger (#1228)
Cache the result of toString in BigInteger
2020-02-20 16:10:31 -08:00
Tyler Benson da4f1dbc99
Merge pull request #1239 from DataDog/mar-kolya/change-profiling-url
Change profiling intake url
2020-02-20 16:08:38 -08:00
Heather D'Souza c0baa48487
Merge pull request #1231 from DataDog/heather.dsouza/disable_log_listeners
Create AgentBuilder with logging listeners only if in debug mode
2020-02-20 17:07:17 -05:00
heathkd b7b46caaa8 create AgentBuilder instance with logging listeners only if debug mode is enabled 2020-02-20 16:29:27 -05:00
Anubhaw Arya 17b4fae39c Ignores for coverage 2020-02-20 12:00:28 -08:00
Tyler Benson b80e9857d2 Reorder java-concurrent matchers
Move the expensive matcher to last.

In theory this should help, but did not seem to make a significant difference in basic startup benchmarks.
2020-02-20 11:34:39 -08:00
Tyler Benson e4a454549d
Split interface and class "supertype matching" (#1232)
Split interface and class "supertype matching"
2020-02-20 11:08:39 -08:00
Nikolay Martynov a43f2b7db6 Change profiling intake url 2020-02-20 12:58:39 -05:00
Nikolay Martynov 2c14aecd5a Create http client laizily 2020-02-20 10:11:25 -05:00
Nikolay Martynov a4071ca768 Fix some typos in tests 2020-02-20 10:07:53 -05:00
Nikolay Martynov 27cb2111b6
Merge pull request #1237 from DataDog/mar-kolya/do-not-create-field-profider-for-all-intrsumentations
Avoid creating context provider for intrumentations that do not need …
2020-02-20 09:51:45 -05:00