diff src/share/vm/classfile/protectionDomainCache.cpp @ 13438:a77c680f1535

8184994: Add Dictionary size logging and jcmd Summary: added dcmd for printing system dictionary like the stringtable and symboltable and making print functions go to outputstream rather than tty Reviewed-by: shade, hseigel
author coleenp
date Wed, 02 Aug 2017 10:52:50 -0400
parents 46bb2774fc88
children 12817e44b856
line wrap: on
line diff
--- a/src/share/vm/classfile/protectionDomainCache.cpp	Wed Aug 02 08:19:09 2017 -0400
+++ b/src/share/vm/classfile/protectionDomainCache.cpp	Wed Aug 02 10:52:50 2017 -0400
@@ -80,25 +80,18 @@
   }
 }
 
-#ifndef PRODUCT
-void ProtectionDomainCacheTable::print() {
-  tty->print_cr("Protection domain cache table (table_size=%d, classes=%d)",
-                table_size(), number_of_entries());
+void ProtectionDomainCacheTable::print_on(outputStream* st) const {
+  st->print_cr("Protection domain cache table (table_size=%d, classes=%d)",
+               table_size(), number_of_entries());
   for (int index = 0; index < table_size(); index++) {
     for (ProtectionDomainCacheEntry* probe = bucket(index);
                                      probe != NULL;
                                      probe = probe->next()) {
-      tty->print("%4d: ", index);
-      probe->print();
+      st->print_cr("%4d: protection_domain: " PTR_FORMAT, index, p2i(probe->literal()));
     }
   }
 }
 
-void ProtectionDomainCacheEntry::print() {
-  tty->print_cr("protection_domain: " PTR_FORMAT, p2i(literal()));
-}
-#endif
-
 void ProtectionDomainCacheTable::verify() {
   verify_table<ProtectionDomainCacheEntry>("Protection Domain Table");
 }