Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/java.cpp @ 4137:04b9a2566eec
Merge with hsx23/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 17 Dec 2011 21:40:27 +0100 |
parents | 2823897b2da2 436b4a3231bf |
children | 3c21eee8ab4d |
comparison
equal
deleted
inserted
replaced
3737:9dc19b7d89a3 | 4137:04b9a2566eec |
---|---|
84 # include "thread_solaris.inline.hpp" | 84 # include "thread_solaris.inline.hpp" |
85 #endif | 85 #endif |
86 #ifdef TARGET_OS_FAMILY_windows | 86 #ifdef TARGET_OS_FAMILY_windows |
87 # include "thread_windows.inline.hpp" | 87 # include "thread_windows.inline.hpp" |
88 #endif | 88 #endif |
89 #ifdef TARGET_OS_FAMILY_bsd | |
90 # include "thread_bsd.inline.hpp" | |
91 #endif | |
89 #ifndef SERIALGC | 92 #ifndef SERIALGC |
90 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp" | 93 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp" |
91 #include "gc_implementation/parallelScavenge/psScavenge.hpp" | 94 #include "gc_implementation/parallelScavenge/psScavenge.hpp" |
92 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp" | 95 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp" |
93 #endif | 96 #endif |
101 #include "opto/compile.hpp" | 104 #include "opto/compile.hpp" |
102 #include "opto/indexSet.hpp" | 105 #include "opto/indexSet.hpp" |
103 #include "opto/runtime.hpp" | 106 #include "opto/runtime.hpp" |
104 #endif | 107 #endif |
105 | 108 |
109 #ifndef USDT2 | |
106 HS_DTRACE_PROBE_DECL(hotspot, vm__shutdown); | 110 HS_DTRACE_PROBE_DECL(hotspot, vm__shutdown); |
111 #endif /* !USDT2 */ | |
107 | 112 |
108 #ifndef PRODUCT | 113 #ifndef PRODUCT |
109 | 114 |
110 // Statistics printing (method invocation histogram) | 115 // Statistics printing (method invocation histogram) |
111 | 116 |
242 #ifdef COMPILER1 | 247 #ifdef COMPILER1 |
243 if ((PrintC1Statistics || LogVMOutput || LogCompilation) && UseCompiler) { | 248 if ((PrintC1Statistics || LogVMOutput || LogCompilation) && UseCompiler) { |
244 FlagSetting fs(DisplayVMOutput, DisplayVMOutput && PrintC1Statistics); | 249 FlagSetting fs(DisplayVMOutput, DisplayVMOutput && PrintC1Statistics); |
245 Runtime1::print_statistics(); | 250 Runtime1::print_statistics(); |
246 Deoptimization::print_statistics(); | 251 Deoptimization::print_statistics(); |
252 SharedRuntime::print_statistics(); | |
247 nmethod::print_statistics(); | 253 nmethod::print_statistics(); |
248 } | 254 } |
249 #endif /* COMPILER1 */ | 255 #endif /* COMPILER1 */ |
250 | 256 |
251 #ifdef COMPILER2 | 257 #ifdef COMPILER2 |
253 FlagSetting fs(DisplayVMOutput, DisplayVMOutput && PrintOptoStatistics); | 259 FlagSetting fs(DisplayVMOutput, DisplayVMOutput && PrintOptoStatistics); |
254 Compile::print_statistics(); | 260 Compile::print_statistics(); |
255 #ifndef COMPILER1 | 261 #ifndef COMPILER1 |
256 Deoptimization::print_statistics(); | 262 Deoptimization::print_statistics(); |
257 nmethod::print_statistics(); | 263 nmethod::print_statistics(); |
264 SharedRuntime::print_statistics(); | |
258 #endif //COMPILER1 | 265 #endif //COMPILER1 |
259 SharedRuntime::print_statistics(); | |
260 os::print_statistics(); | 266 os::print_statistics(); |
261 } | 267 } |
262 | 268 |
263 if (PrintLockStatistics || PrintPreciseBiasedLockingStatistics) { | 269 if (PrintLockStatistics || PrintPreciseBiasedLockingStatistics) { |
264 OptoRuntime::print_named_counters(); | 270 OptoRuntime::print_named_counters(); |
471 | 477 |
472 // shut down the StatSampler task | 478 // shut down the StatSampler task |
473 StatSampler::disengage(); | 479 StatSampler::disengage(); |
474 StatSampler::destroy(); | 480 StatSampler::destroy(); |
475 | 481 |
476 #ifndef SERIALGC | 482 // We do not need to explicitly stop concurrent GC threads because the |
477 // stop CMS threads | 483 // JVM will be taken down at a safepoint when such threads are inactive -- |
478 if (UseConcMarkSweepGC) { | 484 // except for some concurrent G1 threads, see (comment in) |
479 ConcurrentMarkSweepThread::stop(); | 485 // Threads::destroy_vm(). |
480 } | |
481 #endif // SERIALGC | |
482 | 486 |
483 // Print GC/heap related information. | 487 // Print GC/heap related information. |
484 if (PrintGCDetails) { | 488 if (PrintGCDetails) { |
485 Universe::print(); | 489 Universe::print(); |
486 AdaptiveSizePolicyOutput(0); | 490 AdaptiveSizePolicyOutput(0); |
548 ShouldNotReachHere(); | 552 ShouldNotReachHere(); |
549 } | 553 } |
550 | 554 |
551 void notify_vm_shutdown() { | 555 void notify_vm_shutdown() { |
552 // For now, just a dtrace probe. | 556 // For now, just a dtrace probe. |
557 #ifndef USDT2 | |
553 HS_DTRACE_PROBE(hotspot, vm__shutdown); | 558 HS_DTRACE_PROBE(hotspot, vm__shutdown); |
554 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG(); | 559 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG(); |
560 #else /* USDT2 */ | |
561 HOTSPOT_VM_SHUTDOWN(); | |
562 #endif /* USDT2 */ | |
555 } | 563 } |
556 | 564 |
557 void vm_direct_exit(int code) { | 565 void vm_direct_exit(int code) { |
558 notify_vm_shutdown(); | 566 notify_vm_shutdown(); |
559 os::wait_for_keypress_at_exit(); | 567 os::wait_for_keypress_at_exit(); |
676 micro = 0; | 684 micro = 0; |
677 } | 685 } |
678 _current = JDK_Version(major, minor, micro, info.update_version, | 686 _current = JDK_Version(major, minor, micro, info.update_version, |
679 info.special_update_version, build, | 687 info.special_update_version, build, |
680 info.thread_park_blocker == 1, | 688 info.thread_park_blocker == 1, |
681 info.post_vm_init_hook_enabled == 1); | 689 info.post_vm_init_hook_enabled == 1, |
690 info.pending_list_uses_discovered_field == 1); | |
682 } | 691 } |
683 } | 692 } |
684 | 693 |
685 void JDK_Version::fully_initialize( | 694 void JDK_Version::fully_initialize( |
686 uint8_t major, uint8_t minor, uint8_t micro, uint8_t update) { | 695 uint8_t major, uint8_t minor, uint8_t micro, uint8_t update) { |