Code Review for 7196262

Prepared by:twisti on Thu Sep 13 15:41:34 PDT 2012
Workspace:/home/twisti/7196262
Compare against: ssh://hg.openjdk.java.net/hsx/hotspot-gc-gate/hotspot
Summary of changes: 600 lines changed: 120 ins; 311 del; 169 mod; 26753 unchg
Patch of changes: 7196262.patch
Author comments:
7196262: JSR 292: java/lang/invoke/PrivateInvokeTest.java fails on solaris-sparc
Reviewed-by:

We are using G1 and G4 in MethodHandles::generate_method_handle_dispatch
as temporary registers but the calling convention on 32-bit SPARC uses G1
and G4 to pass the first two long arguments.

While investigating possible fixes it turned out that there is another bug.
The appendix argument of the new JSR 292 implementation might end up in the
wrong register or stack slot on SPARC.

To fix that issue I had to change the Java calling convention on SPARC.
While changing that code I also removed the special usage of G1 and G4 to
pass long arguments on 32-bit SPARC. In doing this I could remove a lot
of complicated code.

The calling convention bug could potentially happen on other architectures
as well. I added assertion code that checks that the Java calling
convention can deal with the appendix argument on all architectures.

Additionally I removed some unused code I came across.

Here are refworkload runs to make sure that the changed calling convention
does not affect performance.

32-bit SPARC:

============================================================================
logs.hotspot-sparc: reference_server
Benchmark Samples Mean Stdev Geomean Weight
jetstream 20 173.86 4.09 0.10
scimark 20 400.22 2.73 0.15
specjbb2000 20 128767.32 417.38 0.15
specjbb2005 20 59437.83 237.98 0.25
specjvm98 20 363.66 1.39 0.15
volano25 20 79479.00 1652.97 0.20
--------------------------------------------------------------------------
Weighted Geomean 8679.73
============================================================================
logs.7196262-sparc: reference_server
Benchmark Samples Mean Stdev %Diff P Significant
jetstream 20 169.95 7.96 -2.25 0.060 *
scimark 20 401.49 1.70 0.32 0.087 *
specjbb2000 20 128592.62 524.44 -0.14 0.251 *
specjbb2005 20 59438.10 208.12 0.00 0.997 *
specjvm98 20 363.23 1.28 -0.12 0.310 *
volano25 20 79675.70 949.88 0.25 0.648 *
--------------------------------------------------------------------------
Weighted Geomean 8665.10 -0.17
============================================================================

64-bit SPARC:

============================================================================
logs.hotspot-sparcv9/: reference_server
Benchmark Samples Mean Stdev Geomean Weight
jetstream 20 155.65 0.99 0.10
scimark 20 371.01 5.29 0.15
specjbb2000 20 121447.56 167.26 0.15
specjbb2005 20 55700.69 281.70 0.25
specjvm98 20 306.40 0.93 0.15
volano25 20 70283.25 1468.01 0.20
--------------------------------------------------------------------------
Weighted Geomean 7871.54
============================================================================
logs.7196262-sparcv9/: reference_server
Benchmark Samples Mean Stdev %Diff P Significant
jetstream 20 155.00 3.08 -0.42 0.375 *
scimark 20 373.26 7.16 0.61 0.265 *
specjbb2000 20 121482.24 178.23 0.02 0.529 *
specjbb2005 20 55806.41 174.44 0.19 0.163 *
specjvm98 20 306.16 1.07 -0.07 0.454 *
volano25 20 69820.90 1221.87 -0.66 0.286 *
--------------------------------------------------------------------------
Weighted Geomean 7868.14 -0.04
============================================================================

Bug id: 7196262 JSR 292: java/lang/invoke/PrivateInvokeTest.java fails on solaris-sparc
Legend: Modified file
Deleted file
New file

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

50 lines changed: 26 ins; 18 del; 6 mod; 4920 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/sparc/vm/assembler_sparc.hpp

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

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

58 lines changed: 10 ins; 15 del; 33 mod; 568 unchg

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

349 lines changed: 39 ins; 241 del; 69 mod; 3809 unchg

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

33 lines changed: 10 ins; 15 del; 8 mod; 629 unchg

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

23 lines changed: 2 ins; 8 del; 13 mod; 3436 unchg

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

23 lines changed: 2 ins; 8 del; 13 mod; 4027 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/asm/register.hpp

16 lines changed: 0 ins; 0 del; 16 mod; 235 unchg

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

3 lines changed: 2 ins; 0 del; 1 mod; 2921 unchg

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

32 lines changed: 25 ins; 1 del; 6 mod; 2870 unchg

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

10 lines changed: 4 ins; 2 del; 4 mod; 667 unchg

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