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

Print this page


   1 /*
   2  * Copyright (c) 2001, 2012, 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  *


1057 
1058   // A set of cards where updates happened during the GC
1059   DirtyCardQueueSet& dirty_card_queue_set() { return _dirty_card_queue_set; }
1060 
1061   // A DirtyCardQueueSet that is used to hold cards that contain
1062   // references into the current collection set. This is used to
1063   // update the remembered sets of the regions in the collection
1064   // set in the event of an evacuation failure.
1065   DirtyCardQueueSet& into_cset_dirty_card_queue_set()
1066         { return _into_cset_dirty_card_queue_set; }
1067 
1068   // Create a G1CollectedHeap with the specified policy.
1069   // Must call the initialize method afterwards.
1070   // May not return if something goes wrong.
1071   G1CollectedHeap(G1CollectorPolicy* policy);
1072 
1073   // Initialize the G1CollectedHeap to have the initial and
1074   // maximum sizes and remembered and barrier sets
1075   // specified by the policy object.
1076   jint initialize();



1077 
1078   // Initialize weak reference processing.
1079   virtual void ref_processing_init();
1080 
1081   void set_par_threads(uint t) {
1082     SharedHeap::set_par_threads(t);
1083     // Done in SharedHeap but oddly there are
1084     // two _process_strong_tasks's in a G1CollectedHeap
1085     // so do it here too.
1086     _process_strong_tasks->set_n_threads(t);
1087   }
1088 
1089   // Set _n_par_threads according to a policy TBD.
1090   void set_par_threads();
1091 
1092   void set_n_termination(int t) {
1093     _process_strong_tasks->set_n_threads(t);
1094   }
1095 
1096   virtual CollectedHeap::Name kind() const {


   1 /*
   2  * Copyright (c) 2001, 2013, 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  *


1057 
1058   // A set of cards where updates happened during the GC
1059   DirtyCardQueueSet& dirty_card_queue_set() { return _dirty_card_queue_set; }
1060 
1061   // A DirtyCardQueueSet that is used to hold cards that contain
1062   // references into the current collection set. This is used to
1063   // update the remembered sets of the regions in the collection
1064   // set in the event of an evacuation failure.
1065   DirtyCardQueueSet& into_cset_dirty_card_queue_set()
1066         { return _into_cset_dirty_card_queue_set; }
1067 
1068   // Create a G1CollectedHeap with the specified policy.
1069   // Must call the initialize method afterwards.
1070   // May not return if something goes wrong.
1071   G1CollectedHeap(G1CollectorPolicy* policy);
1072 
1073   // Initialize the G1CollectedHeap to have the initial and
1074   // maximum sizes and remembered and barrier sets
1075   // specified by the policy object.
1076   jint initialize();
1077 
1078   // return the (conservative) maximum heap alignment for any G1 heap
1079   static size_t max_heap_alignment();
1080 
1081   // Initialize weak reference processing.
1082   virtual void ref_processing_init();
1083 
1084   void set_par_threads(uint t) {
1085     SharedHeap::set_par_threads(t);
1086     // Done in SharedHeap but oddly there are
1087     // two _process_strong_tasks's in a G1CollectedHeap
1088     // so do it here too.
1089     _process_strong_tasks->set_n_threads(t);
1090   }
1091 
1092   // Set _n_par_threads according to a policy TBD.
1093   void set_par_threads();
1094 
1095   void set_n_termination(int t) {
1096     _process_strong_tasks->set_n_threads(t);
1097   }
1098 
1099   virtual CollectedHeap::Name kind() const {