< prev index next >

src/hotspot/share/oops/oop.hpp

Print this page




 242   inline bool is_unlocked() const;
 243   inline bool has_bias_pattern() const;
 244   inline bool has_bias_pattern_raw() const;
 245 
 246   // asserts and guarantees
 247   static bool is_oop(oop obj, bool ignore_mark_word = false);
 248   static bool is_oop_or_null(oop obj, bool ignore_mark_word = false);
 249 #ifndef PRODUCT
 250   inline bool is_unlocked_oop() const;
 251 #endif
 252 
 253   // garbage collection
 254   inline bool is_gc_marked() const;
 255 
 256   // Forward pointer operations for scavenge
 257   inline bool is_forwarded() const;
 258 
 259   inline void forward_to(oop p);
 260   inline bool cas_forward_to(oop p, markOop compare);
 261 
 262 #if INCLUDE_ALL_GCS
 263   // Like "forward_to", but inserts the forwarding pointer atomically.
 264   // Exactly one thread succeeds in inserting the forwarding pointer, and
 265   // this call returns "NULL" for that thread; any other thread has the
 266   // value of the forwarding pointer returned and does not modify "this".
 267   inline oop forward_to_atomic(oop p);
 268 #endif // INCLUDE_ALL_GCS
 269 
 270   inline oop forwardee() const;
 271 
 272   // Age of object during scavenge
 273   inline uint age() const;
 274   inline void incr_age();
 275 
 276   // mark-sweep support
 277   void follow_body(int begin, int end);
 278 
 279   // Garbage Collection support
 280 
 281 #if INCLUDE_ALL_GCS
 282   // Parallel Compact
 283   inline void pc_follow_contents(ParCompactionManager* cm);
 284   inline void pc_update_contents(ParCompactionManager* cm);
 285   // Parallel Scavenge
 286   inline void ps_push_contents(PSPromotionManager* pm);
 287 #endif
 288 
 289 
 290   // iterators, returns size of object
 291 #define OOP_ITERATE_DECL(OopClosureType, nv_suffix)                     \
 292   inline void oop_iterate(OopClosureType* blk);                         \
 293   inline void oop_iterate(OopClosureType* blk, MemRegion mr);  // Only in mr.
 294 
 295   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_DECL)
 296   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_DECL)
 297 
 298 #define OOP_ITERATE_SIZE_DECL(OopClosureType, nv_suffix)                \
 299   inline int oop_iterate_size(OopClosureType* blk);                     \
 300   inline int oop_iterate_size(OopClosureType* blk, MemRegion mr);  // Only in mr.
 301 
 302   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_SIZE_DECL)
 303   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_SIZE_DECL)
 304 
 305 
 306 #if INCLUDE_ALL_GCS
 307 
 308 #define OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix)  \
 309   inline void oop_iterate_backwards(OopClosureType* blk);
 310 
 311   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_BACKWARDS_DECL)
 312   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_BACKWARDS_DECL)
 313 
 314 #endif // INCLUDE_ALL_GCS
 315 
 316   inline int oop_iterate_no_header(OopClosure* bk);
 317   inline int oop_iterate_no_header(OopClosure* bk, MemRegion mr);
 318 
 319   inline static bool is_instanceof_or_null(oop obj, Klass* klass);
 320 
 321   // identity hash; returns the identity hash key (computes it if necessary)
 322   // NOTE with the introduction of UseBiasedLocking that identity_hash() might reach a
 323   // safepoint if called on a biased object. Calling code must be aware of that.
 324   inline intptr_t identity_hash();
 325   intptr_t slow_identity_hash();
 326 
 327   // Alternate hashing code if string table is rehashed
 328   unsigned int new_hash(juint seed);
 329 
 330   // marks are forwarded to stack when object is locked
 331   inline bool    has_displaced_mark_raw() const;
 332   inline markOop displaced_mark_raw() const;
 333   inline void    set_displaced_mark_raw(markOop m);
 334 


 242   inline bool is_unlocked() const;
 243   inline bool has_bias_pattern() const;
 244   inline bool has_bias_pattern_raw() const;
 245 
 246   // asserts and guarantees
 247   static bool is_oop(oop obj, bool ignore_mark_word = false);
 248   static bool is_oop_or_null(oop obj, bool ignore_mark_word = false);
 249 #ifndef PRODUCT
 250   inline bool is_unlocked_oop() const;
 251 #endif
 252 
 253   // garbage collection
 254   inline bool is_gc_marked() const;
 255 
 256   // Forward pointer operations for scavenge
 257   inline bool is_forwarded() const;
 258 
 259   inline void forward_to(oop p);
 260   inline bool cas_forward_to(oop p, markOop compare);
 261 

 262   // Like "forward_to", but inserts the forwarding pointer atomically.
 263   // Exactly one thread succeeds in inserting the forwarding pointer, and
 264   // this call returns "NULL" for that thread; any other thread has the
 265   // value of the forwarding pointer returned and does not modify "this".
 266   inline oop forward_to_atomic(oop p);

 267 
 268   inline oop forwardee() const;
 269 
 270   // Age of object during scavenge
 271   inline uint age() const;
 272   inline void incr_age();
 273 
 274   // mark-sweep support
 275   void follow_body(int begin, int end);
 276 
 277   // Garbage Collection support
 278 
 279 #if INCLUDE_PARALLELGC
 280   // Parallel Compact
 281   inline void pc_follow_contents(ParCompactionManager* cm);
 282   inline void pc_update_contents(ParCompactionManager* cm);
 283   // Parallel Scavenge
 284   inline void ps_push_contents(PSPromotionManager* pm);
 285 #endif
 286 
 287 
 288   // iterators, returns size of object
 289 #define OOP_ITERATE_DECL(OopClosureType, nv_suffix)                     \
 290   inline void oop_iterate(OopClosureType* blk);                         \
 291   inline void oop_iterate(OopClosureType* blk, MemRegion mr);  // Only in mr.
 292 
 293   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_DECL)
 294   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_DECL)
 295 
 296 #define OOP_ITERATE_SIZE_DECL(OopClosureType, nv_suffix)                \
 297   inline int oop_iterate_size(OopClosureType* blk);                     \
 298   inline int oop_iterate_size(OopClosureType* blk, MemRegion mr);  // Only in mr.
 299 
 300   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_SIZE_DECL)
 301   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_SIZE_DECL)
 302 
 303 
 304 #if INCLUDE_OOP_OOP_ITERATE_BACKWARDS
 305 
 306 #define OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix)  \
 307   inline void oop_iterate_backwards(OopClosureType* blk);
 308 
 309   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_BACKWARDS_DECL)
 310   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_BACKWARDS_DECL)
 311 
 312 #endif // INCLUDE_OOP_OOP_ITERATE_BACKWARDS
 313 
 314   inline int oop_iterate_no_header(OopClosure* bk);
 315   inline int oop_iterate_no_header(OopClosure* bk, MemRegion mr);
 316 
 317   inline static bool is_instanceof_or_null(oop obj, Klass* klass);
 318 
 319   // identity hash; returns the identity hash key (computes it if necessary)
 320   // NOTE with the introduction of UseBiasedLocking that identity_hash() might reach a
 321   // safepoint if called on a biased object. Calling code must be aware of that.
 322   inline intptr_t identity_hash();
 323   intptr_t slow_identity_hash();
 324 
 325   // Alternate hashing code if string table is rehashed
 326   unsigned int new_hash(juint seed);
 327 
 328   // marks are forwarded to stack when object is locked
 329   inline bool    has_displaced_mark_raw() const;
 330   inline markOop displaced_mark_raw() const;
 331   inline void    set_displaced_mark_raw(markOop m);
 332 
< prev index next >