Prepared by: | never on Fri Apr 3 15:28:59 PDT 2009 |
---|---|
Workspace: | /export/ws/baseline |
Compare against: | ssh://hg.openjdk.java.net/jdk7/hotspot-comp-gate/hotspot |
Summary of changes: | 150 lines changed: 28 ins; 70 del; 52 mod; 1053 unchg |
Patch of changes: | 6826261.patch |
Author comments: |
The serviceability agent has the ability to reconstruct class files from process images which can sometimes be critical to debugging a crash. Currently there are some problems with how it does this. In particular it's logic for selecting a version number if broken, the handling of the synthetic attribute can cause invalid class files to be emitted, handling of RewriteFrequentPairs results in corrupted class files. We also leave out the ACC_ENUM value in class access flags. The fix is to guard writing class indexes with code that will assert if they are 0 and correct the places where this might occur. I also rearranted to order that we emit the check exceptions attribute to match the normal way javac emits them, which facilitates comparison. The RewriteFrequentPairs logic just goes away because they are handled properly by the normal mechanism that rewrites our special bytecodes into standard ones. I also grab the major and minor version for the klass itself instead of trying to guess it. We're still missing a few attributes that would make the dumped files one for one compatible with the original. In particular, RuntimeVisibleAnnotations, EnclosingMethods and Deprecated attributes aren't emitted but those don't seem critical. Verified by running jbb, dumping the classes from the core and then comparing the original and dumped versions. This was also used to diagnose an escalation that required class file dumping to work correctly. |
Legend: |
Modified file Deleted file New file |
Cdiffs
Udiffs
Sdiffs
Frames
Old
New
Patch
Raw
agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java
26 lines changed: 1 ins; 0 del; 25 mod; 150 unchg
Cdiffs
Udiffs
Sdiffs
Frames
Old
New
Patch
Raw
agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java
23 lines changed: 0 ins; 23 del; 0 mod; 144 unchg
Cdiffs
Udiffs
Sdiffs
Frames
Old
New
Patch
Raw
agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java
8 lines changed: 6 ins; 0 del; 2 mod; 114 unchg
Cdiffs
Udiffs
Sdiffs
Frames
Old
New
Patch
Raw
agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java
93 lines changed: 21 ins; 47 del; 25 mod; 645 unchg
This code review page was prepared using /net/smite.sfbay/never/bin/webrev (vers 23.18-hg-never).