src/share/vm/classfile/symbolTable.cpp

changeset 5144
a5d6f0c3585f
parent 4987
f258c5828eb8
child 5195
95c00927be11
     1.1 --- a/src/share/vm/classfile/symbolTable.cpp	Fri May 17 17:52:07 2013 -0700
     1.2 +++ b/src/share/vm/classfile/symbolTable.cpp	Sat May 18 20:41:01 2013 -0700
     1.3 @@ -35,7 +35,6 @@
     1.4  #include "oops/oop.inline2.hpp"
     1.5  #include "runtime/mutexLocker.hpp"
     1.6  #include "utilities/hashtable.inline.hpp"
     1.7 -#include "utilities/numberSeq.hpp"
     1.8  
     1.9  // --------------------------------------------------------------------------
    1.10  
    1.11 @@ -451,21 +450,7 @@
    1.12  }
    1.13  
    1.14  void SymbolTable::dump(outputStream* st) {
    1.15 -  NumberSeq summary;
    1.16 -  for (int i = 0; i < the_table()->table_size(); ++i) {
    1.17 -    int count = 0;
    1.18 -    for (HashtableEntry<Symbol*, mtSymbol>* e = the_table()->bucket(i);
    1.19 -       e != NULL; e = e->next()) {
    1.20 -      count++;
    1.21 -    }
    1.22 -    summary.add((double)count);
    1.23 -  }
    1.24 -  st->print_cr("SymbolTable statistics:");
    1.25 -  st->print_cr("Number of buckets       : %7d", summary.num());
    1.26 -  st->print_cr("Average bucket size     : %7.0f", summary.avg());
    1.27 -  st->print_cr("Variance of bucket size : %7.0f", summary.variance());
    1.28 -  st->print_cr("Std. dev. of bucket size: %7.0f", summary.sd());
    1.29 -  st->print_cr("Maximum bucket size     : %7.0f", summary.maximum());
    1.30 +  the_table()->dump_table(st, "SymbolTable");
    1.31  }
    1.32  
    1.33  
    1.34 @@ -814,21 +799,7 @@
    1.35  }
    1.36  
    1.37  void StringTable::dump(outputStream* st) {
    1.38 -  NumberSeq summary;
    1.39 -  for (int i = 0; i < the_table()->table_size(); ++i) {
    1.40 -    HashtableEntry<oop, mtSymbol>* p = the_table()->bucket(i);
    1.41 -    int count = 0;
    1.42 -    for ( ; p != NULL; p = p->next()) {
    1.43 -      count++;
    1.44 -    }
    1.45 -    summary.add((double)count);
    1.46 -  }
    1.47 -  st->print_cr("StringTable statistics:");
    1.48 -  st->print_cr("Number of buckets       : %7d", summary.num());
    1.49 -  st->print_cr("Average bucket size     : %7.0f", summary.avg());
    1.50 -  st->print_cr("Variance of bucket size : %7.0f", summary.variance());
    1.51 -  st->print_cr("Std. dev. of bucket size: %7.0f", summary.sd());
    1.52 -  st->print_cr("Maximum bucket size     : %7.0f", summary.maximum());
    1.53 +  the_table()->dump_table(st, "StringTable");
    1.54  }
    1.55  
    1.56  

mercurial