annotate src/os/solaris/dtrace/jhelper.d @ 6848:8e47bac5643a

7054512: Compress class pointers after perm gen removal Summary: support of compress class pointers in the compilers. Reviewed-by: kvn, twisti
author roland
date Tue, 09 Oct 2012 10:11:38 +0200
parents da91efe96a93
children 7f11c12d7a90
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
6123
2fe087c3e814 7172967: Eliminate constMethod's _method backpointer to methodOop.
jiangli
parents: 2426
diff changeset
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 844
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 844
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 844
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 /* This file is auto-generated */
a61af66fc99e Initial load
duke
parents:
diff changeset
26 #include "JvmOffsetsIndex.h"
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 #define DEBUG
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 #ifdef DEBUG
a61af66fc99e Initial load
duke
parents:
diff changeset
31 #define MARK_LINE this->line = __LINE__
a61af66fc99e Initial load
duke
parents:
diff changeset
32 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
33 #define MARK_LINE
a61af66fc99e Initial load
duke
parents:
diff changeset
34 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
35
a61af66fc99e Initial load
duke
parents:
diff changeset
36 #ifdef _LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
37 #define STACK_BIAS 0x7ff
a61af66fc99e Initial load
duke
parents:
diff changeset
38 #define pointer uint64_t
a61af66fc99e Initial load
duke
parents:
diff changeset
39 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
40 #define STACK_BIAS 0
a61af66fc99e Initial load
duke
parents:
diff changeset
41 #define pointer uint32_t
a61af66fc99e Initial load
duke
parents:
diff changeset
42 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 extern pointer __JvmOffsets;
a61af66fc99e Initial load
duke
parents:
diff changeset
45
a61af66fc99e Initial load
duke
parents:
diff changeset
46 extern pointer __1cJCodeCacheF_heap_;
a61af66fc99e Initial load
duke
parents:
diff changeset
47 extern pointer __1cIUniverseO_collectedHeap_;
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49 extern pointer __1cHnmethodG__vtbl_;
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
50 extern pointer __1cGMethodG__vtbl_;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
51 extern pointer __1cKBufferBlobG__vtbl_;
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 #define copyin_ptr(ADDR) *(pointer*) copyin((pointer) (ADDR), sizeof(pointer))
a61af66fc99e Initial load
duke
parents:
diff changeset
54 #define copyin_uchar(ADDR) *(uchar_t*) copyin((pointer) (ADDR), sizeof(uchar_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
55 #define copyin_uint16(ADDR) *(uint16_t*) copyin((pointer) (ADDR), sizeof(uint16_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
56 #define copyin_uint32(ADDR) *(uint32_t*) copyin((pointer) (ADDR), sizeof(uint32_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
57 #define copyin_int32(ADDR) *(int32_t*) copyin((pointer) (ADDR), sizeof(int32_t))
642
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
58 #define copyin_uint8(ADDR) *(uint8_t*) copyin((pointer) (ADDR), sizeof(uint8_t))
0
a61af66fc99e Initial load
duke
parents:
diff changeset
59
a61af66fc99e Initial load
duke
parents:
diff changeset
60 #define SAME(x) x
a61af66fc99e Initial load
duke
parents:
diff changeset
61 #define copyin_offset(JVM_CONST) JVM_CONST = \
a61af66fc99e Initial load
duke
parents:
diff changeset
62 copyin_int32(JvmOffsetsPtr + SAME(IDX_)JVM_CONST * sizeof(int32_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
63
a61af66fc99e Initial load
duke
parents:
diff changeset
64 int init_done;
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
67 {
a61af66fc99e Initial load
duke
parents:
diff changeset
68 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
69 this->done = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
70 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
71 * TBD:
a61af66fc99e Initial load
duke
parents:
diff changeset
72 * Here we initialize init_done, otherwise jhelper does not work.
a61af66fc99e Initial load
duke
parents:
diff changeset
73 * Therefore, copyin_offset() statements work multiple times now.
a61af66fc99e Initial load
duke
parents:
diff changeset
74 * There is a hope we could avoid it in the future, and so,
a61af66fc99e Initial load
duke
parents:
diff changeset
75 * this initialization can be removed.
a61af66fc99e Initial load
duke
parents:
diff changeset
76 */
a61af66fc99e Initial load
duke
parents:
diff changeset
77 init_done = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
78 this->error = (char *) NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
79 this->result = (char *) NULL;
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
80 this->isMethod = 0;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
81 this->codecache = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
82 this->klass = (pointer) NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
83 this->vtbl = (pointer) NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
84 this->suffix = '\0';
a61af66fc99e Initial load
duke
parents:
diff changeset
85 }
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
88 {
a61af66fc99e Initial load
duke
parents:
diff changeset
89 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
90 /* Initialization of JvmOffsets constants */
a61af66fc99e Initial load
duke
parents:
diff changeset
91 JvmOffsetsPtr = (pointer) &``__JvmOffsets;
a61af66fc99e Initial load
duke
parents:
diff changeset
92 }
a61af66fc99e Initial load
duke
parents:
diff changeset
93
a61af66fc99e Initial load
duke
parents:
diff changeset
94 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
95 /!init_done && !this->done/
a61af66fc99e Initial load
duke
parents:
diff changeset
96 {
a61af66fc99e Initial load
duke
parents:
diff changeset
97 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
98 init_done = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
99
a61af66fc99e Initial load
duke
parents:
diff changeset
100 copyin_offset(COMPILER);
a61af66fc99e Initial load
duke
parents:
diff changeset
101 copyin_offset(OFFSET_CollectedHeap_reserved);
a61af66fc99e Initial load
duke
parents:
diff changeset
102 copyin_offset(OFFSET_MemRegion_start);
a61af66fc99e Initial load
duke
parents:
diff changeset
103 copyin_offset(OFFSET_MemRegion_word_size);
a61af66fc99e Initial load
duke
parents:
diff changeset
104 copyin_offset(SIZE_HeapWord);
a61af66fc99e Initial load
duke
parents:
diff changeset
105
a61af66fc99e Initial load
duke
parents:
diff changeset
106 copyin_offset(OFFSET_interpreter_frame_method);
a61af66fc99e Initial load
duke
parents:
diff changeset
107 copyin_offset(OFFSET_Klass_name);
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
108 copyin_offset(OFFSET_ConstantPool_pool_holder);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110 copyin_offset(OFFSET_HeapBlockHeader_used);
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
111 copyin_offset(OFFSET_oopDesc_metadata);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
112
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1552
diff changeset
113 copyin_offset(OFFSET_Symbol_length);
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1552
diff changeset
114 copyin_offset(OFFSET_Symbol_body);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
115
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
116 copyin_offset(OFFSET_Method_constMethod);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
117 copyin_offset(OFFSET_ConstMethod_constants);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
118 copyin_offset(OFFSET_ConstMethod_name_index);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
119 copyin_offset(OFFSET_ConstMethod_signature_index);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 copyin_offset(OFFSET_CodeHeap_memory);
a61af66fc99e Initial load
duke
parents:
diff changeset
122 copyin_offset(OFFSET_CodeHeap_segmap);
a61af66fc99e Initial load
duke
parents:
diff changeset
123 copyin_offset(OFFSET_CodeHeap_log2_segment_size);
a61af66fc99e Initial load
duke
parents:
diff changeset
124
a61af66fc99e Initial load
duke
parents:
diff changeset
125 copyin_offset(OFFSET_VirtualSpace_low);
a61af66fc99e Initial load
duke
parents:
diff changeset
126 copyin_offset(OFFSET_VirtualSpace_high);
a61af66fc99e Initial load
duke
parents:
diff changeset
127
a61af66fc99e Initial load
duke
parents:
diff changeset
128 copyin_offset(OFFSET_CodeBlob_name);
a61af66fc99e Initial load
duke
parents:
diff changeset
129
a61af66fc99e Initial load
duke
parents:
diff changeset
130 copyin_offset(OFFSET_nmethod_method);
a61af66fc99e Initial load
duke
parents:
diff changeset
131 copyin_offset(SIZE_HeapBlockHeader);
a61af66fc99e Initial load
duke
parents:
diff changeset
132 copyin_offset(SIZE_oopDesc);
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
133 copyin_offset(SIZE_ConstantPool);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
134
6848
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
135 copyin_offset(OFFSET_NarrowPtrStruct_base);
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
136 copyin_offset(OFFSET_NarrowPtrStruct_shift);
642
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
137
0
a61af66fc99e Initial load
duke
parents:
diff changeset
138 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
139 * The PC to translate is in arg0.
a61af66fc99e Initial load
duke
parents:
diff changeset
140 */
a61af66fc99e Initial load
duke
parents:
diff changeset
141 this->pc = arg0;
a61af66fc99e Initial load
duke
parents:
diff changeset
142
a61af66fc99e Initial load
duke
parents:
diff changeset
143 /*
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
144 * The methodPtr is in %l2 on SPARC. This can be found at
0
a61af66fc99e Initial load
duke
parents:
diff changeset
145 * offset 8 from the frame pointer on 32-bit processes.
a61af66fc99e Initial load
duke
parents:
diff changeset
146 */
a61af66fc99e Initial load
duke
parents:
diff changeset
147 #if defined(__sparc)
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
148 this->methodPtr = copyin_ptr(arg1 + 2 * sizeof(pointer) + STACK_BIAS);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
149 #elif defined(__i386) || defined(__amd64)
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
150 this->methodPtr = copyin_ptr(arg1 + OFFSET_interpreter_frame_method);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
151 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
152 #error "Don't know architecture"
a61af66fc99e Initial load
duke
parents:
diff changeset
153 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
154
a61af66fc99e Initial load
duke
parents:
diff changeset
155 this->CodeCache_heap_address = copyin_ptr(&``__1cJCodeCacheF_heap_);
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 this->CodeCache_low = copyin_ptr(this->CodeCache_heap_address +
a61af66fc99e Initial load
duke
parents:
diff changeset
158 OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
a61af66fc99e Initial load
duke
parents:
diff changeset
159
a61af66fc99e Initial load
duke
parents:
diff changeset
160 this->CodeCache_high = copyin_ptr(this->CodeCache_heap_address +
a61af66fc99e Initial load
duke
parents:
diff changeset
161 OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
a61af66fc99e Initial load
duke
parents:
diff changeset
162
a61af66fc99e Initial load
duke
parents:
diff changeset
163 this->CodeCache_segmap_low = copyin_ptr(this->CodeCache_heap_address +
a61af66fc99e Initial load
duke
parents:
diff changeset
164 OFFSET_CodeHeap_segmap + OFFSET_VirtualSpace_low);
a61af66fc99e Initial load
duke
parents:
diff changeset
165
a61af66fc99e Initial load
duke
parents:
diff changeset
166 this->CodeCache_segmap_high = copyin_ptr(this->CodeCache_heap_address +
a61af66fc99e Initial load
duke
parents:
diff changeset
167 OFFSET_CodeHeap_segmap + OFFSET_VirtualSpace_high);
a61af66fc99e Initial load
duke
parents:
diff changeset
168
a61af66fc99e Initial load
duke
parents:
diff changeset
169 this->CodeHeap_log2_segment_size = copyin_uint32(
a61af66fc99e Initial load
duke
parents:
diff changeset
170 this->CodeCache_heap_address + OFFSET_CodeHeap_log2_segment_size);
a61af66fc99e Initial load
duke
parents:
diff changeset
171
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
172 this->Method_vtbl = (pointer) &``__1cGMethodG__vtbl_;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
173
0
a61af66fc99e Initial load
duke
parents:
diff changeset
174 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
175 * Get Java heap bounds
a61af66fc99e Initial load
duke
parents:
diff changeset
176 */
a61af66fc99e Initial load
duke
parents:
diff changeset
177 this->Universe_collectedHeap = copyin_ptr(&``__1cIUniverseO_collectedHeap_);
a61af66fc99e Initial load
duke
parents:
diff changeset
178 this->heap_start = copyin_ptr(this->Universe_collectedHeap +
a61af66fc99e Initial load
duke
parents:
diff changeset
179 OFFSET_CollectedHeap_reserved +
a61af66fc99e Initial load
duke
parents:
diff changeset
180 OFFSET_MemRegion_start);
a61af66fc99e Initial load
duke
parents:
diff changeset
181 this->heap_size = SIZE_HeapWord *
a61af66fc99e Initial load
duke
parents:
diff changeset
182 copyin_ptr(this->Universe_collectedHeap +
a61af66fc99e Initial load
duke
parents:
diff changeset
183 OFFSET_CollectedHeap_reserved +
a61af66fc99e Initial load
duke
parents:
diff changeset
184 OFFSET_MemRegion_word_size
a61af66fc99e Initial load
duke
parents:
diff changeset
185 );
a61af66fc99e Initial load
duke
parents:
diff changeset
186 this->heap_end = this->heap_start + this->heap_size;
a61af66fc99e Initial load
duke
parents:
diff changeset
187 }
a61af66fc99e Initial load
duke
parents:
diff changeset
188
a61af66fc99e Initial load
duke
parents:
diff changeset
189 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
190 /!this->done &&
a61af66fc99e Initial load
duke
parents:
diff changeset
191 this->CodeCache_low <= this->pc && this->pc < this->CodeCache_high/
a61af66fc99e Initial load
duke
parents:
diff changeset
192 {
a61af66fc99e Initial load
duke
parents:
diff changeset
193 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
194 this->codecache = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
195
a61af66fc99e Initial load
duke
parents:
diff changeset
196 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
197 * Find start.
a61af66fc99e Initial load
duke
parents:
diff changeset
198 */
a61af66fc99e Initial load
duke
parents:
diff changeset
199 this->segment = (this->pc - this->CodeCache_low) >>
a61af66fc99e Initial load
duke
parents:
diff changeset
200 this->CodeHeap_log2_segment_size;
a61af66fc99e Initial load
duke
parents:
diff changeset
201 this->block = this->CodeCache_segmap_low;
a61af66fc99e Initial load
duke
parents:
diff changeset
202 this->tag = copyin_uchar(this->block + this->segment);
a61af66fc99e Initial load
duke
parents:
diff changeset
203 "second";
a61af66fc99e Initial load
duke
parents:
diff changeset
204 }
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
207 /!this->done && this->codecache && this->tag > 0/
a61af66fc99e Initial load
duke
parents:
diff changeset
208 {
a61af66fc99e Initial load
duke
parents:
diff changeset
209 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
210 this->tag = copyin_uchar(this->block + this->segment);
a61af66fc99e Initial load
duke
parents:
diff changeset
211 this->segment = this->segment - this->tag;
a61af66fc99e Initial load
duke
parents:
diff changeset
212 }
a61af66fc99e Initial load
duke
parents:
diff changeset
213
a61af66fc99e Initial load
duke
parents:
diff changeset
214 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
215 /!this->done && this->codecache && this->tag > 0/
a61af66fc99e Initial load
duke
parents:
diff changeset
216 {
a61af66fc99e Initial load
duke
parents:
diff changeset
217 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
218 this->tag = copyin_uchar(this->block + this->segment);
a61af66fc99e Initial load
duke
parents:
diff changeset
219 this->segment = this->segment - this->tag;
a61af66fc99e Initial load
duke
parents:
diff changeset
220 }
a61af66fc99e Initial load
duke
parents:
diff changeset
221
a61af66fc99e Initial load
duke
parents:
diff changeset
222 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
223 /!this->done && this->codecache && this->tag > 0/
a61af66fc99e Initial load
duke
parents:
diff changeset
224 {
a61af66fc99e Initial load
duke
parents:
diff changeset
225 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
226 this->tag = copyin_uchar(this->block + this->segment);
a61af66fc99e Initial load
duke
parents:
diff changeset
227 this->segment = this->segment - this->tag;
a61af66fc99e Initial load
duke
parents:
diff changeset
228 }
a61af66fc99e Initial load
duke
parents:
diff changeset
229
a61af66fc99e Initial load
duke
parents:
diff changeset
230 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
231 /!this->done && this->codecache && this->tag > 0/
a61af66fc99e Initial load
duke
parents:
diff changeset
232 {
a61af66fc99e Initial load
duke
parents:
diff changeset
233 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
234 this->tag = copyin_uchar(this->block + this->segment);
a61af66fc99e Initial load
duke
parents:
diff changeset
235 this->segment = this->segment - this->tag;
a61af66fc99e Initial load
duke
parents:
diff changeset
236 }
a61af66fc99e Initial load
duke
parents:
diff changeset
237
a61af66fc99e Initial load
duke
parents:
diff changeset
238 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
239 /!this->done && this->codecache && this->tag > 0/
a61af66fc99e Initial load
duke
parents:
diff changeset
240 {
a61af66fc99e Initial load
duke
parents:
diff changeset
241 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
242 this->tag = copyin_uchar(this->block + this->segment);
a61af66fc99e Initial load
duke
parents:
diff changeset
243 this->segment = this->segment - this->tag;
a61af66fc99e Initial load
duke
parents:
diff changeset
244 }
a61af66fc99e Initial load
duke
parents:
diff changeset
245
a61af66fc99e Initial load
duke
parents:
diff changeset
246 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
247 /!this->done && this->codecache && this->tag > 0/
a61af66fc99e Initial load
duke
parents:
diff changeset
248 {
a61af66fc99e Initial load
duke
parents:
diff changeset
249 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
250 this->error = "<couldn't find start>";
a61af66fc99e Initial load
duke
parents:
diff changeset
251 this->done = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
252 }
a61af66fc99e Initial load
duke
parents:
diff changeset
253
a61af66fc99e Initial load
duke
parents:
diff changeset
254 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
255 /!this->done && this->codecache/
a61af66fc99e Initial load
duke
parents:
diff changeset
256 {
a61af66fc99e Initial load
duke
parents:
diff changeset
257 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
258 this->block = this->CodeCache_low +
a61af66fc99e Initial load
duke
parents:
diff changeset
259 (this->segment << this->CodeHeap_log2_segment_size);
a61af66fc99e Initial load
duke
parents:
diff changeset
260 this->used = copyin_uint32(this->block + OFFSET_HeapBlockHeader_used);
a61af66fc99e Initial load
duke
parents:
diff changeset
261 }
a61af66fc99e Initial load
duke
parents:
diff changeset
262
a61af66fc99e Initial load
duke
parents:
diff changeset
263 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
264 /!this->done && this->codecache && !this->used/
a61af66fc99e Initial load
duke
parents:
diff changeset
265 {
a61af66fc99e Initial load
duke
parents:
diff changeset
266 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
267 this->error = "<block not in use>";
a61af66fc99e Initial load
duke
parents:
diff changeset
268 this->done = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
269 }
a61af66fc99e Initial load
duke
parents:
diff changeset
270
a61af66fc99e Initial load
duke
parents:
diff changeset
271 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
272 /!this->done && this->codecache/
a61af66fc99e Initial load
duke
parents:
diff changeset
273 {
a61af66fc99e Initial load
duke
parents:
diff changeset
274 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
275 this->start = this->block + SIZE_HeapBlockHeader;
a61af66fc99e Initial load
duke
parents:
diff changeset
276 this->vtbl = copyin_ptr(this->start);
a61af66fc99e Initial load
duke
parents:
diff changeset
277
a61af66fc99e Initial load
duke
parents:
diff changeset
278 this->nmethod_vtbl = (pointer) &``__1cHnmethodG__vtbl_;
a61af66fc99e Initial load
duke
parents:
diff changeset
279 this->BufferBlob_vtbl = (pointer) &``__1cKBufferBlobG__vtbl_;
a61af66fc99e Initial load
duke
parents:
diff changeset
280 }
a61af66fc99e Initial load
duke
parents:
diff changeset
281
a61af66fc99e Initial load
duke
parents:
diff changeset
282 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
283 /!this->done && this->vtbl == this->nmethod_vtbl/
a61af66fc99e Initial load
duke
parents:
diff changeset
284 {
a61af66fc99e Initial load
duke
parents:
diff changeset
285 MARK_LINE;
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
286 this->methodPtr = copyin_ptr(this->start + OFFSET_nmethod_method);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
287 this->suffix = '*';
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
288 this->isMethod = 1;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
289 }
a61af66fc99e Initial load
duke
parents:
diff changeset
290
a61af66fc99e Initial load
duke
parents:
diff changeset
291 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
292 /!this->done && this->vtbl == this->BufferBlob_vtbl/
a61af66fc99e Initial load
duke
parents:
diff changeset
293 {
a61af66fc99e Initial load
duke
parents:
diff changeset
294 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
295 this->name = copyin_ptr(this->start + OFFSET_CodeBlob_name);
a61af66fc99e Initial load
duke
parents:
diff changeset
296 }
a61af66fc99e Initial load
duke
parents:
diff changeset
297
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
298
0
a61af66fc99e Initial load
duke
parents:
diff changeset
299 dtrace:helper:ustack:
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
300 /!this->done && this->vtbl == this->BufferBlob_vtbl && this->methodPtr != 0/
0
a61af66fc99e Initial load
duke
parents:
diff changeset
301 {
a61af66fc99e Initial load
duke
parents:
diff changeset
302 MARK_LINE;
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
303 this->klass = copyin_ptr(this->methodPtr);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
304 this->isMethod = this->klass == this->Method_vtbl;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
305 this->done = !this->isMethod;
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
306 }
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
307
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
308 dtrace:helper:ustack:
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
309 /!this->done && !this->isMethod/
0
a61af66fc99e Initial load
duke
parents:
diff changeset
310 {
a61af66fc99e Initial load
duke
parents:
diff changeset
311 MARK_LINE;
a61af66fc99e Initial load
duke
parents:
diff changeset
312 this->name = copyin_ptr(this->start + OFFSET_CodeBlob_name);
a61af66fc99e Initial load
duke
parents:
diff changeset
313 this->result = this->name != 0 ? copyinstr(this->name) : "<CodeBlob>";
a61af66fc99e Initial load
duke
parents:
diff changeset
314 this->done = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
315 }
a61af66fc99e Initial load
duke
parents:
diff changeset
316
a61af66fc99e Initial load
duke
parents:
diff changeset
317 dtrace:helper:ustack:
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
318 /!this->done && this->isMethod/
0
a61af66fc99e Initial load
duke
parents:
diff changeset
319 {
a61af66fc99e Initial load
duke
parents:
diff changeset
320 MARK_LINE;
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
321 this->constMethod = copyin_ptr(this->methodPtr +
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
322 OFFSET_Method_constMethod);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
323
a61af66fc99e Initial load
duke
parents:
diff changeset
324 this->nameIndex = copyin_uint16(this->constMethod +
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
325 OFFSET_ConstMethod_name_index);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
326
a61af66fc99e Initial load
duke
parents:
diff changeset
327 this->signatureIndex = copyin_uint16(this->constMethod +
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
328 OFFSET_ConstMethod_signature_index);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
329
6123
2fe087c3e814 7172967: Eliminate constMethod's _method backpointer to methodOop.
jiangli
parents: 2426
diff changeset
330 this->constantPool = copyin_ptr(this->constMethod +
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
331 OFFSET_ConstMethod_constants);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
332
a61af66fc99e Initial load
duke
parents:
diff changeset
333 this->nameSymbol = copyin_ptr(this->constantPool +
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
334 this->nameIndex * sizeof (pointer) + SIZE_ConstantPool);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
335
a61af66fc99e Initial load
duke
parents:
diff changeset
336 this->nameSymbolLength = copyin_uint16(this->nameSymbol +
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1552
diff changeset
337 OFFSET_Symbol_length);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
338
a61af66fc99e Initial load
duke
parents:
diff changeset
339 this->signatureSymbol = copyin_ptr(this->constantPool +
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
340 this->signatureIndex * sizeof (pointer) + SIZE_ConstantPool);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
341
a61af66fc99e Initial load
duke
parents:
diff changeset
342 this->signatureSymbolLength = copyin_uint16(this->signatureSymbol +
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1552
diff changeset
343 OFFSET_Symbol_length);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
344
a61af66fc99e Initial load
duke
parents:
diff changeset
345 this->klassPtr = copyin_ptr(this->constantPool +
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
346 OFFSET_ConstantPool_pool_holder);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
347
a61af66fc99e Initial load
duke
parents:
diff changeset
348 this->klassSymbol = copyin_ptr(this->klassPtr +
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6123
diff changeset
349 OFFSET_Klass_name);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
350
a61af66fc99e Initial load
duke
parents:
diff changeset
351 this->klassSymbolLength = copyin_uint16(this->klassSymbol +
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1552
diff changeset
352 OFFSET_Symbol_length);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
353
a61af66fc99e Initial load
duke
parents:
diff changeset
354 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
355 * Enough for three strings, plus the '.', plus the trailing '\0'.
a61af66fc99e Initial load
duke
parents:
diff changeset
356 */
a61af66fc99e Initial load
duke
parents:
diff changeset
357 this->result = (char *) alloca(this->klassSymbolLength +
a61af66fc99e Initial load
duke
parents:
diff changeset
358 this->nameSymbolLength +
a61af66fc99e Initial load
duke
parents:
diff changeset
359 this->signatureSymbolLength + 2 + 1);
a61af66fc99e Initial load
duke
parents:
diff changeset
360
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1552
diff changeset
361 copyinto(this->klassSymbol + OFFSET_Symbol_body,
0
a61af66fc99e Initial load
duke
parents:
diff changeset
362 this->klassSymbolLength, this->result);
a61af66fc99e Initial load
duke
parents:
diff changeset
363
a61af66fc99e Initial load
duke
parents:
diff changeset
364 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
365 * Add the '.' between the class and the name.
a61af66fc99e Initial load
duke
parents:
diff changeset
366 */
a61af66fc99e Initial load
duke
parents:
diff changeset
367 this->result[this->klassSymbolLength] = '.';
a61af66fc99e Initial load
duke
parents:
diff changeset
368
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1552
diff changeset
369 copyinto(this->nameSymbol + OFFSET_Symbol_body,
0
a61af66fc99e Initial load
duke
parents:
diff changeset
370 this->nameSymbolLength,
a61af66fc99e Initial load
duke
parents:
diff changeset
371 this->result + this->klassSymbolLength + 1);
a61af66fc99e Initial load
duke
parents:
diff changeset
372
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1552
diff changeset
373 copyinto(this->signatureSymbol + OFFSET_Symbol_body,
0
a61af66fc99e Initial load
duke
parents:
diff changeset
374 this->signatureSymbolLength,
a61af66fc99e Initial load
duke
parents:
diff changeset
375 this->result + this->klassSymbolLength +
a61af66fc99e Initial load
duke
parents:
diff changeset
376 this->nameSymbolLength + 1);
a61af66fc99e Initial load
duke
parents:
diff changeset
377
a61af66fc99e Initial load
duke
parents:
diff changeset
378 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
379 * Now we need to add a trailing '\0' and possibly a tag character.
a61af66fc99e Initial load
duke
parents:
diff changeset
380 */
a61af66fc99e Initial load
duke
parents:
diff changeset
381 this->result[this->klassSymbolLength + 1 +
a61af66fc99e Initial load
duke
parents:
diff changeset
382 this->nameSymbolLength +
a61af66fc99e Initial load
duke
parents:
diff changeset
383 this->signatureSymbolLength] = this->suffix;
a61af66fc99e Initial load
duke
parents:
diff changeset
384 this->result[this->klassSymbolLength + 2 +
a61af66fc99e Initial load
duke
parents:
diff changeset
385 this->nameSymbolLength +
a61af66fc99e Initial load
duke
parents:
diff changeset
386 this->signatureSymbolLength] = '\0';
a61af66fc99e Initial load
duke
parents:
diff changeset
387
a61af66fc99e Initial load
duke
parents:
diff changeset
388 this->done = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
389 }
a61af66fc99e Initial load
duke
parents:
diff changeset
390
a61af66fc99e Initial load
duke
parents:
diff changeset
391 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
392 /this->done && this->error == (char *) NULL/
a61af66fc99e Initial load
duke
parents:
diff changeset
393 {
a61af66fc99e Initial load
duke
parents:
diff changeset
394 this->result;
a61af66fc99e Initial load
duke
parents:
diff changeset
395 }
a61af66fc99e Initial load
duke
parents:
diff changeset
396
a61af66fc99e Initial load
duke
parents:
diff changeset
397 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
398 /this->done && this->error != (char *) NULL/
a61af66fc99e Initial load
duke
parents:
diff changeset
399 {
a61af66fc99e Initial load
duke
parents:
diff changeset
400 this->error;
a61af66fc99e Initial load
duke
parents:
diff changeset
401 }
a61af66fc99e Initial load
duke
parents:
diff changeset
402
a61af66fc99e Initial load
duke
parents:
diff changeset
403 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
404 /!this->done && this->codecache/
a61af66fc99e Initial load
duke
parents:
diff changeset
405 {
a61af66fc99e Initial load
duke
parents:
diff changeset
406 this->done = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
407 "error";
a61af66fc99e Initial load
duke
parents:
diff changeset
408 }
a61af66fc99e Initial load
duke
parents:
diff changeset
409
a61af66fc99e Initial load
duke
parents:
diff changeset
410
a61af66fc99e Initial load
duke
parents:
diff changeset
411 dtrace:helper:ustack:
a61af66fc99e Initial load
duke
parents:
diff changeset
412 /!this->done/
a61af66fc99e Initial load
duke
parents:
diff changeset
413 {
a61af66fc99e Initial load
duke
parents:
diff changeset
414 NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
415 }