Mercurial > hg > graal-compiler
annotate graal/com.oracle.max.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotNoProfilingInfo.java @ 5060:4ed4295ce15f
Update import statements.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 08 Mar 2012 19:11:12 +0100 |
parents | ed559a528128 |
children |
rev | line source |
---|---|
4446 | 1 /* |
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
23 package com.oracle.graal.hotspot.ri; |
4446 | 24 |
25 import com.oracle.max.cri.ri.*; | |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
26 import com.oracle.graal.hotspot.*; |
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
27 import com.oracle.graal.hotspot.Compiler; |
4446 | 28 |
4551
a7a16015e47f
changed profiling maturity so that profiling information is used more likely
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4527
diff
changeset
|
29 /** |
a7a16015e47f
changed profiling maturity so that profiling information is used more likely
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4527
diff
changeset
|
30 * Dummy profiling information in case that a method was not executed frequently enough so that |
a7a16015e47f
changed profiling maturity so that profiling information is used more likely
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4527
diff
changeset
|
31 * no profiling information does exist yet. |
a7a16015e47f
changed profiling maturity so that profiling information is used more likely
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4527
diff
changeset
|
32 */ |
4446 | 33 public final class HotSpotNoProfilingInfo extends CompilerObject implements RiProfilingInfo { |
34 /** | |
35 * | |
36 */ | |
37 private static final long serialVersionUID = 4357945025049704109L; | |
4551
a7a16015e47f
changed profiling maturity so that profiling information is used more likely
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4527
diff
changeset
|
38 // Be optimistic and return false for exceptionSeen. A methodDataOop is allocated in case of a deoptimization. |
4564
8fc6920e064b
avoid recursive inlining, escape analysis does no longer restart inlining with level 0, bugfixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4551
diff
changeset
|
39 private static final HotSpotMethodDataAccessor noData = HotSpotMethodData.getNoDataAccessor(false); |
4446 | 40 |
41 public HotSpotNoProfilingInfo(Compiler compiler) { | |
42 super(compiler); | |
43 } | |
44 | |
45 @Override | |
46 public RiTypeProfile getTypeProfile(int bci) { | |
47 return noData.getTypeProfile(null, -1); | |
48 } | |
49 | |
50 @Override | |
51 public double getBranchTakenProbability(int bci) { | |
52 return noData.getBranchTakenProbability(null, -1); | |
53 } | |
54 | |
55 @Override | |
56 public double[] getSwitchProbabilities(int bci) { | |
57 return noData.getSwitchProbabilities(null, -1); | |
58 } | |
59 | |
60 @Override | |
4527
a0cca63cd366
fixed exceptionSeen profiling information
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4457
diff
changeset
|
61 public RiExceptionSeen getExceptionSeen(int bci) { |
4457
5acf4a974e4a
fixed framestate for inlining multiple methods
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4447
diff
changeset
|
62 return noData.getExceptionSeen(null, -1); |
4446 | 63 } |
64 | |
65 @Override | |
66 public int getExecutionCount(int bci) { | |
67 return noData.getExecutionCount(null, -1); | |
68 } | |
69 } |