src/hotspot/share/classfile/dictionary.cpp
author iklam
Sun, 29 Oct 2017 18:13:18 -0700
changeset 47761 1b0566927c7a
parent 47216 71c04702a3d5
child 47774 69c081ca110a
permissions -rw-r--r--
8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false Summary: Do not archive these classes Reviewed-by: jiangli, sspitsyn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
46271
979ebd346ecf 8169881: Remove implicit Handle conversions oop->Handle
coleenp
parents: 42073
diff changeset
     2
 * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5426
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5426
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5426
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#include "precompiled.hpp"
35498
392b50de06c6 8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents: 34257
diff changeset
    26
#include "classfile/classLoaderData.inline.hpp"
34257
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    27
#include "classfile/sharedClassUtil.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "classfile/dictionary.hpp"
46382
5520c435279b 8178336: Unnecessary SystemDictionary walk for Protection domain liveness
coleenp
parents: 46380
diff changeset
    29
#include "classfile/protectionDomainCache.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "classfile/systemDictionary.hpp"
34257
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    31
#include "classfile/systemDictionaryShared.hpp"
46701
f559541c0daa 8181917: Refactor UL LogStreams to avoid using resource area
stuefe
parents: 46475
diff changeset
    32
#include "logging/log.hpp"
f559541c0daa 8181917: Refactor UL LogStreams to avoid using resource area
stuefe
parents: 46475
diff changeset
    33
#include "logging/logStream.hpp"
20405
3321f6b16639 8003420: NPG: make new GC root for pd_set
tschatzl
parents: 18439
diff changeset
    34
#include "memory/iterator.hpp"
46746
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
    35
#include "memory/metaspaceClosure.hpp"
37248
11a660dbbb8e 8132524: Missing includes to resourceArea.hpp
jprovino
parents: 37242
diff changeset
    36
#include "memory/resourceArea.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    37
#include "oops/oop.inline.hpp"
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    38
#include "runtime/atomic.hpp"
24351
61b33cc6d3cf 8042195: Introduce umbrella header orderAccess.inline.hpp.
goetz
parents: 22794
diff changeset
    39
#include "runtime/orderAccess.inline.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    40
#include "utilities/hashtable.inline.hpp"
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
34257
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    42
size_t Dictionary::entry_size() {
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    43
  if (DumpSharedSpaces) {
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    44
    return SystemDictionaryShared::dictionary_entry_size();
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    45
  } else {
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    46
    return sizeof(DictionaryEntry);
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    47
  }
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    48
}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    50
Dictionary::Dictionary(ClassLoaderData* loader_data, int table_size)
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    51
  : _loader_data(loader_data), Hashtable<InstanceKlass*, mtClass>(table_size, (int)entry_size()) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    55
Dictionary::Dictionary(ClassLoaderData* loader_data,
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    56
                       int table_size, HashtableBucket<mtClass>* t,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
                       int number_of_entries)
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    58
  : _loader_data(loader_data), Hashtable<InstanceKlass*, mtClass>(table_size, (int)entry_size(), t, number_of_entries) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    61
