6517:a433eb716ce1 | 6518:62c54fcc0a35 |
---|---|
105 #endif | 105 #endif |
106 #ifdef COMPILER2 | 106 #ifdef COMPILER2 |
107 #include "opto/c2compiler.hpp" | 107 #include "opto/c2compiler.hpp" |
108 #include "opto/idealGraphPrinter.hpp" | 108 #include "opto/idealGraphPrinter.hpp" |
109 #endif | 109 #endif |
110 #if INCLUDE_RTM_OPT | |
111 #include "runtime/rtmLocking.hpp" | |
112 #endif | |
110 | 113 |
111 #ifdef DTRACE_ENABLED | 114 #ifdef DTRACE_ENABLED |
112 | 115 |
113 // Only bother with this argument setup if dtrace is available | 116 // Only bother with this argument setup if dtrace is available |
114 | 117 |
3671 StatSampler::engage(); | 3674 StatSampler::engage(); |
3672 if (CheckJNICalls) JniPeriodicChecker::engage(); | 3675 if (CheckJNICalls) JniPeriodicChecker::engage(); |
3673 | 3676 |
3674 BiasedLocking::init(); | 3677 BiasedLocking::init(); |
3675 | 3678 |
3679 #if INCLUDE_RTM_OPT | |
3680 RTMLockingCounters::init(); | |
3681 #endif | |
3682 | |
3676 if (JDK_Version::current().post_vm_init_hook_enabled()) { | 3683 if (JDK_Version::current().post_vm_init_hook_enabled()) { |
3677 call_postVMInitHook(THREAD); | 3684 call_postVMInitHook(THREAD); |
3678 // The Java side of PostVMInitHook.run must deal with all | 3685 // The Java side of PostVMInitHook.run must deal with all |
3679 // exceptions and provide means of diagnosis. | 3686 // exceptions and provide means of diagnosis. |
3680 if (HAS_PENDING_EXCEPTION) { | 3687 if (HAS_PENDING_EXCEPTION) { |
4447 for (;;) { | 4454 for (;;) { |
4448 while (*adr != 0) { | 4455 while (*adr != 0) { |
4449 ++ctr ; | 4456 ++ctr ; |
4450 if ((ctr & 0xFFF) == 0 || !os::is_MP()) { | 4457 if ((ctr & 0xFFF) == 0 || !os::is_MP()) { |
4451 if (Yields > 5) { | 4458 if (Yields > 5) { |
4452 // Consider using a simple NakedSleep() instead. | 4459 os::naked_short_sleep(1); |
4453 // Then SpinAcquire could be called by non-JVM threads | |
4454 Thread::current()->_ParkEvent->park(1) ; | |
4455 } else { | 4460 } else { |
4456 os::NakedYield() ; | 4461 os::NakedYield() ; |
4457 ++Yields ; | 4462 ++Yields ; |
4458 } | 4463 } |
4459 } else { | 4464 } else { |