Code Review for 7012914

Prepared by:twisti on Mon Feb 21 05:04:08 PST 2011
Workspace:/home/twisti/hotspot-comp/7012914
Compare against: /home/twisti/hotspot-comp/hotspot
Summary of changes: 344 lines changed: 129 ins; 123 del; 92 mod; 22163 unchg
Patch of changes: 7012914.patch
Printable review: 7012914.pdf
Author comments:
7012914: JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
Reviewed-by:

The changes of 7007377 changed the way
MethodHandlesImpl.raiseException is called from the raise_exception
method handle adapter as it calls the C2I adapter. Since
MethodHandlesImpl.raiseException has three arguments, on 32-bit x86 we
need to pass one argument on the stack. This additional word on the
stack needs to be removed when we return to the actual callee during
unwinding.

Since the call site that triggers the exception is a method handle
call site we just need to restore the saved SP from BP.

Right now this is only a problem on 32-bit x86 because of the way we
implement the raise_exception method handle adapter. But I assume
it's not impossible that in the future there are stack manipulations
before we throw an exception. So a fix for all architectures seems
reasonable.

This change removes some unused code in
StubGenerator::generate_forward_exception as this stub is only used
for runtime calls with a pending exception and runtime calls can't be
method handle call sites. It also removes the unused
ExceptionCache::_unwind_handler.

Additionally there is a small cleanup of
SharedRuntime::raw_exception_handler_for_return_address to not call
CodeCache::find_blob twice.

Bug id: 7012914 JSR 292 MethodHandlesTest C1: frame::verify_return_pc(return_address) failed: must be a return pc
Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp

2 lines changed: 0 ins; 0 del; 2 mod; 3260 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/sparc/vm/c1_Runtime1_sparc.cpp

96 lines changed: 45 ins; 22 del; 29 mod; 1002 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/sparc/vm/methodHandles_sparc.cpp

8 lines changed: 1 ins; 3 del; 4 mod; 1021 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/c1_LIRAssembler_x86.cpp

4 lines changed: 0 ins; 2 del; 2 mod; 3605 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/c1_Runtime1_x86.cpp

156 lines changed: 65 ins; 66 del; 25 mod; 1713 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/methodHandles_x86.cpp

13 lines changed: 3 ins; 7 del; 3 mod; 1214 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/stubGenerator_x86_32.cpp

4 lines changed: 0 ins; 4 del; 0 mod; 2336 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/c1/c1_Runtime1.cpp

19 lines changed: 6 ins; 7 del; 6 mod; 1244 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/c1/c1_Runtime1.hpp

5 lines changed: 1 ins; 0 del; 4 mod; 183 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/code/nmethod.cpp

6 lines changed: 0 ins; 5 del; 1 mod; 2817 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/code/nmethod.hpp

3 lines changed: 0 ins; 3 del; 0 mod; 714 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/sharedRuntime.cpp

19 lines changed: 0 ins; 4 del; 15 mod; 2814 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/utilities/macros.hpp

9 lines changed: 8 ins; 0 del; 1 mod; 240 unchg

This code review page was prepared using /home/twisti/bin/webrev (vers 23.18-hg-never).