< prev index next >

src/hotspot/share/runtime/continuationJavaClasses.hpp

Print this page

 59   static void compute_offsets();
 60  public:
 61   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 62   // Accessors
 63   static inline oop scope(oop continuation);
 64   static inline oop parent(oop continuation);
 65   static inline stackChunkOop tail(oop continuation);
 66   static inline void set_tail(oop continuation, stackChunkOop value);
 67   static inline bool done(oop continuation);
 68   static inline bool is_preempted(oop continuation);
 69   static inline void set_preempted(oop continuation, bool value);
 70 };
 71 
 72 // Interface to jdk.internal.vm.StackChunk objects
 73 #define STACKCHUNK_INJECTED_FIELDS(macro)                                          \
 74   macro(jdk_internal_vm_StackChunk, cont,            continuation_signature, false) \
 75   macro(jdk_internal_vm_StackChunk, flags,           byte_signature,         false) \
 76   macro(jdk_internal_vm_StackChunk, pc,              intptr_signature,       false) \
 77   macro(jdk_internal_vm_StackChunk, maxThawingSize,  int_signature,          false) \
 78   macro(jdk_internal_vm_StackChunk, lockStackSize,   byte_signature,         false) \


 79 
 80 class jdk_internal_vm_StackChunk: AllStatic {
 81   friend class JavaClasses;
 82  private:
 83   static int _parent_offset;
 84   static int _size_offset;
 85   static int _sp_offset;
 86   static int _pc_offset;
 87   static int _bottom_offset;
 88   static int _flags_offset;
 89   static int _maxThawingSize_offset;
 90   static int _lockStackSize_offset;


 91   static int _cont_offset;
 92 
 93 
 94   static void compute_offsets();
 95  public:
 96   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 97 
 98   static inline int parent_offset() { return _parent_offset; }
 99   static inline int cont_offset()   { return _cont_offset; }
100 
101   // Accessors
102   static inline oop parent(oop chunk);
103   static inline void set_parent(oop chunk, oop value);
104   template<typename P>
105   static inline void set_parent_raw(oop chunk, oop value);
106   template<DecoratorSet decorators>
107   static inline void set_parent_access(oop chunk, oop value);
108 
109   static inline int size(oop chunk);
110   static inline void set_size(HeapWord* chunk, int value);

112   static inline int sp(oop chunk);
113   static inline void set_sp(oop chunk, int value);
114   static inline void set_sp(HeapWord* chunk, int value); // used while allocating
115   static inline address pc(oop chunk);
116   static inline void set_pc(oop chunk, address value);
117   static inline int bottom(oop chunk);
118   static inline void set_bottom(oop chunk, int value);
119   static inline void set_bottom(HeapWord* chunk, int value);
120   static inline uint8_t flags(oop chunk);
121   static inline void set_flags(oop chunk, uint8_t value);
122   static inline uint8_t flags_acquire(oop chunk);
123   static inline void release_set_flags(oop chunk, uint8_t value);
124   static inline bool try_set_flags(oop chunk, uint8_t expected_value, uint8_t new_value);
125 
126   static inline int maxThawingSize(oop chunk);
127   static inline void set_maxThawingSize(oop chunk, int value);
128 
129   static inline uint8_t lockStackSize(oop chunk);
130   static inline void set_lockStackSize(oop chunk, uint8_t value);
131 






132   // cont oop's processing is essential for the chunk's GC protocol
133   static inline oop cont(oop chunk);
134   template<typename P>
135   static inline oop cont_raw(oop chunk);
136   static inline void set_cont(oop chunk, oop value);
137   template<typename P>
138   static inline void set_cont_raw(oop chunk, oop value);
139   template<DecoratorSet decorators>
140   static inline void set_cont_access(oop chunk, oop value);
141 };
142 
143 #endif // SHARE_RUNTIME_CONTINUATIONJAVACLASSES_HPP

 59   static void compute_offsets();
 60  public:
 61   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 62   // Accessors
 63   static inline oop scope(oop continuation);
 64   static inline oop parent(oop continuation);
 65   static inline stackChunkOop tail(oop continuation);
 66   static inline void set_tail(oop continuation, stackChunkOop value);
 67   static inline bool done(oop continuation);
 68   static inline bool is_preempted(oop continuation);
 69   static inline void set_preempted(oop continuation, bool value);
 70 };
 71 
 72 // Interface to jdk.internal.vm.StackChunk objects
 73 #define STACKCHUNK_INJECTED_FIELDS(macro)                                          \
 74   macro(jdk_internal_vm_StackChunk, cont,            continuation_signature, false) \
 75   macro(jdk_internal_vm_StackChunk, flags,           byte_signature,         false) \
 76   macro(jdk_internal_vm_StackChunk, pc,              intptr_signature,       false) \
 77   macro(jdk_internal_vm_StackChunk, maxThawingSize,  int_signature,          false) \
 78   macro(jdk_internal_vm_StackChunk, lockStackSize,   byte_signature,         false) \
 79   macro(jdk_internal_vm_StackChunk, atKlassInit,     bool_signature,         false) \
 80   macro(jdk_internal_vm_StackChunk, hasArgsAtTop,    bool_signature,         false) \
 81 
 82 class jdk_internal_vm_StackChunk: AllStatic {
 83   friend class JavaClasses;
 84  private:
 85   static int _parent_offset;
 86   static int _size_offset;
 87   static int _sp_offset;
 88   static int _pc_offset;
 89   static int _bottom_offset;
 90   static int _flags_offset;
 91   static int _maxThawingSize_offset;
 92   static int _lockStackSize_offset;
 93   static int _atKlassInit_offset;
 94   static int _hasArgsAtTop_offset;
 95   static int _cont_offset;
 96 
 97 
 98   static void compute_offsets();
 99  public:
100   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
101 
102   static inline int parent_offset() { return _parent_offset; }
103   static inline int cont_offset()   { return _cont_offset; }
104 
105   // Accessors
106   static inline oop parent(oop chunk);
107   static inline void set_parent(oop chunk, oop value);
108   template<typename P>
109   static inline void set_parent_raw(oop chunk, oop value);
110   template<DecoratorSet decorators>
111   static inline void set_parent_access(oop chunk, oop value);
112 
113   static inline int size(oop chunk);
114   static inline void set_size(HeapWord* chunk, int value);

116   static inline int sp(oop chunk);
117   static inline void set_sp(oop chunk, int value);
118   static inline void set_sp(HeapWord* chunk, int value); // used while allocating
119   static inline address pc(oop chunk);
120   static inline void set_pc(oop chunk, address value);
121   static inline int bottom(oop chunk);
122   static inline void set_bottom(oop chunk, int value);
123   static inline void set_bottom(HeapWord* chunk, int value);
124   static inline uint8_t flags(oop chunk);
125   static inline void set_flags(oop chunk, uint8_t value);
126   static inline uint8_t flags_acquire(oop chunk);
127   static inline void release_set_flags(oop chunk, uint8_t value);
128   static inline bool try_set_flags(oop chunk, uint8_t expected_value, uint8_t new_value);
129 
130   static inline int maxThawingSize(oop chunk);
131   static inline void set_maxThawingSize(oop chunk, int value);
132 
133   static inline uint8_t lockStackSize(oop chunk);
134   static inline void set_lockStackSize(oop chunk, uint8_t value);
135 
136   static inline bool atKlassInit(oop chunk);
137   static inline void set_atKlassInit(oop chunk, bool value);
138 
139   static inline bool hasArgsAtTop(oop chunk);
140   static inline void set_hasArgsAtTop(oop chunk, bool value);
141 
142   // cont oop's processing is essential for the chunk's GC protocol
143   static inline oop cont(oop chunk);
144   template<typename P>
145   static inline oop cont_raw(oop chunk);
146   static inline void set_cont(oop chunk, oop value);
147   template<typename P>
148   static inline void set_cont_raw(oop chunk, oop value);
149   template<DecoratorSet decorators>
150   static inline void set_cont_access(oop chunk, oop value);
151 };
152 
153 #endif // SHARE_RUNTIME_CONTINUATIONJAVACLASSES_HPP
< prev index next >