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

Print this page




   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  *
  23  */
  24 











  25 // A "G1CollectedHeap" is an implementation of a java heap for HotSpot.
  26 // It uses the "Garbage First" heap organization and algorithm, which
  27 // may combine concurrent marking with parallel, incremental compaction of
  28 // heap subsets that will yield large amounts of garbage.
  29 
  30 class HeapRegion;
  31 class HeapRegionSeq;
  32 class PermanentGenerationSpec;
  33 class GenerationSpec;
  34 class OopsInHeapRegionClosure;
  35 class G1ScanHeapEvacClosure;
  36 class ObjectClosure;
  37 class SpaceClosure;
  38 class CompactibleSpaceClosure;
  39 class Space;
  40 class G1CollectorPolicy;
  41 class GenRemSet;
  42 class G1RemSet;
  43 class HeapRegionRemSetIterator;
  44 class ConcurrentMark;


1781       // "obj_to_scan" is definitely in the heap, and is not in a
1782       // humongous region.
1783       HeapRegion* r = _g1h->heap_region_containing_raw(ref_to_scan);
1784       _evac_cl->set_region(r);
1785       _evac_cl->do_oop_nv(ref_to_scan);
1786     }
1787   }
1788 
1789   void deal_with_reference(StarTask ref) {
1790     assert(verify_task(ref), "sanity");
1791     if (ref.is_narrow()) {
1792       deal_with_reference((narrowOop*)ref);
1793     } else {
1794       deal_with_reference((oop*)ref);
1795     }
1796   }
1797 
1798 public:
1799   void trim_queue();
1800 };




   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  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_HPP
  27 
  28 #include "gc_implementation/g1/concurrentMark.hpp"
  29 #include "gc_implementation/g1/g1RemSet.hpp"
  30 #include "gc_implementation/g1/heapRegion.hpp"
  31 #include "gc_implementation/parNew/parGCAllocBuffer.hpp"
  32 #include "memory/barrierSet.hpp"
  33 #include "memory/memRegion.hpp"
  34 #include "memory/sharedHeap.hpp"
  35 
  36 // A "G1CollectedHeap" is an implementation of a java heap for HotSpot.
  37 // It uses the "Garbage First" heap organization and algorithm, which
  38 // may combine concurrent marking with parallel, incremental compaction of
  39 // heap subsets that will yield large amounts of garbage.
  40 
  41 class HeapRegion;
  42 class HeapRegionSeq;
  43 class PermanentGenerationSpec;
  44 class GenerationSpec;
  45 class OopsInHeapRegionClosure;
  46 class G1ScanHeapEvacClosure;
  47 class ObjectClosure;
  48 class SpaceClosure;
  49 class CompactibleSpaceClosure;
  50 class Space;
  51 class G1CollectorPolicy;
  52 class GenRemSet;
  53 class G1RemSet;
  54 class HeapRegionRemSetIterator;
  55 class ConcurrentMark;


1792       // "obj_to_scan" is definitely in the heap, and is not in a
1793       // humongous region.
1794       HeapRegion* r = _g1h->heap_region_containing_raw(ref_to_scan);
1795       _evac_cl->set_region(r);
1796       _evac_cl->do_oop_nv(ref_to_scan);
1797     }
1798   }
1799 
1800   void deal_with_reference(StarTask ref) {
1801     assert(verify_task(ref), "sanity");
1802     if (ref.is_narrow()) {
1803       deal_with_reference((narrowOop*)ref);
1804     } else {
1805       deal_with_reference((oop*)ref);
1806     }
1807   }
1808 
1809 public:
1810   void trim_queue();
1811 };
1812 
1813 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_HPP