1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Thu May 15 18:23:26 2014 -0400 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Thu May 22 15:52:41 2014 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -427,7 +427,7 @@ 1.11 void LinearAllocBlock::print_on(outputStream* st) const { 1.12 st->print_cr(" LinearAllocBlock: ptr = " PTR_FORMAT ", word_size = " SIZE_FORMAT 1.13 ", refillsize = " SIZE_FORMAT ", allocation_size_limit = " SIZE_FORMAT, 1.14 - _ptr, _word_size, _refillSize, _allocation_size_limit); 1.15 + p2i(_ptr), _word_size, _refillSize, _allocation_size_limit); 1.16 } 1.17 1.18 void CompactibleFreeListSpace::print_on(outputStream* st) const { 1.19 @@ -458,7 +458,7 @@ 1.20 for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL; 1.21 fc = fc->next()) { 1.22 gclog_or_tty->print_cr("\t[" PTR_FORMAT "," PTR_FORMAT ") %s", 1.23 - fc, (HeapWord*)fc + i, 1.24 + p2i(fc), p2i((HeapWord*)fc + i), 1.25 fc->cantCoalesce() ? "\t CC" : ""); 1.26 } 1.27 } 1.28 @@ -502,7 +502,7 @@ 1.29 if (_sp->block_is_obj(addr)) { 1.30 const bool dead = _post_remark && !_live_bit_map->isMarked(addr); 1.31 _st->print_cr(PTR_FORMAT ": %s object of size " SIZE_FORMAT "%s", 1.32 - addr, 1.33 + p2i(addr), 1.34 dead ? "dead" : "live", 1.35 sz, 1.36 (!dead && CMSPrintObjectsInDump) ? ":" : "."); 1.37 @@ -512,7 +512,7 @@ 1.38 } 1.39 } else { // free block 1.40 _st->print_cr(PTR_FORMAT ": free block of size " SIZE_FORMAT "%s", 1.41 - addr, sz, CMSPrintChunksInDump ? ":" : "."); 1.42 + p2i(addr), sz, CMSPrintChunksInDump ? ":" : "."); 1.43 if (CMSPrintChunksInDump) { 1.44 ((FreeChunk*)addr)->print_on(_st); 1.45 _st->print_cr("--------------------------------------"); 1.46 @@ -564,11 +564,11 @@ 1.47 "--------------------------------\n"); 1.48 size_t total_size = totalSizeInIndexedFreeLists(); 1.49 size_t free_blocks = numFreeBlocksInIndexedFreeLists(); 1.50 - gclog_or_tty->print("Total Free Space: %d\n", total_size); 1.51 - gclog_or_tty->print("Max Chunk Size: %d\n", maxChunkSizeInIndexedFreeLists()); 1.52 - gclog_or_tty->print("Number of Blocks: %d\n", free_blocks); 1.53 + gclog_or_tty->print("Total Free Space: " SIZE_FORMAT "\n", total_size); 1.54 + gclog_or_tty->print("Max Chunk Size: " SIZE_FORMAT "\n", maxChunkSizeInIndexedFreeLists()); 1.55 + gclog_or_tty->print("Number of Blocks: " SIZE_FORMAT "\n", free_blocks); 1.56 if (free_blocks != 0) { 1.57 - gclog_or_tty->print("Av. Block Size: %d\n", total_size/free_blocks); 1.58 + gclog_or_tty->print("Av. Block Size: " SIZE_FORMAT "\n", total_size/free_blocks); 1.59 } 1.60 } 1.61 1.62 @@ -2011,7 +2011,7 @@ 1.63 assert(ur.contains(urasm), 1.64 err_msg(" Error at save_marks(): [" PTR_FORMAT "," PTR_FORMAT ")" 1.65 " should contain [" PTR_FORMAT "," PTR_FORMAT ")", 1.66 - ur.start(), ur.end(), urasm.start(), urasm.end())); 1.67 + p2i(ur.start()), p2i(ur.end()), p2i(urasm.start()), p2i(urasm.end()))); 1.68 #endif 1.69 // inform allocator that promotions should be tracked. 1.70 assert(_promoInfo.noPromotions(), "_promoInfo inconsistency"); 1.71 @@ -2181,7 +2181,7 @@ 1.72 for (i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) { 1.73 AdaptiveFreeList<FreeChunk>* fl = &_indexedFreeList[i]; 1.74 if (PrintFLSStatistics > 1) { 1.75 - gclog_or_tty->print("size[%d] : ", i); 1.76 + gclog_or_tty->print("size[" SIZE_FORMAT "] : ", i); 1.77 } 1.78 fl->compute_desired(inter_sweep_current, inter_sweep_estimate, intra_sweep_estimate); 1.79 fl->set_coal_desired((ssize_t)((double)fl->desired() * CMSSmallCoalSurplusPercent)); 1.80 @@ -2234,7 +2234,7 @@ 1.81 if (PrintFLSStatistics > 0) { 1.82 HeapWord* largestAddr = (HeapWord*) dictionary()->find_largest_dict(); 1.83 gclog_or_tty->print_cr("CMS: Large block " PTR_FORMAT, 1.84 - largestAddr); 1.85 + p2i(largestAddr)); 1.86 } 1.87 setFLSurplus(); 1.88 setFLHints(); 1.89 @@ -2383,8 +2383,8 @@ 1.90 gclog_or_tty->print_cr( 1.91 " Current: addr = " PTR_FORMAT ", size = " SIZE_FORMAT ", obj = %s, live = %s \n" 1.92 " Previous: addr = " PTR_FORMAT ", size = " SIZE_FORMAT ", obj = %s, live = %s \n", 1.93 - addr, res, was_obj ?"true":"false", was_live ?"true":"false", 1.94 - _last_addr, _last_size, _last_was_obj?"true":"false", _last_was_live?"true":"false"); 1.95 + p2i(addr), res, was_obj ?"true":"false", was_live ?"true":"false", 1.96 + p2i(_last_addr), _last_size, _last_was_obj?"true":"false", _last_was_live?"true":"false"); 1.97 _sp->print_on(gclog_or_tty); 1.98 guarantee(false, "Seppuku!"); 1.99 } 1.100 @@ -2712,7 +2712,7 @@ 1.101 _global_num_workers[i] = 0; 1.102 _global_num_blocks[i] = 0; 1.103 if (PrintOldPLAB) { 1.104 - gclog_or_tty->print_cr("[%d]: %d", i, (size_t)_blocks_to_claim[i].average()); 1.105 + gclog_or_tty->print_cr("[" SIZE_FORMAT "]: " SIZE_FORMAT, i, (size_t)_blocks_to_claim[i].average()); 1.106 } 1.107 } 1.108 } 1.109 @@ -2751,7 +2751,7 @@ 1.110 } 1.111 } 1.112 if (PrintOldPLAB) { 1.113 - gclog_or_tty->print_cr("%d[%d]: %d/%d/%d", 1.114 + gclog_or_tty->print_cr("%d[" SIZE_FORMAT "]: " SIZE_FORMAT "/" SIZE_FORMAT "/" SIZE_FORMAT, 1.115 tid, i, num_retire, _num_blocks[i], (size_t)_blocks_to_claim[i].average()); 1.116 } 1.117 // Reset stats for next round