66 static bool is_strong_access(DecoratorSet decorators) {
67 return (decorators & (ON_WEAK_OOP_REF | ON_PHANTOM_OOP_REF)) == 0;
68 }
69
70 static bool is_weak_access(DecoratorSet decorators) {
71 return (decorators & ON_WEAK_OOP_REF) != 0;
72 }
73
74 static bool is_phantom_access(DecoratorSet decorators) {
75 return (decorators & ON_PHANTOM_OOP_REF) != 0;
76 }
77
78 static bool is_native_access(DecoratorSet decorators) {
79 return (decorators & IN_NATIVE) != 0;
80 }
81
82 void print_on(outputStream* st) const override;
83
84 template <class T>
85 inline void arraycopy_barrier(T* src, T* dst, size_t count);
86 inline void clone_barrier(oop src);
87 void clone_barrier_runtime(oop src);
88
89 // Support for optimizing compilers to call the barrier set on slow path allocations
90 // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks to take any
91 // compensating actions to restore card-marks that might otherwise be incorrectly elided.
92 void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) override;
93 void on_thread_create(Thread* thread) override;
94 void on_thread_destroy(Thread* thread) override;
95 void on_thread_attach(Thread* thread) override;
96 void on_thread_detach(Thread* thread) override;
97
98 static inline oop resolve_forwarded_not_null(oop p);
99 static inline oop resolve_forwarded_not_null_mutator(oop p);
100 static inline oop resolve_forwarded(oop p);
101
102 template <DecoratorSet decorators, typename T>
103 inline void satb_barrier(T* field);
104 inline void satb_enqueue(oop value);
105
106 inline void keep_alive_if_weak(DecoratorSet decorators, oop value);
107
108 inline void enqueue(oop obj);
109
110 inline oop load_reference_barrier(oop obj);
111
112 template <class T>
113 inline oop load_reference_barrier_mutator(oop obj, T* load_addr);
114
115 template <class T>
116 inline oop load_reference_barrier(DecoratorSet decorators, oop obj, T* load_addr);
117
118 template <typename T>
119 inline oop oop_load(DecoratorSet decorators, T* addr);
120
121 template <typename T>
122 inline oop oop_cmpxchg(DecoratorSet decorators, T* addr, oop compare_value, oop new_value);
123
124 template <typename T>
125 inline oop oop_xchg(DecoratorSet decorators, T* addr, oop new_value);
126
127 template <DecoratorSet decorators, typename T>
128 void write_ref_field_post(T* field);
129
130 void write_ref_array(HeapWord* start, size_t count);
131
132 private:
|
66 static bool is_strong_access(DecoratorSet decorators) {
67 return (decorators & (ON_WEAK_OOP_REF | ON_PHANTOM_OOP_REF)) == 0;
68 }
69
70 static bool is_weak_access(DecoratorSet decorators) {
71 return (decorators & ON_WEAK_OOP_REF) != 0;
72 }
73
74 static bool is_phantom_access(DecoratorSet decorators) {
75 return (decorators & ON_PHANTOM_OOP_REF) != 0;
76 }
77
78 static bool is_native_access(DecoratorSet decorators) {
79 return (decorators & IN_NATIVE) != 0;
80 }
81
82 void print_on(outputStream* st) const override;
83
84 template <class T>
85 inline void arraycopy_barrier(T* src, T* dst, size_t count);
86
87 // Support for optimizing compilers to call the barrier set on slow path allocations
88 // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks to take any
89 // compensating actions to restore card-marks that might otherwise be incorrectly elided.
90 void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) override;
91 void on_thread_create(Thread* thread) override;
92 void on_thread_destroy(Thread* thread) override;
93 void on_thread_attach(Thread* thread) override;
94 void on_thread_detach(Thread* thread) override;
95
96 static inline oop resolve_forwarded_not_null(oop p);
97 static inline oop resolve_forwarded(oop p);
98
99 template <DecoratorSet decorators, typename T>
100 inline void satb_barrier(T* field);
101 inline void satb_enqueue(oop value);
102
103 inline void keep_alive_if_weak(DecoratorSet decorators, oop value);
104
105 inline void enqueue(oop obj);
106
107 inline oop load_reference_barrier(oop obj);
108
109 template <DecoratorSet decorators, class T>
110 inline oop load_reference_barrier_mutator(oop obj, T* load_addr);
111
112 template <class T>
113 inline oop load_reference_barrier(DecoratorSet decorators, oop obj, T* load_addr);
114
115 template <typename T>
116 inline oop oop_load(DecoratorSet decorators, T* addr);
117
118 template <typename T>
119 inline oop oop_cmpxchg(DecoratorSet decorators, T* addr, oop compare_value, oop new_value);
120
121 template <typename T>
122 inline oop oop_xchg(DecoratorSet decorators, T* addr, oop new_value);
123
124 template <DecoratorSet decorators, typename T>
125 void write_ref_field_post(T* field);
126
127 void write_ref_array(HeapWord* start, size_t count);
128
129 private:
|