544 if (walkable) {
545 // The previous definition of walkable may have to be refined
546 // if new call sites cause the next frame constructor to start
547 // failing. Alternatively, frame constructors could be
548 // modified to support the current or future non walkable
549 // frames (but this is more intrusive and is not considered as
550 // part of this RFE, which will instead use a simpler output).
551 frame dump_frame = frame(dump_sp, dump_fp);
552 dump_frame.describe(values, 1);
553 } else {
554 // Stack may not be walkable (invalid PC above FP):
555 // Add descriptions without building a Java frame to avoid issues
556 values.describe(-1, dump_fp, "fp for #1 <not parsed, cannot trust pc>");
557 values.describe(-1, dump_sp, "sp for #1");
558 }
559 values.describe(-1, entry_sp, "raw top of stack");
560
561 tty->print_cr("Stack layout:");
562 values.print(p);
563 }
564 if (has_mh && mh->is_oop()) {
565 mh->print();
566 if (java_lang_invoke_MethodHandle::is_instance(mh)) {
567 if (java_lang_invoke_MethodHandle::form_offset_in_bytes() != 0)
568 java_lang_invoke_MethodHandle::form(mh)->print();
569 }
570 }
571 }
572 }
573
574 // The stub wraps the arguments in a struct on the stack to avoid
575 // dealing with the different calling conventions for passing 6
576 // arguments.
577 struct MethodHandleStubArguments {
578 const char* adaptername;
579 oopDesc* mh;
580 intptr_t* saved_regs;
581 intptr_t* entry_sp;
582 };
583 void trace_method_handle_stub_wrapper(MethodHandleStubArguments* args) {
584 trace_method_handle_stub(args->adaptername,
|
544 if (walkable) {
545 // The previous definition of walkable may have to be refined
546 // if new call sites cause the next frame constructor to start
547 // failing. Alternatively, frame constructors could be
548 // modified to support the current or future non walkable
549 // frames (but this is more intrusive and is not considered as
550 // part of this RFE, which will instead use a simpler output).
551 frame dump_frame = frame(dump_sp, dump_fp);
552 dump_frame.describe(values, 1);
553 } else {
554 // Stack may not be walkable (invalid PC above FP):
555 // Add descriptions without building a Java frame to avoid issues
556 values.describe(-1, dump_fp, "fp for #1 <not parsed, cannot trust pc>");
557 values.describe(-1, dump_sp, "sp for #1");
558 }
559 values.describe(-1, entry_sp, "raw top of stack");
560
561 tty->print_cr("Stack layout:");
562 values.print(p);
563 }
564 if (has_mh && oopDesc::is_oop(mh)) {
565 mh->print();
566 if (java_lang_invoke_MethodHandle::is_instance(mh)) {
567 if (java_lang_invoke_MethodHandle::form_offset_in_bytes() != 0)
568 java_lang_invoke_MethodHandle::form(mh)->print();
569 }
570 }
571 }
572 }
573
574 // The stub wraps the arguments in a struct on the stack to avoid
575 // dealing with the different calling conventions for passing 6
576 // arguments.
577 struct MethodHandleStubArguments {
578 const char* adaptername;
579 oopDesc* mh;
580 intptr_t* saved_regs;
581 intptr_t* entry_sp;
582 };
583 void trace_method_handle_stub_wrapper(MethodHandleStubArguments* args) {
584 trace_method_handle_stub(args->adaptername,
|