Mercurial > hg > truffle
diff graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotProfilingInfo.java @ 4527:a0cca63cd366
fixed exceptionSeen profiling information
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Tue, 07 Feb 2012 12:09:11 -0800 |
parents | 00efac2934d3 |
children | 7d0d849abf80 |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotProfilingInfo.java Tue Feb 07 11:43:05 2012 -0800 +++ b/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotProfilingInfo.java Tue Feb 07 12:09:11 2012 -0800 @@ -66,7 +66,7 @@ } @Override - public boolean getExceptionSeen(int bci) { + public RiExceptionSeen getExceptionSeen(int bci) { findBCI(bci, true); return dataAccessor.getExceptionSeen(methodData, position); } @@ -95,6 +95,7 @@ } } + boolean exceptionPossiblyNotRecorded = false; if (searchExtraData && methodData.hasExtraData()) { int currentPosition = methodData.getExtraDataBeginOffset(); HotSpotMethodDataAccessor currentAccessor; @@ -106,11 +107,11 @@ } currentPosition = currentPosition + currentAccessor.getSize(methodData, currentPosition); } + + exceptionPossiblyNotRecorded = !methodData.isWithin(currentPosition); } - // TODO (ch) getExceptionSeen() should return UNKNOWN if not enough extra data - - noDataFound(); + noDataFound(exceptionPossiblyNotRecorded); } private void normalDataFound(HotSpotMethodDataAccessor data, int pos, int bci) { @@ -123,8 +124,9 @@ setCurrentData(data, pos); } - private void noDataFound() { - setCurrentData(HotSpotMethodData.getNoMethodData(), -1); + private void noDataFound(boolean exceptionPossible) { + HotSpotMethodDataAccessor accessor = exceptionPossible ? HotSpotMethodData.getNoDataNoExceptionAccessor() : HotSpotMethodData.getNoDataNoExceptionAccessor(); + setCurrentData(accessor, -1); } private void setCurrentData(HotSpotMethodDataAccessor dataAccessor, int position) {