Dictionary::~Dictionary() {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    62
  DictionaryEntry* probe = NULL;
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    63
  for (int index = 0; index < table_size(); index++) {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    64
    for (DictionaryEntry** p = bucket_addr(index); *p != NULL; ) {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    65
      probe = *p;
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    66
      *p = probe->next();
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    67
      free_entry(probe);
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    68
    }
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    69
  }
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    70
  assert(number_of_entries() == 0, "should have removed all entries");
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    71
  assert(new_entry_free_list() == NULL, "entry present on Dictionary's free list");
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    72
  free_buckets();
20405
3321f6b16639 8003420: NPG: make new GC root for pd_set
tschatzl
parents: 18439
diff changeset
    73
}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    75
DictionaryEntry* Dictionary::new_entry(unsigned int hash, InstanceKlass* klass) {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    76
  DictionaryEntry* entry = (DictionaryEntry*)Hashtable<InstanceKlass*, mtClass>::allocate_new_entry(hash, klass);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  entry->set_pd_set(NULL);
33611
9abd65805e19 8139203: Consistent naming for klass type predicates
coleenp
parents: 33602
diff changeset
    78
  assert(klass->is_instance_klass(), "Must be");
34257
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    79
  if (DumpSharedSpaces) {
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    80
    SystemDictionaryShared::init_shared_dictionary_entry(klass, entry);
4be3504cc03b 8140802: Clean up and refactor of class loading code for CDS
iklam
parents: 33611
diff changeset
    81
  }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  return entry;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
void Dictionary::free_entry(DictionaryEntry* entry) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  // avoid recursion when deleting linked list
47098
e704f55561c3 8164207: Checking missing load-acquire in relation to _pd_set in dictionary.cpp
coleenp
parents: 46746
diff changeset
    88
  // pd_set is accessed during a safepoint.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  while (entry->pd_set() != NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
    ProtectionDomainEntry* to_delete = entry->pd_set();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    entry->set_pd_set(to_delete->next());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
    delete to_delete;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  }
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    94
  // Unlink from the Hashtable prior to freeing
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    95
  unlink_entry(entry);
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
    96
  FREE_C_HEAP_ARRAY(char, entry);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
bool DictionaryEntry::contains_protection_domain(oop protection_domain) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
#ifdef ASSERT
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   102
  if (protection_domain == instance_klass()->protection_domain()) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
    // Ensure this doesn't show up in the pd_set (invariant)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
    bool in_pd_set = false;
