Mercurial > hg > graal-compiler
diff src/share/vm/code/debugInfo.cpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | f95d63e2154a |
children | b6a8f2d23057 78bbf4d43a14 |
line wrap: on
line diff
--- a/src/share/vm/code/debugInfo.cpp Fri Aug 31 16:39:35 2012 -0700 +++ b/src/share/vm/code/debugInfo.cpp Sat Sep 01 13:25:18 2012 -0400 @@ -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 @@ -41,6 +41,10 @@ write_int(recorder()->oop_recorder()->find_index(h)); } +void DebugInfoWriteStream::write_metadata(Metadata* h) { + write_int(recorder()->oop_recorder()->find_index(h)); +} + ScopeValue* DebugInfoReadStream::read_object_value() { int id = read_int(); #ifdef ASSERT @@ -109,7 +113,7 @@ void ObjectValue::read_object(DebugInfoReadStream* stream) { _klass = read_from(stream); - assert(_klass->is_constant_oop(), "should be constant klass oop"); + assert(_klass->is_constant_oop(), "should be constant java mirror oop"); int length = stream->read_int(); for (int i = 0; i < length; i++) { ScopeValue* val = read_from(stream); @@ -198,6 +202,9 @@ // ConstantOopWriteValue void ConstantOopWriteValue::write_on(DebugInfoWriteStream* stream) { + assert(JNIHandles::resolve(value()) == NULL || + Universe::heap()->is_in_reserved(JNIHandles::resolve(value())), + "Should be in heap"); stream->write_int(CONSTANT_OOP_CODE); stream->write_handle(value()); } @@ -211,6 +218,8 @@ ConstantOopReadValue::ConstantOopReadValue(DebugInfoReadStream* stream) { _value = Handle(stream->read_oop()); + assert(_value() == NULL || + Universe::heap()->is_in_reserved(_value()), "Should be in heap"); } void ConstantOopReadValue::write_on(DebugInfoWriteStream* stream) {