src/share/vm/code/debugInfoRec.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/code

src/share/vm/code/debugInfoRec.cpp

Print this page




 352   last_pd->set_return_oop(return_oop);
 353 
 354   // serialize sender stream offest
 355   stream()->write_int(sender_stream_offset);
 356 
 357   // serialize scope
 358   Metadata* method_enc;
 359   if (method != NULL) {
 360     method_enc = method->constant_encoding();
 361   } else if (methodH.not_null()) {
 362     method_enc = methodH();
 363   } else {
 364     method_enc = NULL;
 365   }
 366   int method_enc_index = oop_recorder()->find_index(method_enc);
 367   stream()->write_int(method_enc_index);
 368   stream()->write_bci(bci);
 369   assert(method == NULL ||
 370          (method->is_native() && bci == 0) ||
 371          (!method->is_native() && 0 <= bci && bci < method->code_size()) ||
 372          (method->is_compiled_lambda_form() && bci == -99) ||  // this might happen in C1
 373          bci == -1, "illegal bci");
 374 
 375   // serialize the locals/expressions/monitors
 376   stream()->write_int((intptr_t) locals);
 377   stream()->write_int((intptr_t) expressions);
 378   stream()->write_int((intptr_t) monitors);
 379 
 380   // Here's a tricky bit.  We just wrote some bytes.
 381   // Wouldn't it be nice to find that we had already
 382   // written those same bytes somewhere else?
 383   // If we get lucky this way, reset the stream
 384   // and reuse the old bytes.  By the way, this
 385   // trick not only shares parent scopes, but also
 386   // compresses equivalent non-safepoint PcDescs.
 387   int shared_stream_offset = find_sharable_decode_offset(stream_offset);
 388   if (shared_stream_offset != serialized_null) {
 389     stream()->set_position(stream_offset);
 390     last_pd->set_scope_decode_offset(shared_stream_offset);
 391   }
 392 }




 352   last_pd->set_return_oop(return_oop);
 353 
 354   // serialize sender stream offest
 355   stream()->write_int(sender_stream_offset);
 356 
 357   // serialize scope
 358   Metadata* method_enc;
 359   if (method != NULL) {
 360     method_enc = method->constant_encoding();
 361   } else if (methodH.not_null()) {
 362     method_enc = methodH();
 363   } else {
 364     method_enc = NULL;
 365   }
 366   int method_enc_index = oop_recorder()->find_index(method_enc);
 367   stream()->write_int(method_enc_index);
 368   stream()->write_bci(bci);
 369   assert(method == NULL ||
 370          (method->is_native() && bci == 0) ||
 371          (!method->is_native() && 0 <= bci && bci < method->code_size()) ||

 372          bci == -1, "illegal bci");
 373 
 374   // serialize the locals/expressions/monitors
 375   stream()->write_int((intptr_t) locals);
 376   stream()->write_int((intptr_t) expressions);
 377   stream()->write_int((intptr_t) monitors);
 378 
 379   // Here's a tricky bit.  We just wrote some bytes.
 380   // Wouldn't it be nice to find that we had already
 381   // written those same bytes somewhere else?
 382   // If we get lucky this way, reset the stream
 383   // and reuse the old bytes.  By the way, this
 384   // trick not only shares parent scopes, but also
 385   // compresses equivalent non-safepoint PcDescs.
 386   int shared_stream_offset = find_sharable_decode_offset(stream_offset);
 387   if (shared_stream_offset != serialized_null) {
 388     stream()->set_position(stream_offset);
 389     last_pd->set_scope_decode_offset(shared_stream_offset);
 390   }
 391 }


src/share/vm/code/debugInfoRec.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File