< prev index next >

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

Print this page
rev 8050 : imported patch fixHeapRegionHpp


   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 #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();
  50   uint array_length = PADDING_ELEM_NUM +




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


< prev index next >