4446
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
1 /*
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
4 *
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation.
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
8 *
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code).
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
14 *
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation,
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
18 *
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
21 * questions.
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
22 */
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
23 package com.oracle.max.graal.hotspot.ri;
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
24
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
25 import com.oracle.max.cri.ri.*;
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
26 import com.oracle.max.graal.hotspot.*;
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
27 import com.oracle.max.graal.hotspot.Compiler;
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
28
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
29
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
30 public final class HotSpotNoProfilingInfo extends CompilerObject implements RiProfilingInfo {
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
31 /**
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
32 *
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
33 */
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
34 private static final long serialVersionUID = 4357945025049704109L;
|
4447
|
35 private static final HotSpotMethodDataAccessor noData = HotSpotMethodData.getNoMethodData();
|
4446
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
36
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
37 public HotSpotNoProfilingInfo(Compiler compiler) {
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
38 super(compiler);
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
39 }
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
40
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
41 @Override
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
42 public RiTypeProfile getTypeProfile(int bci) {
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
43 return noData.getTypeProfile(null, -1);
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
44 }
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
45
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
46 @Override
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
47 public double getBranchTakenProbability(int bci) {
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
48 return noData.getBranchTakenProbability(null, -1);
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
49 }
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
50
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
51 @Override
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
52 public double[] getSwitchProbabilities(int bci) {
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
53 return noData.getSwitchProbabilities(null, -1);
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
54 }
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
55
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
56 @Override
|
4457
|
57 public boolean getExceptionSeen(int bci) {
|
|
58 return noData.getExceptionSeen(null, -1);
|
4446
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
59 }
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
60
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
61 @Override
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
62 public int getExecutionCount(int bci) {
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
63 return noData.getExecutionCount(null, -1);
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
64 }
|
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
65 }
|