comparison src/share/vm/code/debugInfoRec.cpp @ 900:9987d9d5eb0e

6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot Summary: developed a reexecute logic for the interpreter to reexecute the bytecode when deopt happens Reviewed-by: kvn, never, jrose, twisti
author cfang
date Fri, 31 Jul 2009 17:12:33 -0700
parents a61af66fc99e
children 72088be4b386
comparison
equal deleted inserted replaced
0:93db132dee50 1:a2d96f0b6cf9
278 // must call add_safepoint before: it sets PcDesc and this routine uses 278 // must call add_safepoint before: it sets PcDesc and this routine uses
279 // the last PcDesc set 279 // the last PcDesc set
280 void DebugInformationRecorder::describe_scope(int pc_offset, 280 void DebugInformationRecorder::describe_scope(int pc_offset,
281 ciMethod* method, 281 ciMethod* method,
282 int bci, 282 int bci,
283 bool reexecute,
283 DebugToken* locals, 284 DebugToken* locals,
284 DebugToken* expressions, 285 DebugToken* expressions,
285 DebugToken* monitors) { 286 DebugToken* monitors) {
286 assert(_recording_state != rs_null, "nesting of recording calls"); 287 assert(_recording_state != rs_null, "nesting of recording calls");
287 PcDesc* last_pd = last_pc(); 288 PcDesc* last_pd = last_pc();
295 stream()->write_int(sender_stream_offset); 296 stream()->write_int(sender_stream_offset);
296 297
297 // serialize scope 298 // serialize scope
298 jobject method_enc = (method == NULL)? NULL: method->encoding(); 299 jobject method_enc = (method == NULL)? NULL: method->encoding();
299 stream()->write_int(oop_recorder()->find_index(method_enc)); 300 stream()->write_int(oop_recorder()->find_index(method_enc));
300 stream()->write_bci(bci); 301 stream()->write_bci_and_reexecute(bci, reexecute);
301 assert(method == NULL || 302 assert(method == NULL ||
302 (method->is_native() && bci == 0) || 303 (method->is_native() && bci == 0) ||
303 (!method->is_native() && 0 <= bci && bci < method->code_size()) || 304 (!method->is_native() && 0 <= bci && bci < method->code_size()) ||
304 bci == -1, "illegal bci"); 305 bci == -1, "illegal bci");
305 306