Thu, 19 Jan 2012 18:35:13 -0800
Merge
1.1 --- a/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp Wed Jan 18 11:45:14 2012 -0500 1.2 +++ b/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp Thu Jan 19 18:35:13 2012 -0800 1.3 @@ -391,7 +391,7 @@ 1.4 __ call(Runtime1::entry_for(Runtime1::handle_exception_from_callee_id), relocInfo::runtime_call_type); 1.5 __ delayed()->nop(); 1.6 __ should_not_reach_here(); 1.7 - assert(code_offset() - offset <= exception_handler_size, "overflow"); 1.8 + guarantee(code_offset() - offset <= exception_handler_size, "overflow"); 1.9 __ end_a_stub(); 1.10 1.11 return offset; 1.12 @@ -474,8 +474,7 @@ 1.13 AddressLiteral deopt_blob(SharedRuntime::deopt_blob()->unpack()); 1.14 __ JUMP(deopt_blob, G3_scratch, 0); // sethi;jmp 1.15 __ delayed()->nop(); 1.16 - assert(code_offset() - offset <= deopt_handler_size, "overflow"); 1.17 - debug_only(__ stop("should have gone to the caller");) 1.18 + guarantee(code_offset() - offset <= deopt_handler_size, "overflow"); 1.19 __ end_a_stub(); 1.20 1.21 return offset;
2.1 --- a/src/cpu/sparc/vm/c1_LIRAssembler_sparc.hpp Wed Jan 18 11:45:14 2012 -0500 2.2 +++ b/src/cpu/sparc/vm/c1_LIRAssembler_sparc.hpp Thu Jan 19 18:35:13 2012 -0800 2.3 @@ -69,7 +69,7 @@ 2.4 #else 2.5 call_stub_size = 20, 2.6 #endif // _LP64 2.7 - exception_handler_size = DEBUG_ONLY(1*K) NOT_DEBUG(10*4), 2.8 - deopt_handler_size = DEBUG_ONLY(1*K) NOT_DEBUG(10*4) }; 2.9 + exception_handler_size = DEBUG_ONLY(1*K) NOT_DEBUG(128), 2.10 + deopt_handler_size = DEBUG_ONLY(1*K) NOT_DEBUG(64) }; 2.11 2.12 #endif // CPU_SPARC_VM_C1_LIRASSEMBLER_SPARC_HPP
3.1 --- a/src/cpu/sparc/vm/frame_sparc.inline.hpp Wed Jan 18 11:45:14 2012 -0500 3.2 +++ b/src/cpu/sparc/vm/frame_sparc.inline.hpp Thu Jan 19 18:35:13 2012 -0800 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 3.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 * 3.9 * This code is free software; you can redistribute it and/or modify it 3.10 @@ -82,6 +82,8 @@ 3.11 3.12 inline intptr_t* frame::sender_sp() const { return fp(); } 3.13 3.14 +inline intptr_t* frame::real_fp() const { return fp(); } 3.15 + 3.16 // Used only in frame::oopmapreg_to_location 3.17 // This return a value in VMRegImpl::slot_size 3.18 inline int frame::pd_oop_map_offset_adjustment() const {
4.1 --- a/src/cpu/sparc/vm/methodHandles_sparc.cpp Wed Jan 18 11:45:14 2012 -0500 4.2 +++ b/src/cpu/sparc/vm/methodHandles_sparc.cpp Thu Jan 19 18:35:13 2012 -0800 4.3 @@ -1045,7 +1045,7 @@ 4.4 |(1<<java_lang_invoke_AdapterMethodHandle::OP_DROP_ARGS) 4.5 // OP_COLLECT_ARGS is below... 4.6 |(1<<java_lang_invoke_AdapterMethodHandle::OP_SPREAD_ARGS) 4.7 - |(!UseRicochetFrames ? 0 : 4.8 + |( 4.9 java_lang_invoke_MethodTypeForm::vmlayout_offset_in_bytes() <= 0 ? 0 : 4.10 ((1<<java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_REF) 4.11 |(1<<java_lang_invoke_AdapterMethodHandle::OP_COLLECT_ARGS)
5.1 --- a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Wed Jan 18 11:45:14 2012 -0500 5.2 +++ b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Thu Jan 19 18:35:13 2012 -0800 5.3 @@ -406,7 +406,7 @@ 5.4 // search an exception handler (rax: exception oop, rdx: throwing pc) 5.5 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::handle_exception_from_callee_id))); 5.6 __ should_not_reach_here(); 5.7 - assert(code_offset() - offset <= exception_handler_size, "overflow"); 5.8 + guarantee(code_offset() - offset <= exception_handler_size, "overflow"); 5.9 __ end_a_stub(); 5.10 5.11 return offset; 5.12 @@ -490,8 +490,7 @@ 5.13 5.14 __ pushptr(here.addr()); 5.15 __ jump(RuntimeAddress(SharedRuntime::deopt_blob()->unpack())); 5.16 - 5.17 - assert(code_offset() - offset <= deopt_handler_size, "overflow"); 5.18 + guarantee(code_offset() - offset <= deopt_handler_size, "overflow"); 5.19 __ end_a_stub(); 5.20 5.21 return offset;
6.1 --- a/src/cpu/x86/vm/frame_x86.cpp Wed Jan 18 11:45:14 2012 -0500 6.2 +++ b/src/cpu/x86/vm/frame_x86.cpp Thu Jan 19 18:35:13 2012 -0800 6.3 @@ -1,5 +1,5 @@ 6.4 /* 6.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 6.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 6.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.8 * 6.9 * This code is free software; you can redistribute it and/or modify it 6.10 @@ -675,3 +675,21 @@ 6.11 // used to reset the saved FP 6.12 return fp(); 6.13 } 6.14 + 6.15 +intptr_t* frame::real_fp() const { 6.16 + if (_cb != NULL) { 6.17 + // use the frame size if valid 6.18 + int size = _cb->frame_size(); 6.19 + if ((size > 0) && 6.20 + (! is_ricochet_frame())) { 6.21 + // Work-around: ricochet explicitly excluded because frame size is not 6.22 + // constant for the ricochet blob but its frame_size could not, for 6.23 + // some reasons, be declared as <= 0. This potentially confusing 6.24 + // size declaration should be fixed as another CR. 6.25 + return unextended_sp() + size; 6.26 + } 6.27 + } 6.28 + // else rely on fp() 6.29 + assert(! is_compiled_frame(), "unknown compiled frame size"); 6.30 + return fp(); 6.31 +}
7.1 --- a/src/cpu/x86/vm/frame_x86.hpp Wed Jan 18 11:45:14 2012 -0500 7.2 +++ b/src/cpu/x86/vm/frame_x86.hpp Thu Jan 19 18:35:13 2012 -0800 7.3 @@ -1,5 +1,5 @@ 7.4 /* 7.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 7.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 7.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 * 7.9 * This code is free software; you can redistribute it and/or modify it 7.10 @@ -188,6 +188,7 @@ 7.11 frame(intptr_t* sp, intptr_t* fp); 7.12 7.13 // accessors for the instance variables 7.14 + // Note: not necessarily the real 'frame pointer' (see real_fp) 7.15 intptr_t* fp() const { return _fp; } 7.16 7.17 inline address* sender_pc_addr() const;
8.1 --- a/src/cpu/x86/vm/methodHandles_x86.cpp Wed Jan 18 11:45:14 2012 -0500 8.2 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp Thu Jan 19 18:35:13 2012 -0800 8.3 @@ -1005,7 +1005,7 @@ 8.4 intptr_t* base_sp = last_sp; 8.5 typedef MethodHandles::RicochetFrame RicochetFrame; 8.6 RicochetFrame* rfp = (RicochetFrame*)((address)saved_bp - RicochetFrame::sender_link_offset_in_bytes()); 8.7 - if (!UseRicochetFrames || Universe::heap()->is_in((address) rfp->saved_args_base())) { 8.8 + if (Universe::heap()->is_in((address) rfp->saved_args_base())) { 8.9 // Probably an interpreter frame. 8.10 base_sp = (intptr_t*) saved_bp[frame::interpreter_frame_monitor_block_top_offset]; 8.11 } 8.12 @@ -1104,7 +1104,7 @@ 8.13 |(1<<java_lang_invoke_AdapterMethodHandle::OP_DROP_ARGS) 8.14 //OP_COLLECT_ARGS is below... 8.15 |(1<<java_lang_invoke_AdapterMethodHandle::OP_SPREAD_ARGS) 8.16 - |(!UseRicochetFrames ? 0 : 8.17 + |( 8.18 java_lang_invoke_MethodTypeForm::vmlayout_offset_in_bytes() <= 0 ? 0 : 8.19 ((1<<java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_REF) 8.20 |(1<<java_lang_invoke_AdapterMethodHandle::OP_COLLECT_ARGS)
9.1 --- a/src/cpu/zero/vm/frame_zero.inline.hpp Wed Jan 18 11:45:14 2012 -0500 9.2 +++ b/src/cpu/zero/vm/frame_zero.inline.hpp Thu Jan 19 18:35:13 2012 -0800 9.3 @@ -1,5 +1,5 @@ 9.4 /* 9.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 9.6 + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 9.7 * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. 9.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.9 * 9.10 @@ -72,6 +72,10 @@ 9.11 return fp() + 1; 9.12 } 9.13 9.14 +inline intptr_t* frame::real_fp() const { 9.15 + return fp(); 9.16 +} 9.17 + 9.18 inline intptr_t* frame::link() const { 9.19 ShouldNotCallThis(); 9.20 }
10.1 --- a/src/cpu/zero/vm/methodHandles_zero.hpp Wed Jan 18 11:45:14 2012 -0500 10.2 +++ b/src/cpu/zero/vm/methodHandles_zero.hpp Thu Jan 19 18:35:13 2012 -0800 10.3 @@ -29,43 +29,3 @@ 10.4 adapter_code_size = 0 10.5 }; 10.6 10.7 -#define TARGET_ARCH_NYI_6939861 1 10.8 -// ..#ifdef TARGET_ARCH_NYI_6939861 10.9 -// .. // Here are some backward compatible declarations until the 6939861 ports are updated. 10.10 -// .. #define _adapter_flyby (_EK_LIMIT + 10) 10.11 -// .. #define _adapter_ricochet (_EK_LIMIT + 11) 10.12 -// .. #define _adapter_opt_spread_1 _adapter_opt_spread_1_ref 10.13 -// .. #define _adapter_opt_spread_more _adapter_opt_spread_ref 10.14 -// .. enum { 10.15 -// .. _INSERT_NO_MASK = -1, 10.16 -// .. _INSERT_REF_MASK = 0, 10.17 -// .. _INSERT_INT_MASK = 1, 10.18 -// .. _INSERT_LONG_MASK = 3 10.19 -// .. }; 10.20 -// .. static void get_ek_bound_mh_info(EntryKind ek, BasicType& arg_type, int& arg_mask, int& arg_slots) { 10.21 -// .. arg_type = ek_bound_mh_arg_type(ek); 10.22 -// .. arg_mask = 0; 10.23 -// .. arg_slots = type2size[arg_type];; 10.24 -// .. } 10.25 -// .. static void get_ek_adapter_opt_swap_rot_info(EntryKind ek, int& swap_bytes, int& rotate) { 10.26 -// .. int swap_slots = ek_adapter_opt_swap_slots(ek); 10.27 -// .. rotate = ek_adapter_opt_swap_mode(ek); 10.28 -// .. swap_bytes = swap_slots * Interpreter::stackElementSize; 10.29 -// .. } 10.30 -// .. static int get_ek_adapter_opt_spread_info(EntryKind ek) { 10.31 -// .. return ek_adapter_opt_spread_count(ek); 10.32 -// .. } 10.33 -// .. 10.34 -// .. static void insert_arg_slots(MacroAssembler* _masm, 10.35 -// .. RegisterOrConstant arg_slots, 10.36 -// .. int arg_mask, 10.37 -// .. Register argslot_reg, 10.38 -// .. Register temp_reg, Register temp2_reg, Register temp3_reg = noreg); 10.39 -// .. 10.40 -// .. static void remove_arg_slots(MacroAssembler* _masm, 10.41 -// .. RegisterOrConstant arg_slots, 10.42 -// .. Register argslot_reg, 10.43 -// .. Register temp_reg, Register temp2_reg, Register temp3_reg = noreg); 10.44 -// .. 10.45 -// .. static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN; 10.46 -// ..#endif //TARGET_ARCH_NYI_6939861
11.1 --- a/src/share/vm/prims/methodHandles.cpp Wed Jan 18 11:45:14 2012 -0500 11.2 +++ b/src/share/vm/prims/methodHandles.cpp Thu Jan 19 18:35:13 2012 -0800 11.3 @@ -194,9 +194,6 @@ 11.4 // MethodHandles::generate_adapters 11.5 // 11.6 void MethodHandles::generate_adapters() { 11.7 -#ifdef TARGET_ARCH_NYI_6939861 11.8 - if (FLAG_IS_DEFAULT(UseRicochetFrames)) UseRicochetFrames = false; 11.9 -#endif 11.10 if (!EnableInvokeDynamic || SystemDictionary::MethodHandle_klass() == NULL) return; 11.11 11.12 assert(_adapter_code == NULL, "generate only once"); 11.13 @@ -230,18 +227,6 @@ 11.14 } 11.15 11.16 11.17 -#ifdef TARGET_ARCH_NYI_6939861 11.18 -// these defs belong in methodHandles_<arch>.cpp 11.19 -frame MethodHandles::ricochet_frame_sender(const frame& fr, RegisterMap *map) { 11.20 - ShouldNotCallThis(); 11.21 - return fr; 11.22 -} 11.23 -void MethodHandles::ricochet_frame_oops_do(const frame& fr, OopClosure* f, const RegisterMap* reg_map) { 11.24 - ShouldNotCallThis(); 11.25 -} 11.26 -#endif //TARGET_ARCH_NYI_6939861 11.27 - 11.28 - 11.29 //------------------------------------------------------------------------------ 11.30 // MethodHandles::ek_supported 11.31 // 11.32 @@ -251,28 +236,11 @@ 11.33 case _adapter_unused_13: 11.34 return false; // not defined yet 11.35 case _adapter_prim_to_ref: 11.36 - return UseRicochetFrames && conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_REF); 11.37 + return conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_REF); 11.38 case _adapter_collect_args: 11.39 - return UseRicochetFrames && conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_COLLECT_ARGS); 11.40 + return conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_COLLECT_ARGS); 11.41 case _adapter_fold_args: 11.42 - return UseRicochetFrames && conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_FOLD_ARGS); 11.43 - case _adapter_opt_return_any: 11.44 - return UseRicochetFrames; 11.45 -#ifdef TARGET_ARCH_NYI_6939861 11.46 - // ports before 6939861 supported only three kinds of spread ops 11.47 - case _adapter_spread_args: 11.48 - // restrict spreads to three kinds: 11.49 - switch (ek) { 11.50 - case _adapter_opt_spread_0: 11.51 - case _adapter_opt_spread_1: 11.52 - case _adapter_opt_spread_more: 11.53 - break; 11.54 - default: 11.55 - return false; 11.56 - break; 11.57 - } 11.58 - break; 11.59 -#endif //TARGET_ARCH_NYI_6939861 11.60 + return conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_FOLD_ARGS); 11.61 } 11.62 return true; 11.63 } 11.64 @@ -1988,9 +1956,6 @@ 11.65 case _adapter_prim_to_ref: // boxer MH to use 11.66 case _adapter_collect_args: // method handle which collects the args 11.67 case _adapter_fold_args: // method handle which collects the args 11.68 - if (!UseRicochetFrames) { 11.69 - { err = "box/collect/fold operators are not supported"; break; } 11.70 - } 11.71 if (!java_lang_invoke_MethodHandle::is_instance(argument())) 11.72 { err = "MethodHandle adapter argument required"; break; } 11.73 arg_mtype = Handle(THREAD, java_lang_invoke_MethodHandle::type(argument())); 11.74 @@ -2370,7 +2335,6 @@ 11.75 11.76 case _adapter_prim_to_ref: 11.77 { 11.78 - assert(UseRicochetFrames, "else don't come here"); 11.79 // vminfo will be the location to insert the return value 11.80 vminfo = argslot; 11.81 ek_opt = _adapter_opt_collect_ref; 11.82 @@ -2436,20 +2400,6 @@ 11.83 11.84 case _adapter_spread_args: 11.85 { 11.86 -#ifdef TARGET_ARCH_NYI_6939861 11.87 - // ports before 6939861 supported only three kinds of spread ops 11.88 - if (!UseRicochetFrames) { 11.89 - int array_size = slots_pushed + 1; 11.90 - assert(array_size >= 0, ""); 11.91 - vminfo = array_size; 11.92 - switch (array_size) { 11.93 - case 0: ek_opt = _adapter_opt_spread_0; break; 11.94 - case 1: ek_opt = _adapter_opt_spread_1; break; 11.95 - default: ek_opt = _adapter_opt_spread_more; break; 11.96 - } 11.97 - break; 11.98 - } 11.99 -#endif //TARGET_ARCH_NYI_6939861 11.100 // vminfo will be the required length of the array 11.101 int array_size = (slots_pushed + 1) / (type2size[dest] == 2 ? 2 : 1); 11.102 vminfo = array_size; 11.103 @@ -2494,7 +2444,6 @@ 11.104 11.105 case _adapter_collect_args: 11.106 { 11.107 - assert(UseRicochetFrames, "else don't come here"); 11.108 int elem_slots = argument_slot_count(java_lang_invoke_MethodHandle::type(argument())); 11.109 // vminfo will be the location to insert the return value 11.110 vminfo = argslot; 11.111 @@ -2563,7 +2512,6 @@ 11.112 11.113 case _adapter_fold_args: 11.114 { 11.115 - assert(UseRicochetFrames, "else don't come here"); 11.116 int elem_slots = argument_slot_count(java_lang_invoke_MethodHandle::type(argument())); 11.117 // vminfo will be the location to insert the return value 11.118 vminfo = argslot + elem_slots;
12.1 --- a/src/share/vm/prims/methodHandles.hpp Wed Jan 18 11:45:14 2012 -0500 12.2 +++ b/src/share/vm/prims/methodHandles.hpp Thu Jan 19 18:35:13 2012 -0800 12.3 @@ -738,46 +738,6 @@ 12.4 #ifdef TARGET_ARCH_ppc 12.5 # include "methodHandles_ppc.hpp" 12.6 #endif 12.7 - 12.8 -#ifdef TARGET_ARCH_NYI_6939861 12.9 - // Here are some backward compatible declarations until the 6939861 ports are updated. 12.10 - #define _adapter_flyby (_EK_LIMIT + 10) 12.11 - #define _adapter_ricochet (_EK_LIMIT + 11) 12.12 - #define _adapter_opt_spread_1 _adapter_opt_spread_1_ref 12.13 - #define _adapter_opt_spread_more _adapter_opt_spread_ref 12.14 - enum { 12.15 - _INSERT_NO_MASK = -1, 12.16 - _INSERT_REF_MASK = 0, 12.17 - _INSERT_INT_MASK = 1, 12.18 - _INSERT_LONG_MASK = 3 12.19 - }; 12.20 - static void get_ek_bound_mh_info(EntryKind ek, BasicType& arg_type, int& arg_mask, int& arg_slots) { 12.21 - arg_type = ek_bound_mh_arg_type(ek); 12.22 - arg_mask = 0; 12.23 - arg_slots = type2size[arg_type];; 12.24 - } 12.25 - static void get_ek_adapter_opt_swap_rot_info(EntryKind ek, int& swap_bytes, int& rotate) { 12.26 - int swap_slots = ek_adapter_opt_swap_slots(ek); 12.27 - rotate = ek_adapter_opt_swap_mode(ek); 12.28 - swap_bytes = swap_slots * Interpreter::stackElementSize; 12.29 - } 12.30 - static int get_ek_adapter_opt_spread_info(EntryKind ek) { 12.31 - return ek_adapter_opt_spread_count(ek); 12.32 - } 12.33 - 12.34 - static void insert_arg_slots(MacroAssembler* _masm, 12.35 - RegisterOrConstant arg_slots, 12.36 - int arg_mask, 12.37 - Register argslot_reg, 12.38 - Register temp_reg, Register temp2_reg, Register temp3_reg = noreg); 12.39 - 12.40 - static void remove_arg_slots(MacroAssembler* _masm, 12.41 - RegisterOrConstant arg_slots, 12.42 - Register argslot_reg, 12.43 - Register temp_reg, Register temp2_reg, Register temp3_reg = noreg); 12.44 - 12.45 - static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN; 12.46 -#endif //TARGET_ARCH_NYI_6939861 12.47 }; 12.48 12.49
13.1 --- a/src/share/vm/runtime/frame.cpp Wed Jan 18 11:45:14 2012 -0500 13.2 +++ b/src/share/vm/runtime/frame.cpp Thu Jan 19 18:35:13 2012 -0800 13.3 @@ -1,5 +1,5 @@ 13.4 /* 13.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 13.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 13.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 13.8 * 13.9 * This code is free software; you can redistribute it and/or modify it 13.10 @@ -1334,24 +1334,21 @@ 13.11 13.12 13.13 void frame::describe(FrameValues& values, int frame_no) { 13.14 + intptr_t* frame_pointer = real_fp(); 13.15 if (is_entry_frame() || is_compiled_frame() || is_interpreted_frame() || is_native_frame()) { 13.16 // Label values common to most frames 13.17 values.describe(-1, unextended_sp(), err_msg("unextended_sp for #%d", frame_no)); 13.18 values.describe(-1, sp(), err_msg("sp for #%d", frame_no)); 13.19 - if (is_compiled_frame()) { 13.20 - values.describe(-1, sp() + _cb->frame_size(), err_msg("computed fp for #%d", frame_no)); 13.21 - } else { 13.22 - values.describe(-1, fp(), err_msg("fp for #%d", frame_no)); 13.23 - } 13.24 + values.describe(-1, frame_pointer, err_msg("frame pointer for #%d", frame_no)); 13.25 } 13.26 if (is_interpreted_frame()) { 13.27 methodOop m = interpreter_frame_method(); 13.28 int bci = interpreter_frame_bci(); 13.29 13.30 // Label the method and current bci 13.31 - values.describe(-1, MAX2(sp(), fp()), 13.32 + values.describe(-1, MAX2(sp(), frame_pointer), 13.33 FormatBuffer<1024>("#%d method %s @ %d", frame_no, m->name_and_sig_as_C_string(), bci), 2); 13.34 - values.describe(-1, MAX2(sp(), fp()), 13.35 + values.describe(-1, MAX2(sp(), frame_pointer), 13.36 err_msg("- %d locals %d max stack", m->max_locals(), m->max_stack()), 1); 13.37 if (m->max_locals() > 0) { 13.38 intptr_t* l0 = interpreter_frame_local_at(0); 13.39 @@ -1383,18 +1380,18 @@ 13.40 } 13.41 } else if (is_entry_frame()) { 13.42 // For now just label the frame 13.43 - values.describe(-1, MAX2(sp(), fp()), err_msg("#%d entry frame", frame_no), 2); 13.44 + values.describe(-1, MAX2(sp(), frame_pointer), err_msg("#%d entry frame", frame_no), 2); 13.45 } else if (is_compiled_frame()) { 13.46 // For now just label the frame 13.47 nmethod* nm = cb()->as_nmethod_or_null(); 13.48 - values.describe(-1, MAX2(sp(), fp()), 13.49 + values.describe(-1, MAX2(sp(), frame_pointer), 13.50 FormatBuffer<1024>("#%d nmethod " INTPTR_FORMAT " for method %s%s", frame_no, 13.51 nm, nm->method()->name_and_sig_as_C_string(), 13.52 is_deoptimized_frame() ? " (deoptimized" : ""), 2); 13.53 } else if (is_native_frame()) { 13.54 // For now just label the frame 13.55 nmethod* nm = cb()->as_nmethod_or_null(); 13.56 - values.describe(-1, MAX2(sp(), fp()), 13.57 + values.describe(-1, MAX2(sp(), frame_pointer), 13.58 FormatBuffer<1024>("#%d nmethod " INTPTR_FORMAT " for native method %s", frame_no, 13.59 nm, nm->method()->name_and_sig_as_C_string()), 2); 13.60 }
14.1 --- a/src/share/vm/runtime/frame.hpp Wed Jan 18 11:45:14 2012 -0500 14.2 +++ b/src/share/vm/runtime/frame.hpp Thu Jan 19 18:35:13 2012 -0800 14.3 @@ -1,5 +1,5 @@ 14.4 /* 14.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 14.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 14.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 14.8 * 14.9 * This code is free software; you can redistribute it and/or modify it 14.10 @@ -221,6 +221,15 @@ 14.11 // returns the stack pointer of the calling frame 14.12 intptr_t* sender_sp() const; 14.13 14.14 + // Returns the real 'frame pointer' for the current frame. 14.15 + // This is the value expected by the platform ABI when it defines a 14.16 + // frame pointer register. It may differ from the effective value of 14.17 + // the FP register when that register is used in the JVM for other 14.18 + // purposes (like compiled frames on some platforms). 14.19 + // On other platforms, it is defined so that the stack area used by 14.20 + // this frame goes from real_fp() to sp(). 14.21 + intptr_t* real_fp() const; 14.22 + 14.23 // Deoptimization info, if needed (platform dependent). 14.24 // Stored in the initial_info field of the unroll info, to be used by 14.25 // the platform dependent deoptimization blobs.
15.1 --- a/src/share/vm/runtime/globals.hpp Wed Jan 18 11:45:14 2012 -0500 15.2 +++ b/src/share/vm/runtime/globals.hpp Thu Jan 19 18:35:13 2012 -0800 15.3 @@ -3826,10 +3826,6 @@ 15.4 develop(bool, StressMethodHandleWalk, false, \ 15.5 "Process all method handles with MethodHandleWalk") \ 15.6 \ 15.7 - diagnostic(bool, UseRicochetFrames, true, \ 15.8 - "use ricochet stack frames for method handle combination, " \ 15.9 - "if the platform supports them") \ 15.10 - \ 15.11 experimental(bool, TrustFinalNonStaticFields, false, \ 15.12 "trust final non-static declarations for constant folding") \ 15.13 \
16.1 --- a/src/share/vm/runtime/sharedRuntime.cpp Wed Jan 18 11:45:14 2012 -0500 16.2 +++ b/src/share/vm/runtime/sharedRuntime.cpp Thu Jan 19 18:35:13 2012 -0800 16.3 @@ -121,7 +121,6 @@ 16.4 void SharedRuntime::generate_ricochet_blob() { 16.5 if (!EnableInvokeDynamic) return; // leave it as a null 16.6 16.7 -#ifndef TARGET_ARCH_NYI_6939861 16.8 // allocate space for the code 16.9 ResourceMark rm; 16.10 // setup code generation tools 16.11 @@ -142,7 +141,6 @@ 16.12 } 16.13 16.14 _ricochet_blob = RicochetBlob::create(&buffer, bounce_offset, exception_offset, frame_size_in_words); 16.15 -#endif 16.16 } 16.17 16.18