Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java @ 24125:0c5404418ec2
Backout getMarkName fix
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 11 Apr 2017 08:59:43 -0700 |
parents | 286dce1eca9b |
children |
rev | line source |
---|---|
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
1 /* |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
4 * |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
8 * |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
14 * |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
18 * |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
21 * questions. |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
22 */ |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
23 package jdk.vm.ci.hotspot; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
24 |
22569
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22562
diff
changeset
|
25 import static java.lang.String.format; |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
26 import static jdk.vm.ci.hotspot.CompilerToVM.compilerToVM; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
27 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
28 import static jdk.vm.ci.hotspot.HotSpotVMConfig.config; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
29 import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE; |
4470
b7ec250cd29c
fixes after merge
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4467
diff
changeset
|
30 |
22569
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22562
diff
changeset
|
31 import java.util.Arrays; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
32 |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
33 import jdk.vm.ci.meta.DeoptimizationReason; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
34 import jdk.vm.ci.meta.JavaMethodProfile; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
35 import jdk.vm.ci.meta.JavaMethodProfile.ProfiledMethod; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
36 import jdk.vm.ci.meta.JavaTypeProfile; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
37 import jdk.vm.ci.meta.JavaTypeProfile.ProfiledType; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
38 import jdk.vm.ci.meta.ResolvedJavaMethod; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
39 import jdk.vm.ci.meta.ResolvedJavaType; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22582
diff
changeset
|
40 import jdk.vm.ci.meta.TriState; |
22569
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22562
diff
changeset
|
41 import sun.misc.Unsafe; |
18567
37d88a4af2ab
removed references to HotSpotGraalRuntime.unsafeReadWord()
Doug Simon <doug.simon@oracle.com>
parents:
18546
diff
changeset
|
42 |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6539
diff
changeset
|
43 /** |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
44 * Access to a HotSpot {@code MethodData} structure (defined in methodData.hpp). |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6539
diff
changeset
|
45 */ |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
46 final class HotSpotMethodData { |
4444 | 47 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
48 static final HotSpotVMConfig config = config(); |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
49 static final HotSpotMethodDataAccessor NO_DATA_NO_EXCEPTION_ACCESSOR = new NoMethodData(config, config.dataLayoutNoTag, TriState.FALSE); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
50 static final HotSpotMethodDataAccessor NO_DATA_EXCEPTION_POSSIBLY_NOT_RECORDED_ACCESSOR = new NoMethodData(config, config.dataLayoutNoTag, TriState.UNKNOWN); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
51 |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6539
diff
changeset
|
52 /** |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6539
diff
changeset
|
53 * Reference to the C++ MethodData object. |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6539
diff
changeset
|
54 */ |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
55 final long metaspaceMethodData; |
23757
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
56 private final HotSpotResolvedJavaMethodImpl method; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6539
diff
changeset
|
57 |
23719
a52d7039723b
fixed checkstyle issues
Doug Simon <doug.simon@oracle.com>
parents:
23717
diff
changeset
|
58 HotSpotMethodData(long metaspaceMethodData, HotSpotResolvedJavaMethodImpl method) { |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6539
diff
changeset
|
59 this.metaspaceMethodData = metaspaceMethodData; |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
60 this.method = method; |
13241 | 61 } |
62 | |
63 /** | |
64 * @return value of the MethodData::_data_size field | |
65 */ | |
66 private int normalDataSize() { | |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
67 return UNSAFE.getInt(metaspaceMethodData + config.methodDataDataSize); |
13241 | 68 } |
69 | |
70 /** | |
71 * Returns the size of the extra data records. This method does the same calculation as | |
72 * MethodData::extra_data_size(). | |
16479
558cf39c646b
moved toJavaName(JavaType type) from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15291
diff
changeset
|
73 * |
13241 | 74 * @return size of extra data records |
75 */ | |
76 private int extraDataSize() { | |
77 final int extraDataBase = config.methodDataOopDataOffset + normalDataSize(); | |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
78 final int extraDataLimit = UNSAFE.getInt(metaspaceMethodData + config.methodDataSize); |
13241 | 79 return extraDataLimit - extraDataBase; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
80 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
81 |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
82 public boolean hasNormalData() { |
13241 | 83 return normalDataSize() > 0; |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
84 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
85 |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
86 public boolean hasExtraData() { |
13241 | 87 return extraDataSize() > 0; |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
88 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
89 |
4476
00efac2934d3
methodData bugfix
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4470
diff
changeset
|
90 public int getExtraDataBeginOffset() { |
13241 | 91 return normalDataSize(); |
4476
00efac2934d3
methodData bugfix
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4470
diff
changeset
|
92 } |
00efac2934d3
methodData bugfix
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4470
diff
changeset
|
93 |
4444 | 94 public boolean isWithin(int position) { |
13241 | 95 return position >= 0 && position < normalDataSize() + extraDataSize(); |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
96 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
97 |
5541
b4c406861c33
More renamings to drop Ri* prefix completely. Deleted graph.BitMap class and replaced with java.util.BitSet.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
98 public int getDeoptimizationCount(DeoptimizationReason reason) { |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21411
diff
changeset
|
99 HotSpotMetaAccessProvider metaAccess = (HotSpotMetaAccessProvider) runtime().getHostJVMCIBackend().getMetaAccess(); |
18301
0f41072d8bbc
moved use of HotSpotMetaAccessProvider to locations on the "local" side of remote compilation
Doug Simon <doug.simon@oracle.com>
parents:
18223
diff
changeset
|
100 int reasonIndex = metaAccess.convertDeoptReason(reason); |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
101 return UNSAFE.getByte(metaspaceMethodData + config.methodDataOopTrapHistoryOffset + reasonIndex) & 0xFF; |
5114
dad1ac9dba7d
finished first implementation of disabling runtime feedback selectively based on deoptimization history
Christian Haeubl <christian.haeubl@oracle.com>
parents:
5061
diff
changeset
|
102 } |
dad1ac9dba7d
finished first implementation of disabling runtime feedback selectively based on deoptimization history
Christian Haeubl <christian.haeubl@oracle.com>
parents:
5061
diff
changeset
|
103 |
13216
51e97f88c771
Profile deoptimizations of OSR methods separately.
Roland Schatz <roland.schatz@oracle.com>
parents:
13182
diff
changeset
|
104 public int getOSRDeoptimizationCount(DeoptimizationReason reason) { |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21411
diff
changeset
|
105 HotSpotMetaAccessProvider metaAccess = (HotSpotMetaAccessProvider) runtime().getHostJVMCIBackend().getMetaAccess(); |
18301
0f41072d8bbc
moved use of HotSpotMetaAccessProvider to locations on the "local" side of remote compilation
Doug Simon <doug.simon@oracle.com>
parents:
18223
diff
changeset
|
106 int reasonIndex = metaAccess.convertDeoptReason(reason); |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
107 return UNSAFE.getByte(metaspaceMethodData + config.methodDataOopTrapHistoryOffset + config.deoptReasonOSROffset + reasonIndex) & 0xFF; |
13216
51e97f88c771
Profile deoptimizations of OSR methods separately.
Roland Schatz <roland.schatz@oracle.com>
parents:
13182
diff
changeset
|
108 } |
51e97f88c771
Profile deoptimizations of OSR methods separately.
Roland Schatz <roland.schatz@oracle.com>
parents:
13182
diff
changeset
|
109 |
23765
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
110 public int getDecompileCount() { |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
111 return UNSAFE.getInt(metaspaceMethodData + config.methodDataDecompiles); |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
112 } |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
113 |
23782
286dce1eca9b
Sync with JDK9 MDO changes
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23765
diff
changeset
|
114 public int getOverflowRecompileCount() { |
23765
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
115 return UNSAFE.getInt(metaspaceMethodData + config.methodDataOverflowRecompiles); |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
116 } |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
117 |
23782
286dce1eca9b
Sync with JDK9 MDO changes
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23765
diff
changeset
|
118 public int getOverflowTrapCount() { |
23765
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
119 return UNSAFE.getInt(metaspaceMethodData + config.methodDataOverflowTraps); |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
120 } |
c64c9fac1ab9
Expose decompile counts in MDO
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23757
diff
changeset
|
121 |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
122 public HotSpotMethodDataAccessor getNormalData(int position) { |
13241 | 123 if (position >= normalDataSize()) { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
124 return null; |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
125 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
126 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
127 return getData(position); |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
128 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
129 |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
130 public HotSpotMethodDataAccessor getExtraData(int position) { |
13241 | 131 if (position >= normalDataSize() + extraDataSize()) { |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
132 return null; |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
133 } |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
134 HotSpotMethodDataAccessor data = getData(position); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
135 if (data != null) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
136 return data; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
137 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
138 return data; |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
139 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
140 |
4564
8fc6920e064b
avoid recursive inlining, escape analysis does no longer restart inlining with level 0, bugfixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4552
diff
changeset
|
141 public static HotSpotMethodDataAccessor getNoDataAccessor(boolean exceptionPossiblyNotRecorded) { |
8fc6920e064b
avoid recursive inlining, escape analysis does no longer restart inlining with level 0, bugfixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4552
diff
changeset
|
142 if (exceptionPossiblyNotRecorded) { |
8fc6920e064b
avoid recursive inlining, escape analysis does no longer restart inlining with level 0, bugfixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4552
diff
changeset
|
143 return NO_DATA_EXCEPTION_POSSIBLY_NOT_RECORDED_ACCESSOR; |
8fc6920e064b
avoid recursive inlining, escape analysis does no longer restart inlining with level 0, bugfixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4552
diff
changeset
|
144 } else { |
8fc6920e064b
avoid recursive inlining, escape analysis does no longer restart inlining with level 0, bugfixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4552
diff
changeset
|
145 return NO_DATA_NO_EXCEPTION_ACCESSOR; |
8fc6920e064b
avoid recursive inlining, escape analysis does no longer restart inlining with level 0, bugfixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4552
diff
changeset
|
146 } |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
147 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
148 |
4476
00efac2934d3
methodData bugfix
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4470
diff
changeset
|
149 private HotSpotMethodDataAccessor getData(int position) { |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
150 assert position >= 0 : "out of bounds"; |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
151 final int tag = HotSpotMethodDataAccessor.readTag(config, this, position); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
152 HotSpotMethodDataAccessor accessor = PROFILE_DATA_ACCESSORS[tag]; |
14706
579a2a124c95
add HotSpotMethodDataAccessor.Tag enum and dummy entries to PROFILE_DATA_ACCESSORS for new profile types
twisti
parents:
14543
diff
changeset
|
153 assert accessor == null || accessor.getTag() == tag : "wrong data accessor " + accessor + " for tag " + tag; |
579a2a124c95
add HotSpotMethodDataAccessor.Tag enum and dummy entries to PROFILE_DATA_ACCESSORS for new profile types
twisti
parents:
14543
diff
changeset
|
154 return accessor; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
155 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
156 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
157 int readUnsignedByte(int position, int offsetInBytes) { |
4444 | 158 long fullOffsetInBytes = computeFullOffset(position, offsetInBytes); |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
159 return UNSAFE.getByte(metaspaceMethodData + fullOffsetInBytes) & 0xFF; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
160 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
161 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
162 int readUnsignedShort(int position, int offsetInBytes) { |
4444 | 163 long fullOffsetInBytes = computeFullOffset(position, offsetInBytes); |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
164 return UNSAFE.getShort(metaspaceMethodData + fullOffsetInBytes) & 0xFFFF; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
165 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
166 |
11212
3718acd022db
fix HotSpotMethodData to read the correct values on little and big endian
twisti
parents:
9928
diff
changeset
|
167 /** |
3718acd022db
fix HotSpotMethodData to read the correct values on little and big endian
twisti
parents:
9928
diff
changeset
|
168 * Since the values are stored in cells (platform words) this method uses |
18567
37d88a4af2ab
removed references to HotSpotGraalRuntime.unsafeReadWord()
Doug Simon <doug.simon@oracle.com>
parents:
18546
diff
changeset
|
169 * {@link Unsafe#getAddress} to read the right value on both little and big endian machines. |
11212
3718acd022db
fix HotSpotMethodData to read the correct values on little and big endian
twisti
parents:
9928
diff
changeset
|
170 */ |
4444 | 171 private long readUnsignedInt(int position, int offsetInBytes) { |
172 long fullOffsetInBytes = computeFullOffset(position, offsetInBytes); | |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
173 return UNSAFE.getAddress(metaspaceMethodData + fullOffsetInBytes) & 0xFFFFFFFFL; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
174 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
175 |
4444 | 176 private int readUnsignedIntAsSignedInt(int position, int offsetInBytes) { |
177 long value = readUnsignedInt(position, offsetInBytes); | |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
178 return truncateLongToInt(value); |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
179 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
180 |
11212
3718acd022db
fix HotSpotMethodData to read the correct values on little and big endian
twisti
parents:
9928
diff
changeset
|
181 /** |
3718acd022db
fix HotSpotMethodData to read the correct values on little and big endian
twisti
parents:
9928
diff
changeset
|
182 * Since the values are stored in cells (platform words) this method uses |
18567
37d88a4af2ab
removed references to HotSpotGraalRuntime.unsafeReadWord()
Doug Simon <doug.simon@oracle.com>
parents:
18546
diff
changeset
|
183 * {@link Unsafe#getAddress} to read the right value on both little and big endian machines. |
11212
3718acd022db
fix HotSpotMethodData to read the correct values on little and big endian
twisti
parents:
9928
diff
changeset
|
184 */ |
4444 | 185 private int readInt(int position, int offsetInBytes) { |
186 long fullOffsetInBytes = computeFullOffset(position, offsetInBytes); | |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
187 return (int) UNSAFE.getAddress(metaspaceMethodData + fullOffsetInBytes); |
4441
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
188 } |
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
189 |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
190 private HotSpotResolvedJavaMethod readMethod(int position, int offsetInBytes) { |
4444 | 191 long fullOffsetInBytes = computeFullOffset(position, offsetInBytes); |
22582
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22581
diff
changeset
|
192 return compilerToVM().getResolvedJavaMethod(null, metaspaceMethodData + fullOffsetInBytes); |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
193 } |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
194 |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
195 private HotSpotResolvedObjectTypeImpl readKlass(int position, int offsetInBytes) { |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
196 long fullOffsetInBytes = computeFullOffset(position, offsetInBytes); |
22582
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22581
diff
changeset
|
197 return compilerToVM().getResolvedJavaType(null, metaspaceMethodData + fullOffsetInBytes, false); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
198 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
199 |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
200 private static int truncateLongToInt(long value) { |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
201 return value > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) value; |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
202 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
203 |
4444 | 204 private static int computeFullOffset(int position, int offsetInBytes) { |
205 return config.methodDataOopDataOffset + position + offsetInBytes; | |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
206 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
207 |
4444 | 208 private static int cellIndexToOffset(int cells) { |
209 return config.dataLayoutHeaderSize + cellsToBytes(cells); | |
210 } | |
211 | |
212 private static int cellsToBytes(int cells) { | |
213 return cells * config.dataLayoutCellSize; | |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
214 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
215 |
13769
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13312
diff
changeset
|
216 /** |
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13312
diff
changeset
|
217 * Returns whether profiling ran long enough that the profile information is mature. Other |
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13312
diff
changeset
|
218 * informational data will still be valid even if the profile isn't mature. |
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13312
diff
changeset
|
219 */ |
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13312
diff
changeset
|
220 public boolean isProfileMature() { |
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13312
diff
changeset
|
221 return runtime().getCompilerToVM().isMature(metaspaceMethodData); |
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13312
diff
changeset
|
222 } |
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13312
diff
changeset
|
223 |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
224 @Override |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
225 public String toString() { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
226 StringBuilder sb = new StringBuilder(); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
227 String nl = String.format("%n"); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
228 String nlIndent = String.format("%n%38s", ""); |
23757
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
229 sb.append("Raw method data for "); |
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
230 sb.append(method.format("%H.%n(%p)")); |
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
231 sb.append(":"); |
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
232 sb.append(nl); |
23782
286dce1eca9b
Sync with JDK9 MDO changes
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23765
diff
changeset
|
233 sb.append(String.format("nof_decompiles(%d) nof_overflow_recompiles(%d) nof_overflow_traps(%d)%n", |
286dce1eca9b
Sync with JDK9 MDO changes
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23765
diff
changeset
|
234 getDecompileCount(), getOverflowRecompileCount(), getOverflowTrapCount())); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
235 if (hasNormalData()) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
236 int pos = 0; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
237 HotSpotMethodDataAccessor data; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
238 while ((data = getNormalData(pos)) != null) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
239 if (pos != 0) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
240 sb.append(nl); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
241 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
242 int bci = data.getBCI(this, pos); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
243 sb.append(String.format("%-6d bci: %-6d%-20s", pos, bci, data.getClass().getSimpleName())); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
244 sb.append(data.appendTo(new StringBuilder(), this, pos).toString().replace(nl, nlIndent)); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
245 pos = pos + data.getSize(this, pos); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
246 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
247 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
248 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
249 if (hasExtraData()) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
250 int pos = getExtraDataBeginOffset(); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
251 HotSpotMethodDataAccessor data; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
252 while ((data = getExtraData(pos)) != null) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
253 if (pos == getExtraDataBeginOffset()) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
254 sb.append(nl).append("--- Extra data:"); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
255 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
256 int bci = data.getBCI(this, pos); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
257 sb.append(String.format("%n%-6d bci: %-6d%-20s", pos, bci, data.getClass().getSimpleName())); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
258 sb.append(data.appendTo(new StringBuilder(), this, pos).toString().replace(nl, nlIndent)); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
259 pos = pos + data.getSize(this, pos); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
260 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
261 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
262 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
263 return sb.toString(); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
264 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
265 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
266 static final int NO_DATA_SIZE = cellIndexToOffset(0); |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7391
diff
changeset
|
267 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
268 static class NoMethodData extends HotSpotMethodDataAccessor { |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
269 |
8610
5407d1dd6450
API to access nullness profiling information for instanceof, checkcast, and aastore
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7556
diff
changeset
|
270 private final TriState exceptionSeen; |
4527
a0cca63cd366
fixed exceptionSeen profiling information
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4526
diff
changeset
|
271 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
272 protected NoMethodData(HotSpotVMConfig config, int tag, TriState exceptionSeen) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
273 super(config, tag, NO_DATA_SIZE); |
4527
a0cca63cd366
fixed exceptionSeen profiling information
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4526
diff
changeset
|
274 this.exceptionSeen = exceptionSeen; |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
275 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
276 |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
277 @Override |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
278 public int getBCI(HotSpotMethodData data, int position) { |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
279 return -1; |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
280 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
281 |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
282 @Override |
8610
5407d1dd6450
API to access nullness profiling information for instanceof, checkcast, and aastore
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7556
diff
changeset
|
283 public TriState getExceptionSeen(HotSpotMethodData data, int position) { |
4527
a0cca63cd366
fixed exceptionSeen profiling information
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4526
diff
changeset
|
284 return exceptionSeen; |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
285 } |
13164
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
286 |
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
287 @Override |
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
288 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
289 return sb; |
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
290 } |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
291 } |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
292 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
293 static final int BIT_DATA_SIZE = cellIndexToOffset(0); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
294 static final int BIT_DATA_NULL_SEEN_FLAG = 1 << config.bitDataNullSeenFlag; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
295 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
296 static class BitData extends HotSpotMethodDataAccessor { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
297 |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
298 private BitData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
299 super(config, tag, BIT_DATA_SIZE); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
300 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
301 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
302 protected BitData(HotSpotVMConfig config, int tag, int staticSize) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
303 super(config, tag, staticSize); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
304 } |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
305 |
8610
5407d1dd6450
API to access nullness profiling information for instanceof, checkcast, and aastore
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7556
diff
changeset
|
306 @Override |
5407d1dd6450
API to access nullness profiling information for instanceof, checkcast, and aastore
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7556
diff
changeset
|
307 public TriState getNullSeen(HotSpotMethodData data, int position) { |
5407d1dd6450
API to access nullness profiling information for instanceof, checkcast, and aastore
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7556
diff
changeset
|
308 return TriState.get((getFlags(data, position) & BIT_DATA_NULL_SEEN_FLAG) != 0); |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
309 } |
13164
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
310 |
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
311 @Override |
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
312 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
313 return sb.append(format("exception_seen(%s)", getExceptionSeen(data, pos))); |
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
314 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
315 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
316 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
317 static final int COUNTER_DATA_SIZE = cellIndexToOffset(1); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
318 static final int COUNTER_DATA_COUNT_OFFSET = cellIndexToOffset(config.methodDataCountOffset); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
319 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
320 static class CounterData extends BitData { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
321 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
322 CounterData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
323 super(config, tag, COUNTER_DATA_SIZE); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
324 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
325 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
326 protected CounterData(HotSpotVMConfig config, int tag, int staticSize) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
327 super(config, tag, staticSize); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
328 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
329 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
330 @Override |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
331 public int getExecutionCount(HotSpotMethodData data, int position) { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
332 return getCounterValue(data, position); |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
333 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
334 |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
335 protected int getCounterValue(HotSpotMethodData data, int position) { |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
336 return data.readUnsignedIntAsSignedInt(position, COUNTER_DATA_COUNT_OFFSET); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
337 } |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
338 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
339 @Override |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
340 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
13312
323d99404728
added missing exception_seen and null_seen info info when formatting some profile data as strings
Doug Simon <doug.simon@oracle.com>
parents:
13259
diff
changeset
|
341 return sb.append(format("count(%d) null_seen(%s) exception_seen(%s)", getCounterValue(data, pos), getNullSeen(data, pos), getExceptionSeen(data, pos))); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
342 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
343 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
344 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
345 static final int JUMP_DATA_SIZE = cellIndexToOffset(2); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
346 static final int TAKEN_COUNT_OFFSET = cellIndexToOffset(config.jumpDataTakenOffset); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
347 static final int TAKEN_DISPLACEMENT_OFFSET = cellIndexToOffset(config.jumpDataDisplacementOffset); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
348 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
349 static class JumpData extends HotSpotMethodDataAccessor { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
350 |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
351 JumpData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
352 super(config, tag, JUMP_DATA_SIZE); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
353 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
354 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
355 protected JumpData(HotSpotVMConfig config, int tag, int staticSize) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
356 super(config, tag, staticSize); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
357 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
358 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
359 @Override |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
360 public double getBranchTakenProbability(HotSpotMethodData data, int position) { |
5039
f3d2447db2d9
added detection for endless recompilation
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4564
diff
changeset
|
361 return getExecutionCount(data, position) != 0 ? 1 : 0; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
362 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
363 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
364 @Override |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
365 public int getExecutionCount(HotSpotMethodData data, int position) { |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
366 return data.readUnsignedIntAsSignedInt(position, TAKEN_COUNT_OFFSET); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
367 } |
4452
b225da954a32
inlining of multiple trival methods at one call site works
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4448
diff
changeset
|
368 |
b225da954a32
inlining of multiple trival methods at one call site works
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4448
diff
changeset
|
369 public int getTakenDisplacement(HotSpotMethodData data, int position) { |
b225da954a32
inlining of multiple trival methods at one call site works
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4448
diff
changeset
|
370 return data.readInt(position, TAKEN_DISPLACEMENT_OFFSET); |
b225da954a32
inlining of multiple trival methods at one call site works
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4448
diff
changeset
|
371 } |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
372 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
373 @Override |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
374 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
13164
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
375 return sb.append(format("taken(%d) displacement(%d)", getExecutionCount(data, pos), getTakenDisplacement(data, pos))); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
376 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
377 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
378 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
379 static class RawItemProfile<T> { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
380 final int entries; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
381 final T[] items; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
382 final long[] counts; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
383 final long totalCount; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
384 |
23297
4b58c92e939b
remove redundant modifiers
Manuel Rigger <rigger.manuel@gmail.com>
parents:
22672
diff
changeset
|
385 RawItemProfile(int entries, T[] items, long[] counts, long totalCount) { |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
386 this.entries = entries; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
387 this.items = items; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
388 this.counts = counts; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
389 this.totalCount = totalCount; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
390 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
391 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
392 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
393 static final int TYPE_DATA_ROW_SIZE = cellsToBytes(config.receiverTypeDataReceiverTypeRowCellCount); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
394 |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
395 static final int NONPROFILED_COUNT_OFFSET = cellIndexToOffset(config.receiverTypeDataNonprofiledCountOffset); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
396 static final int TYPE_DATA_FIRST_TYPE_OFFSET = cellIndexToOffset(config.receiverTypeDataReceiver0Offset); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
397 static final int TYPE_DATA_FIRST_TYPE_COUNT_OFFSET = cellIndexToOffset(config.receiverTypeDataCount0Offset); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
398 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
399 abstract static class AbstractTypeData extends CounterData { |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
400 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
401 protected AbstractTypeData(HotSpotVMConfig config, int tag, int staticSize) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
402 super(config, tag, staticSize); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
403 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
404 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
405 @Override |
5541
b4c406861c33
More renamings to drop Ri* prefix completely. Deleted graph.BitMap class and replaced with java.util.BitSet.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
406 public JavaTypeProfile getTypeProfile(HotSpotMethodData data, int position) { |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
407 return createTypeProfile(getNullSeen(data, position), getRawTypeProfile(data, position)); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
408 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
409 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
410 private RawItemProfile<ResolvedJavaType> getRawTypeProfile(HotSpotMethodData data, int position) { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
411 int typeProfileWidth = config.typeProfileWidth; |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
412 |
5541
b4c406861c33
More renamings to drop Ri* prefix completely. Deleted graph.BitMap class and replaced with java.util.BitSet.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
413 ResolvedJavaType[] types = new ResolvedJavaType[typeProfileWidth]; |
5335
439ca5ecc7dc
types profiles are now sorted in descending order of each profiled type's probability
Doug Simon <doug.simon@oracle.com>
parents:
5321
diff
changeset
|
414 long[] counts = new long[typeProfileWidth]; |
4441
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
415 long totalCount = 0; |
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
416 int entries = 0; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
417 |
16616
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
418 outer: for (int i = 0; i < typeProfileWidth; i++) { |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
419 HotSpotResolvedObjectTypeImpl receiverKlass = data.readKlass(position, getTypeOffset(i)); |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
420 if (receiverKlass != null) { |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
421 HotSpotResolvedObjectTypeImpl klass = receiverKlass; |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
422 long count = data.readUnsignedInt(position, getTypeCountOffset(i)); |
16616
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
423 /* |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
424 * Because of races in the profile collection machinery it's possible for a |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
425 * class to appear multiple times so merge them to make the profile look |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
426 * rational. |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
427 */ |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
428 for (int j = 0; j < entries; j++) { |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
429 if (types[j].equals(klass)) { |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
430 totalCount += count; |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
431 counts[j] += count; |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
432 continue outer; |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
433 } |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
434 } |
29404eec7ced
eliminate duplicate entries from profile data
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16480
diff
changeset
|
435 types[entries] = klass; |
4447 | 436 totalCount += count; |
437 counts[entries] = count; | |
438 entries++; | |
4441
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
439 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
440 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
441 |
4456
f4c82dd4619e
inlining bugfixes and cleanup
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4455
diff
changeset
|
442 totalCount += getTypesNotRecordedExecutionCount(data, position); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
443 return new RawItemProfile<>(entries, types, counts, totalCount); |
4447 | 444 } |
445 | |
7154
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
446 protected abstract long getTypesNotRecordedExecutionCount(HotSpotMethodData data, int position); |
4456
f4c82dd4619e
inlining bugfixes and cleanup
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4455
diff
changeset
|
447 |
23757
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
448 public int getNonprofiledCount(HotSpotMethodData data, int position) { |
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
449 return data.readUnsignedIntAsSignedInt(position, NONPROFILED_COUNT_OFFSET); |
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
450 } |
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
451 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
452 private JavaTypeProfile createTypeProfile(TriState nullSeen, RawItemProfile<ResolvedJavaType> profile) { |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
453 if (profile.entries <= 0 || profile.totalCount <= 0) { |
4441
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
454 return null; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
455 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
456 |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
457 ProfiledType[] ptypes = new ProfiledType[profile.entries]; |
4456
f4c82dd4619e
inlining bugfixes and cleanup
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4455
diff
changeset
|
458 double totalProbability = 0.0; |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
459 for (int i = 0; i < profile.entries; i++) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
460 double p = profile.counts[i]; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
461 p = p / profile.totalCount; |
4456
f4c82dd4619e
inlining bugfixes and cleanup
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4455
diff
changeset
|
462 totalProbability += p; |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
463 ptypes[i] = new ProfiledType(profile.items[i], p); |
4441
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
464 } |
4456
f4c82dd4619e
inlining bugfixes and cleanup
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4455
diff
changeset
|
465 |
5335
439ca5ecc7dc
types profiles are now sorted in descending order of each profiled type's probability
Doug Simon <doug.simon@oracle.com>
parents:
5321
diff
changeset
|
466 Arrays.sort(ptypes); |
439ca5ecc7dc
types profiles are now sorted in descending order of each profiled type's probability
Doug Simon <doug.simon@oracle.com>
parents:
5321
diff
changeset
|
467 |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
468 double notRecordedTypeProbability = profile.entries < config.typeProfileWidth ? 0.0 : Math.min(1.0, Math.max(0.0, 1.0 - totalProbability)); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
469 assert notRecordedTypeProbability == 0 || profile.entries == config.typeProfileWidth; |
8659
bc7bb895e359
incorporated null-seen information into JavaTypeProfile
Doug Simon <doug.simon@oracle.com>
parents:
8616
diff
changeset
|
470 return new JavaTypeProfile(nullSeen, notRecordedTypeProbability, ptypes); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
471 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
472 |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
473 private static int getTypeOffset(int row) { |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
474 return TYPE_DATA_FIRST_TYPE_OFFSET + row * TYPE_DATA_ROW_SIZE; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
475 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
476 |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
477 protected static int getTypeCountOffset(int row) { |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
478 return TYPE_DATA_FIRST_TYPE_COUNT_OFFSET + row * TYPE_DATA_ROW_SIZE; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
479 } |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
480 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
481 @Override |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
482 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
483 RawItemProfile<ResolvedJavaType> profile = getRawTypeProfile(data, pos); |
13164
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
484 TriState nullSeen = getNullSeen(data, pos); |
13312
323d99404728
added missing exception_seen and null_seen info info when formatting some profile data as strings
Doug Simon <doug.simon@oracle.com>
parents:
13259
diff
changeset
|
485 TriState exceptionSeen = getExceptionSeen(data, pos); |
323d99404728
added missing exception_seen and null_seen info info when formatting some profile data as strings
Doug Simon <doug.simon@oracle.com>
parents:
13259
diff
changeset
|
486 sb.append(format("count(%d) null_seen(%s) exception_seen(%s) nonprofiled_count(%d) entries(%d)", getCounterValue(data, pos), nullSeen, exceptionSeen, |
23757
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
487 getNonprofiledCount(data, pos), profile.entries)); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
488 for (int i = 0; i < profile.entries; i++) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
489 long count = profile.counts[i]; |
16479
558cf39c646b
moved toJavaName(JavaType type) from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15291
diff
changeset
|
490 sb.append(format("%n %s (%d, %4.2f)", profile.items[i].toJavaName(), count, (double) count / profile.totalCount)); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
491 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
492 return sb; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
493 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
494 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
495 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
496 static final int TYPE_CHECK_DATA_SIZE = cellIndexToOffset(2) + TYPE_DATA_ROW_SIZE * config.typeProfileWidth; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
497 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
498 static class ReceiverTypeData extends AbstractTypeData { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
499 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
500 ReceiverTypeData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
501 super(config, tag, TYPE_CHECK_DATA_SIZE); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
502 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
503 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
504 protected ReceiverTypeData(HotSpotVMConfig config, int tag, int staticSize) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
505 super(config, tag, staticSize); |
22572
c3b49e9d0f48
HotSpotMethodData shouldn't hardcode constants
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22569
diff
changeset
|
506 } |
c3b49e9d0f48
HotSpotMethodData shouldn't hardcode constants
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22569
diff
changeset
|
507 |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
508 @Override |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
509 public int getExecutionCount(HotSpotMethodData data, int position) { |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
510 return -1; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
511 } |
7154
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
512 |
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
513 @Override |
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
514 protected long getTypesNotRecordedExecutionCount(HotSpotMethodData data, int position) { |
23757
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
515 return getNonprofiledCount(data, position); |
7154
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
516 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
517 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
518 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
519 static final int VIRTUAL_CALL_DATA_SIZE = cellIndexToOffset(2) + TYPE_DATA_ROW_SIZE * (config.typeProfileWidth + config.methodProfileWidth); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
520 static final int VIRTUAL_CALL_DATA_FIRST_METHOD_OFFSET = TYPE_DATA_FIRST_TYPE_OFFSET + TYPE_DATA_ROW_SIZE * config.typeProfileWidth; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
521 static final int VIRTUAL_CALL_DATA_FIRST_METHOD_COUNT_OFFSET = TYPE_DATA_FIRST_TYPE_COUNT_OFFSET + TYPE_DATA_ROW_SIZE * config.typeProfileWidth; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
522 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
523 static class VirtualCallData extends ReceiverTypeData { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
524 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
525 VirtualCallData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
526 super(config, tag, VIRTUAL_CALL_DATA_SIZE); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
527 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
528 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
529 protected VirtualCallData(HotSpotVMConfig config, int tag, int staticSize) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
530 super(config, tag, staticSize); |
22573
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
531 } |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
532 |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
533 @Override |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
534 public int getExecutionCount(HotSpotMethodData data, int position) { |
14706
579a2a124c95
add HotSpotMethodDataAccessor.Tag enum and dummy entries to PROFILE_DATA_ACCESSORS for new profile types
twisti
parents:
14543
diff
changeset
|
535 final int typeProfileWidth = config.typeProfileWidth; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
536 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
537 long total = 0; |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
538 for (int i = 0; i < typeProfileWidth; i++) { |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
539 total += data.readUnsignedInt(position, getTypeCountOffset(i)); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
540 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
541 |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
542 total += getCounterValue(data, position); |
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
543 return truncateLongToInt(total); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
544 } |
7154
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
545 |
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
546 @Override |
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
547 protected long getTypesNotRecordedExecutionCount(HotSpotMethodData data, int position) { |
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
548 return getCounterValue(data, position); |
5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
Doug Simon <doug.simon@oracle.com>
parents:
7084
diff
changeset
|
549 } |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
550 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
551 private static long getMethodsNotRecordedExecutionCount(HotSpotMethodData data, int position) { |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
552 return data.readUnsignedIntAsSignedInt(position, NONPROFILED_COUNT_OFFSET); |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
553 } |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
554 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
555 @Override |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
556 public JavaMethodProfile getMethodProfile(HotSpotMethodData data, int position) { |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
557 return createMethodProfile(getRawMethodProfile(data, position)); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
558 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
559 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
560 private RawItemProfile<ResolvedJavaMethod> getRawMethodProfile(HotSpotMethodData data, int position) { |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
561 int profileWidth = config.methodProfileWidth; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
562 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
563 ResolvedJavaMethod[] methods = new ResolvedJavaMethod[profileWidth]; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
564 long[] counts = new long[profileWidth]; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
565 long totalCount = 0; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
566 int entries = 0; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
567 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
568 for (int i = 0; i < profileWidth; i++) { |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
569 HotSpotResolvedJavaMethod method = data.readMethod(position, getMethodOffset(i)); |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
570 if (method != null) { |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
571 methods[entries] = method; |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
572 long count = data.readUnsignedInt(position, getMethodCountOffset(i)); |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
573 totalCount += count; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
574 counts[entries] = count; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
575 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
576 entries++; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
577 } |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
578 } |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
579 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
580 totalCount += getMethodsNotRecordedExecutionCount(data, position); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
581 return new RawItemProfile<>(entries, methods, counts, totalCount); |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
582 } |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
583 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
584 private JavaMethodProfile createMethodProfile(RawItemProfile<ResolvedJavaMethod> profile) { |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
585 if (profile.entries <= 0 || profile.totalCount <= 0) { |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
586 return null; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
587 } |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
588 |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
589 ProfiledMethod[] pmethods = new ProfiledMethod[profile.entries]; |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
590 double totalProbability = 0.0; |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
591 for (int i = 0; i < profile.entries; i++) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
592 double p = profile.counts[i]; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
593 p = p / profile.totalCount; |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
594 totalProbability += p; |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
595 pmethods[i] = new ProfiledMethod(profile.items[i], p); |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
596 } |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
597 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
598 Arrays.sort(pmethods); |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
599 |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
600 double notRecordedMethodProbability = profile.entries < config.methodProfileWidth ? 0.0 : Math.min(1.0, Math.max(0.0, 1.0 - totalProbability)); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
601 assert notRecordedMethodProbability == 0 || profile.entries == config.methodProfileWidth; |
9760
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
602 return new JavaMethodProfile(notRecordedMethodProbability, pmethods); |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
603 } |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
604 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
605 private static int getMethodOffset(int row) { |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
606 return VIRTUAL_CALL_DATA_FIRST_METHOD_OFFSET + row * TYPE_DATA_ROW_SIZE; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
607 } |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
608 |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
609 private static int getMethodCountOffset(int row) { |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
610 return VIRTUAL_CALL_DATA_FIRST_METHOD_COUNT_OFFSET + row * TYPE_DATA_ROW_SIZE; |
c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
611 } |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
612 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
613 @Override |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
614 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
615 RawItemProfile<ResolvedJavaMethod> profile = getRawMethodProfile(data, pos); |
13164
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
616 super.appendTo(sb.append(format("exception_seen(%s) ", getExceptionSeen(data, pos))), data, pos).append(format("%nmethod_entries(%d)", profile.entries)); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
617 for (int i = 0; i < profile.entries; i++) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
618 long count = profile.counts[i]; |
16480
10c12d09a8d2
moved format(String format, JavaMethod method) from MetaUtil to be a default method in JavaMethod
Doug Simon <doug.simon@oracle.com>
parents:
16479
diff
changeset
|
619 sb.append(format("%n %s (%d, %4.2f)", profile.items[i].format("%H.%n(%p)"), count, (double) count / profile.totalCount)); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
620 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
621 return sb; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
622 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
623 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
624 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
625 static class VirtualCallTypeData extends VirtualCallData { |
22573
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
626 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
627 VirtualCallTypeData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
628 super(config, tag, 0); |
22573
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
629 } |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
630 |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
631 @Override |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
632 protected int getDynamicSize(HotSpotMethodData data, int position) { |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
633 assert staticSize == 0; |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
634 return HotSpotJVMCIRuntime.runtime().compilerToVm.methodDataProfileDataSize(data.metaspaceMethodData, position); |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
635 } |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
636 } |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
637 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
638 static final int RET_DATA_ROW_SIZE = cellsToBytes(3); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
639 static final int RET_DATA_SIZE = cellIndexToOffset(1) + RET_DATA_ROW_SIZE * config.bciProfileWidth; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
640 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
641 static class RetData extends CounterData { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
642 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
643 RetData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
644 super(config, tag, RET_DATA_SIZE); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
645 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
646 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
647 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
648 static final int BRANCH_DATA_SIZE = cellIndexToOffset(3); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
649 static final int NOT_TAKEN_COUNT_OFFSET = cellIndexToOffset(config.branchDataNotTakenOffset); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
650 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
651 static class BranchData extends JumpData { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
652 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
653 BranchData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
654 super(config, tag, BRANCH_DATA_SIZE); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
655 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
656 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
657 @Override |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
658 public double getBranchTakenProbability(HotSpotMethodData data, int position) { |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
659 long takenCount = data.readUnsignedInt(position, TAKEN_COUNT_OFFSET); |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
660 long notTakenCount = data.readUnsignedInt(position, NOT_TAKEN_COUNT_OFFSET); |
4441
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
661 long total = takenCount + notTakenCount; |
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
662 |
9928
a9311ec68721
Avoid graph caching if immature or no profiling information was used for graph building.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9864
diff
changeset
|
663 return total <= 0 ? -1 : takenCount / (double) total; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
664 } |
4444 | 665 |
666 @Override | |
667 public int getExecutionCount(HotSpotMethodData data, int position) { | |
668 long count = data.readUnsignedInt(position, TAKEN_COUNT_OFFSET) + data.readUnsignedInt(position, NOT_TAKEN_COUNT_OFFSET); | |
669 return truncateLongToInt(count); | |
670 } | |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
671 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
672 @Override |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
673 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
674 long taken = data.readUnsignedInt(pos, TAKEN_COUNT_OFFSET); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
675 long notTaken = data.readUnsignedInt(pos, NOT_TAKEN_COUNT_OFFSET); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
676 double takenProbability = getBranchTakenProbability(data, pos); |
13164
70e6bb85d802
cleaned up HotSpotMethodData tracing a little and enabled it when -Dgraal.traceMethodDataFilter=true
Doug Simon <doug.simon@oracle.com>
parents:
13139
diff
changeset
|
677 return sb.append(format("taken(%d, %4.2f) not_taken(%d, %4.2f) displacement(%d)", taken, takenProbability, notTaken, 1.0D - takenProbability, getTakenDisplacement(data, pos))); |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
678 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
679 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
680 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
681 static final int ARRAY_DATA_LENGTH_OFFSET = cellIndexToOffset(config.arrayDataArrayLenOffset); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
682 static final int ARRAY_DATA_START_OFFSET = cellIndexToOffset(config.arrayDataArrayStartOffset); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
683 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
684 static class ArrayData extends HotSpotMethodDataAccessor { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
685 |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
686 ArrayData(HotSpotVMConfig config, int tag, int staticSize) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
687 super(config, tag, staticSize); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
688 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
689 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
690 @Override |
4444 | 691 protected int getDynamicSize(HotSpotMethodData data, int position) { |
692 return cellsToBytes(getLength(data, position)); | |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
693 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
694 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
695 protected static int getLength(HotSpotMethodData data, int position) { |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
696 return data.readInt(position, ARRAY_DATA_LENGTH_OFFSET); |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
697 } |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
698 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
699 @Override |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
700 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
701 return sb.append(format("length(%d)", getLength(data, pos))); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
702 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
703 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
704 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
705 static final int MULTI_BRANCH_DATA_SIZE = cellIndexToOffset(1); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
706 static final int MULTI_BRANCH_DATA_ROW_SIZE_IN_CELLS = config.multiBranchDataPerCaseCellCount; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
707 static final int MULTI_BRANCH_DATA_ROW_SIZE = cellsToBytes(MULTI_BRANCH_DATA_ROW_SIZE_IN_CELLS); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
708 static final int MULTI_BRANCH_DATA_FIRST_COUNT_OFFSET = ARRAY_DATA_START_OFFSET + cellsToBytes(0); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
709 static final int MULTI_BRANCH_DATA_FIRST_DISPLACEMENT_OFFSET = ARRAY_DATA_START_OFFSET + cellsToBytes(1); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
710 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
711 static class MultiBranchData extends ArrayData { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
712 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
713 MultiBranchData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
714 super(config, tag, MULTI_BRANCH_DATA_SIZE); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
715 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
716 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
717 @Override |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
718 public double[] getSwitchProbabilities(HotSpotMethodData data, int position) { |
4444 | 719 int arrayLength = getLength(data, position); |
720 assert arrayLength > 0 : "switch must have at least the default case"; | |
721 assert arrayLength % MULTI_BRANCH_DATA_ROW_SIZE_IN_CELLS == 0 : "array must have full rows"; | |
4441
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
722 |
4444 | 723 int length = arrayLength / MULTI_BRANCH_DATA_ROW_SIZE_IN_CELLS; |
724 long totalCount = 0; | |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
725 double[] result = new double[length]; |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
726 |
4447 | 727 // default case is first in HotSpot but last for the compiler |
728 long count = readCount(data, position, 0); | |
4446 | 729 totalCount += count; |
730 result[length - 1] = count; | |
731 | |
732 for (int i = 1; i < length; i++) { | |
4447 | 733 count = readCount(data, position, i); |
4444 | 734 totalCount += count; |
4446 | 735 result[i - 1] = count; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
736 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
737 |
9928
a9311ec68721
Avoid graph caching if immature or no profiling information was used for graph building.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9864
diff
changeset
|
738 if (totalCount <= 0) { |
4441
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
739 return null; |
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
740 } else { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
741 for (int i = 0; i < length; i++) { |
4444 | 742 result[i] = result[i] / totalCount; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
743 } |
4441
4e3aaf14cbc6
fixed graal to hotspot
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4440
diff
changeset
|
744 return result; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
745 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
746 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
747 |
4447 | 748 private static long readCount(HotSpotMethodData data, int position, int i) { |
749 int offset; | |
750 long count; | |
751 offset = getCountOffset(i); | |
752 count = data.readUnsignedInt(position, offset); | |
753 return count; | |
754 } | |
755 | |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
756 @Override |
4440
271220b49abc
profiling info fixes
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4439
diff
changeset
|
757 public int getExecutionCount(HotSpotMethodData data, int position) { |
4444 | 758 int arrayLength = getLength(data, position); |
759 assert arrayLength > 0 : "switch must have at least the default case"; | |
760 assert arrayLength % MULTI_BRANCH_DATA_ROW_SIZE_IN_CELLS == 0 : "array must have full rows"; | |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
761 |
4444 | 762 int length = arrayLength / MULTI_BRANCH_DATA_ROW_SIZE_IN_CELLS; |
763 long totalCount = 0; | |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
764 for (int i = 0; i < length; i++) { |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
765 int offset = getCountOffset(i); |
4444 | 766 totalCount += data.readUnsignedInt(position, offset); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
767 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
768 |
4444 | 769 return truncateLongToInt(totalCount); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
770 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
771 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
772 private static int getCountOffset(int index) { |
4444 | 773 return MULTI_BRANCH_DATA_FIRST_COUNT_OFFSET + index * MULTI_BRANCH_DATA_ROW_SIZE; |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
774 } |
4452
b225da954a32
inlining of multiple trival methods at one call site works
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4448
diff
changeset
|
775 |
b225da954a32
inlining of multiple trival methods at one call site works
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4448
diff
changeset
|
776 private static int getDisplacementOffset(int index) { |
b225da954a32
inlining of multiple trival methods at one call site works
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4448
diff
changeset
|
777 return MULTI_BRANCH_DATA_FIRST_DISPLACEMENT_OFFSET + index * MULTI_BRANCH_DATA_ROW_SIZE; |
b225da954a32
inlining of multiple trival methods at one call site works
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4448
diff
changeset
|
778 } |
13139
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
779 |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
780 @Override |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
781 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
782 int entries = getLength(data, pos) / MULTI_BRANCH_DATA_ROW_SIZE_IN_CELLS; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
783 sb.append(format("entries(%d)", entries)); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
784 for (int i = 0; i < entries; i++) { |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
785 sb.append(format("%n %d: count(%d) displacement(%d)", i, data.readUnsignedInt(pos, getCountOffset(i)), data.readUnsignedInt(pos, getDisplacementOffset(i)))); |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
786 } |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
787 return sb; |
f9d908fb3492
added toString() to HotSpotMethodData to assist with debugging low-level profile data reading
Doug Simon <doug.simon@oracle.com>
parents:
12456
diff
changeset
|
788 } |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
789 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
790 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
791 static final int ARG_INFO_DATA_SIZE = cellIndexToOffset(1); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
792 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23297
diff
changeset
|
793 static class ArgInfoData extends ArrayData { |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
794 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
795 ArgInfoData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
796 super(config, tag, ARG_INFO_DATA_SIZE); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
797 } |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
798 } |
14543
12eaf1a47a90
removed ResolvedJavaMethod.getCompilerStorage(); moved last compiled graph node count into profiling info (i.e. MethodData metadata)
Doug Simon <doug.simon@oracle.com>
parents:
13769
diff
changeset
|
799 |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
800 static class UnknownProfileData extends HotSpotMethodDataAccessor { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
801 UnknownProfileData(HotSpotVMConfig config, int tag) { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
802 super(config, tag, 0); |
22573
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
803 } |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
804 |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
805 @Override |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
806 protected int getDynamicSize(HotSpotMethodData data, int position) { |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
807 assert staticSize == 0; |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
808 return HotSpotJVMCIRuntime.runtime().compilerToVm.methodDataProfileDataSize(data.metaspaceMethodData, position); |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
809 } |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
810 |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
811 @Override |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
812 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) { |
23757
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
813 sb.append("unknown profile data with tag: " + tag); |
aaed278a9cf1
Fix logic for printing HotSpotMethodData
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
23719
diff
changeset
|
814 return sb; |
22573
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
815 } |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
816 } |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22572
diff
changeset
|
817 |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21411
diff
changeset
|
818 public void setCompiledIRSize(int size) { |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
819 UNSAFE.putInt(metaspaceMethodData + config.methodDataIRSizeOffset, size); |
14543
12eaf1a47a90
removed ResolvedJavaMethod.getCompilerStorage(); moved last compiled graph node count into profiling info (i.e. MethodData metadata)
Doug Simon <doug.simon@oracle.com>
parents:
13769
diff
changeset
|
820 } |
12eaf1a47a90
removed ResolvedJavaMethod.getCompilerStorage(); moved last compiled graph node count into profiling info (i.e. MethodData metadata)
Doug Simon <doug.simon@oracle.com>
parents:
13769
diff
changeset
|
821 |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21411
diff
changeset
|
822 public int getCompiledIRSize() { |
22542
15579668ec3a
renamed constant field to UNSAFE
Doug Simon <doug.simon@oracle.com>
parents:
22541
diff
changeset
|
823 return UNSAFE.getInt(metaspaceMethodData + config.methodDataIRSizeOffset); |
14543
12eaf1a47a90
removed ResolvedJavaMethod.getCompilerStorage(); moved last compiled graph node count into profiling info (i.e. MethodData metadata)
Doug Simon <doug.simon@oracle.com>
parents:
13769
diff
changeset
|
824 } |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
825 |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
826 // sorted by tag |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
827 // @formatter:off |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
828 static final HotSpotMethodDataAccessor[] PROFILE_DATA_ACCESSORS = { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
829 null, |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
830 new BitData(config, config.dataLayoutBitDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
831 new CounterData(config, config.dataLayoutCounterDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
832 new JumpData(config, config.dataLayoutJumpDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
833 new ReceiverTypeData(config, config.dataLayoutReceiverTypeDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
834 new VirtualCallData(config, config.dataLayoutVirtualCallDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
835 new RetData(config, config.dataLayoutRetDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
836 new BranchData(config, config.dataLayoutBranchDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
837 new MultiBranchData(config, config.dataLayoutMultiBranchDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
838 new ArgInfoData(config, config.dataLayoutArgInfoDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
839 new UnknownProfileData(config, config.dataLayoutCallTypeDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
840 new VirtualCallTypeData(config, config.dataLayoutVirtualCallTypeDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
841 new UnknownProfileData(config, config.dataLayoutParametersTypeDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
842 new UnknownProfileData(config, config.dataLayoutSpeculativeTrapDataTag), |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
843 }; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
844 |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
845 private static boolean checkAccessorTags() { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
846 int expectedTag = 0; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
847 for (HotSpotMethodDataAccessor accessor : PROFILE_DATA_ACCESSORS) { |
23719
a52d7039723b
fixed checkstyle issues
Doug Simon <doug.simon@oracle.com>
parents:
23717
diff
changeset
|
848 if (expectedTag == 0) { |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
849 assert accessor == null; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
850 } else { |
23719
a52d7039723b
fixed checkstyle issues
Doug Simon <doug.simon@oracle.com>
parents:
23717
diff
changeset
|
851 assert accessor.tag == expectedTag : expectedTag + " != " + accessor.tag + " " + accessor; |
23717
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
852 } |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
853 expectedTag++; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
854 } |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
855 return true; |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
856 } |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
857 |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
858 static { |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
859 assert checkAccessorTags(); |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
860 } |
41fa89f93355
removed jdk.vm.ci.hotspot.HotSpotMethodDataAccessor.Tag (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23700
diff
changeset
|
861 // @formatter:on |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
diff
changeset
|
862 } |