Print this page


Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.cpp
          +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.cpp
↓ open down ↓ 294 lines elided ↑ open up ↑
 295  295  void FreeList::assert_proper_lock_protection_work() const {
 296  296  #ifdef ASSERT
 297  297    if (_protecting_lock != NULL &&
 298  298        SharedHeap::heap()->n_par_threads() > 0) {
 299  299      // Should become an assert.
 300  300      guarantee(_protecting_lock->owned_by_self(), "FreeList RACE DETECTED");
 301  301    }
 302  302  #endif
 303  303  }
 304  304  #endif
      305 +
      306 +// Print the "label line" for free list stats.
      307 +void FreeList::print_labels_on(outputStream* st, const char* c) {
      308 +  st->print("%16s\t", c);
      309 +  st->print("%14s\t"    "%14s\t"    "%14s\t"    "%14s\t"    "%14s\t"
      310 +            "%14s\t"    "%14s\t"    "%14s\t"    "%14s\t"    "%14s\t"    "\n",
      311 +            "bfrsurp", "surplus", "desired", "prvSwep", "bfrSwep",
      312 +            "count",   "cBirths", "cDeaths", "sBirths", "sDeaths");
      313 +}
      314 +
      315 +// Print the AllocationStats for the given free list. If the second argument
      316 +// to the call is a non-null string, it is printed in the first column;
      317 +// otherwise, if the argument is null (the default), then the size of the
      318 +// (free list) block is printed in the first column.
      319 +void FreeList::print_on(outputStream* st, const char* c) const {
      320 +  if (c != NULL) {
      321 +    st->print("%16s", c);
      322 +  } else {
      323 +    st->print(SIZE_FORMAT_W(16), size());
      324 +  }
      325 +  st->print("\t"
      326 +           SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t"
      327 +           SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\n",
      328 +           bfrSurp(),             surplus(),             desired(),             prevSweep(),           beforeSweep(),
      329 +           count(),               coalBirths(),          coalDeaths(),          splitBirths(),         splitDeaths());
      330 +}
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX