src/share/vm/opto/runtime.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8031320_8u Cdiff src/share/vm/opto/runtime.hpp

src/share/vm/opto/runtime.hpp

Print this page
rev 5968 : 8031320: Use Intel RTM instructions for locks
Summary: Use RTM for inflated locks and stack locks.
Reviewed-by: iveresov, twisti, roland, dcubed

*** 27,36 **** --- 27,37 ---- #include "code/codeBlob.hpp" #include "opto/machnode.hpp" #include "opto/type.hpp" #include "runtime/biasedLocking.hpp" + #include "runtime/rtmLocking.hpp" #include "runtime/deoptimization.hpp" #include "runtime/vframe.hpp" //------------------------------OptoRuntime------------------------------------ // Opto compiler runtime routines
*** 59,69 **** public: enum CounterTag { NoTag, LockCounter, EliminatedLockCounter, ! BiasedLockingCounter }; private: const char * _name; int _count; --- 60,71 ---- public: enum CounterTag { NoTag, LockCounter, EliminatedLockCounter, ! BiasedLockingCounter, ! RTMLockingCounter }; private: const char * _name; int _count;
*** 83,93 **** CounterTag tag() const { return _tag; } void set_tag(CounterTag tag) { _tag = tag; } NamedCounter* next() const { return _next; } void set_next(NamedCounter* next) { ! assert(_next == NULL, "already set"); _next = next; } }; --- 85,95 ---- CounterTag tag() const { return _tag; } void set_tag(CounterTag tag) { _tag = tag; } NamedCounter* next() const { return _next; } void set_next(NamedCounter* next) { ! assert(_next == NULL || next == NULL, "already set"); _next = next; } };
*** 100,109 **** --- 102,123 ---- NamedCounter(n, BiasedLockingCounter), _counters() {} BiasedLockingCounters* counters() { return &_counters; } }; + + class RTMLockingNamedCounter : public NamedCounter { + private: + RTMLockingCounters _counters; + + public: + RTMLockingNamedCounter(const char *n) : + NamedCounter(n, RTMLockingCounter), _counters() {} + + RTMLockingCounters* counters() { return &_counters; } + }; + typedef const TypeFunc*(*TypeFunc_generator)(); class OptoRuntime : public AllStatic { friend class Matcher; // allow access to stub names
src/share/vm/opto/runtime.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File