src/share/vm/ci/ciMethod.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/ci/ciMethod.cpp
src/share/vm/ci/ciMethod.cpp
Print this page
rev 6132 : 8032410: compiler/uncommontrap/TestStackBangRbp.java times out on Solaris-Sparc V9
Summary: make compiled code bang the stack by the worst case size of the interpreter frame at deoptimization points.
Reviewed-by:
rev 6133 : [mq]: newstackbang-reviews
*** 78,87 ****
--- 78,88 ----
_max_stack = h_m()->max_stack();
_max_locals = h_m()->max_locals();
_code_size = h_m()->code_size();
_intrinsic_id = h_m()->intrinsic_id();
_handler_count = h_m()->exception_table_length();
+ _size_of_parameters = h_m()->size_of_parameters();
_uses_monitors = h_m()->access_flags().has_monitor_bytecodes();
_balanced_monitors = !_uses_monitors || h_m()->access_flags().is_monitor_matching();
_is_c1_compilable = !h_m()->is_not_c1_compilable();
_is_c2_compilable = !h_m()->is_not_c2_compilable();
// Lazy fields, filled in on demand. Require allocation.
*** 875,884 ****
--- 876,906 ----
iter.reset_to_bci(bci);
iter.next();
return iter.get_method(will_link, declared_signature);
}
+ // How much stack slots is this invoke going to add or remove?
+ int ciMethod::get_stack_effect_at_invoke(int bci, Bytecodes::Code code, int& inputs) {
+ assert(Bytecodes::is_invoke(code), "not an invoke");
+ bool ignored_will_link;
+ ciSignature* declared_signature = NULL;
+ ciMethod* ignored_callee = get_method_at_bci(bci, ignored_will_link, &declared_signature);
+ assert(declared_signature != NULL, "cannot be null");
+ inputs = declared_signature->arg_size_for_bc(code);
+ int size = declared_signature->return_type()->size();
+ return size - inputs;
+ }
+
+ int ciMethod::get_stack_effect_if_at_invoke(int bci) {
+ Bytecodes::Code code = java_code_at_bci(bci);
+ if (Bytecodes::is_invoke(code)) {
+ int ignored = 0;
+ return get_stack_effect_at_invoke(bci, code, ignored);
+ }
+ return 0;
+ }
+
// ------------------------------------------------------------------
// Adjust a CounterData count to be commensurate with
// interpreter_invocation_count. If the MDO exists for
// only 25% of the time the method exists, then the
// counts in the MDO should be scaled by 4X, so that
src/share/vm/ci/ciMethod.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File