540 }
541
542 uint ProtectionDomainCacheTable::bucket_size() {
543 return sizeof(ProtectionDomainCacheEntry);
544 }
545
546 #ifndef PRODUCT
547 void ProtectionDomainCacheTable::print() {
548 tty->print_cr("Protection domain cache table (table_size=%d, classes=%d)",
549 table_size(), number_of_entries());
550 for (int index = 0; index < table_size(); index++) {
551 for (ProtectionDomainCacheEntry* probe = bucket(index);
552 probe != NULL;
553 probe = probe->next()) {
554 probe->print();
555 }
556 }
557 }
558
559 void ProtectionDomainCacheEntry::print() {
560 tty->print_cr("entry "PTR_FORMAT" value "PTR_FORMAT" strongly_reachable %d next "PTR_FORMAT,
561 this, (void*)literal(), _strongly_reachable, next());
562 }
563 #endif
564
565 void ProtectionDomainCacheTable::verify() {
566 int element_count = 0;
567 for (int index = 0; index < table_size(); index++) {
568 for (ProtectionDomainCacheEntry* probe = bucket(index);
569 probe != NULL;
570 probe = probe->next()) {
571 probe->verify();
572 element_count++;
573 }
574 }
575 guarantee(number_of_entries() == element_count,
576 "Verify of protection domain cache table failed");
577 debug_only(verify_lookup_length((double)number_of_entries() / table_size()));
578 }
579
580 void ProtectionDomainCacheEntry::verify() {
|
540 }
541
542 uint ProtectionDomainCacheTable::bucket_size() {
543 return sizeof(ProtectionDomainCacheEntry);
544 }
545
546 #ifndef PRODUCT
547 void ProtectionDomainCacheTable::print() {
548 tty->print_cr("Protection domain cache table (table_size=%d, classes=%d)",
549 table_size(), number_of_entries());
550 for (int index = 0; index < table_size(); index++) {
551 for (ProtectionDomainCacheEntry* probe = bucket(index);
552 probe != NULL;
553 probe = probe->next()) {
554 probe->print();
555 }
556 }
557 }
558
559 void ProtectionDomainCacheEntry::print() {
560 tty->print_cr("entry " PTR_FORMAT " value " PTR_FORMAT " strongly_reachable %d next " PTR_FORMAT,
561 this, (void*)literal(), _strongly_reachable, next());
562 }
563 #endif
564
565 void ProtectionDomainCacheTable::verify() {
566 int element_count = 0;
567 for (int index = 0; index < table_size(); index++) {
568 for (ProtectionDomainCacheEntry* probe = bucket(index);
569 probe != NULL;
570 probe = probe->next()) {
571 probe->verify();
572 element_count++;
573 }
574 }
575 guarantee(number_of_entries() == element_count,
576 "Verify of protection domain cache table failed");
577 debug_only(verify_lookup_length((double)number_of_entries() / table_size()));
578 }
579
580 void ProtectionDomainCacheEntry::verify() {
|