1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
command_prompt_1
----------------
D: est>jdb -XX:+UseSerialGC -Xmx10m -J-Duser.country=en.US
Initializing jdb ...
> stop in Test.fn
Deferring breakpoint Test.fn.
It will be set after the class is loaded.
> run Main
run Main
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Set deferred breakpoint Test.fn
Breakpoint hit: "thread=main", Test.fn(), line=5 bci=0
5 Test2 t3 = new Test2();
main[1] next
Step completed: > "thread=main", Test.fn(), line=6 bci=8
6 }
main[1]
command_prompt_2
----------------
D: est>jps
4328 Main
9064 Jps
7716 TTY
D: est>java -cp .;%JAVA_HOME%/lib/sa-jdi.jar sun.jvm.hotspot.HSDB
hsdb_session
------------
hsdb> universe
Heap Parameters:
Gen 0: eden [0x00000000fa400000,0x00000000fa4aad68,0x00000000fa6b0000) space capacity = 2818048, 24.831088753633722 used
from [0x00000000fa6b0000,0x00000000fa6b0000,0x00000000fa700000) space capacity = 327680, 0.0 used
to [0x00000000fa700000,0x00000000fa700000,0x00000000fa750000) space capacity = 327680, 0.0 usedInvocations: 0
Gen 1: old [0x00000000fa750000,0x00000000fa750000,0x00000000fae00000) space capacity = 7012352, 0.0 usedInvocations: 0
perm [0x00000000fae00000,0x00000000fb078898,0x00000000fc2c0000) space capacity = 21757952, 11.90770160721009 usedInvocations: 0
hsdb> scanoops 0x00000000fa400000 0x00000000fc2c0000 Test2
0x00000000fa49a710 Test2
0x00000000fa49a730 Test2
0x00000000fa49a740 Test2
Error: sun.jvm.hotspot.debugger.DebuggerException: Windbg Error: ReadVirtual failed!
hsdb> revptrs 0x00000000fa49a710
Computing reverse pointers...
Done.
null
Oop for java/lang/Class @ 0x00000000fa499b00
hsdb> whatis 0x00000000fa499b00
Address 0x00000000fa499b00: In thread-local allocation buffer for thread "main" (1)
[0x00000000fa48f490,0x00000000fa49a750,0x00000000fa49d118)
hsdb> inspect 0x00000000fa499b00
instance of Oop for java/lang/Class @ 0x00000000fa499b00 @ 0x00000000fa499b00 (size = 120)
<<Reverse pointers>>:
t1: Oop for Test2 @ 0x00000000fa49a710 Oop for Test2 @ 0x00000000fa49a710
hsdb> revptrs 0x00000000fa49a730
Oop for Test @ 0x00000000fa49a720
hsdb> whatis 0x00000000fa49a720
Address 0x00000000fa49a720: In thread-local allocation buffer for thread "main" (1)
[0x00000000fa48f490,0x00000000fa49a750,0x00000000fa49d118)
hsdb> inspect 0x00000000fa49a720
instance of Oop for Test @ 0x00000000fa49a720 @ 0x00000000fa49a720 (size = 16)
<<Reverse pointers>>:
_mark: 1
t2: Oop for Test2 @ 0x00000000fa49a730 Oop for Test2 @ 0x00000000fa49a730
hsdb> revptrs 0x00000000fa49a740
null
hsdb> mem 0x000000000287f7f0 30
0x000000000287f7f0: 0x0000000002886298
0x000000000287f7f8: 0x0000000002893ca5
0x000000000287f800: 0x0000000002893ca5
0x000000000287f808: 0x000000000287f808
0x000000000287f810: 0x00000000fb077f58
0x000000000287f818: 0x000000000287f860
0x000000000287f820: 0x00000000fb078360
0x000000000287f828: 0x0000000000000000
0x000000000287f830: 0x00000000fb077f78
0x000000000287f838: 0x0000000000000000
HSDB
HotSpot VM
.gist.txt 1/12/2020 8:30 AM
Page 1 of 4