< prev index next >

src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp

Print this page




  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 #include "precompiled.hpp"
  26 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
  27 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
  28 #include "gc_implementation/g1/g1ParScanThreadState.inline.hpp"
  29 #include "oops/oop.inline.hpp"
  30 #include "oops/oop.pcgc.inline.hpp"
  31 #include "runtime/prefetch.inline.hpp"
  32 
  33 G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp)
  34   : _g1h(g1h),
  35     _refs(g1h->task_queue(queue_num)),
  36     _dcq(&g1h->dirty_card_queue_set()),
  37     _ct_bs(g1h->g1_barrier_set()),
  38     _g1_rem(g1h->g1_rem_set()),
  39     _hash_seed(17), _queue_num(queue_num),
  40     _term_attempts(0),
  41     _tenuring_threshold(g1h->g1_policy()->tenuring_threshold()),
  42     _age_table(false), _scanner(g1h, rp),
  43     _strong_roots_time(0), _term_time(0) {
  44   _scanner.set_par_scan_thread_state(this);
  45   // we allocate G1YoungSurvRateNumRegions plus one entries, since
  46   // we "sacrifice" entry 0 to keep track of surviving bytes for
  47   // non-young regions (where the age is -1)
  48   // We also add a few elements at the beginning and at the end in
  49   // an attempt to eliminate cache contention
  50   uint real_length = 1 + _g1h->g1_policy()->young_cset_region_length();




  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 #include "precompiled.hpp"
  26 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
  27 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
  28 #include "gc_implementation/g1/g1ParScanThreadState.inline.hpp"
  29 #include "oops/oop.inline.hpp"

  30 #include "runtime/prefetch.inline.hpp"
  31 
  32 G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp)
  33   : _g1h(g1h),
  34     _refs(g1h->task_queue(queue_num)),
  35     _dcq(&g1h->dirty_card_queue_set()),
  36     _ct_bs(g1h->g1_barrier_set()),
  37     _g1_rem(g1h->g1_rem_set()),
  38     _hash_seed(17), _queue_num(queue_num),
  39     _term_attempts(0),
  40     _tenuring_threshold(g1h->g1_policy()->tenuring_threshold()),
  41     _age_table(false), _scanner(g1h, rp),
  42     _strong_roots_time(0), _term_time(0) {
  43   _scanner.set_par_scan_thread_state(this);
  44   // we allocate G1YoungSurvRateNumRegions plus one entries, since
  45   // we "sacrifice" entry 0 to keep track of surviving bytes for
  46   // non-young regions (where the age is -1)
  47   // We also add a few elements at the beginning and at the end in
  48   // an attempt to eliminate cache contention
  49   uint real_length = 1 + _g1h->g1_policy()->young_cset_region_length();


< prev index next >