Mercurial > hg > graal-compiler
annotate src/share/vm/code/codeBlob.cpp @ 7066:7d815d842ee0
Merge.
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Fri, 23 Nov 2012 11:50:27 +0100 |
parents | 8c5333c80cfd b31471cdc53e |
children | 1baf7f1e3f23 |
rev | line source |
---|---|
7066 | 1 /* |
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 * | |
23 */ | |
24 | |
25 #include "precompiled.hpp" | |
26 #include "code/codeBlob.hpp" | |
27 #include "code/codeCache.hpp" | |
28 #include "code/relocInfo.hpp" | |
29 #include "compiler/disassembler.hpp" | |
30 #include "interpreter/bytecode.hpp" | |
31 #include "memory/allocation.inline.hpp" | |
32 #include "memory/heap.hpp" | |
33 #include "oops/oop.inline.hpp" | |
34 #include "prims/forte.hpp" | |
35 #include "runtime/handles.inline.hpp" | |
36 #include "runtime/interfaceSupport.hpp" | |
37 #include "runtime/mutexLocker.hpp" | |
38 #include "runtime/safepoint.hpp" | |
39 #include "runtime/sharedRuntime.hpp" | |
40 #include "runtime/vframe.hpp" | |
41 #include "services/memoryService.hpp" | |
42 #include "utilities/machineCodePrinter.hpp" | |
43 #ifdef TARGET_ARCH_x86 | |
44 # include "nativeInst_x86.hpp" | |
45 #endif | |
46 #ifdef TARGET_ARCH_sparc | |
47 # include "nativeInst_sparc.hpp" | |
48 #endif | |
49 #ifdef TARGET_ARCH_zero | |
50 # include "nativeInst_zero.hpp" | |
51 #endif | |
52 #ifdef TARGET_ARCH_arm | |
53 # include "nativeInst_arm.hpp" | |
54 #endif | |
55 #ifdef TARGET_ARCH_ppc | |
56 # include "nativeInst_ppc.hpp" | |
57 #endif | |
58 #ifdef COMPILER1 | |
59 #include "c1/c1_Runtime1.hpp" | |
60 #endif | |
61 | |
62 unsigned int align_code_offset(int offset) { | |
63 // align the size to CodeEntryAlignment | |
64 return | |
65 ((offset + (int)CodeHeap::header_size() + (CodeEntryAlignment-1)) & ~(CodeEntryAlignment-1)) | |
66 - (int)CodeHeap::header_size(); | |
67 } | |
68 | |
69 | |
70 // This must be consistent with the CodeBlob constructor's layout actions. | |
71 unsigned int CodeBlob::allocation_size(CodeBuffer* cb, int header_size) { | |
72 unsigned int size = header_size; | |
73 size += round_to(cb->total_relocation_size(), oopSize); | |
74 // align the size to CodeEntryAlignment | |
75 size = align_code_offset(size); | |
76 size += round_to(cb->total_content_size(), oopSize); | |
77 size += round_to(cb->total_oop_size(), oopSize); | |
78 size += round_to(cb->total_metadata_size(), oopSize); | |
79 return size; | |
80 } | |
81 | |
82 | |
83 // Creates a simple CodeBlob. Sets up the size of the different regions. | |
84 CodeBlob::CodeBlob(const char* name, int header_size, int size, int frame_complete, int locs_size) { | |
85 assert(size == round_to(size, oopSize), "unaligned size"); | |
86 assert(locs_size == round_to(locs_size, oopSize), "unaligned size"); | |
87 assert(header_size == round_to(header_size, oopSize), "unaligned size"); | |
88 assert(!UseRelocIndex, "no space allocated for reloc index yet"); | |
89 | |
90 // Note: If UseRelocIndex is enabled, there needs to be (at least) one | |
91 // extra word for the relocation information, containing the reloc | |
92 // index table length. Unfortunately, the reloc index table imple- | |
93 // mentation is not easily understandable and thus it is not clear | |
94 // what exactly the format is supposed to be. For now, we just turn | |
95 // off the use of this table (gri 7/6/2000). | |
96 | |
97 _name = name; | |
98 _size = size; | |
99 _frame_complete_offset = frame_complete; | |
100 _header_size = header_size; | |
101 _relocation_size = locs_size; | |
102 _content_offset = align_code_offset(header_size + _relocation_size); | |
103 _code_offset = _content_offset; | |
104 _data_offset = size; | |
105 _frame_size = 0; | |
106 set_oop_maps(NULL); | |
107 } | |
108 | |
109 | |
110 // Creates a CodeBlob from a CodeBuffer. Sets up the size of the different regions, | |
111 // and copy code and relocation info. | |
112 CodeBlob::CodeBlob( | |
113 const char* name, | |
114 CodeBuffer* cb, | |
115 int header_size, | |
116 int size, | |
117 int frame_complete, | |
118 int frame_size, | |
119 OopMapSet* oop_maps | |
120 ) { | |
121 assert(size == round_to(size, oopSize), "unaligned size"); | |
122 assert(header_size == round_to(header_size, oopSize), "unaligned size"); | |
123 | |
124 _name = name; | |
125 _size = size; | |
126 _frame_complete_offset = frame_complete; | |
127 _header_size = header_size; | |
128 _relocation_size = round_to(cb->total_relocation_size(), oopSize); | |
129 _content_offset = align_code_offset(header_size + _relocation_size); | |
130 _code_offset = _content_offset + cb->total_offset_of(cb->insts()); | |
131 _data_offset = _content_offset + round_to(cb->total_content_size(), oopSize); | |
132 assert(_data_offset <= size, "codeBlob is too small"); | |
133 | |
134 cb->copy_code_and_locs_to(this); | |
135 set_oop_maps(oop_maps); | |
136 _frame_size = frame_size; | |
137 #ifdef COMPILER1 | |
138 // probably wrong for tiered | |
139 assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); | |
140 #endif // COMPILER1 | |
141 } | |
142 | |
143 | |
144 void CodeBlob::set_oop_maps(OopMapSet* p) { | |
145 // Danger Will Robinson! This method allocates a big | |
146 // chunk of memory, its your job to free it. | |
147 if (p != NULL) { | |
148 // We need to allocate a chunk big enough to hold the OopMapSet and all of its OopMaps | |
149 _oop_maps = (OopMapSet* )NEW_C_HEAP_ARRAY(unsigned char, p->heap_size(), mtCode); | |
150 p->copy_to((address)_oop_maps); | |
151 } else { | |
152 _oop_maps = NULL; | |
153 } | |
154 } | |
155 | |
156 | |
157 void CodeBlob::trace_new_stub(CodeBlob* stub, const char* name1, const char* name2) { | |
158 // Do not hold the CodeCache lock during name formatting. | |
159 assert(!CodeCache_lock->owned_by_self(), "release CodeCache before registering the stub"); | |
160 | |
161 if (stub != NULL) { | |
162 char stub_id[256]; | |
163 assert(strlen(name1) + strlen(name2) < sizeof(stub_id), ""); | |
164 jio_snprintf(stub_id, sizeof(stub_id), "%s%s", name1, name2); | |
165 if (PrintStubCode) { | |
166 ttyLocker ttyl; | |
167 tty->print_cr("Decoding %s " INTPTR_FORMAT, stub_id, (intptr_t) stub); | |
168 Disassembler::decode(stub->code_begin(), stub->code_end()); | |
169 tty->cr(); | |
170 } | |
171 Forte::register_stub(stub_id, stub->code_begin(), stub->code_end()); | |
172 | |
173 if (JvmtiExport::should_post_dynamic_code_generated()) { | |
174 const char* stub_name = name2; | |
175 if (name2[0] == '\0') stub_name = name1; | |
176 JvmtiExport::post_dynamic_code_generated(stub_name, stub->code_begin(), stub->code_end()); | |
177 } | |
178 } | |
179 | |
180 // Track memory usage statistic after releasing CodeCache_lock | |
181 MemoryService::track_code_cache_memory_usage(); | |
182 } | |
183 | |
184 | |
185 void CodeBlob::flush() { | |
186 if (_oop_maps) { | |
187 FREE_C_HEAP_ARRAY(unsigned char, _oop_maps, mtCode); | |
188 _oop_maps = NULL; | |
189 } | |
190 _comments.free(); | |
191 } | |
192 | |
193 | |
194 OopMap* CodeBlob::oop_map_for_return_address(address return_address) { | |
195 assert(oop_maps() != NULL, "nope"); | |
196 return oop_maps()->find_map_at_offset((intptr_t) return_address - (intptr_t) code_begin()); | |
197 } | |
198 | |
199 | |
200 //---------------------------------------------------------------------------------------------------- | |
201 // Implementation of BufferBlob | |
202 | |
203 | |
204 BufferBlob::BufferBlob(const char* name, int size) | |
205 : CodeBlob(name, sizeof(BufferBlob), size, CodeOffsets::frame_never_safe, /*locs_size:*/ 0) | |
206 {} | |
207 | |
208 BufferBlob* BufferBlob::create(const char* name, int buffer_size) { | |
209 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
210 | |
211 BufferBlob* blob = NULL; | |
212 unsigned int size = sizeof(BufferBlob); | |
213 // align the size to CodeEntryAlignment | |
214 size = align_code_offset(size); | |
215 size += round_to(buffer_size, oopSize); | |
216 assert(name != NULL, "must provide a name"); | |
217 { | |
218 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
219 blob = new (size) BufferBlob(name, size); | |
220 } | |
221 // Track memory usage statistic after releasing CodeCache_lock | |
222 MemoryService::track_code_cache_memory_usage(); | |
223 | |
224 return blob; | |
225 } | |
226 | |
227 | |
228 BufferBlob::BufferBlob(const char* name, int size, CodeBuffer* cb) | |
229 : CodeBlob(name, cb, sizeof(BufferBlob), size, CodeOffsets::frame_never_safe, 0, NULL) | |
230 {} | |
231 | |
232 BufferBlob* BufferBlob::create(const char* name, CodeBuffer* cb) { | |
233 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
234 | |
235 BufferBlob* blob = NULL; | |
236 unsigned int size = allocation_size(cb, sizeof(BufferBlob)); | |
237 assert(name != NULL, "must provide a name"); | |
238 { | |
239 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
240 blob = new (size) BufferBlob(name, size, cb); | |
241 } | |
242 // Track memory usage statistic after releasing CodeCache_lock | |
243 MemoryService::track_code_cache_memory_usage(); | |
244 | |
245 return blob; | |
246 } | |
247 | |
248 | |
249 void* BufferBlob::operator new(size_t s, unsigned size) { | |
250 void* p = CodeCache::allocate(size); | |
251 return p; | |
252 } | |
253 | |
254 | |
255 void BufferBlob::free( BufferBlob *blob ) { | |
256 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
257 { | |
258 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
259 CodeCache::free((CodeBlob*)blob); | |
260 } | |
261 // Track memory usage statistic after releasing CodeCache_lock | |
262 MemoryService::track_code_cache_memory_usage(); | |
263 } | |
264 | |
265 | |
266 //---------------------------------------------------------------------------------------------------- | |
267 // Implementation of AdapterBlob | |
268 | |
269 AdapterBlob::AdapterBlob(int size, CodeBuffer* cb) : | |
270 BufferBlob("I2C/C2I adapters", size, cb) { | |
271 CodeCache::commit(this); | |
272 } | |
273 | |
274 AdapterBlob* AdapterBlob::create(CodeBuffer* cb) { | |
275 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
276 | |
277 AdapterBlob* blob = NULL; | |
278 unsigned int size = allocation_size(cb, sizeof(AdapterBlob)); | |
279 { | |
280 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
281 blob = new (size) AdapterBlob(size, cb); | |
282 } | |
283 // Track memory usage statistic after releasing CodeCache_lock | |
284 MemoryService::track_code_cache_memory_usage(); | |
285 | |
286 return blob; | |
287 } | |
288 | |
289 | |
290 //---------------------------------------------------------------------------------------------------- | |
291 // Implementation of MethodHandlesAdapterBlob | |
292 | |
293 MethodHandlesAdapterBlob* MethodHandlesAdapterBlob::create(int buffer_size) { | |
294 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
295 | |
296 MethodHandlesAdapterBlob* blob = NULL; | |
297 unsigned int size = sizeof(MethodHandlesAdapterBlob); | |
298 // align the size to CodeEntryAlignment | |
299 size = align_code_offset(size); | |
300 size += round_to(buffer_size, oopSize); | |
301 { | |
302 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
303 blob = new (size) MethodHandlesAdapterBlob(size); | |
304 } | |
305 // Track memory usage statistic after releasing CodeCache_lock | |
306 MemoryService::track_code_cache_memory_usage(); | |
307 | |
308 return blob; | |
309 } | |
310 | |
311 | |
312 //---------------------------------------------------------------------------------------------------- | |
313 // Implementation of RuntimeStub | |
314 | |
315 RuntimeStub::RuntimeStub( | |
316 const char* name, | |
317 CodeBuffer* cb, | |
318 int size, | |
319 int frame_complete, | |
320 int frame_size, | |
321 OopMapSet* oop_maps, | |
322 bool caller_must_gc_arguments | |
323 ) | |
324 : CodeBlob(name, cb, sizeof(RuntimeStub), size, frame_complete, frame_size, oop_maps) | |
325 { | |
326 _caller_must_gc_arguments = caller_must_gc_arguments; | |
327 } | |
328 | |
329 | |
330 RuntimeStub* RuntimeStub::new_runtime_stub(const char* stub_name, | |
331 CodeBuffer* cb, | |
332 int frame_complete, | |
333 int frame_size, | |
334 OopMapSet* oop_maps, | |
335 bool caller_must_gc_arguments) | |
336 { | |
337 RuntimeStub* stub = NULL; | |
338 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
339 { | |
340 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
341 unsigned int size = allocation_size(cb, sizeof(RuntimeStub)); | |
342 stub = new (size) RuntimeStub(stub_name, cb, size, frame_complete, frame_size, oop_maps, caller_must_gc_arguments); | |
343 } | |
344 | |
345 trace_new_stub(stub, "RuntimeStub - ", stub_name); | |
346 | |
7062
8c5333c80cfd
increased CompileThreshold to increase reliability of profiling information
Christian Haeubl <haeubl@ssw.jku.at>
parents:
6266
diff
changeset
|
347 if (PrintMachineCodeToFile) { |
8c5333c80cfd
increased CompileThreshold to increase reliability of profiling information
Christian Haeubl <haeubl@ssw.jku.at>
parents:
6266
diff
changeset
|
348 MachineCodePrinter::print(stub); |
7066 | 349 } |
350 | |
351 return stub; | |
352 } | |
353 | |
354 | |
355 void* RuntimeStub::operator new(size_t s, unsigned size) { | |
356 void* p = CodeCache::allocate(size); | |
357 if (!p) fatal("Initial size of CodeCache is too small"); | |
358 return p; | |
359 } | |
360 | |
361 // operator new shared by all singletons: | |
362 void* SingletonBlob::operator new(size_t s, unsigned size) { | |
363 void* p = CodeCache::allocate(size); | |
364 if (!p) fatal("Initial size of CodeCache is too small"); | |
365 return p; | |
366 } | |
367 | |
368 | |
369 //---------------------------------------------------------------------------------------------------- | |
370 // Implementation of DeoptimizationBlob | |
371 | |
372 DeoptimizationBlob::DeoptimizationBlob( | |
373 CodeBuffer* cb, | |
374 int size, | |
375 OopMapSet* oop_maps, | |
376 int unpack_offset, | |
377 int unpack_with_exception_offset, | |
378 int unpack_with_reexecution_offset, | |
379 int frame_size | |
380 ) | |
381 : SingletonBlob("DeoptimizationBlob", cb, sizeof(DeoptimizationBlob), size, frame_size, oop_maps) | |
382 { | |
383 _unpack_offset = unpack_offset; | |
384 _unpack_with_exception = unpack_with_exception_offset; | |
385 _unpack_with_reexecution = unpack_with_reexecution_offset; | |
386 #ifdef COMPILER1 | |
387 _unpack_with_exception_in_tls = -1; | |
388 #endif | |
389 } | |
390 | |
391 | |
392 DeoptimizationBlob* DeoptimizationBlob::create( | |
393 CodeBuffer* cb, | |
394 OopMapSet* oop_maps, | |
395 int unpack_offset, | |
396 int unpack_with_exception_offset, | |
397 int unpack_with_reexecution_offset, | |
398 int frame_size) | |
399 { | |
400 DeoptimizationBlob* blob = NULL; | |
401 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
402 { | |
403 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
404 unsigned int size = allocation_size(cb, sizeof(DeoptimizationBlob)); | |
405 blob = new (size) DeoptimizationBlob(cb, | |
406 size, | |
407 oop_maps, | |
408 unpack_offset, | |
409 unpack_with_exception_offset, | |
410 unpack_with_reexecution_offset, | |
411 frame_size); | |
412 } | |
413 | |
414 trace_new_stub(blob, "DeoptimizationBlob"); | |
415 | |
416 return blob; | |
417 } | |
418 | |
419 | |
420 //---------------------------------------------------------------------------------------------------- | |
421 // Implementation of UncommonTrapBlob | |
422 | |
423 #ifdef COMPILER2 | |
424 UncommonTrapBlob::UncommonTrapBlob( | |
425 CodeBuffer* cb, | |
426 int size, | |
427 OopMapSet* oop_maps, | |
428 int frame_size | |
429 ) | |
430 : SingletonBlob("UncommonTrapBlob", cb, sizeof(UncommonTrapBlob), size, frame_size, oop_maps) | |
431 {} | |
432 | |
433 | |
434 UncommonTrapBlob* UncommonTrapBlob::create( | |
435 CodeBuffer* cb, | |
436 OopMapSet* oop_maps, | |
437 int frame_size) | |
438 { | |
439 UncommonTrapBlob* blob = NULL; | |
440 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
441 { | |
442 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
443 unsigned int size = allocation_size(cb, sizeof(UncommonTrapBlob)); | |
444 blob = new (size) UncommonTrapBlob(cb, size, oop_maps, frame_size); | |
445 } | |
446 | |
447 trace_new_stub(blob, "UncommonTrapBlob"); | |
448 | |
449 return blob; | |
450 } | |
451 | |
452 | |
453 #endif // COMPILER2 | |
454 | |
455 | |
456 //---------------------------------------------------------------------------------------------------- | |
457 // Implementation of ExceptionBlob | |
458 | |
459 #ifdef COMPILER2 | |
460 ExceptionBlob::ExceptionBlob( | |
461 CodeBuffer* cb, | |
462 int size, | |
463 OopMapSet* oop_maps, | |
464 int frame_size | |
465 ) | |
466 : SingletonBlob("ExceptionBlob", cb, sizeof(ExceptionBlob), size, frame_size, oop_maps) | |
467 {} | |
468 | |
469 | |
470 ExceptionBlob* ExceptionBlob::create( | |
471 CodeBuffer* cb, | |
472 OopMapSet* oop_maps, | |
473 int frame_size) | |
474 { | |
475 ExceptionBlob* blob = NULL; | |
476 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
477 { | |
478 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
479 unsigned int size = allocation_size(cb, sizeof(ExceptionBlob)); | |
480 blob = new (size) ExceptionBlob(cb, size, oop_maps, frame_size); | |
481 } | |
482 | |
483 trace_new_stub(blob, "ExceptionBlob"); | |
484 | |
485 return blob; | |
486 } | |
487 | |
488 | |
489 #endif // COMPILER2 | |
490 | |
491 | |
492 //---------------------------------------------------------------------------------------------------- | |
493 // Implementation of SafepointBlob | |
494 | |
495 SafepointBlob::SafepointBlob( | |
496 CodeBuffer* cb, | |
497 int size, | |
498 OopMapSet* oop_maps, | |
499 int frame_size | |
500 ) | |
501 : SingletonBlob("SafepointBlob", cb, sizeof(SafepointBlob), size, frame_size, oop_maps) | |
502 {} | |
503 | |
504 | |
505 SafepointBlob* SafepointBlob::create( | |
506 CodeBuffer* cb, | |
507 OopMapSet* oop_maps, | |
508 int frame_size) | |
509 { | |
510 SafepointBlob* blob = NULL; | |
511 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | |
512 { | |
513 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | |
514 unsigned int size = allocation_size(cb, sizeof(SafepointBlob)); | |
515 blob = new (size) SafepointBlob(cb, size, oop_maps, frame_size); | |
516 } | |
517 | |
518 trace_new_stub(blob, "SafepointBlob"); | |
519 | |
520 return blob; | |
521 } | |
522 | |
523 | |
524 //---------------------------------------------------------------------------------------------------- | |
525 // Verification and printing | |
526 | |
527 void CodeBlob::verify() { | |
528 ShouldNotReachHere(); | |
529 } | |
530 | |
531 void CodeBlob::print_on(outputStream* st) const { | |
532 st->print_cr("[CodeBlob (" INTPTR_FORMAT ")]", this); | |
533 st->print_cr("Framesize: %d", _frame_size); | |
534 } | |
535 | |
536 void CodeBlob::print_value_on(outputStream* st) const { | |
537 st->print_cr("[CodeBlob]"); | |
538 } | |
539 | |
540 void BufferBlob::verify() { | |
541 // unimplemented | |
542 } | |
543 | |
544 void BufferBlob::print_on(outputStream* st) const { | |
545 CodeBlob::print_on(st); | |
546 print_value_on(st); | |
547 } | |
548 | |
549 void BufferBlob::print_value_on(outputStream* st) const { | |
550 st->print_cr("BufferBlob (" INTPTR_FORMAT ") used for %s", this, name()); | |
551 } | |
552 | |
553 void RuntimeStub::verify() { | |
554 // unimplemented | |
555 } | |
556 | |
557 void RuntimeStub::print_on(outputStream* st) const { | |
558 ttyLocker ttyl; | |
559 CodeBlob::print_on(st); | |
560 st->print("Runtime Stub (" INTPTR_FORMAT "): ", this); | |
561 st->print_cr(name()); | |
562 Disassembler::decode((CodeBlob*)this, st); | |
563 } | |
564 | |
565 void RuntimeStub::print_value_on(outputStream* st) const { | |
566 st->print("RuntimeStub (" INTPTR_FORMAT "): ", this); st->print(name()); | |
567 } | |
568 | |
569 void SingletonBlob::verify() { | |
570 // unimplemented | |
571 } | |
572 | |
573 void SingletonBlob::print_on(outputStream* st) const { | |
574 ttyLocker ttyl; | |
575 CodeBlob::print_on(st); | |
576 st->print_cr(name()); | |
577 Disassembler::decode((CodeBlob*)this, st); | |
578 } | |
579 | |
580 void SingletonBlob::print_value_on(outputStream* st) const { | |
581 st->print_cr(name()); | |
582 } | |
583 | |
584 void DeoptimizationBlob::print_value_on(outputStream* st) const { | |
585 st->print_cr("Deoptimization (frame not available)"); | |
586 } |