Mercurial > hg > graal-jvmci-8
changeset 21630:9cc3571ef51d
Add getProfilingInfo(boolean includeNormal, boolean includeOSR) to ResolvedJavaMethod
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Fri, 29 May 2015 14:46:49 +0200 |
parents | 36cf15e3219e |
children | 77acf6ba2fc0 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotResolvedJavaMethod.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotResolvedJavaMethodImpl.java graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/ResolvedJavaMethod.java |
diffstat | 4 files changed, 19 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Mon Jun 01 15:14:39 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Fri May 29 14:46:49 2015 +0200 @@ -149,7 +149,7 @@ protected ProfilingInfo getProfilingInfo() { boolean osrCompilation = entryBCI != StructuredGraph.INVOCATION_ENTRY_BCI; - return method.getCompilationProfilingInfo(osrCompilation); + return method.getProfilingInfo(!osrCompilation, osrCompilation); } public void runCompilation() {
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotResolvedJavaMethod.java Mon Jun 01 15:14:39 2015 +0200 +++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotResolvedJavaMethod.java Fri May 29 14:46:49 2015 +0200 @@ -84,8 +84,6 @@ */ boolean hasCompiledCodeAtLevel(int level); - ProfilingInfo getCompilationProfilingInfo(boolean isOSR); - default boolean isDefault() { if (isConstructor()) { return false;
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotResolvedJavaMethodImpl.java Mon Jun 01 15:14:39 2015 +0200 +++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotResolvedJavaMethodImpl.java Fri May 29 14:46:49 2015 +0200 @@ -410,15 +410,7 @@ private static final String TraceMethodDataFilter = System.getProperty("graal.traceMethodDataFilter"); @Override - public ProfilingInfo getProfilingInfo() { - return getProfilingInfo(true, true); - } - - public ProfilingInfo getCompilationProfilingInfo(boolean isOSR) { - return getProfilingInfo(!isOSR, isOSR); - } - - private ProfilingInfo getProfilingInfo(boolean includeNormal, boolean includeOSR) { + public ProfilingInfo getProfilingInfo(boolean includeNormal, boolean includeOSR) { ProfilingInfo info; if (UseProfilingInformation.getValue() && methodData == null) {
--- a/graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/ResolvedJavaMethod.java Mon Jun 01 15:14:39 2015 +0200 +++ b/graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/ResolvedJavaMethod.java Fri May 29 14:46:49 2015 +0200 @@ -128,7 +128,23 @@ /** * Returns an object that provides access to the profiling information recorded for this method. */ - ProfilingInfo getProfilingInfo(); + default ProfilingInfo getProfilingInfo() { + return getProfilingInfo(true, true); + } + + /** + * Returns an object that provides access to the profiling information recorded for this method. + * + * @param includeNormal if true, + * {@linkplain ProfilingInfo#getDeoptimizationCount(DeoptimizationReason) + * deoptimization counts} will include deoptimization that happened during execution + * of standard non-osr methods. + * @param includeOSR if true, + * {@linkplain ProfilingInfo#getDeoptimizationCount(DeoptimizationReason) + * deoptimization counts} will include deoptimization that happened during execution + * of on-stack-replacement methods. + */ + ProfilingInfo getProfilingInfo(boolean includeNormal, boolean includeOSR); /** * Invalidates the profiling information and restarts profiling upon the next invocation.