equal
deleted
inserted
replaced
32 |
32 |
33 class ZThreadLocalData { |
33 class ZThreadLocalData { |
34 private: |
34 private: |
35 uintptr_t _address_bad_mask; |
35 uintptr_t _address_bad_mask; |
36 ZMarkThreadLocalStacks _stacks; |
36 ZMarkThreadLocalStacks _stacks; |
|
37 oop* _invisible_root; |
37 |
38 |
38 ZThreadLocalData() : |
39 ZThreadLocalData() : |
39 _address_bad_mask(0), |
40 _address_bad_mask(0), |
40 _stacks() {} |
41 _stacks(), |
|
42 _invisible_root(NULL) {} |
41 |
43 |
42 static ZThreadLocalData* data(Thread* thread) { |
44 static ZThreadLocalData* data(Thread* thread) { |
43 return thread->gc_data<ZThreadLocalData>(); |
45 return thread->gc_data<ZThreadLocalData>(); |
44 } |
46 } |
45 |
47 |
58 |
60 |
59 static ZMarkThreadLocalStacks* stacks(Thread* thread) { |
61 static ZMarkThreadLocalStacks* stacks(Thread* thread) { |
60 return &data(thread)->_stacks; |
62 return &data(thread)->_stacks; |
61 } |
63 } |
62 |
64 |
|
65 static void set_invisible_root(Thread* thread, oop* root) { |
|
66 assert(data(thread)->_invisible_root == NULL, "Already set"); |
|
67 data(thread)->_invisible_root = root; |
|
68 } |
|
69 |
|
70 static void clear_invisible_root(Thread* thread) { |
|
71 assert(data(thread)->_invisible_root != NULL, "Should be set"); |
|
72 data(thread)->_invisible_root = NULL; |
|
73 } |
|
74 |
|
75 template <typename T> |
|
76 static void do_invisible_root(Thread* thread, T f) { |
|
77 if (data(thread)->_invisible_root != NULL) { |
|
78 f(data(thread)->_invisible_root); |
|
79 } |
|
80 } |
|
81 |
63 static ByteSize address_bad_mask_offset() { |
82 static ByteSize address_bad_mask_offset() { |
64 return Thread::gc_data_offset() + byte_offset_of(ZThreadLocalData, _address_bad_mask); |
83 return Thread::gc_data_offset() + byte_offset_of(ZThreadLocalData, _address_bad_mask); |
65 } |
84 } |
66 |
85 |
67 static ByteSize nmethod_disarmed_offset() { |
86 static ByteSize nmethod_disarmed_offset() { |