Print this page
rev 6912 : 8065227: Report allocation context stats at end of cleanup
Summary: Moved allocation context update from remark to the cleanup phase.
Reviewed-by: mgerdin, jmasa

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
          +++ new/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
↓ open down ↓ 2167 lines elided ↑ open up ↑
2168 2168  
2169 2169    // Clean out dead classes and update Metaspace sizes.
2170 2170    if (ClassUnloadingWithConcurrentMark) {
2171 2171      ClassLoaderDataGraph::purge();
2172 2172    }
2173 2173    MetaspaceGC::compute_new_size();
2174 2174  
2175 2175    // We reclaimed old regions so we should calculate the sizes to make
2176 2176    // sure we update the old gen/space data.
2177 2177    g1h->g1mm()->update_sizes();
     2178 +  g1h->allocation_context_stats().update_after_mark();
2178 2179  
2179 2180    g1h->trace_heap_after_concurrent_cycle();
2180 2181  }
2181 2182  
2182 2183  void ConcurrentMark::completeCleanup() {
2183 2184    if (has_aborted()) return;
2184 2185  
2185 2186    G1CollectedHeap* g1h = G1CollectedHeap::heap();
2186 2187  
2187 2188    _cleanup_list.verify_optional();
↓ open down ↓ 1151 lines elided ↑ open up ↑
3339 3340      _g1h->set_par_threads(n_workers);
3340 3341      _g1h->workers()->run_task(&g1_par_agg_task);
3341 3342      _g1h->set_par_threads(0);
3342 3343  
3343 3344      assert(_g1h->check_heap_region_claim_values(HeapRegion::AggregateCountClaimValue),
3344 3345             "sanity check");
3345 3346      _g1h->reset_heap_region_claim_values();
3346 3347    } else {
3347 3348      g1_par_agg_task.work(0);
3348 3349    }
3349      -  _g1h->allocation_context_stats().update_at_remark();
3350 3350  }
3351 3351  
3352 3352  // Clear the per-worker arrays used to store the per-region counting data
3353 3353  void ConcurrentMark::clear_all_count_data() {
3354 3354    // Clear the global card bitmap - it will be filled during
3355 3355    // liveness count aggregation (during remark) and the
3356 3356    // final counting task.
3357 3357    _card_bm.clear();
3358 3358  
3359 3359    // Clear the global region bitmap - it will be filled as part
↓ open down ↓ 1470 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX