1.1 --- a/src/share/vm/opto/runtime.hpp Sat Mar 22 00:26:48 2014 +0400 1.2 +++ b/src/share/vm/opto/runtime.hpp Thu Mar 20 17:49:27 2014 -0700 1.3 @@ -29,6 +29,7 @@ 1.4 #include "opto/machnode.hpp" 1.5 #include "opto/type.hpp" 1.6 #include "runtime/biasedLocking.hpp" 1.7 +#include "runtime/rtmLocking.hpp" 1.8 #include "runtime/deoptimization.hpp" 1.9 #include "runtime/vframe.hpp" 1.10 1.11 @@ -61,7 +62,8 @@ 1.12 NoTag, 1.13 LockCounter, 1.14 EliminatedLockCounter, 1.15 - BiasedLockingCounter 1.16 + BiasedLockingCounter, 1.17 + RTMLockingCounter 1.18 }; 1.19 1.20 private: 1.21 @@ -85,7 +87,7 @@ 1.22 1.23 NamedCounter* next() const { return _next; } 1.24 void set_next(NamedCounter* next) { 1.25 - assert(_next == NULL, "already set"); 1.26 + assert(_next == NULL || next == NULL, "already set"); 1.27 _next = next; 1.28 } 1.29 1.30 @@ -102,6 +104,18 @@ 1.31 BiasedLockingCounters* counters() { return &_counters; } 1.32 }; 1.33 1.34 + 1.35 +class RTMLockingNamedCounter : public NamedCounter { 1.36 + private: 1.37 + RTMLockingCounters _counters; 1.38 + 1.39 + public: 1.40 + RTMLockingNamedCounter(const char *n) : 1.41 + NamedCounter(n, RTMLockingCounter), _counters() {} 1.42 + 1.43 + RTMLockingCounters* counters() { return &_counters; } 1.44 +}; 1.45 + 1.46 typedef const TypeFunc*(*TypeFunc_generator)(); 1.47 1.48 class OptoRuntime : public AllStatic {