1.1 --- a/src/share/vm/opto/indexSet.cpp Mon Feb 07 10:25:39 2011 -0800 1.2 +++ b/src/share/vm/opto/indexSet.cpp Mon Feb 07 10:34:39 2011 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1998, 2011, 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 @@ -39,12 +39,12 @@ 1.11 1.12 #ifdef ASSERT 1.13 // Initialize statistics counters 1.14 -uint IndexSet::_alloc_new = 0; 1.15 -uint IndexSet::_alloc_total = 0; 1.16 +julong IndexSet::_alloc_new = 0; 1.17 +julong IndexSet::_alloc_total = 0; 1.18 1.19 -long IndexSet::_total_bits = 0; 1.20 -long IndexSet::_total_used_blocks = 0; 1.21 -long IndexSet::_total_unused_blocks = 0; 1.22 +julong IndexSet::_total_bits = 0; 1.23 +julong IndexSet::_total_used_blocks = 0; 1.24 +julong IndexSet::_total_unused_blocks = 0; 1.25 1.26 // Per set, or all sets operation tracing 1.27 int IndexSet::_serial_count = 1; 1.28 @@ -141,7 +141,7 @@ 1.29 1.30 #ifdef ASSERT 1.31 if (CollectIndexSetStatistics) { 1.32 - _alloc_new += bitblock_alloc_chunk_size; 1.33 + inc_stat_counter(&_alloc_new, bitblock_alloc_chunk_size); 1.34 } 1.35 #endif 1.36 } 1.37 @@ -154,7 +154,7 @@ 1.38 IndexSet::BitBlock *IndexSet::alloc_block() { 1.39 #ifdef ASSERT 1.40 if (CollectIndexSetStatistics) { 1.41 - _alloc_total++; 1.42 + inc_stat_counter(&_alloc_total, 1); 1.43 } 1.44 #endif 1.45 Compile *compile = Compile::current(); 1.46 @@ -391,13 +391,13 @@ 1.47 // Update block/bit counts to reflect that this set has been iterated over. 1.48 1.49 void IndexSet::tally_iteration_statistics() const { 1.50 - _total_bits += count(); 1.51 + inc_stat_counter(&_total_bits, count()); 1.52 1.53 for (uint i = 0; i < _max_blocks; i++) { 1.54 if (_blocks[i] != &_empty_block) { 1.55 - _total_used_blocks++; 1.56 + inc_stat_counter(&_total_used_blocks, 1); 1.57 } else { 1.58 - _total_unused_blocks++; 1.59 + inc_stat_counter(&_total_unused_blocks, 1); 1.60 } 1.61 } 1.62 } 1.63 @@ -406,17 +406,17 @@ 1.64 // Print statistics about IndexSet usage. 1.65 1.66 void IndexSet::print_statistics() { 1.67 - long total_blocks = _total_used_blocks + _total_unused_blocks; 1.68 + julong total_blocks = _total_used_blocks + _total_unused_blocks; 1.69 tty->print_cr ("Accumulated IndexSet usage statistics:"); 1.70 tty->print_cr ("--------------------------------------"); 1.71 tty->print_cr (" Iteration:"); 1.72 - tty->print_cr (" blocks visited: %d", total_blocks); 1.73 - tty->print_cr (" blocks empty: %4.2f%%", 100.0*_total_unused_blocks/total_blocks); 1.74 - tty->print_cr (" bit density (bits/used blocks): %4.2f%%", (double)_total_bits/_total_used_blocks); 1.75 - tty->print_cr (" bit density (bits/all blocks): %4.2f%%", (double)_total_bits/total_blocks); 1.76 + tty->print_cr (" blocks visited: " UINT64_FORMAT, total_blocks); 1.77 + tty->print_cr (" blocks empty: %4.2f%%", 100.0*(double)_total_unused_blocks/total_blocks); 1.78 + tty->print_cr (" bit density (bits/used blocks): %4.2f", (double)_total_bits/_total_used_blocks); 1.79 + tty->print_cr (" bit density (bits/all blocks): %4.2f", (double)_total_bits/total_blocks); 1.80 tty->print_cr (" Allocation:"); 1.81 - tty->print_cr (" blocks allocated: %d", _alloc_new); 1.82 - tty->print_cr (" blocks used/reused: %d", _alloc_total); 1.83 + tty->print_cr (" blocks allocated: " UINT64_FORMAT, _alloc_new); 1.84 + tty->print_cr (" blocks used/reused: " UINT64_FORMAT, _alloc_total); 1.85 } 1.86 1.87 //---------------------------- IndexSet::verify() -----------------------------