< prev index next >

src/hotspot/share/runtime/frame.cpp

Print this page

  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "classfile/moduleEntry.hpp"
  26 #include "code/codeCache.hpp"
  27 #include "code/scopeDesc.hpp"
  28 #include "code/vmreg.inline.hpp"
  29 #include "compiler/abstractCompiler.hpp"
  30 #include "compiler/disassembler.hpp"
  31 #include "compiler/oopMap.hpp"
  32 #include "gc/shared/collectedHeap.inline.hpp"
  33 #include "interpreter/interpreter.hpp"
  34 #include "interpreter/oopMapCache.hpp"
  35 #include "logging/log.hpp"
  36 #include "memory/resourceArea.hpp"
  37 #include "memory/universe.hpp"

  38 #include "oops/markWord.hpp"
  39 #include "oops/method.inline.hpp"
  40 #include "oops/methodData.hpp"
  41 #include "oops/oop.inline.hpp"
  42 #include "oops/stackChunkOop.inline.hpp"
  43 #include "oops/verifyOopClosure.hpp"
  44 #include "prims/methodHandles.hpp"
  45 #include "runtime/continuation.hpp"
  46 #include "runtime/continuationEntry.inline.hpp"
  47 #include "runtime/frame.inline.hpp"
  48 #include "runtime/handles.inline.hpp"
  49 #include "runtime/javaCalls.hpp"
  50 #include "runtime/javaThread.hpp"
  51 #include "runtime/monitorChunk.hpp"
  52 #include "runtime/os.hpp"
  53 #include "runtime/safefetch.hpp"
  54 #include "runtime/sharedRuntime.hpp"
  55 #include "runtime/signature.hpp"
  56 #include "runtime/stackValue.hpp"
  57 #include "runtime/stubCodeGenerator.hpp"
  58 #include "runtime/stubRoutines.hpp"
  59 #include "utilities/debug.hpp"
  60 #include "utilities/decoder.hpp"
  61 #include "utilities/formatBuffer.hpp"



  62 
  63 RegisterMap::RegisterMap(JavaThread *thread, UpdateMap update_map, ProcessFrames process_frames, WalkContinuation walk_cont) {
  64   _thread         = thread;
  65   _update_map     = update_map == UpdateMap::include;
  66   _process_frames = process_frames == ProcessFrames::include;
  67   _walk_cont      = walk_cont == WalkContinuation::include;
  68   clear();
  69   DEBUG_ONLY (_update_for_id = nullptr;)
  70   NOT_PRODUCT(_skip_missing = false;)
  71   NOT_PRODUCT(_async = false;)
  72 
  73   if (walk_cont == WalkContinuation::include && thread != nullptr && thread->last_continuation() != nullptr) {
  74     _chunk = stackChunkHandle(Thread::current()->handle_area()->allocate_null_handle(), true /* dummy */);
  75   }
  76   _chunk_index = -1;
  77 
  78 #ifndef PRODUCT
  79   for (int i = 0; i < reg_count ; i++ ) _location[i] = nullptr;
  80 #endif /* PRODUCT */
  81 }

 344     return false;
 345 
 346   return !nm->is_at_poll_return(pc());
 347 }
 348 
 349 void frame::deoptimize(JavaThread* thread) {
 350   assert(thread == nullptr
 351          || (thread->frame_anchor()->has_last_Java_frame() &&
 352              thread->frame_anchor()->walkable()), "must be");
 353   // Schedule deoptimization of an nmethod activation with this frame.
 354   assert(_cb != nullptr && _cb->is_nmethod(), "must be");
 355 
 356   // If the call site is a MethodHandle call site use the MH deopt handler.
 357   nmethod* nm = _cb->as_nmethod();
 358   address deopt = nm->deopt_handler_entry();
 359 
 360   NativePostCallNop* inst = nativePostCallNop_at(pc());
 361 
 362   // Save the original pc before we patch in the new one
 363   nm->set_original_pc(this, pc());



















 364   patch_pc(thread, deopt);
 365   assert(is_deoptimized_frame(), "must be");
 366 
 367 #ifdef ASSERT
 368   if (thread != nullptr) {
 369     frame fr = thread->last_frame();
 370     RegisterMap map(thread,
 371                     RegisterMap::UpdateMap::skip,
 372                     RegisterMap::ProcessFrames::include,
 373                     !is_heap_frame() ? RegisterMap::WalkContinuation::skip : RegisterMap::WalkContinuation::include);
 374     intptr_t* fr_id = fr.id();
 375     while (id() != fr_id) {
 376       fr = fr.sender(&map);
 377       if (fr.is_heap_frame()) {
 378         assert(is_heap_frame(), "");
 379         frame derel_fr = map.stack_chunk()->derelativize(fr);
 380         fr_id = derel_fr.id();
 381       } else {
 382         fr_id = fr.id();
 383       }

 995 class CompiledArgumentOopFinder: public SignatureIterator {
 996  protected:
 997   OopClosure*     _f;
 998   int             _offset;        // the current offset, incremented with each argument
 999   bool            _has_receiver;  // true if the callee has a receiver
1000   bool            _has_appendix;  // true if the call has an appendix
1001   frame           _fr;
1002   RegisterMap*    _reg_map;
1003   int             _arg_size;
1004   VMRegPair*      _regs;        // VMReg list of arguments
1005 
1006   friend class SignatureIterator;  // so do_parameters_on can call do_type
1007   void do_type(BasicType type) {
1008     if (is_reference_type(type))  handle_oop_offset();
1009     _offset += parameter_type_word_count(type);
1010   }
1011 
1012   virtual void handle_oop_offset() {
1013     // Extract low order register number from register array.
1014     // In LP64-land, the high-order bits are valid but unhelpful.

1015     VMReg reg = _regs[_offset].first();
1016     oop *loc = _fr.oopmapreg_to_oop_location(reg, _reg_map);
1017   #ifdef ASSERT
1018     if (loc == nullptr) {
1019       if (_reg_map->should_skip_missing()) {
1020         return;
1021       }
1022       tty->print_cr("Error walking frame oops:");
1023       _fr.print_on(tty);
1024       assert(loc != nullptr, "missing register map entry reg: %d %s loc: " INTPTR_FORMAT, reg->value(), reg->name(), p2i(loc));
1025     }
1026   #endif
1027     _f->do_oop(loc);
1028   }
1029 
1030  public:
1031   CompiledArgumentOopFinder(Symbol* signature, bool has_receiver, bool has_appendix, OopClosure* f, frame fr, const RegisterMap* reg_map)
1032     : SignatureIterator(signature) {
1033 
1034     // initialize CompiledArgumentOopFinder
1035     _f         = f;
1036     _offset    = 0;
1037     _has_receiver = has_receiver;
1038     _has_appendix = has_appendix;
1039     _fr        = fr;
1040     _reg_map   = (RegisterMap*)reg_map;
1041     _arg_size  = ArgumentSizeComputer(signature).size() + (has_receiver ? 1 : 0) + (has_appendix ? 1 : 0);
1042 
1043     int arg_size;
1044     _regs = SharedRuntime::find_callee_arguments(signature, has_receiver, has_appendix, &arg_size);
1045     assert(arg_size == _arg_size, "wrong arg size");
1046   }
1047 
1048   void oops_do() {
1049     if (_has_receiver) {
1050       handle_oop_offset();
1051       _offset++;
1052     }
1053     do_parameters_on(this);
1054     if (_has_appendix) {
1055       handle_oop_offset();
1056       _offset++;
1057     }
1058   }
1059 };
1060 
1061 void frame::oops_compiled_arguments_do(Symbol* signature, bool has_receiver, bool has_appendix,
1062                                        const RegisterMap* reg_map, OopClosure* f) const {
1063   // ResourceMark rm;
1064   CompiledArgumentOopFinder finder(signature, has_receiver, has_appendix, f, *this, reg_map);
1065   finder.oops_do();

1389       tos = MAX2(tos, interpreter_frame_expression_stack_at(e));
1390       values.describe(frame_no, interpreter_frame_expression_stack_at(e),
1391                       err_msg("stack %d", e), 1);
1392     }
1393     if (tos != nullptr) {
1394       values.describe(-1, tos, err_msg("expression stack for #%d", frame_no), 2);
1395     }
1396 
1397     if (reg_map != nullptr) {
1398       FrameValuesOopClosure oopsFn;
1399       oops_do(&oopsFn, nullptr, &oopsFn, reg_map);
1400       oopsFn.describe(values, frame_no);
1401     }
1402   } else if (is_entry_frame()) {
1403     // For now just label the frame
1404     values.describe(-1, info_address, err_msg("#%d entry frame", frame_no), 2);
1405   } else if (is_compiled_frame()) {
1406     // For now just label the frame
1407     nmethod* nm = cb()->as_nmethod();
1408     values.describe(-1, info_address,
1409                     FormatBuffer<1024>("#%d nmethod " INTPTR_FORMAT " for method J %s%s", frame_no,
1410                                        p2i(nm),
1411                                        nm->method()->name_and_sig_as_C_string(),
1412                                        (_deopt_state == is_deoptimized) ?
1413                                        " (deoptimized)" :
1414                                        ((_deopt_state == unknown) ? " (state unknown)" : "")),
1415                     3);
1416 
1417     { // mark arguments (see nmethod::print_nmethod_labels)
1418       Method* m = nm->method();
1419 





1420       int stack_slot_offset = nm->frame_size() * wordSize; // offset, in bytes, to caller sp
1421       int sizeargs = m->size_of_parameters();
1422 
1423       BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, sizeargs);
1424       VMRegPair* regs   = NEW_RESOURCE_ARRAY(VMRegPair, sizeargs);
1425       {
1426         int sig_index = 0;
1427         if (!m->is_static()) {
1428           sig_bt[sig_index++] = T_OBJECT; // 'this'
1429         }
1430         for (SignatureStream ss(m->signature()); !ss.at_return_type(); ss.next()) {
1431           BasicType t = ss.type();
1432           assert(type2size[t] == 1 || type2size[t] == 2, "size is 1 or 2");
1433           sig_bt[sig_index++] = t;
1434           if (type2size[t] == 2) {
1435             sig_bt[sig_index++] = T_VOID;
1436           }
1437         }
1438         assert(sig_index == sizeargs, "");
1439       }
1440       int stack_arg_slots = SharedRuntime::java_calling_convention(sig_bt, regs, sizeargs);
1441       assert(stack_arg_slots ==  nm->as_nmethod()->num_stack_arg_slots(false /* rounded */) || nm->is_osr_method(), "");
1442       int out_preserve = SharedRuntime::out_preserve_stack_slots();
1443       int sig_index = 0;
1444       int arg_index = (m->is_static() ? 0 : -1);
1445       for (SignatureStream ss(m->signature()); !ss.at_return_type(); ) {
1446         bool at_this = (arg_index == -1);
1447         bool at_old_sp = false;
1448         BasicType t = (at_this ? T_OBJECT : ss.type());
1449         assert(t == sig_bt[sig_index], "sigs in sync");
1450         VMReg fst = regs[sig_index].first();
1451         if (fst->is_stack()) {
1452           assert(((int)fst->reg2stack()) >= 0, "reg2stack: %d", fst->reg2stack());
1453           int offset = (fst->reg2stack() + out_preserve) * VMRegImpl::stack_slot_size + stack_slot_offset;
1454           intptr_t* stack_address = (intptr_t*)((address)unextended_sp() + offset);
1455           if (at_this) {
1456             values.describe(frame_no, stack_address, err_msg("this for #%d", frame_no), 1);
1457           } else {
1458             values.describe(frame_no, stack_address, err_msg("param %d %s for #%d", arg_index, type2name(t), frame_no), 1);
1459           }
1460         }
1461         sig_index += type2size[t];
1462         arg_index += 1;
1463         if (!at_this) {
1464           ss.next();
1465         }
1466       }
1467     }
1468 
1469     if (reg_map != nullptr && is_java_frame()) {
1470       int scope_no = 0;
1471       for (ScopeDesc* scope = nm->scope_desc_at(pc()); scope != nullptr; scope = scope->sender(), scope_no++) {
1472         Method* m = scope->method();
1473         int  bci = scope->bci();
1474         values.describe(-1, info_address, err_msg("- #%d scope %s @ %d", scope_no, m->name_and_sig_as_C_string(), bci), 2);
1475 
1476         { // mark locals
1477           GrowableArray<ScopeValue*>* scvs = scope->locals();
1478           int scvs_length = scvs != nullptr ? scvs->length() : 0;
1479           for (int i = 0; i < scvs_length; i++) {
1480             intptr_t* stack_address = (intptr_t*)StackValue::stack_value_address(this, reg_map, scvs->at(i));
1481             if (stack_address != nullptr) {
1482               values.describe(frame_no, stack_address, err_msg("local %d for #%d (scope %d)", i, frame_no, scope_no), 1);
1483             }
1484           }
1485         }

  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "classfile/moduleEntry.hpp"
  26 #include "code/codeCache.hpp"
  27 #include "code/scopeDesc.hpp"
  28 #include "code/vmreg.inline.hpp"
  29 #include "compiler/abstractCompiler.hpp"
  30 #include "compiler/disassembler.hpp"
  31 #include "compiler/oopMap.hpp"
  32 #include "gc/shared/collectedHeap.inline.hpp"
  33 #include "interpreter/interpreter.hpp"
  34 #include "interpreter/oopMapCache.hpp"
  35 #include "logging/log.hpp"
  36 #include "memory/resourceArea.hpp"
  37 #include "memory/universe.hpp"
  38 #include "oops/inlineKlass.hpp"
  39 #include "oops/markWord.hpp"
  40 #include "oops/method.inline.hpp"
  41 #include "oops/methodData.hpp"
  42 #include "oops/oop.inline.hpp"
  43 #include "oops/stackChunkOop.inline.hpp"
  44 #include "oops/verifyOopClosure.hpp"
  45 #include "prims/methodHandles.hpp"
  46 #include "runtime/continuation.hpp"
  47 #include "runtime/continuationEntry.inline.hpp"
  48 #include "runtime/frame.inline.hpp"
  49 #include "runtime/handles.inline.hpp"
  50 #include "runtime/javaCalls.hpp"
  51 #include "runtime/javaThread.hpp"
  52 #include "runtime/monitorChunk.hpp"
  53 #include "runtime/os.hpp"
  54 #include "runtime/safefetch.hpp"
  55 #include "runtime/sharedRuntime.hpp"
  56 #include "runtime/signature.hpp"
  57 #include "runtime/stackValue.hpp"
  58 #include "runtime/stubCodeGenerator.hpp"
  59 #include "runtime/stubRoutines.hpp"
  60 #include "utilities/debug.hpp"
  61 #include "utilities/decoder.hpp"
  62 #include "utilities/formatBuffer.hpp"
  63 #ifdef COMPILER1
  64 #include "c1/c1_Runtime1.hpp"
  65 #endif
  66 
  67 RegisterMap::RegisterMap(JavaThread *thread, UpdateMap update_map, ProcessFrames process_frames, WalkContinuation walk_cont) {
  68   _thread         = thread;
  69   _update_map     = update_map == UpdateMap::include;
  70   _process_frames = process_frames == ProcessFrames::include;
  71   _walk_cont      = walk_cont == WalkContinuation::include;
  72   clear();
  73   DEBUG_ONLY (_update_for_id = nullptr;)
  74   NOT_PRODUCT(_skip_missing = false;)
  75   NOT_PRODUCT(_async = false;)
  76 
  77   if (walk_cont == WalkContinuation::include && thread != nullptr && thread->last_continuation() != nullptr) {
  78     _chunk = stackChunkHandle(Thread::current()->handle_area()->allocate_null_handle(), true /* dummy */);
  79   }
  80   _chunk_index = -1;
  81 
  82 #ifndef PRODUCT
  83   for (int i = 0; i < reg_count ; i++ ) _location[i] = nullptr;
  84 #endif /* PRODUCT */
  85 }

 348     return false;
 349 
 350   return !nm->is_at_poll_return(pc());
 351 }
 352 
 353 void frame::deoptimize(JavaThread* thread) {
 354   assert(thread == nullptr
 355          || (thread->frame_anchor()->has_last_Java_frame() &&
 356              thread->frame_anchor()->walkable()), "must be");
 357   // Schedule deoptimization of an nmethod activation with this frame.
 358   assert(_cb != nullptr && _cb->is_nmethod(), "must be");
 359 
 360   // If the call site is a MethodHandle call site use the MH deopt handler.
 361   nmethod* nm = _cb->as_nmethod();
 362   address deopt = nm->deopt_handler_entry();
 363 
 364   NativePostCallNop* inst = nativePostCallNop_at(pc());
 365 
 366   // Save the original pc before we patch in the new one
 367   nm->set_original_pc(this, pc());
 368 
 369 #ifdef COMPILER1
 370   if (nm->is_compiled_by_c1() && nm->method()->has_scalarized_args() &&
 371       pc() < nm->verified_inline_entry_point()) {
 372     // The VEP and VIEP(RO) of C1-compiled methods call into the runtime to buffer scalarized value
 373     // type args. We can't deoptimize at that point because the buffers have not yet been initialized.
 374     // Also, if the method is synchronized, we first need to acquire the lock.
 375     // Don't patch the return pc to delay deoptimization until we enter the method body (the check
 376     // added in LIRGenerator::do_Base will detect the pending deoptimization by checking the original_pc).
 377 #if defined ASSERT && !defined AARCH64   // Stub call site does not look like NativeCall on AArch64
 378     NativeCall* call = nativeCall_before(this->pc());
 379     address dest = call->destination();
 380     assert(dest == Runtime1::entry_for(StubId::c1_buffer_inline_args_no_receiver_id) ||
 381            dest == Runtime1::entry_for(StubId::c1_buffer_inline_args_id), "unexpected safepoint in entry point");
 382 #endif
 383     return;
 384   }
 385 #endif
 386 
 387   patch_pc(thread, deopt);
 388   assert(is_deoptimized_frame(), "must be");
 389 
 390 #ifdef ASSERT
 391   if (thread != nullptr) {
 392     frame fr = thread->last_frame();
 393     RegisterMap map(thread,
 394                     RegisterMap::UpdateMap::skip,
 395                     RegisterMap::ProcessFrames::include,
 396                     !is_heap_frame() ? RegisterMap::WalkContinuation::skip : RegisterMap::WalkContinuation::include);
 397     intptr_t* fr_id = fr.id();
 398     while (id() != fr_id) {
 399       fr = fr.sender(&map);
 400       if (fr.is_heap_frame()) {
 401         assert(is_heap_frame(), "");
 402         frame derel_fr = map.stack_chunk()->derelativize(fr);
 403         fr_id = derel_fr.id();
 404       } else {
 405         fr_id = fr.id();
 406       }

1018 class CompiledArgumentOopFinder: public SignatureIterator {
1019  protected:
1020   OopClosure*     _f;
1021   int             _offset;        // the current offset, incremented with each argument
1022   bool            _has_receiver;  // true if the callee has a receiver
1023   bool            _has_appendix;  // true if the call has an appendix
1024   frame           _fr;
1025   RegisterMap*    _reg_map;
1026   int             _arg_size;
1027   VMRegPair*      _regs;        // VMReg list of arguments
1028 
1029   friend class SignatureIterator;  // so do_parameters_on can call do_type
1030   void do_type(BasicType type) {
1031     if (is_reference_type(type))  handle_oop_offset();
1032     _offset += parameter_type_word_count(type);
1033   }
1034 
1035   virtual void handle_oop_offset() {
1036     // Extract low order register number from register array.
1037     // In LP64-land, the high-order bits are valid but unhelpful.
1038     assert(_offset < _arg_size, "out of bounds");
1039     VMReg reg = _regs[_offset].first();
1040     oop *loc = _fr.oopmapreg_to_oop_location(reg, _reg_map);
1041   #ifdef ASSERT
1042     if (loc == nullptr) {
1043       if (_reg_map->should_skip_missing()) {
1044         return;
1045       }
1046       tty->print_cr("Error walking frame oops:");
1047       _fr.print_on(tty);
1048       assert(loc != nullptr, "missing register map entry reg: %d %s loc: " INTPTR_FORMAT, reg->value(), reg->name(), p2i(loc));
1049     }
1050   #endif
1051     _f->do_oop(loc);
1052   }
1053 
1054  public:
1055   CompiledArgumentOopFinder(Symbol* signature, bool has_receiver, bool has_appendix, OopClosure* f, frame fr, const RegisterMap* reg_map)
1056     : SignatureIterator(signature) {
1057 
1058     // initialize CompiledArgumentOopFinder
1059     _f         = f;
1060     _offset    = 0;
1061     _has_receiver = has_receiver;
1062     _has_appendix = has_appendix;
1063     _fr        = fr;
1064     _reg_map   = (RegisterMap*)reg_map;
1065     _regs = SharedRuntime::find_callee_arguments(signature, has_receiver, has_appendix, &_arg_size);




1066   }
1067 
1068   void oops_do() {
1069     if (_has_receiver) {
1070       handle_oop_offset();
1071       _offset++;
1072     }
1073     do_parameters_on(this);
1074     if (_has_appendix) {
1075       handle_oop_offset();
1076       _offset++;
1077     }
1078   }
1079 };
1080 
1081 void frame::oops_compiled_arguments_do(Symbol* signature, bool has_receiver, bool has_appendix,
1082                                        const RegisterMap* reg_map, OopClosure* f) const {
1083   // ResourceMark rm;
1084   CompiledArgumentOopFinder finder(signature, has_receiver, has_appendix, f, *this, reg_map);
1085   finder.oops_do();

1409       tos = MAX2(tos, interpreter_frame_expression_stack_at(e));
1410       values.describe(frame_no, interpreter_frame_expression_stack_at(e),
1411                       err_msg("stack %d", e), 1);
1412     }
1413     if (tos != nullptr) {
1414       values.describe(-1, tos, err_msg("expression stack for #%d", frame_no), 2);
1415     }
1416 
1417     if (reg_map != nullptr) {
1418       FrameValuesOopClosure oopsFn;
1419       oops_do(&oopsFn, nullptr, &oopsFn, reg_map);
1420       oopsFn.describe(values, frame_no);
1421     }
1422   } else if (is_entry_frame()) {
1423     // For now just label the frame
1424     values.describe(-1, info_address, err_msg("#%d entry frame", frame_no), 2);
1425   } else if (is_compiled_frame()) {
1426     // For now just label the frame
1427     nmethod* nm = cb()->as_nmethod();
1428     values.describe(-1, info_address,
1429                     FormatBuffer<1024>("#%d nmethod (%s %d) " INTPTR_FORMAT " for method J %s%s", frame_no,
1430                                        nm->is_compiled_by_c1() ? "c1" : "c2", nm->frame_size(), p2i(nm),
1431                                        nm->method()->name_and_sig_as_C_string(),
1432                                        (_deopt_state == is_deoptimized) ?
1433                                        " (deoptimized)" :
1434                                        ((_deopt_state == unknown) ? " (state unknown)" : "")),
1435                     3);
1436 
1437     { // mark arguments (see nmethod::print_nmethod_labels)
1438       Method* m = nm->method();
1439 
1440       CompiledEntrySignature ces(m);
1441       ces.compute_calling_conventions(false);
1442       const GrowableArray<SigEntry>* sig_cc = nm->is_compiled_by_c2() ? ces.sig_cc() : ces.sig();
1443       const VMRegPair* regs = nm->is_compiled_by_c2() ? ces.regs_cc() : ces.regs();
1444 
1445       int stack_slot_offset = nm->frame_size() * wordSize; // offset, in bytes, to caller sp





















1446       int out_preserve = SharedRuntime::out_preserve_stack_slots();
1447       int sig_index = 0;
1448       int arg_index = (m->is_static() ? 0 : -1);
1449       for (ExtendedSignature sig = ExtendedSignature(sig_cc, SigEntryFilter()); !sig.at_end(); ++sig) {
1450         bool at_this = (arg_index == -1);
1451         BasicType t = (*sig)._bt;


1452         VMReg fst = regs[sig_index].first();
1453         if (fst->is_stack()) {
1454           assert(((int)fst->reg2stack()) >= 0, "reg2stack: %d", fst->reg2stack());
1455           int offset = (fst->reg2stack() + out_preserve) * VMRegImpl::stack_slot_size + stack_slot_offset;
1456           intptr_t* stack_address = (intptr_t*)((address)unextended_sp() + offset);
1457           if (at_this) {
1458             values.describe(frame_no, stack_address, err_msg("this for #%d", frame_no), 1);
1459           } else {
1460             values.describe(frame_no, stack_address, err_msg("param %d %s for #%d", arg_index, type2name(t), frame_no), 1);
1461           }
1462         }
1463         sig_index += type2size[t];
1464         arg_index += 1;



1465       }
1466     }
1467 
1468     if (reg_map != nullptr && is_java_frame()) {
1469       int scope_no = 0;
1470       for (ScopeDesc* scope = nm->scope_desc_at(pc()); scope != nullptr; scope = scope->sender(), scope_no++) {
1471         Method* m = scope->method();
1472         int  bci = scope->bci();
1473         values.describe(-1, info_address, err_msg("- #%d scope %s @ %d", scope_no, m->name_and_sig_as_C_string(), bci), 2);
1474 
1475         { // mark locals
1476           GrowableArray<ScopeValue*>* scvs = scope->locals();
1477           int scvs_length = scvs != nullptr ? scvs->length() : 0;
1478           for (int i = 0; i < scvs_length; i++) {
1479             intptr_t* stack_address = (intptr_t*)StackValue::stack_value_address(this, reg_map, scvs->at(i));
1480             if (stack_address != nullptr) {
1481               values.describe(frame_no, stack_address, err_msg("local %d for #%d (scope %d)", i, frame_no, scope_no), 1);
1482             }
1483           }
1484         }
< prev index next >