Skip to content

Commit

Permalink
[GR-32637] [GR-22733] [GR-14736] In agent, filter lambda classes heur…
Browse files Browse the repository at this point in the history
…istically.

PullRequest: graal/11947
  • Loading branch information
peter-hofer committed Jun 10, 2022
2 parents 00657a1 + a3ca043 commit 18c276f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import java.util.regex.Pattern;

import org.graalvm.compiler.java.LambdaUtils;
import org.graalvm.compiler.phases.common.LazyValue;

import com.oracle.svm.configure.filters.ConfigurationFilter;
Expand Down Expand Up @@ -169,7 +170,13 @@ public boolean shouldIgnore(LazyValue<String> queriedClass, LazyValue<String> ca
if (accessFilter != null && queriedClass.get() != null && !accessFilter.includes(queriedClass.get())) {
return true;
}
return heuristicsEnabled && queriedClass.get() != null && PROXY_CLASS_NAME_PATTERN.matcher(queriedClass.get()).matches();
if (heuristicsEnabled && queriedClass.get() != null) {
if (queriedClass.get().contains(LambdaUtils.LAMBDA_CLASS_NAME_SUBSTRING) ||
PROXY_CLASS_NAME_PATTERN.matcher(queriedClass.get()).matches()) {
return true;
}
}
return false;
}

public boolean shouldIgnoreJniMethodLookup(LazyValue<String> queriedClass, LazyValue<String> name, LazyValue<String> signature, LazyValue<String> callerClass) {
Expand Down

0 comments on commit 18c276f

Please sign in to comment.