2528 if (block_begin == entry_point()) stream->print_cr("[Entry Point]");
2529 if (block_begin == verified_entry_point()) stream->print_cr("[Verified Entry Point]");
2530 if (JVMCI_ONLY(_exception_offset >= 0 &&) block_begin == exception_begin()) stream->print_cr("[Exception Handler]");
2531 if (block_begin == stub_begin()) stream->print_cr("[Stub Code]");
2532 if (JVMCI_ONLY(_deopt_handler_begin != NULL &&) block_begin == deopt_handler_begin()) stream->print_cr("[Deopt Handler Code]");
2533
2534 if (has_method_handle_invokes())
2535 if (block_begin == deopt_mh_handler_begin()) stream->print_cr("[Deopt MH Handler Code]");
2536
2537 if (block_begin == consts_begin()) stream->print_cr("[Constants]");
2538
2539 if (block_begin == entry_point()) {
2540 methodHandle m = method();
2541 if (m.not_null()) {
2542 stream->print(" # ");
2543 m->print_value_on(stream);
2544 stream->cr();
2545 }
2546 if (m.not_null() && !is_osr_method()) {
2547 ResourceMark rm;
2548 int sizeargs = m->size_of_parameters();
2549 BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, sizeargs);
2550 VMRegPair* regs = NEW_RESOURCE_ARRAY(VMRegPair, sizeargs);
2551 {
2552 int sig_index = 0;
2553 if (!m->is_static())
2554 sig_bt[sig_index++] = T_OBJECT; // 'this'
2555 for (SignatureStream ss(m->signature()); !ss.at_return_type(); ss.next()) {
2556 BasicType t = ss.type();
2557 sig_bt[sig_index++] = t;
2558 if (type2size[t] == 2) {
2559 sig_bt[sig_index++] = T_VOID;
2560 } else {
2561 assert(type2size[t] == 1, "size is 1 or 2");
2562 }
2563 }
2564 assert(sig_index == sizeargs, "");
2565 }
2566 const char* spname = "sp"; // make arch-specific?
2567 intptr_t out_preserve = SharedRuntime::java_calling_convention(sig_bt, regs, sizeargs, false);
2568 int stack_slot_offset = this->frame_size() * wordSize;
2569 int tab1 = 14, tab2 = 24;
2570 int sig_index = 0;
2571 int arg_index = (m->is_static() ? 0 : -1);
2572 bool did_old_sp = false;
2573 for (SignatureStream ss(m->signature()); !ss.at_return_type(); ) {
2574 bool at_this = (arg_index == -1);
2575 bool at_old_sp = false;
2576 BasicType t = (at_this ? T_OBJECT : ss.type());
2577 assert(t == sig_bt[sig_index], "sigs in sync");
2578 if (at_this)
2579 stream->print(" # this: ");
2580 else
2581 stream->print(" # parm%d: ", arg_index);
2582 stream->move_to(tab1);
2583 VMReg fst = regs[sig_index].first();
2584 VMReg snd = regs[sig_index].second();
2585 if (fst->is_reg()) {
2586 stream->print("%s", fst->name());
2587 if (snd->is_valid()) {
2588 stream->print(":%s", snd->name());
2589 }
2590 } else if (fst->is_stack()) {
2591 int offset = fst->reg2stack() * VMRegImpl::stack_slot_size + stack_slot_offset;
2592 if (offset == stack_slot_offset) at_old_sp = true;
2593 stream->print("[%s+0x%x]", spname, offset);
|
2528 if (block_begin == entry_point()) stream->print_cr("[Entry Point]");
2529 if (block_begin == verified_entry_point()) stream->print_cr("[Verified Entry Point]");
2530 if (JVMCI_ONLY(_exception_offset >= 0 &&) block_begin == exception_begin()) stream->print_cr("[Exception Handler]");
2531 if (block_begin == stub_begin()) stream->print_cr("[Stub Code]");
2532 if (JVMCI_ONLY(_deopt_handler_begin != NULL &&) block_begin == deopt_handler_begin()) stream->print_cr("[Deopt Handler Code]");
2533
2534 if (has_method_handle_invokes())
2535 if (block_begin == deopt_mh_handler_begin()) stream->print_cr("[Deopt MH Handler Code]");
2536
2537 if (block_begin == consts_begin()) stream->print_cr("[Constants]");
2538
2539 if (block_begin == entry_point()) {
2540 methodHandle m = method();
2541 if (m.not_null()) {
2542 stream->print(" # ");
2543 m->print_value_on(stream);
2544 stream->cr();
2545 }
2546 if (m.not_null() && !is_osr_method()) {
2547 ResourceMark rm;
2548 int sizeargs = 0;
2549 BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, 256);
2550 VMRegPair* regs = NEW_RESOURCE_ARRAY(VMRegPair, 256);
2551 Symbol* sig = m->signature();
2552 bool has_value_arg = false;
2553 if (ValueTypePassFieldsAsArgs && m->adapter()->get_sig_extended() != NULL) {
2554 // Use extended signature if value type arguments are passed as fields
2555 sig = m->adapter()->get_sig_extended();
2556 has_value_arg = true;
2557 } else if (!m->is_static()) {
2558 sig_bt[sizeargs++] = T_OBJECT; // 'this'
2559 }
2560 for (SignatureStream ss(sig); !ss.at_return_type(); ss.next()) {
2561 BasicType t = ss.type();
2562 sig_bt[sizeargs++] = t;
2563 if (type2size[t] == 2) {
2564 sig_bt[sizeargs++] = T_VOID;
2565 } else {
2566 assert(type2size[t] == 1, "size is 1 or 2");
2567 }
2568 }
2569 const char* spname = "sp"; // make arch-specific?
2570 intptr_t out_preserve = SharedRuntime::java_calling_convention(sig_bt, regs, sizeargs, false);
2571 int stack_slot_offset = this->frame_size() * wordSize;
2572 int tab1 = 14, tab2 = 24;
2573 int sig_index = 0;
2574 int arg_index = ((m->is_static() || has_value_arg) ? 0 : -1);
2575 bool did_old_sp = false;
2576 for (SignatureStream ss(sig); !ss.at_return_type(); ) {
2577 bool at_this = (arg_index == -1);
2578 bool at_old_sp = false;
2579 BasicType t = (at_this ? T_OBJECT : ss.type());
2580 assert(t == sig_bt[sig_index], "sigs in sync");
2581 if (at_this)
2582 stream->print(" # this: ");
2583 else
2584 stream->print(" # parm%d: ", arg_index);
2585 stream->move_to(tab1);
2586 VMReg fst = regs[sig_index].first();
2587 VMReg snd = regs[sig_index].second();
2588 if (fst->is_reg()) {
2589 stream->print("%s", fst->name());
2590 if (snd->is_valid()) {
2591 stream->print(":%s", snd->name());
2592 }
2593 } else if (fst->is_stack()) {
2594 int offset = fst->reg2stack() * VMRegImpl::stack_slot_size + stack_slot_offset;
2595 if (offset == stack_slot_offset) at_old_sp = true;
2596 stream->print("[%s+0x%x]", spname, offset);
|