mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02: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
This commit is contained in:
parent
36eee7c8c8
commit
5c58d27aac
853 changed files with 26124 additions and 82956 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "oops/instanceKlass.hpp"
|
||||
|
||||
// An instanceRefKlass is a specialized instanceKlass for Java
|
||||
// An instanceRefKlass is a specialized InstanceKlass for Java
|
||||
// classes that are subclasses of java/lang/ref/Reference.
|
||||
//
|
||||
// These classes are used to implement soft/weak/final/phantom
|
||||
|
@ -44,20 +44,24 @@
|
|||
// and the pending list lock object in the same class is notified.
|
||||
|
||||
|
||||
class instanceRefKlass: public instanceKlass {
|
||||
class instanceRefKlass: public InstanceKlass {
|
||||
friend class InstanceKlass;
|
||||
|
||||
// Constructor
|
||||
instanceRefKlass(int vtable_len, int itable_len, int static_field_size, int nonstatic_oop_map_size, ReferenceType rt, AccessFlags access_flags, bool is_anonymous)
|
||||
: InstanceKlass(vtable_len, itable_len, static_field_size, nonstatic_oop_map_size, rt, access_flags, is_anonymous) {}
|
||||
|
||||
public:
|
||||
instanceRefKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
|
||||
// Type testing
|
||||
bool oop_is_instanceRef() const { return true; }
|
||||
|
||||
// Casting from klassOop
|
||||
static instanceRefKlass* cast(klassOop k) {
|
||||
assert(k->klass_part()->oop_is_instanceRef(), "cast to instanceRefKlass");
|
||||
return (instanceRefKlass*) k->klass_part();
|
||||
// Casting from Klass*
|
||||
static instanceRefKlass* cast(Klass* k) {
|
||||
assert(k->oop_is_instanceRef(), "cast to instanceRefKlass");
|
||||
return (instanceRefKlass*) k;
|
||||
}
|
||||
|
||||
// allocation
|
||||
DEFINE_ALLOCATE_PERMANENT(instanceRefKlass);
|
||||
|
||||
// Garbage collection
|
||||
int oop_adjust_pointers(oop obj);
|
||||
void oop_follow_contents(oop obj);
|
||||
|
@ -65,10 +69,10 @@ class instanceRefKlass: public instanceKlass {
|
|||
// Parallel Scavenge and Parallel Old
|
||||
PARALLEL_GC_DECLS
|
||||
|
||||
int oop_oop_iterate(oop obj, OopClosure* blk) {
|
||||
int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {
|
||||
return oop_oop_iterate_v(obj, blk);
|
||||
}
|
||||
int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) {
|
||||
int oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) {
|
||||
return oop_oop_iterate_v_m(obj, blk, mr);
|
||||
}
|
||||
|
||||
|
@ -93,7 +97,7 @@ class instanceRefKlass: public instanceKlass {
|
|||
|
||||
// Update non-static oop maps so 'referent', 'nextPending' and
|
||||
// 'discovered' will look like non-oops
|
||||
static void update_nonstatic_oop_maps(klassOop k);
|
||||
static void update_nonstatic_oop_maps(Klass* k);
|
||||
|
||||
public:
|
||||
// Verification
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue