src/hotspot/share/gc/z/zBarrier.hpp
changeset 58066 8407928b9fe5
parent 52939 9a8585f60c32
child 58931 304c63b17b07
equal deleted inserted replaced
58065:3fee0e6b54f5 58066:8407928b9fe5
    30 typedef bool (*ZBarrierFastPath)(uintptr_t);
    30 typedef bool (*ZBarrierFastPath)(uintptr_t);
    31 typedef uintptr_t (*ZBarrierSlowPath)(uintptr_t);
    31 typedef uintptr_t (*ZBarrierSlowPath)(uintptr_t);
    32 
    32 
    33 class ZBarrier : public AllStatic {
    33 class ZBarrier : public AllStatic {
    34 private:
    34 private:
       
    35   static const bool Follow      = true;
       
    36   static const bool DontFollow  = false;
       
    37 
    35   static const bool Strong      = false;
    38   static const bool Strong      = false;
    36   static const bool Finalizable = true;
    39   static const bool Finalizable = true;
    37 
    40 
    38   static const bool Publish     = true;
    41   static const bool Publish     = true;
    39   static const bool Overflow    = false;
    42   static const bool Overflow    = false;
    49   static bool is_resurrection_blocked(volatile oop* p, oop* o);
    52   static bool is_resurrection_blocked(volatile oop* p, oop* o);
    50 
    53 
    51   static bool during_mark();
    54   static bool during_mark();
    52   static bool during_relocate();
    55   static bool during_relocate();
    53   template <bool finalizable> static bool should_mark_through(uintptr_t addr);
    56   template <bool finalizable> static bool should_mark_through(uintptr_t addr);
    54   template <bool finalizable, bool publish> static uintptr_t mark(uintptr_t addr);
    57   template <bool follow, bool finalizable, bool publish> static uintptr_t mark(uintptr_t addr);
    55   static uintptr_t remap(uintptr_t addr);
    58   static uintptr_t remap(uintptr_t addr);
    56   static uintptr_t relocate(uintptr_t addr);
    59   static uintptr_t relocate(uintptr_t addr);
    57   static uintptr_t relocate_or_mark(uintptr_t addr);
    60   static uintptr_t relocate_or_mark(uintptr_t addr);
    58   static uintptr_t relocate_or_remap(uintptr_t addr);
    61   static uintptr_t relocate_or_remap(uintptr_t addr);
    59 
    62 
    67   static uintptr_t keep_alive_barrier_on_phantom_oop_slow_path(uintptr_t addr);
    70   static uintptr_t keep_alive_barrier_on_phantom_oop_slow_path(uintptr_t addr);
    68 
    71 
    69   static uintptr_t mark_barrier_on_oop_slow_path(uintptr_t addr);
    72   static uintptr_t mark_barrier_on_oop_slow_path(uintptr_t addr);
    70   static uintptr_t mark_barrier_on_finalizable_oop_slow_path(uintptr_t addr);
    73   static uintptr_t mark_barrier_on_finalizable_oop_slow_path(uintptr_t addr);
    71   static uintptr_t mark_barrier_on_root_oop_slow_path(uintptr_t addr);
    74   static uintptr_t mark_barrier_on_root_oop_slow_path(uintptr_t addr);
       
    75   static uintptr_t mark_barrier_on_invisible_root_oop_slow_path(uintptr_t addr);
    72 
    76 
    73   static uintptr_t relocate_barrier_on_root_oop_slow_path(uintptr_t addr);
    77   static uintptr_t relocate_barrier_on_root_oop_slow_path(uintptr_t addr);
    74 
    78 
    75 public:
    79 public:
    76   // Load barrier
    80   // Load barrier
   104 
   108 
   105   // Mark barrier
   109   // Mark barrier
   106   static void mark_barrier_on_oop_field(volatile oop* p, bool finalizable);
   110   static void mark_barrier_on_oop_field(volatile oop* p, bool finalizable);
   107   static void mark_barrier_on_oop_array(volatile oop* p, size_t length, bool finalizable);
   111   static void mark_barrier_on_oop_array(volatile oop* p, size_t length, bool finalizable);
   108   static void mark_barrier_on_root_oop_field(oop* p);
   112   static void mark_barrier_on_root_oop_field(oop* p);
       
   113   static void mark_barrier_on_invisible_root_oop_field(oop* p);
   109 
   114 
   110   // Relocate barrier
   115   // Relocate barrier
   111   static void relocate_barrier_on_root_oop_field(oop* p);
   116   static void relocate_barrier_on_root_oop_field(oop* p);
   112 
   117 
   113   // Narrow oop variants, never used.
   118   // Narrow oop variants, never used.