Mercurial > hg > graal-compiler
diff graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiTypeProfile.java @ 4456:f4c82dd4619e
inlining bugfixes and cleanup
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Tue, 31 Jan 2012 11:37:16 -0800 |
parents | c0430421d43d |
children | 12c63380e7ff |
line wrap: on
line diff
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiTypeProfile.java Mon Jan 30 17:02:27 2012 -0800 +++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiTypeProfile.java Tue Jan 31 11:37:16 2012 -0800 @@ -35,16 +35,18 @@ */ private static final long serialVersionUID = -6877016333706838441L; - private RiResolvedType[] types; - private double[] probabilities; + private final RiResolvedType[] types; + private final double notRecordedProbability; + private final double[] probabilities; - public RiTypeProfile(RiResolvedType[] types, double[] probabilites) { + public RiTypeProfile(RiResolvedType[] types, double notRecordedProbability, double[] probabilites) { this.types = types; + this.notRecordedProbability = notRecordedProbability; this.probabilities = probabilites; } /** - * The estimated probabilities of the different receivers. This array needs to have the same length as + * The estimated probabilities of the different receivers. This array needs to have the same length as the array returned by * {@link RiTypeProfile#types}. */ public double[] getProbabilities() { @@ -52,6 +54,14 @@ } /** + * Returns the estimated probability of all types that could not be recorded due to profiling limitations. + * @return double value >= 0.0 and <= 1.0 + */ + public double getNotRecordedProbability() { + return notRecordedProbability; + } + + /** * A list of receivers for which the runtime has recorded probability information. This array needs to have the same * length as {@link RiTypeProfile#probabilities}. */