2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2016-01-04 15:41:05 +01:00
|
|
|
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
2007-12-01 00:00:00 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
2010-05-27 19:08:38 -07:00
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
2007-12-01 00:00:00 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "precompiled.hpp"
|
2012-07-04 15:55:45 -04:00
|
|
|
#include "classfile/altHashing.hpp"
|
2016-01-04 15:41:05 +01:00
|
|
|
#include "classfile/javaClasses.inline.hpp"
|
2014-05-07 14:16:45 -05:00
|
|
|
#include "classfile/stringTable.hpp"
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "memory/allocation.inline.hpp"
|
2012-06-25 21:33:35 -04:00
|
|
|
#include "memory/filemap.hpp"
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "memory/resourceArea.hpp"
|
|
|
|
#include "oops/oop.inline.hpp"
|
|
|
|
#include "runtime/safepoint.hpp"
|
|
|
|
#include "utilities/dtrace.hpp"
|
|
|
|
#include "utilities/hashtable.hpp"
|
|
|
|
#include "utilities/hashtable.inline.hpp"
|
2013-05-18 20:41:01 -07:00
|
|
|
#include "utilities/numberSeq.hpp"
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
|
2014-08-29 13:08:01 +02:00
|
|
|
// This hashtable is implemented as an open hash table with a fixed number of buckets.
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2014-08-29 13:08:01 +02:00
|
|
|
template <MEMFLAGS F> BasicHashtableEntry<F>* BasicHashtable<F>::new_entry_free_list() {
|
|
|
|
BasicHashtableEntry<F>* entry = NULL;
|
|
|
|
if (_free_list != NULL) {
|
2007-12-01 00:00:00 +00:00
|
|
|
entry = _free_list;
|
|
|
|
_free_list = _free_list->next();
|
2014-08-29 13:08:01 +02:00
|
|
|
}
|
|
|
|
return entry;
|
|
|
|
}
|
|
|
|
|
|
|
|
// HashtableEntrys are allocated in blocks to reduce the space overhead.
|
|
|
|
template <MEMFLAGS F> BasicHashtableEntry<F>* BasicHashtable<F>::new_entry(unsigned int hashValue) {
|
|
|
|
BasicHashtableEntry<F>* entry = new_entry_free_list();
|
|
|
|
|
|
|
|
if (entry == NULL) {
|
2008-11-12 23:26:45 -08:00
|
|
|
if (_first_free_entry + _entry_size >= _end_block) {
|
|
|
|
int block_size = MIN2(512, MAX2((int)_table_size / 2, (int)_number_of_entries));
|
2007-12-01 00:00:00 +00:00
|
|
|
int len = _entry_size * block_size;
|
2008-11-12 23:26:45 -08:00
|
|
|
len = 1 << log2_intptr(len); // round down to power of 2
|
|
|
|
assert(len >= _entry_size, "");
|
2012-06-28 17:03:16 -04:00
|
|
|
_first_free_entry = NEW_C_HEAP_ARRAY2(char, len, F, CURRENT_PC);
|
2007-12-01 00:00:00 +00:00
|
|
|
_end_block = _first_free_entry + len;
|
|
|
|
}
|
2012-06-28 17:03:16 -04:00
|
|
|
entry = (BasicHashtableEntry<F>*)_first_free_entry;
|
2007-12-01 00:00:00 +00:00
|
|
|
_first_free_entry += _entry_size;
|
|
|
|
}
|
|
|
|
|
2008-11-12 23:26:45 -08:00
|
|
|
assert(_entry_size % HeapWordSize == 0, "");
|
2007-12-01 00:00:00 +00:00
|
|
|
entry->set_hash(hashValue);
|
|
|
|
return entry;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
template <class T, MEMFLAGS F> HashtableEntry<T, F>* Hashtable<T, F>::new_entry(unsigned int hashValue, T obj) {
|
|
|
|
HashtableEntry<T, F>* entry;
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
entry = (HashtableEntry<T, F>*)BasicHashtable<F>::new_entry(hashValue);
|
2011-01-27 16:11:27 -08:00
|
|
|
entry->set_literal(obj);
|
2007-12-01 00:00:00 +00:00
|
|
|
return entry;
|
|
|
|
}
|
|
|
|
|
2012-06-13 19:52:59 -04:00
|
|
|
// Check to see if the hashtable is unbalanced. The caller set a flag to
|
|
|
|
// rehash at the next safepoint. If this bucket is 60 times greater than the
|
|
|
|
// expected average bucket length, it's an unbalanced hashtable.
|
|
|
|
// This is somewhat an arbitrary heuristic but if one bucket gets to
|
|
|
|
// rehash_count which is currently 100, there's probably something wrong.
|
|
|
|
|
2014-08-29 13:08:01 +02:00
|
|
|
template <class T, MEMFLAGS F> bool RehashableHashtable<T, F>::check_rehash_table(int count) {
|
|
|
|
assert(this->table_size() != 0, "underflow");
|
|
|
|
if (count > (((double)this->number_of_entries()/(double)this->table_size())*rehash_multiple)) {
|
2012-06-13 19:52:59 -04:00
|
|
|
// Set a flag for the next safepoint, which should be at some guaranteed
|
|
|
|
// safepoint interval.
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-08-29 13:08:01 +02:00
|
|
|
template <class T, MEMFLAGS F> juint RehashableHashtable<T, F>::_seed = 0;
|
2012-07-04 15:55:45 -04:00
|
|
|
|
2012-06-13 19:52:59 -04:00
|
|
|
// Create a new table and using alternate hash code, populate the new table
|
|
|
|
// with the existing elements. This can be used to change the hash code
|
|
|
|
// and could in the future change the size of the table.
|
|
|
|
|
2014-08-29 13:08:01 +02:00
|
|
|
template <class T, MEMFLAGS F> void RehashableHashtable<T, F>::move_to(RehashableHashtable<T, F>* new_table) {
|
2012-07-04 15:55:45 -04:00
|
|
|
|
|
|
|
// Initialize the global seed for hashing.
|
|
|
|
_seed = AltHashing::compute_seed();
|
|
|
|
assert(seed() != 0, "shouldn't be zero");
|
|
|
|
|
|
|
|
int saved_entry_count = this->number_of_entries();
|
2012-06-13 19:52:59 -04:00
|
|
|
|
|
|
|
// Iterate through the table and create a new entry for the new table
|
|
|
|
for (int i = 0; i < new_table->table_size(); ++i) {
|
2014-08-29 13:08:01 +02:00
|
|
|
for (HashtableEntry<T, F>* p = this->bucket(i); p != NULL; ) {
|
2012-06-28 17:03:16 -04:00
|
|
|
HashtableEntry<T, F>* next = p->next();
|
2012-06-13 19:52:59 -04:00
|
|
|
T string = p->literal();
|
|
|
|
// Use alternate hashing algorithm on the symbol in the first table
|
6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
|
|
|
unsigned int hashValue = string->new_hash(seed());
|
2012-06-13 19:52:59 -04:00
|
|
|
// Get a new index relative to the new table (can also change size)
|
|
|
|
int index = new_table->hash_to_index(hashValue);
|
|
|
|
p->set_hash(hashValue);
|
2012-06-25 21:33:35 -04:00
|
|
|
// Keep the shared bit in the Hashtable entry to indicate that this entry
|
|
|
|
// can't be deleted. The shared bit is the LSB in the _next field so
|
|
|
|
// walking the hashtable past these entries requires
|
|
|
|
// BasicHashtableEntry::make_ptr() call.
|
|
|
|
bool keep_shared = p->is_shared();
|
2012-07-31 16:01:56 -04:00
|
|
|
this->unlink_entry(p);
|
2012-06-13 19:52:59 -04:00
|
|
|
new_table->add_entry(index, p);
|
2012-06-25 21:33:35 -04:00
|
|
|
if (keep_shared) {
|
|
|
|
p->set_shared();
|
|
|
|
}
|
2012-06-13 19:52:59 -04:00
|
|
|
p = next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// give the new table the free list as well
|
|
|
|
new_table->copy_freelist(this);
|
|
|
|
assert(new_table->number_of_entries() == saved_entry_count, "lost entry on dictionary copy?");
|
|
|
|
|
|
|
|
// Destroy memory used by the buckets in the hashtable. The memory
|
|
|
|
// for the elements has been used in a new table and is not
|
|
|
|
// destroyed. The memory reuse will benefit resizing the SystemDictionary
|
|
|
|
// to avoid a memory allocation spike at safepoint.
|
2012-06-28 17:03:16 -04:00
|
|
|
BasicHashtable<F>::free_buckets();
|
2012-06-13 19:52:59 -04:00
|
|
|
}
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
template <MEMFLAGS F> void BasicHashtable<F>::free_buckets() {
|
2012-06-25 21:33:35 -04:00
|
|
|
if (NULL != _buckets) {
|
|
|
|
// Don't delete the buckets in the shared space. They aren't
|
|
|
|
// allocated by os::malloc
|
|
|
|
if (!UseSharedSpaces ||
|
|
|
|
!FileMapInfo::current_info()->is_in_shared_space(_buckets)) {
|
2014-12-01 12:16:15 -05:00
|
|
|
FREE_C_HEAP_ARRAY(HashtableBucket, _buckets);
|
2012-06-25 21:33:35 -04:00
|
|
|
}
|
|
|
|
_buckets = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// Reverse the order of elements in the hash buckets.
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
template <MEMFLAGS F> void BasicHashtable<F>::reverse() {
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
for (int i = 0; i < _table_size; ++i) {
|
2012-06-28 17:03:16 -04:00
|
|
|
BasicHashtableEntry<F>* new_list = NULL;
|
|
|
|
BasicHashtableEntry<F>* p = bucket(i);
|
2007-12-01 00:00:00 +00:00
|
|
|
while (p != NULL) {
|
2012-06-28 17:03:16 -04:00
|
|
|
BasicHashtableEntry<F>* next = p->next();
|
2007-12-01 00:00:00 +00:00
|
|
|
p->set_next(new_list);
|
|
|
|
new_list = p;
|
|
|
|
p = next;
|
|
|
|
}
|
|
|
|
*bucket_addr(i) = new_list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Copy the table to the shared space.
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
template <MEMFLAGS F> void BasicHashtable<F>::copy_table(char** top, char* end) {
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Dump the hash table entries.
|
|
|
|
|
|
|
|
intptr_t *plen = (intptr_t*)(*top);
|
|
|
|
*top += sizeof(*plen);
|
|
|
|
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < _table_size; ++i) {
|
2012-06-28 17:03:16 -04:00
|
|
|
for (BasicHashtableEntry<F>** p = _buckets[i].entry_addr();
|
2007-12-01 00:00:00 +00:00
|
|
|
*p != NULL;
|
|
|
|
p = (*p)->next_addr()) {
|
|
|
|
if (*top + entry_size() > end) {
|
2011-01-27 16:11:27 -08:00
|
|
|
report_out_of_shared_space(SharedMiscData);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
2012-06-28 17:03:16 -04:00
|
|
|
*p = (BasicHashtableEntry<F>*)memcpy(*top, *p, entry_size());
|
2007-12-01 00:00:00 +00:00
|
|
|
*top += entry_size();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*plen = (char*)(*top) - (char*)plen - sizeof(*plen);
|
|
|
|
|
|
|
|
// Set the shared bit.
|
|
|
|
|
|
|
|
for (i = 0; i < _table_size; ++i) {
|
2012-06-28 17:03:16 -04:00
|
|
|
for (BasicHashtableEntry<F>* p = bucket(i); p != NULL; p = p->next()) {
|
2007-12-01 00:00:00 +00:00
|
|
|
p->set_shared();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reverse the order of elements in the hash buckets.
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
template <class T, MEMFLAGS F> void Hashtable<T, F>::reverse(void* boundary) {
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
for (int i = 0; i < this->table_size(); ++i) {
|
|
|
|
HashtableEntry<T, F>* high_list = NULL;
|
|
|
|
HashtableEntry<T, F>* low_list = NULL;
|
|
|
|
HashtableEntry<T, F>* last_low_entry = NULL;
|
|
|
|
HashtableEntry<T, F>* p = bucket(i);
|
2007-12-01 00:00:00 +00:00
|
|
|
while (p != NULL) {
|
2012-06-28 17:03:16 -04:00
|
|
|
HashtableEntry<T, F>* next = p->next();
|
2007-12-01 00:00:00 +00:00
|
|
|
if ((void*)p->literal() >= boundary) {
|
|
|
|
p->set_next(high_list);
|
|
|
|
high_list = p;
|
|
|
|
} else {
|
|
|
|
p->set_next(low_list);
|
|
|
|
low_list = p;
|
|
|
|
if (last_low_entry == NULL) {
|
|
|
|
last_low_entry = p;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
p = next;
|
|
|
|
}
|
|
|
|
if (low_list != NULL) {
|
|
|
|
*bucket_addr(i) = low_list;
|
|
|
|
last_low_entry->set_next(high_list);
|
|
|
|
} else {
|
|
|
|
*bucket_addr(i) = high_list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-08-29 13:08:01 +02:00
|
|
|
template <class T, MEMFLAGS F> int RehashableHashtable<T, F>::literal_size(Symbol *symbol) {
|
2013-05-18 20:41:01 -07:00
|
|
|
return symbol->size() * HeapWordSize;
|
|
|
|
}
|
|
|
|
|
2014-08-29 13:08:01 +02:00
|
|
|
template <class T, MEMFLAGS F> int RehashableHashtable<T, F>::literal_size(oop oop) {
|
2013-05-18 20:41:01 -07:00
|
|
|
// NOTE: this would over-count if (pre-JDK8) java_lang_Class::has_offset_field() is true,
|
|
|
|
// and the String.value array is shared by several Strings. However, starting from JDK8,
|
|
|
|
// the String.value array is not shared anymore.
|
|
|
|
assert(oop != NULL && oop->klass() == SystemDictionary::String_klass(), "only strings are supported");
|
|
|
|
return (oop->size() + java_lang_String::value(oop)->size()) * HeapWordSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Dump footprint and bucket length statistics
|
|
|
|
//
|
|
|
|
// Note: if you create a new subclass of Hashtable<MyNewType, F>, you will need to
|
|
|
|
// add a new function Hashtable<T, F>::literal_size(MyNewType lit)
|
|
|
|
|
2014-08-29 13:08:01 +02:00
|
|
|
template <class T, MEMFLAGS F> void RehashableHashtable<T, F>::dump_table(outputStream* st, const char *table_name) {
|
2013-05-18 20:41:01 -07:00
|
|
|
NumberSeq summary;
|
|
|
|
int literal_bytes = 0;
|
|
|
|
for (int i = 0; i < this->table_size(); ++i) {
|
|
|
|
int count = 0;
|
2014-08-29 13:08:01 +02:00
|
|
|
for (HashtableEntry<T, F>* e = this->bucket(i);
|
2013-05-18 20:41:01 -07:00
|
|
|
e != NULL; e = e->next()) {
|
|
|
|
count++;
|
|
|
|
literal_bytes += literal_size(e->literal());
|
|
|
|
}
|
|
|
|
summary.add((double)count);
|
|
|
|
}
|
|
|
|
double num_buckets = summary.num();
|
|
|
|
double num_entries = summary.sum();
|
|
|
|
|
2014-08-29 13:08:01 +02:00
|
|
|
int bucket_bytes = (int)num_buckets * sizeof(HashtableBucket<F>);
|
2013-05-18 20:41:01 -07:00
|
|
|
int entry_bytes = (int)num_entries * sizeof(HashtableEntry<T, F>);
|
|
|
|
int total_bytes = literal_bytes + bucket_bytes + entry_bytes;
|
|
|
|
|
|
|
|
double bucket_avg = (num_buckets <= 0) ? 0 : (bucket_bytes / num_buckets);
|
|
|
|
double entry_avg = (num_entries <= 0) ? 0 : (entry_bytes / num_entries);
|
|
|
|
double literal_avg = (num_entries <= 0) ? 0 : (literal_bytes / num_entries);
|
|
|
|
|
|
|
|
st->print_cr("%s statistics:", table_name);
|
|
|
|
st->print_cr("Number of buckets : %9d = %9d bytes, avg %7.3f", (int)num_buckets, bucket_bytes, bucket_avg);
|
|
|
|
st->print_cr("Number of entries : %9d = %9d bytes, avg %7.3f", (int)num_entries, entry_bytes, entry_avg);
|
|
|
|
st->print_cr("Number of literals : %9d = %9d bytes, avg %7.3f", (int)num_entries, literal_bytes, literal_avg);
|
|
|
|
st->print_cr("Total footprint : %9s = %9d bytes", "", total_bytes);
|
|
|
|
st->print_cr("Average bucket size : %9.3f", summary.avg());
|
|
|
|
st->print_cr("Variance of bucket size : %9.3f", summary.variance());
|
|
|
|
st->print_cr("Std. dev. of bucket size: %9.3f", summary.sd());
|
|
|
|
st->print_cr("Maximum bucket size : %9d", (int)summary.maximum());
|
|
|
|
}
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Dump the hash table buckets.
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
template <MEMFLAGS F> void BasicHashtable<F>::copy_buckets(char** top, char* end) {
|
|
|
|
intptr_t len = _table_size * sizeof(HashtableBucket<F>);
|
2007-12-01 00:00:00 +00:00
|
|
|
*(intptr_t*)(*top) = len;
|
|
|
|
*top += sizeof(intptr_t);
|
|
|
|
|
|
|
|
*(intptr_t*)(*top) = _number_of_entries;
|
|
|
|
*top += sizeof(intptr_t);
|
|
|
|
|
|
|
|
if (*top + len > end) {
|
2011-01-27 16:11:27 -08:00
|
|
|
report_out_of_shared_space(SharedMiscData);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
2012-06-28 17:03:16 -04:00
|
|
|
_buckets = (HashtableBucket<F>*)memcpy(*top, _buckets, len);
|
2007-12-01 00:00:00 +00:00
|
|
|
*top += len;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef PRODUCT
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
template <class T, MEMFLAGS F> void Hashtable<T, F>::print() {
|
2007-12-01 00:00:00 +00:00
|
|
|
ResourceMark rm;
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
for (int i = 0; i < BasicHashtable<F>::table_size(); i++) {
|
|
|
|
HashtableEntry<T, F>* entry = bucket(i);
|
2007-12-01 00:00:00 +00:00
|
|
|
while(entry != NULL) {
|
|
|
|
tty->print("%d : ", i);
|
|
|
|
entry->literal()->print();
|
|
|
|
tty->cr();
|
|
|
|
entry = entry->next();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
template <MEMFLAGS F> void BasicHashtable<F>::verify() {
|
2007-12-01 00:00:00 +00:00
|
|
|
int count = 0;
|
|
|
|
for (int i = 0; i < table_size(); i++) {
|
2012-06-28 17:03:16 -04:00
|
|
|
for (BasicHashtableEntry<F>* p = bucket(i); p != NULL; p = p->next()) {
|
2007-12-01 00:00:00 +00:00
|
|
|
++count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assert(count == number_of_entries(), "number of hashtable entries incorrect");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PRODUCT
|
|
|
|
|
|
|
|
#ifdef ASSERT
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
template <MEMFLAGS F> void BasicHashtable<F>::verify_lookup_length(double load) {
|
2007-12-01 00:00:00 +00:00
|
|
|
if ((double)_lookup_length / (double)_lookup_count > load * 2.0) {
|
|
|
|
warning("Performance bug: SystemDictionary lookup_count=%d "
|
|
|
|
"lookup_length=%d average=%lf load=%f",
|
|
|
|
_lookup_count, _lookup_length,
|
|
|
|
(double) _lookup_length / _lookup_count, load);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2014-02-26 11:29:47 +01:00
|
|
|
|
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
// Explicitly instantiate these types
|
2014-08-29 13:12:21 +02:00
|
|
|
#if INCLUDE_ALL_GCS
|
|
|
|
template class Hashtable<nmethod*, mtGC>;
|
|
|
|
template class HashtableEntry<nmethod*, mtGC>;
|
|
|
|
template class BasicHashtable<mtGC>;
|
|
|
|
#endif
|
6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
|
|
|
template class Hashtable<ConstantPool*, mtClass>;
|
2014-08-29 13:08:01 +02:00
|
|
|
template class RehashableHashtable<Symbol*, mtSymbol>;
|
|
|
|
template class RehashableHashtable<oopDesc*, mtSymbol>;
|
2012-06-28 17:03:16 -04:00
|
|
|
template class Hashtable<Symbol*, mtSymbol>;
|
6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
|
|
|
template class Hashtable<Klass*, mtClass>;
|
2015-08-18 11:27:23 -07:00
|
|
|
template class Hashtable<InstanceKlass*, mtClass>;
|
2012-06-28 17:03:16 -04:00
|
|
|
template class Hashtable<oop, mtClass>;
|
2013-09-26 10:25:02 -04:00
|
|
|
#if defined(SOLARIS) || defined(CHECK_UNHANDLED_OOPS)
|
2012-06-28 17:03:16 -04:00
|
|
|
template class Hashtable<oop, mtSymbol>;
|
2014-08-29 13:08:01 +02:00
|
|
|
template class RehashableHashtable<oop, mtSymbol>;
|
2013-09-26 10:25:02 -04:00
|
|
|
#endif // SOLARIS || CHECK_UNHANDLED_OOPS
|
2012-06-28 17:03:16 -04:00
|
|
|
template class Hashtable<oopDesc*, mtSymbol>;
|
|
|
|
template class Hashtable<Symbol*, mtClass>;
|
|
|
|
template class HashtableEntry<Symbol*, mtSymbol>;
|
|
|
|
template class HashtableEntry<Symbol*, mtClass>;
|
|
|
|
template class HashtableEntry<oop, mtSymbol>;
|
|
|
|
template class BasicHashtableEntry<mtSymbol>;
|
|
|
|
template class BasicHashtableEntry<mtCode>;
|
|
|
|
template class BasicHashtable<mtClass>;
|
2015-08-18 11:27:23 -07:00
|
|
|
template class BasicHashtable<mtClassShared>;
|
2012-06-28 17:03:16 -04:00
|
|
|
template class BasicHashtable<mtSymbol>;
|
|
|
|
template class BasicHashtable<mtCode>;
|
|
|
|
template class BasicHashtable<mtInternal>;
|
2016-03-01 23:46:09 +01:00
|
|
|
#if INCLUDE_TRACE
|
|
|
|
template class Hashtable<Symbol*, mtTracing>;
|
|
|
|
template class HashtableEntry<Symbol*, mtTracing>;
|
|
|
|
template class BasicHashtable<mtTracing>;
|
|
|
|
#endif
|
2015-05-05 12:33:57 -07:00
|
|
|
template class BasicHashtable<mtCompiler>;
|