Code Review for 6993078

Prepared by:twisti on Wed Apr 20 09:47:02 PDT 2011
Workspace:/home/twisti/hotspot-comp/6993078
Compare against: /home/twisti/hotspot-comp/hotspot
Summary of changes: 41 lines changed: 14 ins; 13 del; 14 mod; 12745 unchg
Patch of changes: 6993078.patch
Printable review: 6993078.pdf
Author comments:
6993078: JSR 292 too many pushes: Lesp points into register window
Reviewed-by:

The logic in InterpreterRuntime::resolve_invokedynamic already handles
the possible race of different threads installing the CallSite object
in the constant pool cache properly. To short circuit the CallSite
object creation the f1 field in the constant pool cache is checked for
non-null values.

ConstantPoolCacheEntry::set_dynamic_call first sets f1 atomically and
later other fields like flags. The window between setting f1 and the
flags in one thread makes it possible that another thread already sees
the non-null f1 value but flags is still uninitialized. That can
result in very strange behaviour since flags encodes the TosState and
the parameter size.

The fix is to set all other values first (currently that's only flags)
and f1 as very last.

The patch also includes some cleanup and additional verify_oop's in
TemplateTable::invokedynamic.

Bug id: 6993078 JSR 292 too many pushes: Lesp points into register window
Legend: Modified file
Deleted file
New file

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

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

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

10 lines changed: 3 ins; 3 del; 4 mod; 3594 unchg

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

9 lines changed: 2 ins; 3 del; 4 mod; 3664 unchg

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

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

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

16 lines changed: 7 ins; 5 del; 4 mod; 528 unchg

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