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:
Jon Masamitsu 2012-09-01 13:25:18 -04:00 committed by Coleen Phillimore
parent 36eee7c8c8
commit 5c58d27aac
853 changed files with 26124 additions and 82956 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 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
@ -305,7 +305,7 @@ void DebugInformationRecorder::describe_scope(int pc_offset,
stream()->write_int(sender_stream_offset);
// serialize scope
jobject method_enc = (method == NULL)? NULL: method->constant_encoding();
Metadata* method_enc = (method == NULL)? NULL: method->constant_encoding();
stream()->write_int(oop_recorder()->find_index(method_enc));
stream()->write_bci(bci);
assert(method == NULL ||
@ -378,26 +378,36 @@ void DebugInformationRecorder::end_scopes(int pc_offset, bool is_safepoint) {
}
}
#ifdef ASSERT
bool DebugInformationRecorder::recorders_frozen() {
return _oop_recorder->is_complete() || _oop_recorder->is_complete();
}
void DebugInformationRecorder::mark_recorders_frozen() {
_oop_recorder->freeze();
}
#endif // PRODUCT
DebugToken* DebugInformationRecorder::create_scope_values(GrowableArray<ScopeValue*>* values) {
assert(!_oop_recorder->is_complete(), "not frozen yet");
assert(!recorders_frozen(), "not frozen yet");
return (DebugToken*) (intptr_t) serialize_scope_values(values);
}
DebugToken* DebugInformationRecorder::create_monitor_values(GrowableArray<MonitorValue*>* monitors) {
assert(!_oop_recorder->is_complete(), "not frozen yet");
assert(!recorders_frozen(), "not frozen yet");
return (DebugToken*) (intptr_t) serialize_monitor_values(monitors);
}
int DebugInformationRecorder::data_size() {
debug_only(_oop_recorder->oop_size()); // mark it "frozen" for asserts
debug_only(mark_recorders_frozen()); // mark it "frozen" for asserts
return _stream->position();
}
int DebugInformationRecorder::pcs_size() {
debug_only(_oop_recorder->oop_size()); // mark it "frozen" for asserts
debug_only(mark_recorders_frozen()); // mark it "frozen" for asserts
if (last_pc()->pc_offset() != PcDesc::upper_offset_limit)
add_new_pc_offset(PcDesc::upper_offset_limit);
return _pcs_length * sizeof(PcDesc);