86 // This is done late during GC. This doesn't use the hash table unlink because |
86 // This is done late during GC. This doesn't use the hash table unlink because |
87 // it assumes that the literals are oops. |
87 // it assumes that the literals are oops. |
88 void SymbolTable::unlink() { |
88 void SymbolTable::unlink() { |
89 int removed = 0; |
89 int removed = 0; |
90 int total = 0; |
90 int total = 0; |
91 int memory_total = 0; |
91 size_t memory_total = 0; |
92 for (int i = 0; i < the_table()->table_size(); ++i) { |
92 for (int i = 0; i < the_table()->table_size(); ++i) { |
93 for (HashtableEntry<Symbol*>** p = the_table()->bucket_addr(i); *p != NULL; ) { |
93 for (HashtableEntry<Symbol*>** p = the_table()->bucket_addr(i); *p != NULL; ) { |
94 HashtableEntry<Symbol*>* entry = *p; |
94 HashtableEntry<Symbol*>* entry = *p; |
95 if (entry->is_shared()) { |
95 if (entry->is_shared()) { |
96 break; |
96 break; |
110 } |
110 } |
111 } |
111 } |
112 } |
112 } |
113 symbols_removed += removed; |
113 symbols_removed += removed; |
114 symbols_counted += total; |
114 symbols_counted += total; |
115 if (PrintGCDetails) { |
115 // Exclude printing for normal PrintGCDetails because people parse |
116 gclog_or_tty->print(" [Symbols=%d size=%dK] ", total, |
116 // this output. |
|
117 if (PrintGCDetails && Verbose && WizardMode) { |
|
118 gclog_or_tty->print(" [Symbols=%d size=" SIZE_FORMAT "K] ", total, |
117 (memory_total*HeapWordSize)/1024); |
119 (memory_total*HeapWordSize)/1024); |
118 } |
120 } |
119 } |
121 } |
120 |
122 |
121 |
123 |