src/hotspot/share/gc/g1/g1ParScanThreadState.cpp
changeset 53985 0da5c17f5e43
parent 53846 fe95464806a7
child 53986 9ad20fd52b19
equal deleted inserted replaced
53984:31884d19e945 53985:0da5c17f5e43
    46     _dcq(&g1h->dirty_card_queue_set()),
    46     _dcq(&g1h->dirty_card_queue_set()),
    47     _ct(g1h->card_table()),
    47     _ct(g1h->card_table()),
    48     _closures(NULL),
    48     _closures(NULL),
    49     _plab_allocator(NULL),
    49     _plab_allocator(NULL),
    50     _age_table(false),
    50     _age_table(false),
    51     _tenuring_threshold(g1h->g1_policy()->tenuring_threshold()),
    51     _tenuring_threshold(g1h->policy()->tenuring_threshold()),
    52     _scanner(g1h, this),
    52     _scanner(g1h, this),
    53     _worker_id(worker_id),
    53     _worker_id(worker_id),
    54     _stack_trim_upper_threshold(GCDrainStackTargetSize * 2 + 1),
    54     _stack_trim_upper_threshold(GCDrainStackTargetSize * 2 + 1),
    55     _stack_trim_lower_threshold(GCDrainStackTargetSize),
    55     _stack_trim_lower_threshold(GCDrainStackTargetSize),
    56     _trim_ticks(),
    56     _trim_ticks(),
    89 // Pass locally gathered statistics to global state.
    89 // Pass locally gathered statistics to global state.
    90 void G1ParScanThreadState::flush(size_t* surviving_young_words) {
    90 void G1ParScanThreadState::flush(size_t* surviving_young_words) {
    91   _dcq.flush();
    91   _dcq.flush();
    92   // Update allocation statistics.
    92   // Update allocation statistics.
    93   _plab_allocator->flush_and_retire_stats();
    93   _plab_allocator->flush_and_retire_stats();
    94   _g1h->g1_policy()->record_age_table(&_age_table);
    94   _g1h->policy()->record_age_table(&_age_table);
    95 
    95 
    96   uint length = _g1h->collection_set()->young_region_length();
    96   uint length = _g1h->collection_set()->young_region_length();
    97   for (uint region_index = 0; region_index < length; region_index++) {
    97   for (uint region_index = 0; region_index < length; region_index++) {
    98     surviving_young_words[region_index] += _surviving_young_words[region_index];
    98     surviving_young_words[region_index] += _surviving_young_words[region_index];
    99   }
    99   }
   370     if (pss == NULL) {
   370     if (pss == NULL) {
   371       continue;
   371       continue;
   372     }
   372     }
   373 
   373 
   374     size_t used_memory = pss->oops_into_optional_region(hr)->used_memory();
   374     size_t used_memory = pss->oops_into_optional_region(hr)->used_memory();
   375     _g1h->g1_policy()->phase_times()->record_or_add_thread_work_item(G1GCPhaseTimes::OptScanRS, worker_index, used_memory, G1GCPhaseTimes::OptCSetUsedMemory);
   375     _g1h->policy()->phase_times()->record_or_add_thread_work_item(G1GCPhaseTimes::OptScanRS, worker_index, used_memory, G1GCPhaseTimes::OptCSetUsedMemory);
   376   }
   376   }
   377 }
   377 }
   378 
   378 
   379 oop G1ParScanThreadState::handle_evacuation_failure_par(oop old, markOop m) {
   379 oop G1ParScanThreadState::handle_evacuation_failure_par(oop old, markOop m) {
   380   assert(_g1h->is_in_cset(old), "Object " PTR_FORMAT " should be in the CSet", p2i(old));
   380   assert(_g1h->is_in_cset(old), "Object " PTR_FORMAT " should be in the CSet", p2i(old));