Mercurial > hg > graal-compiler
changeset 9342:e8dc8748f415
added check for JaCoCo methods being inserted into replacement methods
added JaCoCo exclusion tag to TypeCheckSnippetUtils and Stub
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 26 Apr 2013 22:18:59 +0200 |
parents | 26d11d3ca6bc |
children | cdc21fd3d389 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/TypeCheckSnippetUtils.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java |
diffstat | 3 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/TypeCheckSnippetUtils.java Fri Apr 26 22:00:49 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/TypeCheckSnippetUtils.java Fri Apr 26 22:18:59 2013 +0200 @@ -37,6 +37,8 @@ import com.oracle.graal.replacements.*; import com.oracle.graal.word.*; +//JaCoCo Exclude + /** * Utilities and common code paths used by the type check snippets. */
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java Fri Apr 26 22:00:49 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java Fri Apr 26 22:18:59 2013 +0200 @@ -52,6 +52,8 @@ import com.oracle.graal.replacements.SnippetTemplate.SnippetInfo; import com.oracle.graal.word.*; +//JaCoCo Exclude + /** * Base class for implementing some low level code providing the out-of-line slow path for a * snippet. A concrete stub is defined a subclass of this class.
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Fri Apr 26 22:00:49 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Fri Apr 26 22:18:59 2013 +0200 @@ -372,6 +372,11 @@ if (intrinsicGraph != null && policy.shouldUseReplacement(callee, methodToParse)) { targetGraph = intrinsicGraph; } else { + if (callee.getName().startsWith("$jacoco")) { + throw new GraalInternalError("Parsing call to JaCoCo instrumentation method " + format("%H.%n(%p)", callee) + " from " + format("%H.%n(%p)", methodToParse) + + " while preparing replacement " + format("%H.%n(%p)", method) + ". Placing \"//JaCoCo Exclude\" anywhere in " + + methodToParse.getDeclaringClass().getSourceFileName() + " should fix this."); + } targetGraph = parseGraph(callee, policy); } InliningUtil.inline(callTarget.invoke(), targetGraph, true);