285 guarantee(size() == curFC->size(), "Chunk is in wrong list."); 286 if (fc == curFC) { 287 return true; 288 } 289 curFC = curFC->next(); 290 } 291 return false; 292 } 293 294 #ifndef PRODUCT 295 void FreeList::assert_proper_lock_protection_work() const { 296 #ifdef ASSERT 297 if (_protecting_lock != NULL && 298 SharedHeap::heap()->n_par_threads() > 0) { 299 // Should become an assert. 300 guarantee(_protecting_lock->owned_by_self(), "FreeList RACE DETECTED"); 301 } 302 #endif 303 } 304 #endif | 285 guarantee(size() == curFC->size(), "Chunk is in wrong list."); 286 if (fc == curFC) { 287 return true; 288 } 289 curFC = curFC->next(); 290 } 291 return false; 292 } 293 294 #ifndef PRODUCT 295 void FreeList::assert_proper_lock_protection_work() const { 296 #ifdef ASSERT 297 if (_protecting_lock != NULL && 298 SharedHeap::heap()->n_par_threads() > 0) { 299 // Should become an assert. 300 guarantee(_protecting_lock->owned_by_self(), "FreeList RACE DETECTED"); 301 } 302 #endif 303 } 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 } |