Code Review for 7071653

Prepared by:twisti on Fri Aug 12 04:59:10 PDT 2011
Workspace:/home/twisti/hsx/hotspot-comp/7071653
Compare against: /home/twisti/hsx/hotspot-comp/hotspot
Summary of changes: 1058 lines changed: 530 ins; 149 del; 379 mod; 36068 unchg
Patch of changes: 7071653.patch
Printable review: 7071653.pdf
Author comments:
7071653: JSR 292: call site change notification should be pushed not pulled
Reviewed-by:

Currently every speculatively inlined method handle call site has a
guard that compares the current target of the CallSite object to the
inlined one. This per-invocation overhead can be removed if the
notification is changed from pulled to pushed (i.e. deoptimization).

I had to change the logic in TemplateTable::patch_bytecode to skip
bytecode quickening for putfield instructions when the put_code
written to the constant pool cache is zero. This is required so that
every execution of a putfield to CallSite.target calls out to
InterpreterRuntime::resolve_get_put to do the deoptimization of
depending compiled methods.

I also had to change the dependency machinery to understand other
dependencies than class hierarchy ones. DepChange got the super-type
of two new dependencies, KlassDepChange and CallSiteDepChange.

Tested with JRuby tests and benchmarks, hand-written testcases, JDK
tests and vm.mlvm tests.

Here is the speedup for the JRuby fib benchmark (first is JDK 7 b147,
second with 7071653). Since the CallSite targets don't change during
the runtime of this benchmark we can see the performance benefit of
eliminating the guard:

$ jruby --server bench/bench_fib_recursive.rb 5 35
0.883000 0.000000 0.883000 ( 0.854000)
0.715000 0.000000 0.715000 ( 0.715000)
0.712000 0.000000 0.712000 ( 0.712000)
0.713000 0.000000 0.713000 ( 0.713000)
0.713000 0.000000 0.713000 ( 0.712000)

$ jruby --server bench/bench_fib_recursive.rb 5 35
0.772000 0.000000 0.772000 ( 0.742000)
0.624000 0.000000 0.624000 ( 0.624000)
0.621000 0.000000 0.621000 ( 0.621000)
0.622000 0.000000 0.622000 ( 0.622000)
0.622000 0.000000 0.622000 ( 0.621000)

Bug id: 7071653 JSR 292: call site change notification should be pushed not pulled
Legend: Modified file
Deleted file
New file

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

14 lines changed: 14 ins; 0 del; 0 mod; 2405 unchg

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

1 line changed: 1 ins; 0 del; 0 mod; 336 unchg

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

179 lines changed: 59 ins; 21 del; 99 mod; 3673 unchg

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

15 lines changed: 14 ins; 0 del; 1 mod; 1403 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/interp_masm_x86_32.hpp

1 line changed: 1 ins; 0 del; 0 mod; 231 unchg

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

17 lines changed: 16 ins; 0 del; 1 mod; 1461 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/interp_masm_x86_64.hpp

5 lines changed: 0 ins; 2 del; 3 mod; 241 unchg

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

186 lines changed: 62 ins; 22 del; 102 mod; 3488 unchg

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

148 lines changed: 62 ins; 16 del; 70 mod; 3595 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/ci/ciCallSite.cpp

11 lines changed: 11 ins; 0 del; 0 mod; 47 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/ci/ciCallSite.hpp

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

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/ci/ciField.hpp

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

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/classfile/systemDictionary.cpp

1 line changed: 0 ins; 0 del; 1 mod; 2898 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/classfile/systemDictionary.hpp

14 lines changed: 3 ins; 0 del; 11 mod; 672 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/classfile/vmSymbols.hpp

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

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

198 lines changed: 102 ins; 45 del; 51 mod; 1478 unchg

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

141 lines changed: 87 ins; 32 del; 22 mod; 508 unchg

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

1 line changed: 1 ins; 0 del; 0 mod; 2783 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/interpreter/interpreterRuntime.cpp

21 lines changed: 18 ins; 3 del; 0 mod; 1247 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/interpreter/templateTable.hpp

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

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/memory/universe.cpp

32 lines changed: 31 ins; 0 del; 1 mod; 1602 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/memory/universe.hpp

1 line changed: 1 ins; 0 del; 0 mod; 474 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/oops/instanceKlass.cpp

1 line changed: 0 ins; 0 del; 1 mod; 2972 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/callGenerator.cpp

29 lines changed: 29 ins; 0 del; 0 mod; 1075 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/callGenerator.hpp

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

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/doCall.cpp

19 lines changed: 0 ins; 8 del; 11 mod; 930 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/parse3.cpp

8 lines changed: 8 ins; 0 del; 0 mod; 523 unchg

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