2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-02-13 14:37:35 +01:00
|
|
|
* Copyright (c) 2003, 2015, 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
|
|
|
#ifndef SHARE_VM_CLASSFILE_DICTIONARY_HPP
|
|
|
|
#define SHARE_VM_CLASSFILE_DICTIONARY_HPP
|
|
|
|
|
|
|
|
#include "classfile/systemDictionary.hpp"
|
|
|
|
#include "oops/instanceKlass.hpp"
|
2015-02-13 14:37:35 +01:00
|
|
|
#include "oops/oop.hpp"
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "utilities/hashtable.hpp"
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
class DictionaryEntry;
|
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
|
|
|
class PSPromotionManager;
|
2013-10-09 10:57:01 +02:00
|
|
|
class ProtectionDomainCacheTable;
|
|
|
|
class ProtectionDomainCacheEntry;
|
|
|
|
class BoolObjectClosure;
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// The data structure for the system dictionary (and the shared system
|
|
|
|
// dictionary).
|
|
|
|
|
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
|
|
|
class Dictionary : public TwoOopHashtable<Klass*, mtClass> {
|
2007-12-01 00:00:00 +00:00
|
|
|
friend class VMStructs;
|
|
|
|
private:
|
|
|
|
// current iteration index.
|
|
|
|
static int _current_class_index;
|
|
|
|
// pointer to the current hash table entry.
|
|
|
|
static DictionaryEntry* _current_class_entry;
|
|
|
|
|
2013-10-09 10:57:01 +02:00
|
|
|
ProtectionDomainCacheTable* _pd_cache_table;
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
DictionaryEntry* get_entry(int index, unsigned int hash,
|
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
|
|
|
Symbol* name, ClassLoaderData* loader_data);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2015-08-18 11:27:23 -07:00
|
|
|
protected:
|
2015-12-08 20:04:03 +01:00
|
|
|
DictionaryEntry* bucket(int i) const {
|
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
|
|
|
return (DictionaryEntry*)Hashtable<Klass*, mtClass>::bucket(i);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// The following method is not MT-safe and must be done under lock.
|
|
|
|
DictionaryEntry** bucket_addr(int i) {
|
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
|
|
|
return (DictionaryEntry**)Hashtable<Klass*, mtClass>::bucket_addr(i);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void add_entry(int index, DictionaryEntry* new_entry) {
|
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
|
|
|
Hashtable<Klass*, mtClass>::add_entry(index, (HashtableEntry<Klass*, mtClass>*)new_entry);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2015-08-18 11:27:23 -07:00
|
|
|
static size_t entry_size();
|
2007-12-01 00:00:00 +00:00
|
|
|
public:
|
|
|
|
Dictionary(int table_size);
|
2012-06-28 17:03:16 -04:00
|
|
|
Dictionary(int table_size, HashtableBucket<mtClass>* t, int number_of_entries);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
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
|
|
|
DictionaryEntry* new_entry(unsigned int hash, Klass* klass, ClassLoaderData* loader_data);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
DictionaryEntry* new_entry();
|
|
|
|
|
|
|
|
void free_entry(DictionaryEntry* entry);
|
|
|
|
|
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
|
|
|
void add_klass(Symbol* class_name, ClassLoaderData* loader_data,KlassHandle obj);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
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
|
|
|
Klass* find_class(int index, unsigned int hash,
|
|
|
|
Symbol* name, ClassLoaderData* loader_data);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
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
|
|
|
Klass* find_shared_class(int index, unsigned int hash, Symbol* name);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Compiler support
|
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
|
|
|
Klass* try_get_next_class();
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// GC support
|
|
|
|
void oops_do(OopClosure* f);
|
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
|
|
|
void always_strong_oops_do(OopClosure* blk);
|
2014-07-07 10:12:40 +02:00
|
|
|
void roots_oops_do(OopClosure* strong, OopClosure* weak);
|
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
|
|
|
|
|
|
|
void always_strong_classes_do(KlassClosure* closure);
|
|
|
|
|
|
|
|
void classes_do(void f(Klass*));
|
|
|
|
void classes_do(void f(Klass*, TRAPS), TRAPS);
|
|
|
|
void classes_do(void f(Klass*, ClassLoaderData*));
|
2007-12-01 00:00:00 +00:00
|
|
|
|
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
|
|
|
void methods_do(void f(Method*));
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2013-10-09 10:57:01 +02:00
|
|
|
void unlink(BoolObjectClosure* is_alive);
|
2014-08-12 17:29:00 -07:00
|
|
|
void remove_classes_in_error_state();
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Classes loaded by the bootstrap loader are always strongly reachable.
|
|
|
|
// If we're not doing class unloading, all classes are strongly reachable.
|
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
|
|
|
static bool is_strongly_reachable(ClassLoaderData* loader_data, Klass* klass) {
|
2007-12-01 00:00:00 +00:00
|
|
|
assert (klass != NULL, "should have non-null klass");
|
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
|
|
|
return (loader_data->is_the_null_class_loader_data() || !ClassUnloading);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2014-08-14 09:15:39 +02:00
|
|
|
// Unload (that is, break root links to) all unmarked classes and loaders.
|
|
|
|
void do_unloading();
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Protection domains
|
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
|
|
|
Klass* find(int index, unsigned int hash, Symbol* name,
|
|
|
|
ClassLoaderData* loader_data, Handle protection_domain, TRAPS);
|
2007-12-01 00:00:00 +00:00
|
|
|
bool is_valid_protection_domain(int index, unsigned int hash,
|
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
|
|
|
Symbol* name, ClassLoaderData* loader_data,
|
2007-12-01 00:00:00 +00:00
|
|
|
Handle protection_domain);
|
|
|
|
void add_protection_domain(int index, unsigned int hash,
|
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
|
|
|
instanceKlassHandle klass, ClassLoaderData* loader_data,
|
2007-12-01 00:00:00 +00:00
|
|
|
Handle protection_domain, TRAPS);
|
|
|
|
|
|
|
|
// Sharing support
|
|
|
|
void reorder_dictionary();
|
|
|
|
|
2013-10-09 10:57:01 +02:00
|
|
|
ProtectionDomainCacheEntry* cache_get(oop protection_domain);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2014-08-12 17:29:00 -07:00
|
|
|
void print(bool details = true);
|
2007-12-01 00:00:00 +00:00
|
|
|
void verify();
|
|
|
|
};
|
|
|
|
|
|
|
|
// The following classes can be in dictionary.cpp, but we need these
|
2013-10-09 10:57:01 +02:00
|
|
|
// to be in header file so that SA's vmStructs can access them.
|
|
|
|
class ProtectionDomainCacheEntry : public HashtableEntry<oop, mtClass> {
|
|
|
|
friend class VMStructs;
|
|
|
|
private:
|
|
|
|
// Flag indicating whether this protection domain entry is strongly reachable.
|
|
|
|
// Used during iterating over the system dictionary to remember oops that need
|
|
|
|
// to be updated.
|
|
|
|
bool _strongly_reachable;
|
|
|
|
public:
|
|
|
|
oop protection_domain() { return literal(); }
|
|
|
|
|
|
|
|
void init() {
|
|
|
|
_strongly_reachable = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
ProtectionDomainCacheEntry* next() {
|
|
|
|
return (ProtectionDomainCacheEntry*)HashtableEntry<oop, mtClass>::next();
|
|
|
|
}
|
|
|
|
|
|
|
|
ProtectionDomainCacheEntry** next_addr() {
|
|
|
|
return (ProtectionDomainCacheEntry**)HashtableEntry<oop, mtClass>::next_addr();
|
|
|
|
}
|
|
|
|
|
|
|
|
void oops_do(OopClosure* f) {
|
|
|
|
f->do_oop(literal_addr());
|
|
|
|
}
|
|
|
|
|
|
|
|
void set_strongly_reachable() { _strongly_reachable = true; }
|
|
|
|
bool is_strongly_reachable() { return _strongly_reachable; }
|
|
|
|
void reset_strongly_reachable() { _strongly_reachable = false; }
|
|
|
|
|
|
|
|
void print() PRODUCT_RETURN;
|
|
|
|
void verify();
|
|
|
|
};
|
|
|
|
|
|
|
|
// The ProtectionDomainCacheTable contains all protection domain oops. The system
|
|
|
|
// dictionary entries reference its entries instead of having references to oops
|
|
|
|
// directly.
|
|
|
|
// This is used to speed up system dictionary iteration: the oops in the
|
|
|
|
// protection domain are the only ones referring the Java heap. So when there is
|
|
|
|
// need to update these, instead of going over every entry of the system dictionary,
|
|
|
|
// we only need to iterate over this set.
|
|
|
|
// The amount of different protection domains used is typically magnitudes smaller
|
|
|
|
// than the number of system dictionary entries (loaded classes).
|
|
|
|
class ProtectionDomainCacheTable : public Hashtable<oop, mtClass> {
|
|
|
|
friend class VMStructs;
|
|
|
|
private:
|
|
|
|
ProtectionDomainCacheEntry* bucket(int i) {
|
|
|
|
return (ProtectionDomainCacheEntry*) Hashtable<oop, mtClass>::bucket(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
// The following method is not MT-safe and must be done under lock.
|
|
|
|
ProtectionDomainCacheEntry** bucket_addr(int i) {
|
|
|
|
return (ProtectionDomainCacheEntry**) Hashtable<oop, mtClass>::bucket_addr(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
ProtectionDomainCacheEntry* new_entry(unsigned int hash, oop protection_domain) {
|
|
|
|
ProtectionDomainCacheEntry* entry = (ProtectionDomainCacheEntry*) Hashtable<oop, mtClass>::new_entry(hash, protection_domain);
|
|
|
|
entry->init();
|
|
|
|
return entry;
|
|
|
|
}
|
|
|
|
|
|
|
|
static unsigned int compute_hash(oop protection_domain) {
|
|
|
|
return (unsigned int)(protection_domain->identity_hash());
|
|
|
|
}
|
|
|
|
|
|
|
|
int index_for(oop protection_domain) {
|
|
|
|
return hash_to_index(compute_hash(protection_domain));
|
|
|
|
}
|
|
|
|
|
|
|
|
ProtectionDomainCacheEntry* add_entry(int index, unsigned int hash, oop protection_domain);
|
|
|
|
ProtectionDomainCacheEntry* find_entry(int index, oop protection_domain);
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
ProtectionDomainCacheTable(int table_size);
|
|
|
|
|
|
|
|
ProtectionDomainCacheEntry* get(oop protection_domain);
|
|
|
|
void free(ProtectionDomainCacheEntry* entry);
|
|
|
|
|
|
|
|
void unlink(BoolObjectClosure* cl);
|
|
|
|
|
|
|
|
// GC support
|
|
|
|
void oops_do(OopClosure* f);
|
|
|
|
void always_strong_oops_do(OopClosure* f);
|
2014-07-07 10:12:40 +02:00
|
|
|
void roots_oops_do(OopClosure* strong, OopClosure* weak);
|
2013-10-09 10:57:01 +02:00
|
|
|
|
|
|
|
static uint bucket_size();
|
|
|
|
|
|
|
|
void print() PRODUCT_RETURN;
|
|
|
|
void verify();
|
|
|
|
};
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
class ProtectionDomainEntry :public CHeapObj<mtClass> {
|
2007-12-01 00:00:00 +00:00
|
|
|
friend class VMStructs;
|
|
|
|
public:
|
|
|
|
ProtectionDomainEntry* _next;
|
2013-10-09 10:57:01 +02:00
|
|
|
ProtectionDomainCacheEntry* _pd_cache;
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2013-10-09 10:57:01 +02:00
|
|
|
ProtectionDomainEntry(ProtectionDomainCacheEntry* pd_cache, ProtectionDomainEntry* next) {
|
|
|
|
_pd_cache = pd_cache;
|
|
|
|
_next = next;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ProtectionDomainEntry* next() { return _next; }
|
2013-10-09 10:57:01 +02:00
|
|
|
oop protection_domain() { return _pd_cache->protection_domain(); }
|
2007-12-01 00:00:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// An entry in the system dictionary, this describes a class as
|
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
|
|
|
// { Klass*, loader, protection_domain }.
|
2007-12-01 00:00:00 +00:00
|
|
|
|
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
|
|
|
class DictionaryEntry : public HashtableEntry<Klass*, mtClass> {
|
2007-12-01 00:00:00 +00:00
|
|
|
friend class VMStructs;
|
|
|
|
private:
|
|
|
|
// Contains the set of approved protection domains that can access
|
|
|
|
// this system dictionary entry.
|
2013-10-09 10:57:01 +02:00
|
|
|
//
|
|
|
|
// This protection domain set is a set of tuples:
|
|
|
|
//
|
|
|
|
// (InstanceKlass C, initiating class loader ICL, Protection Domain PD)
|
|
|
|
//
|
|
|
|
// [Note that C.protection_domain(), which is stored in the java.lang.Class
|
|
|
|
// mirror of C, is NOT the same as PD]
|
|
|
|
//
|
|
|
|
// If such an entry (C, ICL, PD) exists in the table, it means that
|
|
|
|
// it is okay for a class Foo to reference C, where
|
|
|
|
//
|
|
|
|
// Foo.protection_domain() == PD, and
|
|
|
|
// Foo's defining class loader == ICL
|
|
|
|
//
|
|
|
|
// The usage of the PD set can be seen in SystemDictionary::validate_protection_domain()
|
|
|
|
// It is essentially a cache to avoid repeated Java up-calls to
|
|
|
|
// ClassLoader.checkPackageAccess().
|
|
|
|
//
|
2007-12-01 00:00:00 +00:00
|
|
|
ProtectionDomainEntry* _pd_set;
|
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
|
|
|
ClassLoaderData* _loader_data;
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
// Tells whether a protection is in the approved set.
|
|
|
|
bool contains_protection_domain(oop protection_domain) const;
|
|
|
|
// Adds a protection domain to the approved set.
|
2013-10-09 10:57:01 +02:00
|
|
|
void add_protection_domain(Dictionary* dict, oop protection_domain);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
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
|
|
|
Klass* klass() const { return (Klass*)literal(); }
|
|
|
|
Klass** klass_addr() { return (Klass**)literal_addr(); }
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
DictionaryEntry* next() const {
|
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
|
|
|
return (DictionaryEntry*)HashtableEntry<Klass*, mtClass>::next();
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DictionaryEntry** next_addr() {
|
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
|
|
|
return (DictionaryEntry**)HashtableEntry<Klass*, mtClass>::next_addr();
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
ClassLoaderData* loader_data() const { return _loader_data; }
|
|
|
|
void set_loader_data(ClassLoaderData* loader_data) { _loader_data = loader_data; }
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
ProtectionDomainEntry* pd_set() const { return _pd_set; }
|
|
|
|
void set_pd_set(ProtectionDomainEntry* pd_set) { _pd_set = pd_set; }
|
|
|
|
|
|
|
|
bool has_protection_domain() { return _pd_set != NULL; }
|
|
|
|
|
|
|
|
// Tells whether the initiating class' protection can access the this _klass
|
|
|
|
bool is_valid_protection_domain(Handle protection_domain) {
|
|
|
|
if (!ProtectionDomainVerification) return true;
|
|
|
|
if (!SystemDictionary::has_checkPackageAccess()) return true;
|
|
|
|
|
|
|
|
return protection_domain() == NULL
|
|
|
|
? true
|
|
|
|
: contains_protection_domain(protection_domain());
|
|
|
|
}
|
|
|
|
|
2013-10-09 10:57:01 +02:00
|
|
|
void set_strongly_reachable() {
|
2007-12-01 00:00:00 +00:00
|
|
|
for (ProtectionDomainEntry* current = _pd_set;
|
|
|
|
current != NULL;
|
|
|
|
current = current->_next) {
|
2013-10-09 10:57:01 +02:00
|
|
|
current->_pd_cache->set_strongly_reachable();
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void verify_protection_domain_set() {
|
|
|
|
for (ProtectionDomainEntry* current = _pd_set;
|
|
|
|
current != NULL;
|
|
|
|
current = current->_next) {
|
2013-10-09 10:57:01 +02:00
|
|
|
current->_pd_cache->protection_domain()->verify();
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-08 20:04:03 +01:00
|
|
|
bool equals(const Symbol* class_name, ClassLoaderData* loader_data) const {
|
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
|
|
|
Klass* klass = (Klass*)literal();
|
2015-10-26 13:11:36 -04:00
|
|
|
return (klass->name() == class_name && _loader_data == loader_data);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void print() {
|
|
|
|
int count = 0;
|
|
|
|
for (ProtectionDomainEntry* current = _pd_set;
|
|
|
|
current != NULL;
|
|
|
|
current = current->_next) {
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
tty->print_cr("pd set = #%d", count);
|
|
|
|
}
|
|
|
|
};
|
2009-04-08 10:56:49 -07:00
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
// Entry in a SymbolPropertyTable, mapping a single Symbol*
|
2009-04-08 10:56:49 -07:00
|
|
|
// to a managed and an unmanaged pointer.
|
2012-06-28 17:03:16 -04:00
|
|
|
class SymbolPropertyEntry : public HashtableEntry<Symbol*, mtSymbol> {
|
2009-04-08 10:56:49 -07:00
|
|
|
friend class VMStructs;
|
|
|
|
private:
|
2010-05-01 02:42:18 -07:00
|
|
|
intptr_t _symbol_mode; // secondary key
|
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
|
|
|
Method* _method;
|
|
|
|
oop _method_type;
|
2009-04-08 10:56:49 -07:00
|
|
|
|
|
|
|
public:
|
2011-01-27 16:11:27 -08:00
|
|
|
Symbol* symbol() const { return literal(); }
|
2009-04-08 10:56:49 -07:00
|
|
|
|
2010-05-01 02:42:18 -07:00
|
|
|
intptr_t symbol_mode() const { return _symbol_mode; }
|
|
|
|
void set_symbol_mode(intptr_t m) { _symbol_mode = m; }
|
|
|
|
|
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
|
|
|
Method* method() const { return _method; }
|
|
|
|
void set_method(Method* p) { _method = p; }
|
2009-04-08 10:56:49 -07:00
|
|
|
|
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
|
|
|
oop method_type() const { return _method_type; }
|
|
|
|
oop* method_type_addr() { return &_method_type; }
|
|
|
|
void set_method_type(oop p) { _method_type = p; }
|
2009-04-08 10:56:49 -07:00
|
|
|
|
|
|
|
SymbolPropertyEntry* next() const {
|
2012-06-28 17:03:16 -04:00
|
|
|
return (SymbolPropertyEntry*)HashtableEntry<Symbol*, mtSymbol>::next();
|
2009-04-08 10:56:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
SymbolPropertyEntry** next_addr() {
|
2012-06-28 17:03:16 -04:00
|
|
|
return (SymbolPropertyEntry**)HashtableEntry<Symbol*, mtSymbol>::next_addr();
|
2009-04-08 10:56:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void print_on(outputStream* st) const {
|
|
|
|
symbol()->print_value_on(st);
|
2015-06-24 12:12:25 -04:00
|
|
|
st->print("/mode=" INTX_FORMAT, symbol_mode());
|
2009-04-08 10:56:49 -07:00
|
|
|
st->print(" -> ");
|
|
|
|
bool printed = false;
|
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
|
|
|
if (method() != NULL) {
|
|
|
|
method()->print_value_on(st);
|
2009-04-08 10:56:49 -07:00
|
|
|
printed = true;
|
|
|
|
}
|
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
|
|
|
if (method_type() != NULL) {
|
2009-04-08 10:56:49 -07:00
|
|
|
if (printed) st->print(" and ");
|
2014-05-09 16:50:54 -04:00
|
|
|
st->print(INTPTR_FORMAT, p2i((void *)method_type()));
|
2009-04-08 10:56:49 -07:00
|
|
|
printed = true;
|
|
|
|
}
|
|
|
|
st->print_cr(printed ? "" : "(empty)");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
// A system-internal mapping of symbols to pointers, both managed
|
|
|
|
// and unmanaged. Used to record the auto-generation of each method
|
|
|
|
// MethodHandle.invoke(S)T, for all signatures (S)T.
|
2012-06-28 17:03:16 -04:00
|
|
|
class SymbolPropertyTable : public Hashtable<Symbol*, mtSymbol> {
|
2009-04-08 10:56:49 -07:00
|
|
|
friend class VMStructs;
|
|
|
|
private:
|
|
|
|
SymbolPropertyEntry* bucket(int i) {
|
2012-06-28 17:03:16 -04:00
|
|
|
return (SymbolPropertyEntry*) Hashtable<Symbol*, mtSymbol>::bucket(i);
|
2009-04-08 10:56:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// The following method is not MT-safe and must be done under lock.
|
|
|
|
SymbolPropertyEntry** bucket_addr(int i) {
|
2012-06-28 17:03:16 -04:00
|
|
|
return (SymbolPropertyEntry**) Hashtable<Symbol*, mtSymbol>::bucket_addr(i);
|
2009-04-08 10:56:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void add_entry(int index, SymbolPropertyEntry* new_entry) {
|
|
|
|
ShouldNotReachHere();
|
|
|
|
}
|
|
|
|
void set_entry(int index, SymbolPropertyEntry* new_entry) {
|
|
|
|
ShouldNotReachHere();
|
|
|
|
}
|
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
SymbolPropertyEntry* new_entry(unsigned int hash, Symbol* symbol, intptr_t symbol_mode) {
|
2012-06-28 17:03:16 -04:00
|
|
|
SymbolPropertyEntry* entry = (SymbolPropertyEntry*) Hashtable<Symbol*, mtSymbol>::new_entry(hash, symbol);
|
2011-01-27 16:11:27 -08:00
|
|
|
// Hashtable with Symbol* literal must increment and decrement refcount.
|
|
|
|
symbol->increment_refcount();
|
2010-05-01 02:42:18 -07:00
|
|
|
entry->set_symbol_mode(symbol_mode);
|
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
|
|
|
entry->set_method(NULL);
|
|
|
|
entry->set_method_type(NULL);
|
2009-04-08 10:56:49 -07:00
|
|
|
return entry;
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
SymbolPropertyTable(int table_size);
|
2012-06-28 17:03:16 -04:00
|
|
|
SymbolPropertyTable(int table_size, HashtableBucket<mtSymbol>* t, int number_of_entries);
|
2009-04-08 10:56:49 -07:00
|
|
|
|
|
|
|
void free_entry(SymbolPropertyEntry* entry) {
|
2011-01-27 16:11:27 -08:00
|
|
|
// decrement Symbol refcount here because hashtable doesn't.
|
|
|
|
entry->literal()->decrement_refcount();
|
2012-06-28 17:03:16 -04:00
|
|
|
Hashtable<Symbol*, mtSymbol>::free_entry(entry);
|
2009-04-08 10:56:49 -07:00
|
|
|
}
|
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
unsigned int compute_hash(Symbol* sym, intptr_t symbol_mode) {
|
2009-04-08 10:56:49 -07:00
|
|
|
// Use the regular identity_hash.
|
2012-06-28 17:03:16 -04:00
|
|
|
return Hashtable<Symbol*, mtSymbol>::compute_hash(sym) ^ symbol_mode;
|
2010-05-01 02:42:18 -07:00
|
|
|
}
|
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
int index_for(Symbol* name, intptr_t symbol_mode) {
|
2010-05-01 02:42:18 -07:00
|
|
|
return hash_to_index(compute_hash(name, symbol_mode));
|
2009-04-08 10:56:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// need not be locked; no state change
|
2011-01-27 16:11:27 -08:00
|
|
|
SymbolPropertyEntry* find_entry(int index, unsigned int hash, Symbol* name, intptr_t name_mode);
|
2009-04-08 10:56:49 -07:00
|
|
|
|
|
|
|
// must be done under SystemDictionary_lock
|
2011-01-27 16:11:27 -08:00
|
|
|
SymbolPropertyEntry* add_entry(int index, unsigned int hash, Symbol* name, intptr_t name_mode);
|
2009-04-08 10:56:49 -07:00
|
|
|
|
|
|
|
// GC support
|
|
|
|
void oops_do(OopClosure* f);
|
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
|
|
|
|
|
|
|
void methods_do(void f(Method*));
|
2009-04-08 10:56:49 -07:00
|
|
|
|
|
|
|
// Sharing support
|
|
|
|
void reorder_dictionary();
|
|
|
|
|
|
|
|
#ifndef PRODUCT
|
|
|
|
void print();
|
|
|
|
#endif
|
|
|
|
void verify();
|
|
|
|
};
|
2010-11-23 13:22:55 -08:00
|
|
|
#endif // SHARE_VM_CLASSFILE_DICTIONARY_HPP
|