< prev index next >

src/hotspot/share/gc/g1/g1ParScanThreadState.cpp

Print this page
rev 53774 : imported patch 8219096-merge-termination-stats-logging


  89 // Pass locally gathered statistics to global state.
  90 void G1ParScanThreadState::flush(size_t* surviving_young_words) {
  91   _dcq.flush();
  92   // Update allocation statistics.
  93   _plab_allocator->flush_and_retire_stats();
  94   _g1h->g1_policy()->record_age_table(&_age_table);
  95 
  96   uint length = _g1h->collection_set()->young_region_length();
  97   for (uint region_index = 0; region_index < length; region_index++) {
  98     surviving_young_words[region_index] += _surviving_young_words[region_index];
  99   }
 100 }
 101 
 102 G1ParScanThreadState::~G1ParScanThreadState() {
 103   delete _plab_allocator;
 104   delete _closures;
 105   FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base);
 106   delete[] _oops_into_optional_regions;
 107 }
 108 
 109 void G1ParScanThreadState::waste(size_t& wasted, size_t& undo_wasted) {
 110   _plab_allocator->waste(wasted, undo_wasted);




 111 }
 112 
 113 #ifdef ASSERT
 114 bool G1ParScanThreadState::verify_ref(narrowOop* ref) const {
 115   assert(ref != NULL, "invariant");
 116   assert(UseCompressedOops, "sanity");
 117   assert(!has_partial_array_mask(ref), "ref=" PTR_FORMAT, p2i(ref));
 118   oop p = RawAccess<>::oop_load(ref);
 119   assert(_g1h->is_in_g1_reserved(p),
 120          "ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p));
 121   return true;
 122 }
 123 
 124 bool G1ParScanThreadState::verify_ref(oop* ref) const {
 125   assert(ref != NULL, "invariant");
 126   if (has_partial_array_mask(ref)) {
 127     // Must be in the collection set--it's already been copied.
 128     oop p = clear_partial_array_mask(ref);
 129     assert(_g1h->is_in_cset(p),
 130            "ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p));




  89 // Pass locally gathered statistics to global state.
  90 void G1ParScanThreadState::flush(size_t* surviving_young_words) {
  91   _dcq.flush();
  92   // Update allocation statistics.
  93   _plab_allocator->flush_and_retire_stats();
  94   _g1h->g1_policy()->record_age_table(&_age_table);
  95 
  96   uint length = _g1h->collection_set()->young_region_length();
  97   for (uint region_index = 0; region_index < length; region_index++) {
  98     surviving_young_words[region_index] += _surviving_young_words[region_index];
  99   }
 100 }
 101 
 102 G1ParScanThreadState::~G1ParScanThreadState() {
 103   delete _plab_allocator;
 104   delete _closures;
 105   FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base);
 106   delete[] _oops_into_optional_regions;
 107 }
 108 
 109 size_t G1ParScanThreadState::lab_waste() const {
 110   return _plab_allocator->waste() * HeapWordSize;
 111 }
 112 
 113 size_t G1ParScanThreadState::lab_undo_waste() const {
 114   return _plab_allocator->undo_waste() * HeapWordSize;
 115 }
 116 
 117 #ifdef ASSERT
 118 bool G1ParScanThreadState::verify_ref(narrowOop* ref) const {
 119   assert(ref != NULL, "invariant");
 120   assert(UseCompressedOops, "sanity");
 121   assert(!has_partial_array_mask(ref), "ref=" PTR_FORMAT, p2i(ref));
 122   oop p = RawAccess<>::oop_load(ref);
 123   assert(_g1h->is_in_g1_reserved(p),
 124          "ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p));
 125   return true;
 126 }
 127 
 128 bool G1ParScanThreadState::verify_ref(oop* ref) const {
 129   assert(ref != NULL, "invariant");
 130   if (has_partial_array_mask(ref)) {
 131     // Must be in the collection set--it's already been copied.
 132     oop p = clear_partial_array_mask(ref);
 133     assert(_g1h->is_in_cset(p),
 134            "ref=" PTR_FORMAT " p=" PTR_FORMAT, p2i(ref), p2i(p));


< prev index next >