src/hotspot/share/gc/z/zThreadLocalData.hpp
changeset 58066 8407928b9fe5
parent 57851 6728c41f2a08
child 58679 9c3209ff7550
equal deleted inserted replaced
58065:3fee0e6b54f5 58066:8407928b9fe5
    61   static ZMarkThreadLocalStacks* stacks(Thread* thread) {
    61   static ZMarkThreadLocalStacks* stacks(Thread* thread) {
    62     return &data(thread)->_stacks;
    62     return &data(thread)->_stacks;
    63   }
    63   }
    64 
    64 
    65   static void set_invisible_root(Thread* thread, oop* root) {
    65   static void set_invisible_root(Thread* thread, oop* root) {
    66     assert(!has_invisible_root(thread), "Already set");
    66     assert(data(thread)->_invisible_root == NULL, "Already set");
    67     data(thread)->_invisible_root = root;
    67     data(thread)->_invisible_root = root;
    68   }
    68   }
    69 
    69 
    70   static void clear_invisible_root(Thread* thread) {
    70   static void clear_invisible_root(Thread* thread) {
    71     assert(has_invisible_root(thread), "Should be set");
    71     assert(data(thread)->_invisible_root != NULL, "Should be set");
    72     data(thread)->_invisible_root = NULL;
    72     data(thread)->_invisible_root = NULL;
    73   }
    73   }
    74 
    74 
    75   static bool has_invisible_root(Thread* thread) {
    75   template <typename T>
    76     return data(thread)->_invisible_root != NULL;
    76   static void do_invisible_root(Thread* thread, T f) {
    77   }
    77     if (data(thread)->_invisible_root != NULL) {
    78 
    78       f(data(thread)->_invisible_root);
    79   static oop* invisible_root(Thread* thread) {
    79     }
    80     assert(has_invisible_root(thread), "Should be set");
       
    81     return data(thread)->_invisible_root;
       
    82   }
    80   }
    83 
    81 
    84   static ByteSize address_bad_mask_offset() {
    82   static ByteSize address_bad_mask_offset() {
    85     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);
    86   }
    84   }