comparison src/share/vm/gc_interface/collectedHeap.hpp @ 360:5d254928c888

Merge
author ysr
date Wed, 27 Aug 2008 11:20:46 -0700
parents 1ee8caae33af
children 7d7a7c599c17
comparison
equal deleted inserted replaced
341:d60e4e6d7f72 360:5d254928c888
362 return 0; 362 return 0;
363 } 363 }
364 // Can a compiler initialize a new object without store barriers? 364 // Can a compiler initialize a new object without store barriers?
365 // This permission only extends from the creation of a new object 365 // This permission only extends from the creation of a new object
366 // via a TLAB up to the first subsequent safepoint. 366 // via a TLAB up to the first subsequent safepoint.
367 virtual bool can_elide_tlab_store_barriers() const { 367 virtual bool can_elide_tlab_store_barriers() const = 0;
368 guarantee(kind() < CollectedHeap::G1CollectedHeap, "else change or refactor this"); 368
369 return true;
370 }
371 // If a compiler is eliding store barriers for TLAB-allocated objects, 369 // If a compiler is eliding store barriers for TLAB-allocated objects,
372 // there is probably a corresponding slow path which can produce 370 // there is probably a corresponding slow path which can produce
373 // an object allocated anywhere. The compiler's runtime support 371 // an object allocated anywhere. The compiler's runtime support
374 // promises to call this function on such a slow-path-allocated 372 // promises to call this function on such a slow-path-allocated
375 // object before performing initializations that have elided 373 // object before performing initializations that have elided
377 virtual oop new_store_barrier(oop new_obj); 375 virtual oop new_store_barrier(oop new_obj);
378 376
379 // Can a compiler elide a store barrier when it writes 377 // Can a compiler elide a store barrier when it writes
380 // a permanent oop into the heap? Applies when the compiler 378 // a permanent oop into the heap? Applies when the compiler
381 // is storing x to the heap, where x->is_perm() is true. 379 // is storing x to the heap, where x->is_perm() is true.
382 virtual bool can_elide_permanent_oop_store_barriers() const; 380 virtual bool can_elide_permanent_oop_store_barriers() const = 0;
383 381
384 // Does this heap support heap inspection (+PrintClassHistogram?) 382 // Does this heap support heap inspection (+PrintClassHistogram?)
385 virtual bool supports_heap_inspection() const { 383 virtual bool supports_heap_inspection() const = 0;
386 return false; // Until RFE 5023697 is implemented
387 }
388 384
389 // Perform a collection of the heap; intended for use in implementing 385 // Perform a collection of the heap; intended for use in implementing
390 // "System.gc". This probably implies as full a collection as the 386 // "System.gc". This probably implies as full a collection as the
391 // "CollectedHeap" supports. 387 // "CollectedHeap" supports.
392 virtual void collect(GCCause::Cause cause) = 0; 388 virtual void collect(GCCause::Cause cause) = 0;