Mercurial > hg > graal-jvmci-8
comparison src/share/vm/code/debugInfoRec.cpp @ 7933:85bd81dba8fc
Remove more code related to deferred writes.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 05 Mar 2013 17:21:54 +0100 |
parents | 0b646334c5f7 |
children | b8f261ba79c6 |
comparison
equal
deleted
inserted
replaced
7932:d4e6c82cd6a1 | 7933:85bd81dba8fc |
---|---|
211 } | 211 } |
212 | 212 |
213 return result; | 213 return result; |
214 } | 214 } |
215 | 215 |
216 #ifdef GRAAL | |
217 | |
218 int DebugInformationRecorder::serialize_deferred_writes(GrowableArray<DeferredWriteValue*>* deferred_writes) { | |
219 if (deferred_writes == NULL || deferred_writes->is_empty()) return DebugInformationRecorder::serialized_null; | |
220 assert(_recording_state == rs_safepoint, "must be recording a safepoint"); | |
221 int result = stream()->position(); | |
222 assert(result != serialized_null, "sanity"); | |
223 stream()->write_int(deferred_writes->length()); | |
224 for (int index = 0; index < deferred_writes->length(); index++) { | |
225 deferred_writes->at(index)->write_on(stream()); | |
226 } | |
227 | |
228 // (See comment below on DebugInformationRecorder::describe_scope.) | |
229 int shared_result = find_sharable_decode_offset(result); | |
230 if (shared_result != serialized_null) { | |
231 stream()->set_position(result); | |
232 result = shared_result; | |
233 } | |
234 | |
235 return result; | |
236 } | |
237 | |
238 #endif // GRAAL | |
239 | 216 |
240 #ifndef PRODUCT | 217 #ifndef PRODUCT |
241 // These variables are put into one block to reduce relocations | 218 // These variables are put into one block to reduce relocations |
242 // and make it simpler to print from the debugger. | 219 // and make it simpler to print from the debugger. |
243 static | 220 static |
311 bool is_method_handle_invoke, | 288 bool is_method_handle_invoke, |
312 bool return_oop, | 289 bool return_oop, |
313 DebugToken* locals, | 290 DebugToken* locals, |
314 DebugToken* expressions, | 291 DebugToken* expressions, |
315 DebugToken* monitors | 292 DebugToken* monitors |
316 #ifdef GRAAL | |
317 , DebugToken* deferred_writes | |
318 #endif // GRAAL | |
319 ) { | 293 ) { |
320 assert(_recording_state != rs_null, "nesting of recording calls"); | 294 assert(_recording_state != rs_null, "nesting of recording calls"); |
321 PcDesc* last_pd = last_pc(); | 295 PcDesc* last_pd = last_pc(); |
322 assert(last_pd->pc_offset() == pc_offset, "must be last pc"); | 296 assert(last_pd->pc_offset() == pc_offset, "must be last pc"); |
323 int sender_stream_offset = last_pd->scope_decode_offset(); | 297 int sender_stream_offset = last_pd->scope_decode_offset(); |
353 | 327 |
354 // serialize the locals/expressions/monitors | 328 // serialize the locals/expressions/monitors |
355 stream()->write_int((intptr_t) locals); | 329 stream()->write_int((intptr_t) locals); |
356 stream()->write_int((intptr_t) expressions); | 330 stream()->write_int((intptr_t) expressions); |
357 stream()->write_int((intptr_t) monitors); | 331 stream()->write_int((intptr_t) monitors); |
358 #ifdef GRAAL | |
359 stream()->write_int((intptr_t) deferred_writes); | |
360 #endif // GRAAL | |
361 | 332 |
362 // Here's a tricky bit. We just wrote some bytes. | 333 // Here's a tricky bit. We just wrote some bytes. |
363 // Wouldn't it be nice to find that we had already | 334 // Wouldn't it be nice to find that we had already |
364 // written those same bytes somewhere else? | 335 // written those same bytes somewhere else? |
365 // If we get lucky this way, reset the stream | 336 // If we get lucky this way, reset the stream |
437 DebugToken* DebugInformationRecorder::create_monitor_values(GrowableArray<MonitorValue*>* monitors) { | 408 DebugToken* DebugInformationRecorder::create_monitor_values(GrowableArray<MonitorValue*>* monitors) { |
438 assert(!recorders_frozen(), "not frozen yet"); | 409 assert(!recorders_frozen(), "not frozen yet"); |
439 return (DebugToken*) (intptr_t) serialize_monitor_values(monitors); | 410 return (DebugToken*) (intptr_t) serialize_monitor_values(monitors); |
440 } | 411 } |
441 | 412 |
442 #ifdef GRAAL | |
443 | |
444 DebugToken* DebugInformationRecorder::create_deferred_writes(GrowableArray<DeferredWriteValue*>* deferred_writes) { | |
445 assert(!recorders_frozen(), "not frozen yet"); | |
446 return (DebugToken*) (intptr_t) serialize_deferred_writes(deferred_writes); | |
447 } | |
448 | |
449 #endif // GRAAL | |
450 | 413 |
451 int DebugInformationRecorder::data_size() { | 414 int DebugInformationRecorder::data_size() { |
452 debug_only(mark_recorders_frozen()); // mark it "frozen" for asserts | 415 debug_only(mark_recorders_frozen()); // mark it "frozen" for asserts |
453 return _stream->position(); | 416 return _stream->position(); |
454 } | 417 } |