Skip to content

Commit 3debd02

Browse files
committed
Optimize Lambda proxy class matching on filtering
When trying to match classes to exclude third-party ones we are excluding also lambda proxy classes that are shown with JVM option -XX:+ShowHiddenFrames RegEx are used to identify them correctly but this is expensive. we are using a fast path by searching for 'Lambda' first before applying RegEx matching.
1 parent 018d1ea commit 3debd02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/util/ClassNameFiltering.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public boolean isExcluded(String className) {
5050
}
5151

5252
static boolean isLambdaProxyClass(String className) {
53-
return LAMBDA_PROXY_CLASS_PATTERN.matcher(className).matches();
53+
return className.contains("Lambda") && LAMBDA_PROXY_CLASS_PATTERN.matcher(className).matches();
5454
}
5555

5656
int shadedIndexOf(String className) {

0 commit comments

Comments
 (0)