8142472: Remove debugging code guarded by CMSPrintPromoBlockInfo
authorbrutisso
Thu, 12 Nov 2015 09:19:44 +0100
changeset 34129 41cd6f08f3e8
parent 34128 86d333c6f003
child 34130 1618c0dd6712
8142472: Remove debugging code guarded by CMSPrintPromoBlockInfo Reviewed-by: david, ehelin
hotspot/src/share/vm/gc/cms/promotionInfo.cpp
hotspot/src/share/vm/gc/cms/promotionInfo.hpp
--- a/hotspot/src/share/vm/gc/cms/promotionInfo.cpp	Wed Nov 11 23:51:57 2015 -0500
+++ b/hotspot/src/share/vm/gc/cms/promotionInfo.cpp	Thu Nov 12 09:19:44 2015 +0100
@@ -233,41 +233,11 @@
   _tracking = true;
 }
 
-#define CMSPrintPromoBlockInfo 1
-
 void PromotionInfo::stopTrackingPromotions(uint worker_id) {
   assert(_spoolHead == _spoolTail && _firstIndex == _nextIndex,
          "spooling inconsistency?");
   _firstIndex = _nextIndex = 1;
   _tracking = false;
-  if (CMSPrintPromoBlockInfo > 1) {
-    print_statistics(worker_id);
-  }
-}
-
-void PromotionInfo::print_statistics(uint worker_id) const {
-  assert(_spoolHead == _spoolTail && _firstIndex == _nextIndex,
-         "Else will undercount");
-  assert(CMSPrintPromoBlockInfo > 0, "Else unnecessary call");
-  // Count the number of blocks and slots in the free pool
-  size_t slots  = 0;
-  size_t blocks = 0;
-  for (SpoolBlock* cur_spool = _spareSpool;
-       cur_spool != NULL;
-       cur_spool = cur_spool->nextSpoolBlock) {
-    // the first entry is just a self-pointer; indices 1 through
-    // bufferSize - 1 are occupied (thus, bufferSize - 1 slots).
-    assert((void*)cur_spool->displacedHdr == (void*)&cur_spool->displacedHdr,
-           "first entry of displacedHdr should be self-referential");
-    slots += cur_spool->bufferSize - 1;
-    blocks++;
-  }
-  if (_spoolHead != NULL) {
-    slots += _spoolHead->bufferSize - 1;
-    blocks++;
-  }
-  gclog_or_tty->print_cr(" [worker %d] promo_blocks = " SIZE_FORMAT ", promo_slots = " SIZE_FORMAT,
-                         worker_id, blocks, slots);
 }
 
 // When _spoolTail is not NULL, then the slot <_spoolTail, _nextIndex>
--- a/hotspot/src/share/vm/gc/cms/promotionInfo.hpp	Wed Nov 11 23:51:57 2015 -0500
+++ b/hotspot/src/share/vm/gc/cms/promotionInfo.hpp	Thu Nov 12 09:19:44 2015 +0100
@@ -207,7 +207,6 @@
   }
 
   void print_on(outputStream* st) const;
-  void print_statistics(uint worker_id) const;
 };