7024584: Symbol printouts shouldnt be under PrintGCDetails
authorcoleenp
Mon, 07 Mar 2011 16:03:28 -0500
changeset 8655 fec854507832
parent 8654 dd743af4c937
child 8656 d79ff605028d
child 8657 5bb183666ecd
child 8664 3eb3d84f5e07
child 8674 303a2149d371
7024584: Symbol printouts shouldnt be under PrintGCDetails Summary: Put symbol printing under Verbose and WizardMode so you can get this information if you really want it. Reviewed-by: phh, stefank, never, dholmes, jcoomes
hotspot/src/share/vm/classfile/symbolTable.cpp
--- a/hotspot/src/share/vm/classfile/symbolTable.cpp	Mon Mar 07 09:16:08 2011 -0800
+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp	Mon Mar 07 16:03:28 2011 -0500
@@ -88,7 +88,7 @@
 void SymbolTable::unlink() {
   int removed = 0;
   int total = 0;
-  int memory_total = 0;
+  size_t memory_total = 0;
   for (int i = 0; i < the_table()->table_size(); ++i) {
     for (HashtableEntry<Symbol*>** p = the_table()->bucket_addr(i); *p != NULL; ) {
       HashtableEntry<Symbol*>* entry = *p;
@@ -112,8 +112,10 @@
   }
   symbols_removed += removed;
   symbols_counted += total;
-  if (PrintGCDetails) {
-    gclog_or_tty->print(" [Symbols=%d size=%dK] ", total,
+  // Exclude printing for normal PrintGCDetails because people parse
+  // this output.
+  if (PrintGCDetails && Verbose && WizardMode) {
+    gclog_or_tty->print(" [Symbols=%d size=" SIZE_FORMAT "K] ", total,
                         (memory_total*HeapWordSize)/1024);
   }
 }