47098
e704f55561c3 8164207: Checking missing load-acquire in relation to _pd_set in dictionary.cpp
coleenp
parents: 46746
diff changeset
   105
    for (ProtectionDomainEntry* current = pd_set_acquire();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
                                current != NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
                                current = current->next()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
      if (current->protection_domain() == protection_domain) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
        in_pd_set = true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
        break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    if (in_pd_set) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
      assert(false, "A klass's protection domain should not show up "
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
                    "in its sys. dict. PD set");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
#endif /* ASSERT */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   120
  if (protection_domain == instance_klass()->protection_domain()) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
    // Succeeds trivially
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
    return true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
47098
e704f55561c3 8164207: Checking missing load-acquire in relation to _pd_set in dictionary.cpp
coleenp
parents: 46746
diff changeset
   125
  for (ProtectionDomainEntry* current = pd_set_acquire();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
                              current != NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
                              current = current->next()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
    if (current->protection_domain() == protection_domain) return true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  return false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
46274
534d019edb92 8175104: Unhandled oop in ProtectionDomainCacheTable::compute_hash
coleenp
parents: 46271
diff changeset
   134
void DictionaryEntry::add_protection_domain(Dictionary* dict, Handle protection_domain) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  assert_locked_or_safepoint(SystemDictionary_lock);
46274
534d019edb92 8175104: Unhandled oop in ProtectionDomainCacheTable::compute_hash
coleenp
parents: 46271
diff changeset
   136
  if (!contains_protection_domain(protection_domain())) {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   137
    ProtectionDomainCacheEntry* entry = SystemDictionary::cache_get(protection_domain);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
    ProtectionDomainEntry* new_head =
47098
e704f55561c3 8164207: Checking missing load-acquire in relation to _pd_set in dictionary.cpp
coleenp
parents: 46746
diff changeset
   139
                new ProtectionDomainEntry(entry, pd_set());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
    // Warning: Preserve store ordering.  The SystemDictionary is read
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
    //          without locks.  The new ProtectionDomainEntry must be
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
    //          complete before other threads can be allowed to see it
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
    //          via a store to _pd_set.
47098
e704f55561c3 8164207: Checking missing load-acquire in relation to _pd_set in dictionary.cpp
coleenp
parents: 46746
diff changeset
   144
    release_set_pd_set(new_head);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  }
46701
f559541c0daa 8181917: Refactor UL LogStreams to avoid using resource area
stuefe
parents: 46475
diff changeset
   146
  LogTarget(Trace, protectiondomain) lt;
f559541c0daa 8181917: Refactor UL LogStreams to avoid using resource area
stuefe
parents: 46475
diff changeset
   147
  if (lt.is_enabled()) {
f559541c0daa 8181917: Refactor UL LogStreams to avoid using resource area
stuefe
parents: 46475
diff changeset
   148
    LogStream ls(lt);
f559541c0daa 8181917: Refactor UL LogStreams to avoid using resource area
stuefe
parents: 46475
diff changeset
   149
    print_count(&ls);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
26174
ca46a107cb78 8054402: "klass->is_loader_alive(_is_alive)) failed: must be alive" for anonymous classes
thartmann
parents: 25492
diff changeset
   154
void Dictionary::do_unloading() {
5402
c51fd0c1d005 6888953: some calls to function-like macros are missing semicolons
jcoomes
parents: 2534
diff changeset
   155
  assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   157
  // The NULL class loader doesn't initiate loading classes from other class loaders
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   158
  if (loader_data() == ClassLoaderData::the_null_class_loader_data()) {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   159
    return;
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   160
  }
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   161
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   162
  // Remove unloaded entries and classes from this dictionary
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
  DictionaryEntry* probe = NULL;
26174
ca46a107cb78 8054402: "klass->is_loader_alive(_is_alive)) failed: must be alive" for anonymous classes
thartmann
parents: 25492
diff changeset
   164
  for (int index = 0; index < table_size(); index++) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
    for (DictionaryEntry** p = bucket_addr(index); *p != NULL; ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
      probe = *p;
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   167
      InstanceKlass* ik = probe->instance_klass();
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   168
      ClassLoaderData* k_def_class_loader_data = ik->class_loader_data();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   170
      // If the klass that this loader initiated is dead,
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   171
      // (determined by checking the defining class loader)
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   172
      // remove this entry.
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   173
      if (k_def_class_loader_data->is_unloading()) {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   174
        assert(k_def_class_loader_data != loader_data(),
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   175
               "cannot have live defining loader and unreachable klass");
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   176
        *p = probe->next();
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   177
        free_entry(probe);
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   178
        continue;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
      p = probe->next_addr();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
26135
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   185
void Dictionary::remove_classes_in_error_state() {
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   186
  assert(DumpSharedSpaces, "supported only when dumping");
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   187
  DictionaryEntry* probe = NULL;
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   188
  for (int index = 0; index < table_size(); index++) {
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   189
    for (DictionaryEntry** p = bucket_addr(index); *p != NULL; ) {
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   190
      probe = *p;
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   191
      InstanceKlass* ik = probe->instance_klass();
26135
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   192
      if (ik->is_in_error_state()) { // purge this entry
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   193
        *p = probe->next();
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   194
        free_entry(probe);
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   195
        ResourceMark rm;
27618
790a8bf5488b 8064375: Change certain errors to warnings in CDS output.
jiangli
parents: 26181
diff changeset
   196
        tty->print_cr("Preload Warning: Removed error class: %s", ik->external_name());
26135
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   197
        continue;
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   198
      }
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   199
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   200
      p = probe->next_addr();
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   201
    }
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   202
  }
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   203
}
82b516c550f7 8046070: Class Data Sharing clean up and refactoring
iklam
parents: 25492
diff changeset
   204
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   205
//   Just the classes from defining class loaders
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   206
void Dictionary::classes_do(void f(InstanceKlass*)) {
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   207
  for (int index = 0; index < table_size(); index++) {
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   208
    for (DictionaryEntry* probe = bucket(index);
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   209
                          probe != NULL;
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   210
                          probe = probe->next()) {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   211
      InstanceKlass* k = probe->instance_klass();
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   212
      if (loader_data() == k->class_loader_data()) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
        f(k);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
// Added for initialize_itable_for_klass to handle exceptions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
//   Just the classes from defining class loaders
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   221
void Dictionary::classes_do(void f(InstanceKlass*, TRAPS), TRAPS) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
  for (int index = 0; index < table_size(); index++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
    for (DictionaryEntry* probe = bucket(index);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
                          probe != NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
                          probe = probe->next()) {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   226
      InstanceKlass* k = probe->instance_klass();
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   227
      if (loader_data() == k->class_loader_data()) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
        f(k, CHECK);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   234
// All classes, and their class loaders, including initiating class loaders
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   235
void Dictionary::all_entries_do(void f(InstanceKlass*, ClassLoaderData*)) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  for (int index = 0; index < table_size(); index++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
    for (DictionaryEntry* probe = bucket(index);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
                          probe != NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
                          probe = probe->next()) {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   240
      InstanceKlass* k = probe->instance_klass();
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   241
      f(k, loader_data());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
46746
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   246
// Used to scan and relocate the classes during CDS archive dump.
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   247
void Dictionary::classes_do(MetaspaceClosure* it) {
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   248
  assert(DumpSharedSpaces, "dump-time only");
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   249
  for (int index = 0; index < table_size(); index++) {
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   250
    for (DictionaryEntry* probe = bucket(index);
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   251
                          probe != NULL;
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   252
                          probe = probe->next()) {
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   253
      it->push(probe->klass_addr());
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   254
      ((SharedDictionaryEntry*)probe)->metaspace_pointers_do(it);
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   255
    }
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   256
  }
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   257
}
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   258
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   259
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   261
// Add a loaded class to the dictionary.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
// Readers of the SystemDictionary aren't always locked, so _buckets
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
// is volatile. The store of the next field in the constructor is
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
// also cast to volatile;  we do this to ensure store order is maintained
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
// by the compilers.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   267
void Dictionary::add_klass(int index, unsigned int hash, Symbol* class_name,
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46274
diff changeset
   268
                           InstanceKlass* obj) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
  assert_locked_or_safepoint(SystemDictionary_lock);
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46274
diff changeset
   270
  assert(obj != NULL, "adding NULL obj");
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46274
diff changeset
   271
  assert(obj->name() == class_name, "sanity check on name");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   273
  DictionaryEntry* entry = new_entry(hash, obj);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
  add_entry(index, entry);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   278
// This routine does not lock the dictionary.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
// Since readers don't hold a lock, we must make sure that system
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
// dictionary entries are only removed at a safepoint (when only one
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
// thread is running), and are added to in a safe way (all links must
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
// be updated in an MT-safe manner).
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
// Callers should be aware that an entry could be added just after
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
// _buckets[index] is read here, so the caller will not see the new entry.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
DictionaryEntry* Dictionary::get_entry(int index, unsigned int hash,
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   288
                                       Symbol* class_name) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
  for (DictionaryEntry* entry = bucket(index);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
                        entry != NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
                        entry = entry->next()) {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   292
    if (entry->hash() == hash && entry->equals(class_name)) {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   293
      if (!DumpSharedSpaces || SystemDictionaryShared::is_builtin(entry)) {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   294
        return entry;
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   295
      }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
  return NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46274
diff changeset
   302
InstanceKlass* Dictionary::find(int index, unsigned int hash, Symbol* name,
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   303
                                Handle protection_domain) {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   304
  DictionaryEntry* entry = get_entry(index, hash, name);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
  if (entry != NULL && entry->is_valid_protection_domain(protection_domain)) {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   306
    return entry->instance_klass();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
  } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
    return NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46274
diff changeset
   313
InstanceKlass* Dictionary::find_class(int index, unsigned int hash,
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   314
                                      Symbol* name) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
  assert_locked_or_safepoint(SystemDictionary_lock);
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   316
  assert (index == index_for(name), "incorrect index?");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   318
  DictionaryEntry* entry = get_entry(index, hash, name);
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   319
  return (entry != NULL) ? entry->instance_klass() : NULL;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
// Variant of find_class for shared classes.  No locking required, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
// that table is static.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46274
diff changeset
   326
InstanceKlass* Dictionary::find_shared_class(int index, unsigned int hash,
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46274
diff changeset
   327
                                             Symbol* name) {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   328
  assert (index == index_for(name), "incorrect index?");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   330
  DictionaryEntry* entry = get_entry(index, hash, name);
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   331
  return (entry != NULL) ? entry->instance_klass() : NULL;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
void Dictionary::add_protection_domain(int index, unsigned int hash,
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46274
diff changeset
   336
                                       InstanceKlass* klass,
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   337
                                       Handle protection_domain,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
                                       TRAPS) {
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   339
  Symbol*  klass_name = klass->name();
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   340
  DictionaryEntry* entry = get_entry(index, hash, klass_name);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
  assert(entry != NULL,"entry must be present, we just created it");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
  assert(protection_domain() != NULL,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
         "real protection domain should be present");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
46274
534d019edb92 8175104: Unhandled oop in ProtectionDomainCacheTable::compute_hash
coleenp
parents: 46271
diff changeset
   346
  entry->add_protection_domain(this, protection_domain);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
  assert(entry->contains_protection_domain(protection_domain()),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
         "now protection domain should be present");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
bool Dictionary::is_valid_protection_domain(int index, unsigned int hash,
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   354
                                            Symbol* name,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
                                            Handle protection_domain) {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   356
  DictionaryEntry* entry = get_entry(index, hash, name);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
  return entry->is_valid_protection_domain(protection_domain);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
47761
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   360
#if INCLUDE_CDS
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   361
static bool is_jfr_event_class(Klass *k) {
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   362
  while (k) {
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   363
    if (k->name()->equals("jdk/jfr/Event")) {
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   364
      return true;
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   365
    }
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   366
    k = k->super();
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   367
  }
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   368
  return false;
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   369
}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
46746
ea379ebb9447 8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents: 46742
diff changeset
   371
void Dictionary::reorder_dictionary_for_sharing() {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
  // Copy all the dictionary entries into a single master list.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
  DictionaryEntry* master_list = NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
  for (int i = 0; i < table_size(); ++i) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
    DictionaryEntry* p = bucket(i);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
    while (p != NULL) {
47103
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   379
      DictionaryEntry* next = p->next();
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   380
      InstanceKlass*ik = p->instance_klass();
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   381
      if (ik->signers() != NULL) {
47761
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   382
        // We cannot include signed classes in the archive because the certificates
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   383
        // used during dump time may be different than those used during
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   384
        // runtime (due to expiration, etc).
47103
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   385
        ResourceMark rm;
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   386
        tty->print_cr("Preload Warning: Skipping %s from signed JAR",
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   387
                       ik->name()->as_C_string());
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   388
        free_entry(p);
47761
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   389
      } else if (is_jfr_event_class(ik)) {
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   390
        // We cannot include JFR event classes because they need runtime-specific
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   391
        // instrumentation in order to work with -XX:FlightRecorderOptions=retransform=false.
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   392
        // There are only a small number of these classes, so it's not worthwhile to
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   393
        // support them and make CDS more complicated.
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   394
        ResourceMark rm;
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   395
        tty->print_cr("Skipping JFR event class %s", ik->name()->as_C_string());
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   396
        free_entry(p);
47103
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   397
      } else {
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   398
        p->set_next(master_list);
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   399
        master_list = p;
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   400
      }
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 47098
diff changeset
   401
      p = next;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
    set_entry(i, NULL);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
  // Add the dictionary entries back to the list in the correct buckets.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
  while (master_list != NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
    DictionaryEntry* p = master_list;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
    master_list = master_list->next();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
    p->set_next(NULL);
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   411
    Symbol* class_name = p->instance_klass()->name();
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   412
    // Since the null class loader data isn't copied to the CDS archive,
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   413
    // compute the hash with NULL for loader data.
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   414
    unsigned int hash = compute_hash(class_name);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
    int index = hash_to_index(hash);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
    p->set_hash(hash);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
    p->set_next(bucket(index));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
    set_entry(index, p);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
}
47761
1b0566927c7a 8190191: Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false
iklam
parents: 47216
diff changeset
   421
#endif
35498
392b50de06c6 8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents: 34257
diff changeset
   422
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   423
SymbolPropertyTable::SymbolPropertyTable(int table_size)
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 11628
diff changeset
   424
  : Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry))
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   425
{
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   426
}
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 11628
diff changeset
   427
SymbolPropertyTable::SymbolPropertyTable(int table_size, HashtableBucket<mtSymbol>* t,
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   428
                                         int number_of_entries)
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 11628
diff changeset
   429
  : Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry), t, number_of_entries)
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   430
{
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   431
}
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   432
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   433
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   434
SymbolPropertyEntry* SymbolPropertyTable::find_entry(int index, unsigned int hash,
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   435
                                                     Symbol* sym,
5420
586d3988e72b 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 2534
diff changeset
   436
                                                     intptr_t sym_mode) {
586d3988e72b 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 2534
diff changeset
   437
  assert(index == index_for(sym, sym_mode), "incorrect index?");
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   438
  for (SymbolPropertyEntry* p = bucket(index); p != NULL; p = p->next()) {
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   439
    if (p->hash() == hash && p->symbol() == sym && p->symbol_mode() == sym_mode) {
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   440
      return p;
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   441
    }
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   442
  }
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   443
  return NULL;
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   444
}
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   445
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   446
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   447
SymbolPropertyEntry* SymbolPropertyTable::add_entry(int index, unsigned int hash,
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   448
                                                    Symbol* sym, intptr_t sym_mode) {
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   449
  assert_locked_or_safepoint(SystemDictionary_lock);
5420
586d3988e72b 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 2534
diff changeset
   450
  assert(index == index_for(sym, sym_mode), "incorrect index?");
586d3988e72b 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 2534
diff changeset
   451
  assert(find_entry(index, hash, sym, sym_mode) == NULL, "no double entry");
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   452
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   453
  SymbolPropertyEntry* p = new_entry(hash, sym, sym_mode);
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 11628
diff changeset
   454
  Hashtable<Symbol*, mtSymbol>::add_entry(index, p);
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   455
  return p;
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   456
}
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   457
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   458
void SymbolPropertyTable::oops_do(OopClosure* f) {
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   459
  for (int index = 0; index < table_size(); index++) {
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   460
    for (SymbolPropertyEntry* p = bucket(index); p != NULL; p = p->next()) {
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   461
      if (p->method_type() != NULL) {
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   462
        f->do_oop(p->method_type_addr());
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   463
      }
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   464
    }
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   465
  }
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   466
}
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   467
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   468
void SymbolPropertyTable::methods_do(void f(Method*)) {
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   469
  for (int index = 0; index < table_size(); index++) {
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   470
    for (SymbolPropertyEntry* p = bucket(index); p != NULL; p = p->next()) {
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   471
      Method* prop = p->method();
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   472
      if (prop != NULL) {
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
   473
        f((Method*)prop);
2534
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   474
      }
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   475
    }
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   476
  }
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   477
}
08dac9ce0cd7 6655638: dynamic languages need method handles
jrose
parents: 670
diff changeset
   478
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   479
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
// ----------------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   481
46742
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   482
void Dictionary::print_on(outputStream* st) const {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   483
  ResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   484
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   485
  assert(loader_data() != NULL, "loader data should not be null");
46742
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   486
  st->print_cr("Java dictionary (table_size=%d, classes=%d)",
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   487
               table_size(), number_of_entries());
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   488
  st->print_cr("^ indicates that initiating loader is different from defining loader");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   489
489c9b5090e2 Initial load
duke
parents:
diff changeset
   490
  for (int index = 0; index < table_size(); index++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   491
    for (DictionaryEntry* probe = bucket(index);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
                          probe != NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
                          probe = probe->next()) {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   494
      Klass* e = probe->instance_klass();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   495
      bool is_defining_class =
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   496
         (loader_data() == e->class_loader_data());
46742
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   497
      st->print("%4d: %s%s, loader ", index, is_defining_class ? " " : "^", e->external_name());
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   498
      ClassLoaderData* loader_data = e->class_loader_data();
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   499
      if (loader_data == NULL) {
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   500
        // Shared class not restored yet in shared dictionary
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   501
        st->print("<shared, not restored>");
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   502
      } else {
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   503
        loader_data->print_value_on(st);
39982
1a3808e3f4d9 8138760: [JVMCI] VM warning: Performance bug: SystemDictionary lookup_count=21831450 lookup_length=1275207287 average=58.411479 load=5.572844
gziemski
parents: 38259
diff changeset
   504
      }
46742
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46729
diff changeset
   505
      st->cr();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   506
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   507
  }
20405
3321f6b16639 8003420: NPG: make new GC root for pd_set
tschatzl
parents: 18439
diff changeset
   508
  tty->cr();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   509
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
46475
75902cea18af 8166848: Performance bug: SystemDictionary - optimization
coleenp
parents: 46382
diff changeset
   511
void DictionaryEntry::verify() {
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   512
  Klass* e = instance_klass();
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   513
  guarantee(e->is_instance_klass(),
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   514
                          "Verify of dictionary failed");
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   515
  e->verify();
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   516
  verify_protection_domain_set();
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   517
}
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   518
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   519
void Dictionary::verify() {
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   520
  guarantee(number_of_entries() >= 0, "Verify of dictionary failed");
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   521
46475
75902cea18af 8166848: Performance bug: SystemDictionary - optimization
coleenp
parents: 46382
diff changeset
   522
  ClassLoaderData* cld = loader_data();
75902cea18af 8166848: Performance bug: SystemDictionary - optimization
coleenp
parents: 46382
diff changeset
   523
  // class loader must be present;  a null class loader is the
75902cea18af 8166848: Performance bug: SystemDictionary - optimization
coleenp
parents: 46382
diff changeset
   524
  // boostrap loader
75902cea18af 8166848: Performance bug: SystemDictionary - optimization
coleenp
parents: 46382
diff changeset
   525
  guarantee(cld != NULL || DumpSharedSpaces ||
75902cea18af 8166848: Performance bug: SystemDictionary - optimization
coleenp
parents: 46382
diff changeset
   526
            cld->class_loader() == NULL ||
75902cea18af 8166848: Performance bug: SystemDictionary - optimization
coleenp
parents: 46382
diff changeset
   527
            cld->class_loader()->is_instance(),
75902cea18af 8166848: Performance bug: SystemDictionary - optimization
coleenp
parents: 46382
diff changeset
   528
            "checking type of class_loader");
46729
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   529
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   530
  ResourceMark rm;
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   531
  stringStream tempst;
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   532
  tempst.print("System Dictionary for %s", cld->loader_name());
c62d2e8b2728 7133093: Improve system dictionary performance
coleenp
parents: 46701
diff changeset
   533
  verify_table<DictionaryEntry>(tempst.as_string());
42073
89e056fd82cc 8166145: runtime/threads/ThreadInterruptTest3 fails with ExitCode 0
gziemski
parents: 39982
diff changeset
   534
}