diff options
author | lagergren <none@none> | 2014-10-14 16:11:07 +0200 |
---|---|---|
committer | lagergren <none@none> | 2014-10-14 16:11:07 +0200 |
commit | 58b9fa7a9aa7672dedf071d3f17a9efd0c969f1c (patch) | |
tree | 5aed9c2259f4381530b3b430e4f3a5762e7ac425 /src/jdk | |
parent | 3d610004832d55f46958bfa22521fbbb1d9ad079 (diff) | |
download | jdk8u_nashorn-58b9fa7a9aa7672dedf071d3f17a9efd0c969f1c.tar.gz |
8060471: DynamicLinker.getLinkedCallSiteLocation() is called even when logger is disabled, and it creates a stacktrace. This contributes unnecessarily to compile time.
Reviewed-by: lagergren, attila
Contributed-by: andreas.gabrielsson@oracle.com
Diffstat (limited to 'src/jdk')
-rw-r--r-- | src/jdk/nashorn/internal/runtime/GlobalConstants.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/jdk/nashorn/internal/runtime/GlobalConstants.java b/src/jdk/nashorn/internal/runtime/GlobalConstants.java index 6099a70b..c6f9b964 100644 --- a/src/jdk/nashorn/internal/runtime/GlobalConstants.java +++ b/src/jdk/nashorn/internal/runtime/GlobalConstants.java @@ -31,7 +31,6 @@ import static jdk.nashorn.internal.lookup.Lookup.MH; import static jdk.nashorn.internal.runtime.UnwarrantedOptimismException.INVALID_PROGRAM_POINT; import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.getProgramPoint; import static jdk.nashorn.internal.runtime.logging.DebugLogger.quote; - import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.SwitchPoint; @@ -328,7 +327,9 @@ public final class GlobalConstants implements Loggable { } if (!acc.mayRetry()) { - log.info("*** SET: Giving up on " + quote(name) + " - retry count has exceeded " + DynamicLinker.getLinkedCallSiteLocation()); + if (log.isEnabled()) { + log.fine("*** SET: Giving up on " + quote(name) + " - retry count has exceeded " + DynamicLinker.getLinkedCallSiteLocation()); + } return null; } @@ -404,7 +405,9 @@ public final class GlobalConstants implements Loggable { } if (acc.hasBeenInvalidated() || acc.guardFailed()) { - log.fine("*** GET: Giving up on " + quote(name) + " - retry count has exceeded"); + if (log.isEnabled()) { + log.info("*** GET: Giving up on " + quote(name) + " - retry count has exceeded " + DynamicLinker.getLinkedCallSiteLocation()); + } return null; } |