20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 #ifndef SHARE_GC_Z_ZBARRIERSET_HPP
25 #define SHARE_GC_Z_ZBARRIERSET_HPP
26
27 #include "gc/shared/barrierSet.hpp"
28
29 class ZBarrierSetAssembler;
30
31 class ZBarrierSet : public BarrierSet {
32 public:
33 ZBarrierSet();
34
35 static ZBarrierSetAssembler* assembler();
36 static bool barrier_needed(DecoratorSet decorators, BasicType type);
37
38 virtual void on_thread_create(Thread* thread);
39 virtual void on_thread_destroy(Thread* thread);
40 virtual void on_thread_attach(JavaThread* thread);
41 virtual void on_thread_detach(JavaThread* thread);
42
43 virtual void print_on(outputStream* st) const {}
44
45 template <DecoratorSet decorators, typename BarrierSetT = ZBarrierSet>
46 class AccessBarrier : public BarrierSet::AccessBarrier<decorators, BarrierSetT> {
47 private:
48 typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
49
50 template <DecoratorSet expected>
51 static void verify_decorators_present();
52
53 template <DecoratorSet expected>
54 static void verify_decorators_absent();
55
56 static oop* field_addr(oop base, ptrdiff_t offset);
57
58 template <typename T>
59 static oop load_barrier_on_oop_field_preloaded(T* addr, oop o);
60
61 template <typename T>
|
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 #ifndef SHARE_GC_Z_ZBARRIERSET_HPP
25 #define SHARE_GC_Z_ZBARRIERSET_HPP
26
27 #include "gc/shared/barrierSet.hpp"
28
29 class ZBarrierSetAssembler;
30
31 class ZBarrierSet : public BarrierSet {
32 public:
33 ZBarrierSet();
34
35 static ZBarrierSetAssembler* assembler();
36 static bool barrier_needed(DecoratorSet decorators, BasicType type);
37
38 virtual void on_thread_create(Thread* thread);
39 virtual void on_thread_destroy(Thread* thread);
40 virtual void on_thread_attach(Thread* thread);
41 virtual void on_thread_detach(Thread* thread);
42
43 virtual void print_on(outputStream* st) const {}
44
45 template <DecoratorSet decorators, typename BarrierSetT = ZBarrierSet>
46 class AccessBarrier : public BarrierSet::AccessBarrier<decorators, BarrierSetT> {
47 private:
48 typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
49
50 template <DecoratorSet expected>
51 static void verify_decorators_present();
52
53 template <DecoratorSet expected>
54 static void verify_decorators_absent();
55
56 static oop* field_addr(oop base, ptrdiff_t offset);
57
58 template <typename T>
59 static oop load_barrier_on_oop_field_preloaded(T* addr, oop o);
60
61 template <typename T>
|