annotate src/share/vm/code/debugInfoRec.cpp @ 15433:8638307944be

Add flag to always enable debug info sharing (true ifdef GRAAL)
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 29 Apr 2014 16:11:54 +0200
parents fe11cb3c7882
children b888ded3ee42
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
12146
9758d9f36299 8021954: VM SIGSEGV during classloading on MacOS; hs_err_pid file produced
coleenp
parents: 6725
diff changeset
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1253
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1253
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1253
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #include "precompiled.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #include "code/debugInfoRec.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27 #include "code/scopeDesc.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
28 #include "prims/jvmtiExport.hpp"
0
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 // Private definition.
a61af66fc99e Initial load
duke
parents:
diff changeset
31 // There is one DIR_Chunk for each scope and values array.
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // A chunk can potentially be used more than once.
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // We keep track of these chunks in order to detect
a61af66fc99e Initial load
duke
parents:
diff changeset
34 // repetition and enable sharing.
a61af66fc99e Initial load
duke
parents:
diff changeset
35 class DIR_Chunk {
a61af66fc99e Initial load
duke
parents:
diff changeset
36 friend class DebugInformationRecorder;
a61af66fc99e Initial load
duke
parents:
diff changeset
37 int _offset; // location in the stream of this scope
a61af66fc99e Initial load
duke
parents:
diff changeset
38 int _length; // number of bytes in the stream
a61af66fc99e Initial load
duke
parents:
diff changeset
39 int _hash; // hash of stream bytes (for quicker reuse)
a61af66fc99e Initial load
duke
parents:
diff changeset
40
12146
9758d9f36299 8021954: VM SIGSEGV during classloading on MacOS; hs_err_pid file produced
coleenp
parents: 6725
diff changeset
41 void* operator new(size_t ignore, DebugInformationRecorder* dir) throw() {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
42 assert(ignore == sizeof(DIR_Chunk), "");
a61af66fc99e Initial load
duke
parents:
diff changeset
43 if (dir->_next_chunk >= dir->_next_chunk_limit) {
a61af66fc99e Initial load
duke
parents:
diff changeset
44 const int CHUNK = 100;
a61af66fc99e Initial load
duke
parents:
diff changeset
45 dir->_next_chunk = NEW_RESOURCE_ARRAY(DIR_Chunk, CHUNK);
a61af66fc99e Initial load
duke
parents:
diff changeset
46 dir->_next_chunk_limit = dir->_next_chunk + CHUNK;
a61af66fc99e Initial load
duke
parents:
diff changeset
47 }
a61af66fc99e Initial load
duke
parents:
diff changeset
48 return dir->_next_chunk++;
a61af66fc99e Initial load
duke
parents:
diff changeset
49 }
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 DIR_Chunk(int offset, int length, DebugInformationRecorder* dir) {
a61af66fc99e Initial load
duke
parents:
diff changeset
52 _offset = offset;
a61af66fc99e Initial load
duke
parents:
diff changeset
53 _length = length;
a61af66fc99e Initial load
duke
parents:
diff changeset
54 unsigned int hash = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
55 address p = dir->stream()->buffer() + _offset;
a61af66fc99e Initial load
duke
parents:
diff changeset
56 for (int i = 0; i < length; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
57 if (i == 6) break;
a61af66fc99e Initial load
duke
parents:
diff changeset
58 hash *= 127;
a61af66fc99e Initial load
duke
parents:
diff changeset
59 hash += p[i];
a61af66fc99e Initial load
duke
parents:
diff changeset
60 }
a61af66fc99e Initial load
duke
parents:
diff changeset
61 _hash = hash;
a61af66fc99e Initial load
duke
parents:
diff changeset
62 }
a61af66fc99e Initial load
duke
parents:
diff changeset
63
a61af66fc99e Initial load
duke
parents:
diff changeset
64 DIR_Chunk* find_match(GrowableArray<DIR_Chunk*>* arr,
a61af66fc99e Initial load
duke
parents:
diff changeset
65 int start_index,
a61af66fc99e Initial load
duke
parents:
diff changeset
66 DebugInformationRecorder* dir) {
a61af66fc99e Initial load
duke
parents:
diff changeset
67 int end_index = arr->length();
a61af66fc99e Initial load
duke
parents:
diff changeset
68 int hash = this->_hash, length = this->_length;
a61af66fc99e Initial load
duke
parents:
diff changeset
69 address buf = dir->stream()->buffer();
a61af66fc99e Initial load
duke
parents:
diff changeset
70 for (int i = end_index; --i >= start_index; ) {
a61af66fc99e Initial load
duke
parents:
diff changeset
71 DIR_Chunk* that = arr->at(i);
a61af66fc99e Initial load
duke
parents:
diff changeset
72 if (hash == that->_hash &&
a61af66fc99e Initial load
duke
parents:
diff changeset
73 length == that->_length &&
a61af66fc99e Initial load
duke
parents:
diff changeset
74 0 == memcmp(buf + this->_offset, buf + that->_offset, length)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
75 return that;
a61af66fc99e Initial load
duke
parents:
diff changeset
76 }
a61af66fc99e Initial load
duke
parents:
diff changeset
77 }
a61af66fc99e Initial load
duke
parents:
diff changeset
78 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
79 }
a61af66fc99e Initial load
duke
parents:
diff changeset
80 };
a61af66fc99e Initial load
duke
parents:
diff changeset
81
a61af66fc99e Initial load
duke
parents:
diff changeset
82 static inline bool compute_recording_non_safepoints() {
a61af66fc99e Initial load
duke
parents:
diff changeset
83 if (JvmtiExport::should_post_compiled_method_load()
a61af66fc99e Initial load
duke
parents:
diff changeset
84 && FLAG_IS_DEFAULT(DebugNonSafepoints)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
85 // The default value of this flag is taken to be true,
a61af66fc99e Initial load
duke
parents:
diff changeset
86 // if JVMTI is looking at nmethod codes.
a61af66fc99e Initial load
duke
parents:
diff changeset
87 // We anticipate that JVMTI may wish to participate in profiling.
a61af66fc99e Initial load
duke
parents:
diff changeset
88 return true;
a61af66fc99e Initial load
duke
parents:
diff changeset
89 }
a61af66fc99e Initial load
duke
parents:
diff changeset
90
a61af66fc99e Initial load
duke
parents:
diff changeset
91 // If the flag is set manually, use it, whether true or false.
a61af66fc99e Initial load
duke
parents:
diff changeset
92 // Otherwise, if JVMTI is not in the picture, use the default setting.
a61af66fc99e Initial load
duke
parents:
diff changeset
93 // (This is true in debug, just for the exercise, false in product mode.)
a61af66fc99e Initial load
duke
parents:
diff changeset
94 return DebugNonSafepoints;
a61af66fc99e Initial load
duke
parents:
diff changeset
95 }
a61af66fc99e Initial load
duke
parents:
diff changeset
96
a61af66fc99e Initial load
duke
parents:
diff changeset
97 DebugInformationRecorder::DebugInformationRecorder(OopRecorder* oop_recorder)
a61af66fc99e Initial load
duke
parents:
diff changeset
98 : _recording_non_safepoints(compute_recording_non_safepoints())
a61af66fc99e Initial load
duke
parents:
diff changeset
99 {
a61af66fc99e Initial load
duke
parents:
diff changeset
100 _pcs_size = 100;
a61af66fc99e Initial load
duke
parents:
diff changeset
101 _pcs = NEW_RESOURCE_ARRAY(PcDesc, _pcs_size);
a61af66fc99e Initial load
duke
parents:
diff changeset
102 _pcs_length = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 _prev_safepoint_pc = PcDesc::lower_offset_limit;
a61af66fc99e Initial load
duke
parents:
diff changeset
105
a61af66fc99e Initial load
duke
parents:
diff changeset
106 _stream = new DebugInfoWriteStream(this, 10 * K);
a61af66fc99e Initial load
duke
parents:
diff changeset
107 // make sure that there is no stream_decode_offset that is zero
a61af66fc99e Initial load
duke
parents:
diff changeset
108 _stream->write_byte((jbyte)0xFF);
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110 // make sure that we can distinguish the value "serialized_null" from offsets
a61af66fc99e Initial load
duke
parents:
diff changeset
111 assert(_stream->position() > serialized_null, "sanity");
a61af66fc99e Initial load
duke
parents:
diff changeset
112
a61af66fc99e Initial load
duke
parents:
diff changeset
113 _oop_recorder = oop_recorder;
a61af66fc99e Initial load
duke
parents:
diff changeset
114
a61af66fc99e Initial load
duke
parents:
diff changeset
115 _all_chunks = new GrowableArray<DIR_Chunk*>(300);
a61af66fc99e Initial load
duke
parents:
diff changeset
116 _shared_chunks = new GrowableArray<DIR_Chunk*>(30);
a61af66fc99e Initial load
duke
parents:
diff changeset
117 _next_chunk = _next_chunk_limit = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
118
a61af66fc99e Initial load
duke
parents:
diff changeset
119 add_new_pc_offset(PcDesc::lower_offset_limit); // sentinel record
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 debug_only(_recording_state = rs_null);
a61af66fc99e Initial load
duke
parents:
diff changeset
122 }
a61af66fc99e Initial load
duke
parents:
diff changeset
123
a61af66fc99e Initial load
duke
parents:
diff changeset
124
a61af66fc99e Initial load
duke
parents:
diff changeset
125 void DebugInformationRecorder::add_oopmap(int pc_offset, OopMap* map) {
a61af66fc99e Initial load
duke
parents:
diff changeset
126 // !!!!! Preserve old style handling of oopmaps for now
a61af66fc99e Initial load
duke
parents:
diff changeset
127 _oopmaps->add_gc_map(pc_offset, map);
a61af66fc99e Initial load
duke
parents:
diff changeset
128 }
a61af66fc99e Initial load
duke
parents:
diff changeset
129
a61af66fc99e Initial load
duke
parents:
diff changeset
130 void DebugInformationRecorder::add_safepoint(int pc_offset, OopMap* map) {
a61af66fc99e Initial load
duke
parents:
diff changeset
131 assert(!_oop_recorder->is_complete(), "not frozen yet");
a61af66fc99e Initial load
duke
parents:
diff changeset
132 // Store the new safepoint
a61af66fc99e Initial load
duke
parents:
diff changeset
133
a61af66fc99e Initial load
duke
parents:
diff changeset
134 // Add the oop map
a61af66fc99e Initial load
duke
parents:
diff changeset
135 add_oopmap(pc_offset, map);
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 add_new_pc_offset(pc_offset);
a61af66fc99e Initial load
duke
parents:
diff changeset
138
a61af66fc99e Initial load
duke
parents:
diff changeset
139 assert(_recording_state == rs_null, "nesting of recording calls");
a61af66fc99e Initial load
duke
parents:
diff changeset
140 debug_only(_recording_state = rs_safepoint);
a61af66fc99e Initial load
duke
parents:
diff changeset
141 }
a61af66fc99e Initial load
duke
parents:
diff changeset
142
a61af66fc99e Initial load
duke
parents:
diff changeset
143 void DebugInformationRecorder::add_non_safepoint(int pc_offset) {
a61af66fc99e Initial load
duke
parents:
diff changeset
144 assert(!_oop_recorder->is_complete(), "not frozen yet");
a61af66fc99e Initial load
duke
parents:
diff changeset
145 assert(_recording_non_safepoints, "must be recording non-safepoints");
a61af66fc99e Initial load
duke
parents:
diff changeset
146
a61af66fc99e Initial load
duke
parents:
diff changeset
147 add_new_pc_offset(pc_offset);
a61af66fc99e Initial load
duke
parents:
diff changeset
148
a61af66fc99e Initial load
duke
parents:
diff changeset
149 assert(_recording_state == rs_null, "nesting of recording calls");
a61af66fc99e Initial load
duke
parents:
diff changeset
150 debug_only(_recording_state = rs_non_safepoint);
a61af66fc99e Initial load
duke
parents:
diff changeset
151 }
a61af66fc99e Initial load
duke
parents:
diff changeset
152
a61af66fc99e Initial load
duke
parents:
diff changeset
153 void DebugInformationRecorder::add_new_pc_offset(int pc_offset) {
a61af66fc99e Initial load
duke
parents:
diff changeset
154 assert(_pcs_length == 0 || last_pc()->pc_offset() < pc_offset,
a61af66fc99e Initial load
duke
parents:
diff changeset
155 "must specify a new, larger pc offset");
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 // add the pcdesc
a61af66fc99e Initial load
duke
parents:
diff changeset
158 if (_pcs_length == _pcs_size) {
a61af66fc99e Initial load
duke
parents:
diff changeset
159 // Expand
a61af66fc99e Initial load
duke
parents:
diff changeset
160 int new_pcs_size = _pcs_size * 2;
a61af66fc99e Initial load
duke
parents:
diff changeset
161 PcDesc* new_pcs = NEW_RESOURCE_ARRAY(PcDesc, new_pcs_size);
a61af66fc99e Initial load
duke
parents:
diff changeset
162 for (int index = 0; index < _pcs_length; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
163 new_pcs[index] = _pcs[index];
a61af66fc99e Initial load
duke
parents:
diff changeset
164 }
a61af66fc99e Initial load
duke
parents:
diff changeset
165 _pcs_size = new_pcs_size;
a61af66fc99e Initial load
duke
parents:
diff changeset
166 _pcs = new_pcs;
a61af66fc99e Initial load
duke
parents:
diff changeset
167 }
a61af66fc99e Initial load
duke
parents:
diff changeset
168 assert(_pcs_size > _pcs_length, "There must be room for after expanding");
a61af66fc99e Initial load
duke
parents:
diff changeset
169
a61af66fc99e Initial load
duke
parents:
diff changeset
170 _pcs[_pcs_length++] = PcDesc(pc_offset, DebugInformationRecorder::serialized_null,
a61af66fc99e Initial load
duke
parents:
diff changeset
171 DebugInformationRecorder::serialized_null);
a61af66fc99e Initial load
duke
parents:
diff changeset
172 }
a61af66fc99e Initial load
duke
parents:
diff changeset
173
a61af66fc99e Initial load
duke
parents:
diff changeset
174
a61af66fc99e Initial load
duke
parents:
diff changeset
175 int DebugInformationRecorder::serialize_monitor_values(GrowableArray<MonitorValue*>* monitors) {
a61af66fc99e Initial load
duke
parents:
diff changeset
176 if (monitors == NULL || monitors->is_empty()) return DebugInformationRecorder::serialized_null;
a61af66fc99e Initial load
duke
parents:
diff changeset
177 assert(_recording_state == rs_safepoint, "must be recording a safepoint");
a61af66fc99e Initial load
duke
parents:
diff changeset
178 int result = stream()->position();
a61af66fc99e Initial load
duke
parents:
diff changeset
179 stream()->write_int(monitors->length());
a61af66fc99e Initial load
duke
parents:
diff changeset
180 for (int index = 0; index < monitors->length(); index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
181 monitors->at(index)->write_on(stream());
a61af66fc99e Initial load
duke
parents:
diff changeset
182 }
a61af66fc99e Initial load
duke
parents:
diff changeset
183 assert(result != serialized_null, "sanity");
a61af66fc99e Initial load
duke
parents:
diff changeset
184
a61af66fc99e Initial load
duke
parents:
diff changeset
185 // (See comment below on DebugInformationRecorder::describe_scope.)
a61af66fc99e Initial load
duke
parents:
diff changeset
186 int shared_result = find_sharable_decode_offset(result);
a61af66fc99e Initial load
duke
parents:
diff changeset
187 if (shared_result != serialized_null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
188 stream()->set_position(result);
a61af66fc99e Initial load
duke
parents:
diff changeset
189 result = shared_result;
a61af66fc99e Initial load
duke
parents:
diff changeset
190 }
a61af66fc99e Initial load
duke
parents:
diff changeset
191
a61af66fc99e Initial load
duke
parents:
diff changeset
192 return result;
a61af66fc99e Initial load
duke
parents:
diff changeset
193 }
a61af66fc99e Initial load
duke
parents:
diff changeset
194
a61af66fc99e Initial load
duke
parents:
diff changeset
195
a61af66fc99e Initial load
duke
parents:
diff changeset
196 int DebugInformationRecorder::serialize_scope_values(GrowableArray<ScopeValue*>* values) {
a61af66fc99e Initial load
duke
parents:
diff changeset
197 if (values == NULL || values->is_empty()) return DebugInformationRecorder::serialized_null;
a61af66fc99e Initial load
duke
parents:
diff changeset
198 assert(_recording_state == rs_safepoint, "must be recording a safepoint");
a61af66fc99e Initial load
duke
parents:
diff changeset
199 int result = stream()->position();
a61af66fc99e Initial load
duke
parents:
diff changeset
200 assert(result != serialized_null, "sanity");
a61af66fc99e Initial load
duke
parents:
diff changeset
201 stream()->write_int(values->length());
a61af66fc99e Initial load
duke
parents:
diff changeset
202 for (int index = 0; index < values->length(); index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
203 values->at(index)->write_on(stream());
a61af66fc99e Initial load
duke
parents:
diff changeset
204 }
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 // (See comment below on DebugInformationRecorder::describe_scope.)
a61af66fc99e Initial load
duke
parents:
diff changeset
207 int shared_result = find_sharable_decode_offset(result);
a61af66fc99e Initial load
duke
parents:
diff changeset
208 if (shared_result != serialized_null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
209 stream()->set_position(result);
a61af66fc99e Initial load
duke
parents:
diff changeset
210 result = shared_result;
a61af66fc99e Initial load
duke
parents:
diff changeset
211 }
a61af66fc99e Initial load
duke
parents:
diff changeset
212
a61af66fc99e Initial load
duke
parents:
diff changeset
213 return result;
a61af66fc99e Initial load
duke
parents:
diff changeset
214 }
a61af66fc99e Initial load
duke
parents:
diff changeset
215
a61af66fc99e Initial load
duke
parents:
diff changeset
216
a61af66fc99e Initial load
duke
parents:
diff changeset
217 #ifndef PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
218 // These variables are put into one block to reduce relocations
a61af66fc99e Initial load
duke
parents:
diff changeset
219 // and make it simpler to print from the debugger.
a61af66fc99e Initial load
duke
parents:
diff changeset
220 static
a61af66fc99e Initial load
duke
parents:
diff changeset
221 struct dir_stats_struct {
a61af66fc99e Initial load
duke
parents:
diff changeset
222 int chunks_queried;
a61af66fc99e Initial load
duke
parents:
diff changeset
223 int chunks_shared;
a61af66fc99e Initial load
duke
parents:
diff changeset
224 int chunks_reshared;
a61af66fc99e Initial load
duke
parents:
diff changeset
225 int chunks_elided;
a61af66fc99e Initial load
duke
parents:
diff changeset
226
a61af66fc99e Initial load
duke
parents:
diff changeset
227 void print() {
a61af66fc99e Initial load
duke
parents:
diff changeset
228 tty->print_cr("Debug Data Chunks: %d, shared %d+%d, non-SP's elided %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
229 chunks_queried,
a61af66fc99e Initial load
duke
parents:
diff changeset
230 chunks_shared, chunks_reshared,
a61af66fc99e Initial load
duke
parents:
diff changeset
231 chunks_elided);
a61af66fc99e Initial load
duke
parents:
diff changeset
232 }
a61af66fc99e Initial load
duke
parents:
diff changeset
233 } dir_stats;
a61af66fc99e Initial load
duke
parents:
diff changeset
234 #endif //PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
235
a61af66fc99e Initial load
duke
parents:
diff changeset
236
a61af66fc99e Initial load
duke
parents:
diff changeset
237 int DebugInformationRecorder::find_sharable_decode_offset(int stream_offset) {
15433
8638307944be Add flag to always enable debug info sharing (true ifdef GRAAL)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15100
diff changeset
238 if (FLAG_IS_DEFAULT(ShareDebugInfo)) {
8638307944be Add flag to always enable debug info sharing (true ifdef GRAAL)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15100
diff changeset
239 if (!ShareDebugInfo && !recording_non_safepoints()) {
8638307944be Add flag to always enable debug info sharing (true ifdef GRAAL)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15100
diff changeset
240 return serialized_null;
8638307944be Add flag to always enable debug info sharing (true ifdef GRAAL)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15100
diff changeset
241 }
8638307944be Add flag to always enable debug info sharing (true ifdef GRAAL)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15100
diff changeset
242 } else if (!ShareDebugInfo) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
243 return serialized_null;
15433
8638307944be Add flag to always enable debug info sharing (true ifdef GRAAL)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15100
diff changeset
244 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
245
a61af66fc99e Initial load
duke
parents:
diff changeset
246 NOT_PRODUCT(++dir_stats.chunks_queried);
a61af66fc99e Initial load
duke
parents:
diff changeset
247 int stream_length = stream()->position() - stream_offset;
a61af66fc99e Initial load
duke
parents:
diff changeset
248 assert(stream_offset != serialized_null, "should not be null");
a61af66fc99e Initial load
duke
parents:
diff changeset
249 assert(stream_length != 0, "should not be empty");
a61af66fc99e Initial load
duke
parents:
diff changeset
250
a61af66fc99e Initial load
duke
parents:
diff changeset
251 DIR_Chunk* ns = new(this) DIR_Chunk(stream_offset, stream_length, this);
a61af66fc99e Initial load
duke
parents:
diff changeset
252
a61af66fc99e Initial load
duke
parents:
diff changeset
253 // Look in previously shared scopes first:
a61af66fc99e Initial load
duke
parents:
diff changeset
254 DIR_Chunk* ms = ns->find_match(_shared_chunks, 0, this);
a61af66fc99e Initial load
duke
parents:
diff changeset
255 if (ms != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
256 NOT_PRODUCT(++dir_stats.chunks_reshared);
a61af66fc99e Initial load
duke
parents:
diff changeset
257 assert(ns+1 == _next_chunk, "");
a61af66fc99e Initial load
duke
parents:
diff changeset
258 _next_chunk = ns;
a61af66fc99e Initial load
duke
parents:
diff changeset
259 return ms->_offset;
a61af66fc99e Initial load
duke
parents:
diff changeset
260 }
a61af66fc99e Initial load
duke
parents:
diff changeset
261
a61af66fc99e Initial load
duke
parents:
diff changeset
262 // Look in recently encountered scopes next:
a61af66fc99e Initial load
duke
parents:
diff changeset
263 const int MAX_RECENT = 50;
a61af66fc99e Initial load
duke
parents:
diff changeset
264 int start_index = _all_chunks->length() - MAX_RECENT;
a61af66fc99e Initial load
duke
parents:
diff changeset
265 if (start_index < 0) start_index = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
266 ms = ns->find_match(_all_chunks, start_index, this);
a61af66fc99e Initial load
duke
parents:
diff changeset
267 if (ms != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
268 NOT_PRODUCT(++dir_stats.chunks_shared);
a61af66fc99e Initial load
duke
parents:
diff changeset
269 // Searching in _all_chunks is limited to a window,
a61af66fc99e Initial load
duke
parents:
diff changeset
270 // but searching in _shared_chunks is unlimited.
a61af66fc99e Initial load
duke
parents:
diff changeset
271 _shared_chunks->append(ms);
a61af66fc99e Initial load
duke
parents:
diff changeset
272 assert(ns+1 == _next_chunk, "");
a61af66fc99e Initial load
duke
parents:
diff changeset
273 _next_chunk = ns;
a61af66fc99e Initial load
duke
parents:
diff changeset
274 return ms->_offset;
a61af66fc99e Initial load
duke
parents:
diff changeset
275 }
a61af66fc99e Initial load
duke
parents:
diff changeset
276
a61af66fc99e Initial load
duke
parents:
diff changeset
277 // No match. Add this guy to the list, in hopes of future shares.
a61af66fc99e Initial load
duke
parents:
diff changeset
278 _all_chunks->append(ns);
a61af66fc99e Initial load
duke
parents:
diff changeset
279 return serialized_null;
a61af66fc99e Initial load
duke
parents:
diff changeset
280 }
a61af66fc99e Initial load
duke
parents:
diff changeset
281
a61af66fc99e Initial load
duke
parents:
diff changeset
282
a61af66fc99e Initial load
duke
parents:
diff changeset
283 // must call add_safepoint before: it sets PcDesc and this routine uses
a61af66fc99e Initial load
duke
parents:
diff changeset
284 // the last PcDesc set
a61af66fc99e Initial load
duke
parents:
diff changeset
285 void DebugInformationRecorder::describe_scope(int pc_offset,
4583
597bc897257d Made DebugInformationRecorder::describe_scope() take both a methodHandle _and_ a ciMethod* parameter to avoid creating handles in scopes where it is not allowed.
Doug Simon <doug.simon@oracle.com>
parents: 3650
diff changeset
286 methodHandle methodH,
0
a61af66fc99e Initial load
duke
parents:
diff changeset
287 ciMethod* method,
a61af66fc99e Initial load
duke
parents:
diff changeset
288 int bci,
900
9987d9d5eb0e 6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents: 0
diff changeset
289 bool reexecute,
3018
5857923e563c Fixed an issue with frame states in exception dispatch chains (now we are correctly rethrowing the exception immediately at entering the interpreter).
Thomas Wuerthinger <thomas@wuerthinger.net>
parents: 1972
diff changeset
290 bool rethrow_exception,
1135
e66fd840cb6b 6893081: method handle & invokedynamic code needs additional cleanup (post 6815692, 6858164)
twisti
parents: 1014
diff changeset
291 bool is_method_handle_invoke,
1253
f70b0d9ab095 6910618: C2: Error: assert(d->is_oop(),"JVM_ArrayCopy: dst not an oop")
kvn
parents: 1135
diff changeset
292 bool return_oop,
0
a61af66fc99e Initial load
duke
parents:
diff changeset
293 DebugToken* locals,
a61af66fc99e Initial load
duke
parents:
diff changeset
294 DebugToken* expressions,
a61af66fc99e Initial load
duke
parents:
diff changeset
295 DebugToken* monitors) {
a61af66fc99e Initial load
duke
parents:
diff changeset
296 assert(_recording_state != rs_null, "nesting of recording calls");
a61af66fc99e Initial load
duke
parents:
diff changeset
297 PcDesc* last_pd = last_pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
298 assert(last_pd->pc_offset() == pc_offset, "must be last pc");
a61af66fc99e Initial load
duke
parents:
diff changeset
299 int sender_stream_offset = last_pd->scope_decode_offset();
a61af66fc99e Initial load
duke
parents:
diff changeset
300 // update the stream offset of current pc desc
a61af66fc99e Initial load
duke
parents:
diff changeset
301 int stream_offset = stream()->position();
a61af66fc99e Initial load
duke
parents:
diff changeset
302 last_pd->set_scope_decode_offset(stream_offset);
a61af66fc99e Initial load
duke
parents:
diff changeset
303
1135
e66fd840cb6b 6893081: method handle & invokedynamic code needs additional cleanup (post 6815692, 6858164)
twisti
parents: 1014
diff changeset
304 // Record flags into pcDesc.
931
72088be4b386 6873116: Modify reexecute implementation to use pcDesc to record the reexecute bit
cfang
parents: 900
diff changeset
305 last_pd->set_should_reexecute(reexecute);
3018
5857923e563c Fixed an issue with frame states in exception dispatch chains (now we are correctly rethrowing the exception immediately at entering the interpreter).
Thomas Wuerthinger <thomas@wuerthinger.net>
parents: 1972
diff changeset
306 last_pd->set_rethrow_exception(rethrow_exception);
1135
e66fd840cb6b 6893081: method handle & invokedynamic code needs additional cleanup (post 6815692, 6858164)
twisti
parents: 1014
diff changeset
307 last_pd->set_is_method_handle_invoke(is_method_handle_invoke);
1253
f70b0d9ab095 6910618: C2: Error: assert(d->is_oop(),"JVM_ArrayCopy: dst not an oop")
kvn
parents: 1135
diff changeset
308 last_pd->set_return_oop(return_oop);
931
72088be4b386 6873116: Modify reexecute implementation to use pcDesc to record the reexecute bit
cfang
parents: 900
diff changeset
309
0
a61af66fc99e Initial load
duke
parents:
diff changeset
310 // serialize sender stream offest
a61af66fc99e Initial load
duke
parents:
diff changeset
311 stream()->write_int(sender_stream_offset);
a61af66fc99e Initial load
duke
parents:
diff changeset
312
a61af66fc99e Initial load
duke
parents:
diff changeset
313 // serialize scope
6948
e522a00b91aa Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
Doug Simon <doug.simon@oracle.com>
parents: 6275 6725
diff changeset
314 Metadata* method_enc;
4583
597bc897257d Made DebugInformationRecorder::describe_scope() take both a methodHandle _and_ a ciMethod* parameter to avoid creating handles in scopes where it is not allowed.
Doug Simon <doug.simon@oracle.com>
parents: 3650
diff changeset
315 if (method != NULL) {
597bc897257d Made DebugInformationRecorder::describe_scope() take both a methodHandle _and_ a ciMethod* parameter to avoid creating handles in scopes where it is not allowed.
Doug Simon <doug.simon@oracle.com>
parents: 3650
diff changeset
316 method_enc = method->constant_encoding();
597bc897257d Made DebugInformationRecorder::describe_scope() take both a methodHandle _and_ a ciMethod* parameter to avoid creating handles in scopes where it is not allowed.
Doug Simon <doug.simon@oracle.com>
parents: 3650
diff changeset
317 } else if (methodH.not_null()) {
6948
e522a00b91aa Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
Doug Simon <doug.simon@oracle.com>
parents: 6275 6725
diff changeset
318 method_enc = methodH();
4583
597bc897257d Made DebugInformationRecorder::describe_scope() take both a methodHandle _and_ a ciMethod* parameter to avoid creating handles in scopes where it is not allowed.
Doug Simon <doug.simon@oracle.com>
parents: 3650
diff changeset
319 } else {
597bc897257d Made DebugInformationRecorder::describe_scope() take both a methodHandle _and_ a ciMethod* parameter to avoid creating handles in scopes where it is not allowed.
Doug Simon <doug.simon@oracle.com>
parents: 3650
diff changeset
320 method_enc = NULL;
597bc897257d Made DebugInformationRecorder::describe_scope() take both a methodHandle _and_ a ciMethod* parameter to avoid creating handles in scopes where it is not allowed.
Doug Simon <doug.simon@oracle.com>
parents: 3650
diff changeset
321 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
322 stream()->write_int(oop_recorder()->find_index(method_enc));
931
72088be4b386 6873116: Modify reexecute implementation to use pcDesc to record the reexecute bit
cfang
parents: 900
diff changeset
323 stream()->write_bci(bci);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
324 assert(method == NULL ||
a61af66fc99e Initial load
duke
parents:
diff changeset
325 (method->is_native() && bci == 0) ||
a61af66fc99e Initial load
duke
parents:
diff changeset
326 (!method->is_native() && 0 <= bci && bci < method->code_size()) ||
6266
1d7922586cf6 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 1972
diff changeset
327 (method->is_compiled_lambda_form() && bci == -99) || // this might happen in C1
0
a61af66fc99e Initial load
duke
parents:
diff changeset
328 bci == -1, "illegal bci");
a61af66fc99e Initial load
duke
parents:
diff changeset
329
a61af66fc99e Initial load
duke
parents:
diff changeset
330 // serialize the locals/expressions/monitors
a61af66fc99e Initial load
duke
parents:
diff changeset
331 stream()->write_int((intptr_t) locals);
a61af66fc99e Initial load
duke
parents:
diff changeset
332 stream()->write_int((intptr_t) expressions);
a61af66fc99e Initial load
duke
parents:
diff changeset
333 stream()->write_int((intptr_t) monitors);
a61af66fc99e Initial load
duke
parents:
diff changeset
334
a61af66fc99e Initial load
duke
parents:
diff changeset
335 // Here's a tricky bit. We just wrote some bytes.
a61af66fc99e Initial load
duke
parents:
diff changeset
336 // Wouldn't it be nice to find that we had already
a61af66fc99e Initial load
duke
parents:
diff changeset
337 // written those same bytes somewhere else?
a61af66fc99e Initial load
duke
parents:
diff changeset
338 // If we get lucky this way, reset the stream
a61af66fc99e Initial load
duke
parents:
diff changeset
339 // and reuse the old bytes. By the way, this
a61af66fc99e Initial load
duke
parents:
diff changeset
340 // trick not only shares parent scopes, but also
a61af66fc99e Initial load
duke
parents:
diff changeset
341 // compresses equivalent non-safepoint PcDescs.
a61af66fc99e Initial load
duke
parents:
diff changeset
342 int shared_stream_offset = find_sharable_decode_offset(stream_offset);
a61af66fc99e Initial load
duke
parents:
diff changeset
343 if (shared_stream_offset != serialized_null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
344 stream()->set_position(stream_offset);
a61af66fc99e Initial load
duke
parents:
diff changeset
345 last_pd->set_scope_decode_offset(shared_stream_offset);
a61af66fc99e Initial load
duke
parents:
diff changeset
346 }
a61af66fc99e Initial load
duke
parents:
diff changeset
347 }
a61af66fc99e Initial load
duke
parents:
diff changeset
348
a61af66fc99e Initial load
duke
parents:
diff changeset
349 void DebugInformationRecorder::dump_object_pool(GrowableArray<ScopeValue*>* objects) {
a61af66fc99e Initial load
duke
parents:
diff changeset
350 guarantee( _pcs_length > 0, "safepoint must exist before describing scopes");
a61af66fc99e Initial load
duke
parents:
diff changeset
351 PcDesc* last_pd = &_pcs[_pcs_length-1];
a61af66fc99e Initial load
duke
parents:
diff changeset
352 if (objects != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
353 for (int i = objects->length() - 1; i >= 0; i--) {
a61af66fc99e Initial load
duke
parents:
diff changeset
354 ((ObjectValue*) objects->at(i))->set_visited(false);
a61af66fc99e Initial load
duke
parents:
diff changeset
355 }
a61af66fc99e Initial load
duke
parents:
diff changeset
356 }
a61af66fc99e Initial load
duke
parents:
diff changeset
357 int offset = serialize_scope_values(objects);
a61af66fc99e Initial load
duke
parents:
diff changeset
358 last_pd->set_obj_decode_offset(offset);
a61af66fc99e Initial load
duke
parents:
diff changeset
359 }
a61af66fc99e Initial load
duke
parents:
diff changeset
360
a61af66fc99e Initial load
duke
parents:
diff changeset
361 void DebugInformationRecorder::end_scopes(int pc_offset, bool is_safepoint) {
a61af66fc99e Initial load
duke
parents:
diff changeset
362 assert(_recording_state == (is_safepoint? rs_safepoint: rs_non_safepoint),
a61af66fc99e Initial load
duke
parents:
diff changeset
363 "nesting of recording calls");
a61af66fc99e Initial load
duke
parents:
diff changeset
364 debug_only(_recording_state = rs_null);
a61af66fc99e Initial load
duke
parents:
diff changeset
365
a61af66fc99e Initial load
duke
parents:
diff changeset
366 // Try to compress away an equivalent non-safepoint predecessor.
a61af66fc99e Initial load
duke
parents:
diff changeset
367 // (This only works because we have previously recognized redundant
a61af66fc99e Initial load
duke
parents:
diff changeset
368 // scope trees and made them use a common scope_decode_offset.)
a61af66fc99e Initial load
duke
parents:
diff changeset
369 if (_pcs_length >= 2 && recording_non_safepoints()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
370 PcDesc* last = last_pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
371 PcDesc* prev = prev_pc();
a61af66fc99e Initial load
duke
parents:
diff changeset
372 // If prev is (a) not a safepoint and (b) has the same
a61af66fc99e Initial load
duke
parents:
diff changeset
373 // stream pointer, then it can be coalesced into the last.
a61af66fc99e Initial load
duke
parents:
diff changeset
374 // This is valid because non-safepoints are only sought
a61af66fc99e Initial load
duke
parents:
diff changeset
375 // with pc_desc_near, which (when it misses prev) will
a61af66fc99e Initial load
duke
parents:
diff changeset
376 // search forward until it finds last.
a61af66fc99e Initial load
duke
parents:
diff changeset
377 // In addition, it does not matter if the last PcDesc
a61af66fc99e Initial load
duke
parents:
diff changeset
378 // is for a safepoint or not.
1014
8e954aedbb81 6889869: assert(!Interpreter::bytecode_should_reexecute(code),"should not reexecute")
never
parents: 989
diff changeset
379 if (_prev_safepoint_pc < prev->pc_offset() && prev->is_same_info(last)) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
380 assert(prev == last-1, "sane");
a61af66fc99e Initial load
duke
parents:
diff changeset
381 prev->set_pc_offset(pc_offset);
a61af66fc99e Initial load
duke
parents:
diff changeset
382 _pcs_length -= 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
383 NOT_PRODUCT(++dir_stats.chunks_elided);
a61af66fc99e Initial load
duke
parents:
diff changeset
384 }
a61af66fc99e Initial load
duke
parents:
diff changeset
385 }
a61af66fc99e Initial load
duke
parents:
diff changeset
386
a61af66fc99e Initial load
duke
parents:
diff changeset
387 // We have just recorded this safepoint.
a61af66fc99e Initial load
duke
parents:
diff changeset
388 // Remember it in case the previous paragraph needs to know.
a61af66fc99e Initial load
duke
parents:
diff changeset
389 if (is_safepoint) {
a61af66fc99e Initial load
duke
parents:
diff changeset
390 _prev_safepoint_pc = pc_offset;
a61af66fc99e Initial load
duke
parents:
diff changeset
391 }
a61af66fc99e Initial load
duke
parents:
diff changeset
392 }
a61af66fc99e Initial load
duke
parents:
diff changeset
393
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
394 #ifdef ASSERT
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
395 bool DebugInformationRecorder::recorders_frozen() {
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
396 return _oop_recorder->is_complete() || _oop_recorder->is_complete();
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
397 }
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
398
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
399 void DebugInformationRecorder::mark_recorders_frozen() {
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
400 _oop_recorder->freeze();
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
401 }
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
402 #endif // PRODUCT
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
403
0
a61af66fc99e Initial load
duke
parents:
diff changeset
404 DebugToken* DebugInformationRecorder::create_scope_values(GrowableArray<ScopeValue*>* values) {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
405 assert(!recorders_frozen(), "not frozen yet");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
406 return (DebugToken*) (intptr_t) serialize_scope_values(values);
a61af66fc99e Initial load
duke
parents:
diff changeset
407 }
a61af66fc99e Initial load
duke
parents:
diff changeset
408
a61af66fc99e Initial load
duke
parents:
diff changeset
409
a61af66fc99e Initial load
duke
parents:
diff changeset
410 DebugToken* DebugInformationRecorder::create_monitor_values(GrowableArray<MonitorValue*>* monitors) {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
411 assert(!recorders_frozen(), "not frozen yet");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
412 return (DebugToken*) (intptr_t) serialize_monitor_values(monitors);
a61af66fc99e Initial load
duke
parents:
diff changeset
413 }
a61af66fc99e Initial load
duke
parents:
diff changeset
414
a61af66fc99e Initial load
duke
parents:
diff changeset
415
a61af66fc99e Initial load
duke
parents:
diff changeset
416 int DebugInformationRecorder::data_size() {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
417 debug_only(mark_recorders_frozen()); // mark it "frozen" for asserts
0
a61af66fc99e Initial load
duke
parents:
diff changeset
418 return _stream->position();
a61af66fc99e Initial load
duke
parents:
diff changeset
419 }
a61af66fc99e Initial load
duke
parents:
diff changeset
420
a61af66fc99e Initial load
duke
parents:
diff changeset
421
a61af66fc99e Initial load
duke
parents:
diff changeset
422 int DebugInformationRecorder::pcs_size() {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6266
diff changeset
423 debug_only(mark_recorders_frozen()); // mark it "frozen" for asserts
0
a61af66fc99e Initial load
duke
parents:
diff changeset
424 if (last_pc()->pc_offset() != PcDesc::upper_offset_limit)
a61af66fc99e Initial load
duke
parents:
diff changeset
425 add_new_pc_offset(PcDesc::upper_offset_limit);
a61af66fc99e Initial load
duke
parents:
diff changeset
426 return _pcs_length * sizeof(PcDesc);
a61af66fc99e Initial load
duke
parents:
diff changeset
427 }
a61af66fc99e Initial load
duke
parents:
diff changeset
428
a61af66fc99e Initial load
duke
parents:
diff changeset
429
a61af66fc99e Initial load
duke
parents:
diff changeset
430 void DebugInformationRecorder::copy_to(nmethod* nm) {
a61af66fc99e Initial load
duke
parents:
diff changeset
431 nm->copy_scopes_data(stream()->buffer(), stream()->position());
a61af66fc99e Initial load
duke
parents:
diff changeset
432 nm->copy_scopes_pcs(_pcs, _pcs_length);
a61af66fc99e Initial load
duke
parents:
diff changeset
433 }
a61af66fc99e Initial load
duke
parents:
diff changeset
434
a61af66fc99e Initial load
duke
parents:
diff changeset
435
a61af66fc99e Initial load
duke
parents:
diff changeset
436 void DebugInformationRecorder::verify(const nmethod* code) {
a61af66fc99e Initial load
duke
parents:
diff changeset
437 Unimplemented();
a61af66fc99e Initial load
duke
parents:
diff changeset
438 }
a61af66fc99e Initial load
duke
parents:
diff changeset
439
a61af66fc99e Initial load
duke
parents:
diff changeset
440 #ifndef PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
441 void DebugInformationRecorder::print_statistics() {
a61af66fc99e Initial load
duke
parents:
diff changeset
442 dir_stats.print();
a61af66fc99e Initial load
duke
parents:
diff changeset
443 }
a61af66fc99e Initial load
duke
parents:
diff changeset
444 #endif //PRODUCT