Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
4455:b788ebbb7ef8 | 4456:f4c82dd4619e |
---|---|
33 /** | 33 /** |
34 * | 34 * |
35 */ | 35 */ |
36 private static final long serialVersionUID = -6877016333706838441L; | 36 private static final long serialVersionUID = -6877016333706838441L; |
37 | 37 |
38 private RiResolvedType[] types; | 38 private final RiResolvedType[] types; |
39 private double[] probabilities; | 39 private final double notRecordedProbability; |
40 private final double[] probabilities; | |
40 | 41 |
41 public RiTypeProfile(RiResolvedType[] types, double[] probabilites) { | 42 public RiTypeProfile(RiResolvedType[] types, double notRecordedProbability, double[] probabilites) { |
42 this.types = types; | 43 this.types = types; |
44 this.notRecordedProbability = notRecordedProbability; | |
43 this.probabilities = probabilites; | 45 this.probabilities = probabilites; |
44 } | 46 } |
45 | 47 |
46 /** | 48 /** |
47 * The estimated probabilities of the different receivers. This array needs to have the same length as | 49 * The estimated probabilities of the different receivers. This array needs to have the same length as the array returned by |
48 * {@link RiTypeProfile#types}. | 50 * {@link RiTypeProfile#types}. |
49 */ | 51 */ |
50 public double[] getProbabilities() { | 52 public double[] getProbabilities() { |
51 return probabilities; | 53 return probabilities; |
54 } | |
55 | |
56 /** | |
57 * Returns the estimated probability of all types that could not be recorded due to profiling limitations. | |
58 * @return double value >= 0.0 and <= 1.0 | |
59 */ | |
60 public double getNotRecordedProbability() { | |
61 return notRecordedProbability; | |
52 } | 62 } |
53 | 63 |
54 /** | 64 /** |
55 * A list of receivers for which the runtime has recorded probability information. This array needs to have the same | 65 * A list of receivers for which the runtime has recorded probability information. This array needs to have the same |
56 * length as {@link RiTypeProfile#probabilities}. | 66 * length as {@link RiTypeProfile#probabilities}. |