< prev index next >

src/hotspot/share/gc/shared/collectedHeap.hpp

Print this page

338   virtual bool uses_stack_watermark_barrier() const { return false; }
339 
340   // Perform a collection of the heap; intended for use in implementing
341   // "System.gc".  This probably implies as full a collection as the
342   // "CollectedHeap" supports.
343   virtual void collect(GCCause::Cause cause) = 0;
344 
345   // Perform a full collection
346   virtual void do_full_collection(bool clear_all_soft_refs) = 0;
347 
348   // This interface assumes that it's being called by the
349   // vm thread. It collects the heap assuming that the
350   // heap lock is already held and that we are executing in
351   // the context of the vm thread.
352   virtual void collect_as_vm_thread(GCCause::Cause cause);
353 
354   virtual MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
355                                                        size_t size,
356                                                        Metaspace::MetadataType mdtype);
357 












358   // Returns "true" iff there is a stop-world GC in progress.  (I assume
359   // that it should answer "false" for the concurrent part of a concurrent
360   // collector -- dld).
361   bool is_gc_active() const { return _is_gc_active; }
362 
363   // Total number of GC collections (started)
364   unsigned int total_collections() const { return _total_collections; }
365   unsigned int total_full_collections() const { return _total_full_collections;}
366 
367   // Increment total number of GC collections (started)
368   void increment_total_collections(bool full = false) {
369     _total_collections++;
370     if (full) {
371       increment_total_full_collections();
372     }
373   }
374 
375   void increment_total_full_collections() { _total_full_collections++; }
376 
377   // Return the SoftRefPolicy for the heap;

338   virtual bool uses_stack_watermark_barrier() const { return false; }
339 
340   // Perform a collection of the heap; intended for use in implementing
341   // "System.gc".  This probably implies as full a collection as the
342   // "CollectedHeap" supports.
343   virtual void collect(GCCause::Cause cause) = 0;
344 
345   // Perform a full collection
346   virtual void do_full_collection(bool clear_all_soft_refs) = 0;
347 
348   // This interface assumes that it's being called by the
349   // vm thread. It collects the heap assuming that the
350   // heap lock is already held and that we are executing in
351   // the context of the vm thread.
352   virtual void collect_as_vm_thread(GCCause::Cause cause);
353 
354   virtual MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
355                                                        size_t size,
356                                                        Metaspace::MetadataType mdtype);
357 
358   // Continuation support
359   virtual void collect_for_codecache();
360 
361   // Return true, if accesses to the object would require barriers.
362   // This is used by continuations to copy chunks of a thread stack into StackChunk object or out of a StackChunk
363   // object back into the thread stack. These chunks may contain references to objects. It is crucial that
364   // the GC does not attempt to traverse the object while we modify it, because its structure (oopmap) is changed
365   // when stack chunks are stored into it.
366   // StackChunk objects may be reused, the GC must not assume that a StackChunk object is always a freshly
367   // allocated object.
368   virtual bool requires_barriers(oop obj) const = 0;
369 
370   // Returns "true" iff there is a stop-world GC in progress.  (I assume
371   // that it should answer "false" for the concurrent part of a concurrent
372   // collector -- dld).
373   bool is_gc_active() const { return _is_gc_active; }
374 
375   // Total number of GC collections (started)
376   unsigned int total_collections() const { return _total_collections; }
377   unsigned int total_full_collections() const { return _total_full_collections;}
378 
379   // Increment total number of GC collections (started)
380   void increment_total_collections(bool full = false) {
381     _total_collections++;
382     if (full) {
383       increment_total_full_collections();
384     }
385   }
386 
387   void increment_total_full_collections() { _total_full_collections++; }
388 
389   // Return the SoftRefPolicy for the heap;
< prev index next >