comparison graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiProfilingInfo.java @ 5346:4c3d953f8131

added mechanism (enabled by -G:PICache and -G:PiFilter) for saving/loading method profiling info to/from disk
author Doug Simon <doug.simon@oracle.com>
date Thu, 03 May 2012 13:39:45 +0200
parents dad1ac9dba7d
children 56860d3f9f39
comparison
equal deleted inserted replaced
5345:00803ae428d2 5346:4c3d953f8131
28 * Every accessor method returns the information that is available at the time of invocation. 28 * Every accessor method returns the information that is available at the time of invocation.
29 * If a method is invoked multiple times, it may return significantly different results for every invocation 29 * If a method is invoked multiple times, it may return significantly different results for every invocation
30 * as the profiling information may be changed by other Java threads at any time. 30 * as the profiling information may be changed by other Java threads at any time.
31 */ 31 */
32 public interface RiProfilingInfo { 32 public interface RiProfilingInfo {
33
34 /**
35 * Gets the length of the code associated with this profile.
36 */
37 int codeSize();
38
33 /** 39 /**
34 * Returns an estimate of how often the branch at the given byte code was taken. 40 * Returns an estimate of how often the branch at the given byte code was taken.
35 * @return The estimated probability, with 0.0 meaning never and 1.0 meaning always, or -1 if this information is not available. 41 * @return The estimated probability, with 0.0 meaning never and 1.0 meaning always, or -1 if this information is not available.
36 */ 42 */
37 double getBranchTakenProbability(int bci); 43 double getBranchTakenProbability(int bci);
50 */ 56 */
51 RiTypeProfile getTypeProfile(int bci); 57 RiTypeProfile getTypeProfile(int bci);
52 58
53 /** 59 /**
54 * Returns information if the given BCI did ever throw an exception. 60 * Returns information if the given BCI did ever throw an exception.
55 * @return @link{RiExceptionSeen.TRUE} if the instruction has thrown an exception at least once, 61 * @return {@link RiExceptionSeen#TRUE} if the instruction has thrown an exception at least once,
56 * @link{RiExceptionSeen.FALSE} if it never threw an exception, and @link{RiExceptionSeen.UNKNOWN} 62 * {@link RiExceptionSeen#FALSE} if it never threw an exception, and {@link RiExceptionSeen#NOT_SUPPORTED}
57 * if this information was not recorded. 63 * if this information was not recorded.
58 */ 64 */
59 RiExceptionSeen getExceptionSeen(int bci); 65 RiExceptionSeen getExceptionSeen(int bci);
60 66
61 /** 67 /**