12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoaderData.inline.hpp"
27 #include "classfile/sharedClassUtil.hpp"
28 #include "classfile/dictionary.inline.hpp"
29 #include "classfile/protectionDomainCache.hpp"
30 #include "classfile/systemDictionary.hpp"
31 #include "classfile/systemDictionaryShared.hpp"
32 #include "gc/shared/gcLocker.hpp"
33 #include "logging/log.hpp"
34 #include "logging/logStream.hpp"
35 #include "memory/iterator.hpp"
36 #include "memory/metaspaceClosure.hpp"
37 #include "memory/resourceArea.hpp"
38 #include "oops/oop.inline.hpp"
39 #include "runtime/atomic.hpp"
40 #include "runtime/orderAccess.inline.hpp"
41 #include "utilities/hashtable.inline.hpp"
42
43 // Optimization: if any dictionary needs resizing, we set this flag,
44 // so that we dont't have to walk all dictionaries to check if any actually
45 // needs resizing, which is costly to do at Safepoint.
46 bool Dictionary::_some_dictionary_needs_resizing = false;
47
48 size_t Dictionary::entry_size() {
49 if (DumpSharedSpaces) {
50 return SystemDictionaryShared::dictionary_entry_size();
51 } else {
52 return sizeof(DictionaryEntry);
53 }
54 }
55
56 Dictionary::Dictionary(ClassLoaderData* loader_data, int table_size, bool resizable)
57 : _loader_data(loader_data), _resizable(resizable), _needs_resizing(false),
58 Hashtable<InstanceKlass*, mtClass>(table_size, (int)entry_size()) {
59 };
60
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoaderData.inline.hpp"
27 #include "classfile/sharedClassUtil.hpp"
28 #include "classfile/dictionary.inline.hpp"
29 #include "classfile/protectionDomainCache.hpp"
30 #include "classfile/systemDictionary.hpp"
31 #include "classfile/systemDictionaryShared.hpp"
32 #include "logging/log.hpp"
33 #include "logging/logStream.hpp"
34 #include "memory/iterator.hpp"
35 #include "memory/metaspaceClosure.hpp"
36 #include "memory/resourceArea.hpp"
37 #include "oops/oop.inline.hpp"
38 #include "runtime/atomic.hpp"
39 #include "runtime/orderAccess.inline.hpp"
40 #include "runtime/safepointVerifiers.hpp"
41 #include "utilities/hashtable.inline.hpp"
42
43 // Optimization: if any dictionary needs resizing, we set this flag,
44 // so that we dont't have to walk all dictionaries to check if any actually
45 // needs resizing, which is costly to do at Safepoint.
46 bool Dictionary::_some_dictionary_needs_resizing = false;
47
48 size_t Dictionary::entry_size() {
49 if (DumpSharedSpaces) {
50 return SystemDictionaryShared::dictionary_entry_size();
51 } else {
52 return sizeof(DictionaryEntry);
53 }
54 }
55
56 Dictionary::Dictionary(ClassLoaderData* loader_data, int table_size, bool resizable)
57 : _loader_data(loader_data), _resizable(resizable), _needs_resizing(false),
58 Hashtable<InstanceKlass*, mtClass>(table_size, (int)entry_size()) {
59 };
60
|