19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_SYNCHRONIZER_HPP
26 #define SHARE_VM_RUNTIME_SYNCHRONIZER_HPP
27
28 #include "oops/markOop.hpp"
29 #include "runtime/basicLock.hpp"
30 #include "runtime/handles.hpp"
31 #include "runtime/perfData.hpp"
32 #include "utilities/top.hpp"
33
34
35 class ObjectMonitor;
36
37 class ObjectSynchronizer : AllStatic {
38 friend class VMStructs;
39 public:
40 typedef enum {
41 owner_self,
42 owner_none,
43 owner_other
44 } LockOwnership;
45
46 typedef enum {
47 inflate_cause_vm_internal = 0,
48 inflate_cause_monitor_enter = 1,
49 inflate_cause_wait = 2,
50 inflate_cause_notify = 3,
51 inflate_cause_hash_code = 4,
52 inflate_cause_jni_enter = 5,
53 inflate_cause_jni_exit = 6,
54 inflate_cause_nof = 7 // Number of causes
55 } InflateCause;
56
57 // exit must be implemented non-blocking, since the compiler cannot easily handle
58 // deoptimization at monitor exit. Hence, it does not take a Handle argument.
59
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_SYNCHRONIZER_HPP
26 #define SHARE_VM_RUNTIME_SYNCHRONIZER_HPP
27
28 #include "oops/markOop.hpp"
29 #include "runtime/basicLock.hpp"
30 #include "runtime/handles.hpp"
31 #include "runtime/perfData.hpp"
32 #include "utilities/top.hpp"
33
34
35 class ObjectMonitor;
36
37 class ObjectSynchronizer : AllStatic {
38 friend class VMStructs;
39 #if INCLUDE_ALL_GCS
40 friend class ShenandoahSynchronizerIterator;
41 #endif
42
43 public:
44 typedef enum {
45 owner_self,
46 owner_none,
47 owner_other
48 } LockOwnership;
49
50 typedef enum {
51 inflate_cause_vm_internal = 0,
52 inflate_cause_monitor_enter = 1,
53 inflate_cause_wait = 2,
54 inflate_cause_notify = 3,
55 inflate_cause_hash_code = 4,
56 inflate_cause_jni_enter = 5,
57 inflate_cause_jni_exit = 6,
58 inflate_cause_nof = 7 // Number of causes
59 } InflateCause;
60
61 // exit must be implemented non-blocking, since the compiler cannot easily handle
62 // deoptimization at monitor exit. Hence, it does not take a Handle argument.
63
|