Mercurial > hg > truffle
diff src/share/vm/opto/runtime.hpp @ 17783:85b20fdf2d24
Merge
author | kvn |
---|---|
date | Tue, 25 Mar 2014 11:38:48 -0700 |
parents | 606acabe7b5c |
children | b20a35eae442 |
line wrap: on
line diff
--- a/src/share/vm/opto/runtime.hpp Thu Mar 20 15:53:17 2014 +0100 +++ b/src/share/vm/opto/runtime.hpp Tue Mar 25 11:38:48 2014 -0700 @@ -29,6 +29,7 @@ #include "opto/machnode.hpp" #include "opto/type.hpp" #include "runtime/biasedLocking.hpp" +#include "runtime/rtmLocking.hpp" #include "runtime/deoptimization.hpp" #include "runtime/vframe.hpp" @@ -61,7 +62,8 @@ NoTag, LockCounter, EliminatedLockCounter, - BiasedLockingCounter + BiasedLockingCounter, + RTMLockingCounter }; private: @@ -85,7 +87,7 @@ NamedCounter* next() const { return _next; } void set_next(NamedCounter* next) { - assert(_next == NULL, "already set"); + assert(_next == NULL || next == NULL, "already set"); _next = next; } @@ -102,6 +104,18 @@ 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 {