Code Review for 7017732

Prepared by:never on Fri Mar 18 14:59:41 PDT 2011
Workspace:/net/smite.us.oracle.com/export/ws/statics
Compare against: /export/ws/scav
Summary of changes: 1286 lines changed: 827 ins; 263 del; 196 mod; 84479 unchg
Patch of changes: 7017732.patch
Author comments:
7017732: move static fields into Class to prepare for perm gen removal
Reviewed-by:

Currently static fields are stored in the instanceKlass but when those
are moved into native memory we'd have to have a new card mark
strategy for static fields. This could be something like setting a
flag in the instanceKlass and then rescanning every klass during a GC
which seems expensive or marking the card for the java.lang.Class then
making sure to scan the instanceKlass when scanning the Class. If we
move them into the Class then almost all the existing machinery works
exactly as it always has. The only execution difference is which
constant is materialized for the field access.

Most of the machinery for static fields is now over in
javaClasses.cpp. The bootstrap had to change slightly since we don't
have Class until we've loaded a few classes but it all fits into the
existing mirror creation logic. I also only create mirrors for real
Java classes whereas previously we also created them for internal
klasses we create.

The main implementation oddity is that java.lang.Class instances are
now variably sized. This required a small change in size_given_klass
and a new instanceMirrorKlass to handle visiting the oops in them.

Performance is unchanged. Tested with ctw, runthese, nsk jvmti tests
and jbb with the various collectors.

Legend: Modified file
Deleted file
New file

------ ------ ------ ------ --- New Patch Raw src/share/vm/oops/instanceMirrorKlass.hpp

110 lines changed: 110 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ --- New Patch Raw src/share/vm/oops/instanceMirrorKlass.cpp

313 lines changed: 313 ins; 0 del; 0 mod; 0 unchg

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

74 lines changed: 11 ins; 56 del; 7 mod; 4597 unchg

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

17 lines changed: 10 ins; 5 del; 2 mod; 1278 unchg

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

144 lines changed: 114 ins; 12 del; 18 mod; 3080 unchg

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

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

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

8 lines changed: 6 ins; 0 del; 2 mod; 1593 unchg

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

19 lines changed: 16 ins; 0 del; 3 mod; 162 unchg

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

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

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

36 lines changed: 5 ins; 25 del; 6 mod; 1009 unchg

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

112 lines changed: 15 ins; 93 del; 4 mod; 2951 unchg

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

31 lines changed: 7 ins; 18 del; 6 mod; 773 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/oops/klass.hpp

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

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/oops/klassOop.hpp

68 lines changed: 66 ins; 0 del; 2 mod; 49 unchg

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

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

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/oops/oop.hpp

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

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/oops/oop.inline.hpp

10 lines changed: 7 ins; 0 del; 3 mod; 783 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/oops/oopsHierarchy.hpp

2 lines changed: 1 ins; 0 del; 1 mod; 192 unchg

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

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

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

46 lines changed: 22 ins; 9 del; 15 mod; 3087 unchg

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

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

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

10 lines changed: 2 ins; 0 del; 8 mod; 497 unchg

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

48 lines changed: 24 ins; 17 del; 7 mod; 4156 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/prims/jni.cpp

9 lines changed: 0 ins; 2 del; 7 mod; 3667 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/prims/jniCheck.cpp

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

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/prims/jvmtiEnvBase.cpp

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

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/prims/jvmtiTagMap.cpp

13 lines changed: 6 ins; 0 del; 7 mod; 3405 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/prims/unsafe.cpp

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

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

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

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

2 lines changed: 1 ins; 0 del; 1 mod; 466 unchg

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

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

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

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

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

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

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

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

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

12 lines changed: 2 ins; 0 del; 10 mod; 355 unchg

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

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

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

7 lines changed: 6 ins; 0 del; 1 mod; 139 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw agent/src/share/classes/sun/jvm/hotspot/jdi/FieldImpl.java

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

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java

7 lines changed: 0 ins; 1 del; 6 mod; 876 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw agent/src/share/classes/sun/jvm/hotspot/oops/IntField.java

7 lines changed: 5 ins; 0 del; 2 mod; 45 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw agent/src/share/classes/sun/jvm/hotspot/oops/OopField.java

7 lines changed: 6 ins; 0 del; 1 mod; 54 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java

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

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/shark/sharkNativeWrapper.cpp

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

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

20 lines changed: 10 ins; 9 del; 1 mod; 2496 unchg

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

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

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/prims/jvm.cpp

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

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

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

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

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

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

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

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

4 lines changed: 1 ins; 0 del; 3 mod; 298 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/cpu/zero/vm/cppInterpreter_zero.cpp

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

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java

8 lines changed: 0 ins; 6 del; 2 mod; 310 unchg

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

20 lines changed: 18 ins; 0 del; 2 mod; 296 unchg

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

11 lines changed: 10 ins; 0 del; 1 mod; 238 unchg

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

12 lines changed: 0 ins; 4 del; 8 mod; 226 unchg

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

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

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

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

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

5 lines changed: 3 ins; 1 del; 1 mod; 598 unchg

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

5 lines changed: 5 ins; 0 del; 0 mod; 3812 unchg

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

6 lines changed: 6 ins; 0 del; 0 mod; 3282 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/oops/instanceKlassKlass.hpp

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

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

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

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

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

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

2 lines changed: 0 ins; 1 del; 1 mod; 952 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw agent/test/jdi/sasanity.sh

2 lines changed: 1 ins; 0 del; 1 mod; 78 unchg

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