Created
February 20, 2013 04:20
-
-
Save rednaxelafx/4992859 to your computer and use it in GitHub Desktop.
SA demo from https://gist.github.com/rednaxelafx/4986917 without UseCompressedOops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D:\temp>set JAVA_OPTS=-XX:-UseCompressedOops | |
D:\temp>java -version | |
java version "1.7.0_09" | |
Java(TM) SE Runtime Environment (build 1.7.0_09-b05) | |
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode) | |
D:\temp>groovysh | |
Groovy Shell (1.8.4, JVM: 1.7.0_09) | |
Type 'help' or '\h' for help. | |
------------------------------------------------------------------------ | |
groovy:000> new MysteryBox() | |
===> MysteryBox@49c5f29d | |
groovy:000> quit | |
D:\temp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D:\temp>jps | |
5896 Jps | |
9004 GroovyStarter | |
D:\temp>java -cp .;%JAVA_HOME%\lib\sa-jdi.jar -XX:-UseCompressedOops sun.jvm.hotspot.CLHSDB | |
hsdb> attach 9004 | |
Attaching to process 9004, please wait... | |
hsdb> universe | |
Heap Parameters: | |
ParallelScavengeHeap [ PSYoungGen [ eden = [0x000000000ff70000,0x0000000010e730b0,0x0000000011ed0000] , from = [0x0000000012160000,0x00000000123ee078,0x00000000123f0000] , to = [0x0000000011ed0000,0x0000000011ed0000,0x0000000012160000] ] PSOldGen [ [0x000000000aa10000,0x000000000b8827f8,0x000000000d3c0000] ] PSPermGen [ [0x0000000005810000,0x00000000065f5290,0x0000000006cd0000] ] ] hsdb> | |
hsdb> scanoops 0x000000000ff70000 0x0000000010e730b0 MysteryBox | |
0x0000000010d32db8 MysteryBox | |
hsdb> inspect 0x0000000010d32db8 | |
instance of Oop for MysteryBox @ 0x0000000010d32db8 @ 0x0000000010d32db8 (size = 4 | |
8) | |
_mark: 316853624065 | |
_metadata._klass: InstanceKlass for MysteryBox @ 0x0000000006553488 Oop @ 0x000000 | |
0006553488 | |
x0: 0 | |
x1: 0 | |
y0: false | |
y1: false | |
y2: false | |
y3: false | |
z0: 0 | |
a: [D @ 0x0000000010d32de8 Oop for [D @ 0x0000000010d32de8 | |
hsdb> inspect 0x0000000010d32de8 | |
instance of [D @ 0x0000000010d32de8 @ 0x0000000010d32de8 (size = 88) | |
_mark: 1 | |
_metadata._klass: TypeArrayKlass for [D @ 0x0000000005810ad0 Oop @ 0x0000000005810 | |
ad0 | |
0: 0.0 | |
1: 0.0 | |
2: 0.0 | |
3: 0.0 | |
4: 0.0 | |
5: 0.0 | |
6: 0.0 | |
7: 0.0 | |
hsdb> class MysteryBox | |
MysteryBox @0x0000000006553488 | |
hsdb> print 0x0000000006553488 | |
public class MysteryBox @0x0000000006553488 | |
Super Class | |
public class java.lang.Object @0x0000000005812e38 | |
Fields | |
private long x0; (offset = 16) | |
private long x1; (offset = 24) | |
private boolean y0; (offset = 36) | |
private boolean y1; (offset = 37) | |
private boolean y2; (offset = 38) | |
private boolean y3; (offset = 39) | |
private int z0; (offset = 32) | |
private double[] a; (offset = 40) | |
Methods | |
public void <init>() @0x0000000006553400; | |
Constant Pool | |
Constant Pool of [public class MysteryBox @0x0000000006553488] @0x00000000065531b0 | |
hsdb> quit | |
D:\temp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MysteryBox { | |
private long x0, x1; | |
private boolean y0, y1, y2, y3; | |
private int z0; | |
private double[] a = new double[8]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment