Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotMethodData.java @ 4527:a0cca63cd366
fixed exceptionSeen profiling information
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Tue, 07 Feb 2012 12:09:11 -0800 |
parents | 0e1f15ec0e94 |
children | a7a16015e47f |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotMethodData.java Tue Feb 07 11:43:05 2012 -0800 +++ b/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotMethodData.java Tue Feb 07 12:09:11 2012 -0800 @@ -44,7 +44,8 @@ // TODO (ch) use same logic as in NodeClass? private static final Unsafe unsafe = Unsafe.getUnsafe(); - private static final HotSpotMethodDataAccessor NO_DATA_ACCESSOR = new NoMethodData(); + private static final HotSpotMethodDataAccessor NO_DATA_NO_EXCEPTION_ACCESSOR = new NoMethodData(RiExceptionSeen.FALSE); + private static final HotSpotMethodDataAccessor NO_DATA_EXCEPTION_POSSIBLE_ACCESSOR = new NoMethodData(RiExceptionSeen.UNKNOWN); private static final HotSpotVMConfig config; // sorted by tag private static final HotSpotMethodDataAccessor[] PROFILE_DATA_ACCESSORS = { @@ -109,8 +110,12 @@ return getData(position); } - public static HotSpotMethodDataAccessor getNoMethodData() { - return NO_DATA_ACCESSOR; + public static HotSpotMethodDataAccessor getNoDataNoExceptionAccessor() { + return NO_DATA_NO_EXCEPTION_ACCESSOR; + } + + public static HotSpotMethodDataAccessor getNoDataExceptionPossibleAccessor() { + return NO_DATA_EXCEPTION_POSSIBLE_ACCESSOR; } private HotSpotMethodDataAccessor getData(int position) { @@ -196,8 +201,8 @@ } @Override - public boolean getExceptionSeen(HotSpotMethodData data, int position) { - return (getFlags(data, position) & EXCEPTIONS_MASK) != 0; + public RiExceptionSeen getExceptionSeen(HotSpotMethodData data, int position) { + return RiExceptionSeen.get((getFlags(data, position) & EXCEPTIONS_MASK) != 0); } @Override @@ -233,8 +238,11 @@ private static final int NO_DATA_TAG = 0; private static final int NO_DATA_SIZE = cellIndexToOffset(0); - protected NoMethodData() { + private final RiExceptionSeen exceptionSeen; + + protected NoMethodData(RiExceptionSeen exceptionSeen) { super(NO_DATA_TAG, NO_DATA_SIZE); + this.exceptionSeen = exceptionSeen; } @Override @@ -244,8 +252,8 @@ @Override - public boolean getExceptionSeen(HotSpotMethodData data, int position) { - return false; + public RiExceptionSeen getExceptionSeen(HotSpotMethodData data, int position) { + return exceptionSeen; } }