< prev index next >

src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp

Print this page
rev 8910 : full patch for jfr
   1   /*
   2  * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  58 class G1KlassScanClosure;
  59 class G1ScanHeapEvacClosure;
  60 class ObjectClosure;
  61 class SpaceClosure;
  62 class CompactibleSpaceClosure;
  63 class Space;
  64 class G1CollectorPolicy;
  65 class GenRemSet;
  66 class G1RemSet;
  67 class HeapRegionRemSetIterator;
  68 class ConcurrentMark;
  69 class ConcurrentMarkThread;
  70 class ConcurrentG1Refine;
  71 class ConcurrentGCTimer;
  72 class GenerationCounters;
  73 class STWGCTimer;
  74 class G1NewTracer;
  75 class G1OldTracer;
  76 class EvacuationFailedInfo;
  77 class nmethod;
  78 class Ticks;
  79 
  80 typedef OverflowTaskQueue<StarTask, mtGC>         RefToScanQueue;
  81 typedef GenericTaskQueueSet<RefToScanQueue, mtGC> RefToScanQueueSet;
  82 
  83 typedef int RegionIdx_t;   // needs to hold [ 0..max_regions() )
  84 typedef int CardIdx_t;     // needs to hold [ 0..CardsPerRegion )
  85 
  86 class YoungList : public CHeapObj<mtGC> {
  87 private:
  88   G1CollectedHeap* _g1h;
  89 
  90   HeapRegion* _head;
  91 
  92   HeapRegion* _survivor_head;
  93   HeapRegion* _survivor_tail;
  94 
  95   HeapRegion* _curr;
  96 
  97   uint        _length;
  98   uint        _survivor_length;


1065   // continues humongous regions too.
1066   void reset_gc_time_stamps(HeapRegion* hr);
1067 
1068   void iterate_dirty_card_closure(CardTableEntryClosure* cl,
1069                                   DirtyCardQueue* into_cset_dcq,
1070                                   bool concurrent, uint worker_i);
1071 
1072   // The shared block offset table array.
1073   G1BlockOffsetSharedArray* bot_shared() const { return _bot_shared; }
1074 
1075   // Reference Processing accessors
1076 
1077   // The STW reference processor....
1078   ReferenceProcessor* ref_processor_stw() const { return _ref_processor_stw; }
1079 
1080   // The Concurrent Marking reference processor...
1081   ReferenceProcessor* ref_processor_cm() const { return _ref_processor_cm; }
1082 
1083   ConcurrentGCTimer* gc_timer_cm() const { return _gc_timer_cm; }
1084   G1OldTracer* gc_tracer_cm() const { return _gc_tracer_cm; }

1085 
1086   virtual size_t capacity() const;
1087   virtual size_t used() const;
1088   // This should be called when we're not holding the heap lock. The
1089   // result might be a bit inaccurate.
1090   size_t used_unlocked() const;
1091   size_t recalculate_used() const;
1092 
1093   // These virtual functions do the actual allocation.
1094   // Some heaps may offer a contiguous region for shared non-blocking
1095   // allocation, via inlined code (by exporting the address of the top and
1096   // end fields defining the extent of the contiguous allocation region.)
1097   // But G1CollectedHeap doesn't yet support this.
1098 
1099   virtual bool is_maximal_no_gc() const {
1100     return _hrm.available() == 0;
1101   }
1102 
1103   // The current number of regions in the heap.
1104   uint num_regions() const { return _hrm.length(); }


   1   /*
   2  * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  58 class G1KlassScanClosure;
  59 class G1ScanHeapEvacClosure;
  60 class ObjectClosure;
  61 class SpaceClosure;
  62 class CompactibleSpaceClosure;
  63 class Space;
  64 class G1CollectorPolicy;
  65 class GenRemSet;
  66 class G1RemSet;
  67 class HeapRegionRemSetIterator;
  68 class ConcurrentMark;
  69 class ConcurrentMarkThread;
  70 class ConcurrentG1Refine;
  71 class ConcurrentGCTimer;
  72 class GenerationCounters;
  73 class STWGCTimer;
  74 class G1NewTracer;
  75 class G1OldTracer;
  76 class EvacuationFailedInfo;
  77 class nmethod;

  78 
  79 typedef OverflowTaskQueue<StarTask, mtGC>         RefToScanQueue;
  80 typedef GenericTaskQueueSet<RefToScanQueue, mtGC> RefToScanQueueSet;
  81 
  82 typedef int RegionIdx_t;   // needs to hold [ 0..max_regions() )
  83 typedef int CardIdx_t;     // needs to hold [ 0..CardsPerRegion )
  84 
  85 class YoungList : public CHeapObj<mtGC> {
  86 private:
  87   G1CollectedHeap* _g1h;
  88 
  89   HeapRegion* _head;
  90 
  91   HeapRegion* _survivor_head;
  92   HeapRegion* _survivor_tail;
  93 
  94   HeapRegion* _curr;
  95 
  96   uint        _length;
  97   uint        _survivor_length;


1064   // continues humongous regions too.
1065   void reset_gc_time_stamps(HeapRegion* hr);
1066 
1067   void iterate_dirty_card_closure(CardTableEntryClosure* cl,
1068                                   DirtyCardQueue* into_cset_dcq,
1069                                   bool concurrent, uint worker_i);
1070 
1071   // The shared block offset table array.
1072   G1BlockOffsetSharedArray* bot_shared() const { return _bot_shared; }
1073 
1074   // Reference Processing accessors
1075 
1076   // The STW reference processor....
1077   ReferenceProcessor* ref_processor_stw() const { return _ref_processor_stw; }
1078 
1079   // The Concurrent Marking reference processor...
1080   ReferenceProcessor* ref_processor_cm() const { return _ref_processor_cm; }
1081 
1082   ConcurrentGCTimer* gc_timer_cm() const { return _gc_timer_cm; }
1083   G1OldTracer* gc_tracer_cm() const { return _gc_tracer_cm; }
1084   G1NewTracer* gc_tracer_stw() const { return _gc_tracer_stw; }
1085 
1086   virtual size_t capacity() const;
1087   virtual size_t used() const;
1088   // This should be called when we're not holding the heap lock. The
1089   // result might be a bit inaccurate.
1090   size_t used_unlocked() const;
1091   size_t recalculate_used() const;
1092 
1093   // These virtual functions do the actual allocation.
1094   // Some heaps may offer a contiguous region for shared non-blocking
1095   // allocation, via inlined code (by exporting the address of the top and
1096   // end fields defining the extent of the contiguous allocation region.)
1097   // But G1CollectedHeap doesn't yet support this.
1098 
1099   virtual bool is_maximal_no_gc() const {
1100     return _hrm.available() == 0;
1101   }
1102 
1103   // The current number of regions in the heap.
1104   uint num_regions() const { return _hrm.length(); }


< prev index next >