comparison src/share/vm/code/scopeDesc.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 e522a00b91aa 78bbf4d43a14
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
63 void ScopeDesc::decode_body() { 63 void ScopeDesc::decode_body() {
64 if (decode_offset() == DebugInformationRecorder::serialized_null) { 64 if (decode_offset() == DebugInformationRecorder::serialized_null) {
65 // This is a sentinel record, which is only relevant to 65 // This is a sentinel record, which is only relevant to
66 // approximate queries. Decode a reasonable frame. 66 // approximate queries. Decode a reasonable frame.
67 _sender_decode_offset = DebugInformationRecorder::serialized_null; 67 _sender_decode_offset = DebugInformationRecorder::serialized_null;
68 _method = methodHandle(_code->method()); 68 _method = _code->method();
69 _bci = InvocationEntryBci; 69 _bci = InvocationEntryBci;
70 _locals_decode_offset = DebugInformationRecorder::serialized_null; 70 _locals_decode_offset = DebugInformationRecorder::serialized_null;
71 _expressions_decode_offset = DebugInformationRecorder::serialized_null; 71 _expressions_decode_offset = DebugInformationRecorder::serialized_null;
72 _monitors_decode_offset = DebugInformationRecorder::serialized_null; 72 _monitors_decode_offset = DebugInformationRecorder::serialized_null;
73 } else { 73 } else {
74 // decode header 74 // decode header
75 DebugInfoReadStream* stream = stream_at(decode_offset()); 75 DebugInfoReadStream* stream = stream_at(decode_offset());
76 76
77 _sender_decode_offset = stream->read_int(); 77 _sender_decode_offset = stream->read_int();
78 _method = methodHandle((methodOop) stream->read_oop()); 78 _method = stream->read_method();
79 _bci = stream->read_bci(); 79 _bci = stream->read_bci();
80 80
81 // decode offsets for body and sender 81 // decode offsets for body and sender
82 _locals_decode_offset = stream->read_int(); 82 _locals_decode_offset = stream->read_int();
83 _expressions_decode_offset = stream->read_int(); 83 _expressions_decode_offset = stream->read_int();
155 155
156 #ifndef PRODUCT 156 #ifndef PRODUCT
157 157
158 void ScopeDesc::print_value_on(outputStream* st) const { 158 void ScopeDesc::print_value_on(outputStream* st) const {
159 tty->print(" "); 159 tty->print(" ");
160 method()()->print_short_name(st); 160 method()->print_short_name(st);
161 int lineno = method()->line_number_from_bci(bci()); 161 int lineno = method()->line_number_from_bci(bci());
162 if (lineno != -1) { 162 if (lineno != -1) {
163 st->print_cr("@%d (line %d)", bci(), lineno); 163 st->print_cr("@%d (line %d)", bci(), lineno);
164 } else { 164 } else {
165 st->print_cr("@%d", bci()); 165 st->print_cr("@%d", bci());