.Net 内存转储:!eeheap -gc:GC 生成从哪里开始和结束?
我认为我在这里遗漏了一些基础知识,所以希望这篇文章可以澄清这一点。
我已经进行了转储,正在查看托管堆,并且有兴趣专门查看每个堆中的对象。 以下是调试器的输出:
0:000> !eeheap -gc
Number of GC Heaps: 1
generation 0 starts at 0x3cca447c
generation 1 starts at 0x3cc9d8a0
generation 2 starts at 0x01651000
ephemeral segment allocation context: none
segment begin allocated size
01650000 01651000 0264fcc8 0x00ffecc8(16772296)
139a0000 139a1000 1499e5b0 0x00ffd5b0(16766384)
18ca0000 18ca1000 19c98a58 0x00ff7a58(16743000)
25ad0000 25ad1000 26acd454 0x00ffc454(16761940)
23ad0000 23ad1000 24acd2a0 0x00ffc2a0(16761504)
27ad0000 27ad1000 28acc724 0x00ffb724(16758564)
29ad0000 29ad1000 2aacf1e8 0x00ffe1e8(16769512)
1dca0000 1dca1000 1ec9ff50 0x00ffef50(16772944)
26ad0000 26ad1000 27acf8f8 0x00ffe8f8(16771320)
1bca0000 1bca1000 1cc9f680 0x00ffe680(16770688)
30790000 30791000 3178fe0c 0x00ffee0c(16772620)
2f790000 2f791000 3078ff74 0x00ffef74(16772980)
31790000 31791000 3278eef4 0x00ffdef4(16768756)
24ad0000 24ad1000 25acf6b4 0x00ffe6b4(16770740)
1cca0000 1cca1000 1dc78438 0x00fd7438(16610360)
2bad0000 2bad1000 2cace4fc 0x00ffd4fc(16766204)
28ad0000 28ad1000 29aca8d8 0x00ff98d8(16750808)
34790000 34791000 3578aa1c 0x00ff9a1c(16751132)
2aad0000 2aad1000 2baaa004 0x00fd9004(16617476)
32790000 32791000 337385fc 0x00fa75fc(16414204)
35790000 35791000 36779394 0x00fe8394(16679828)
149a0000 149a1000 1599f9f0 0x00ffe9f0(16771568)
42550000 42551000 435493e8 0x00ff83e8(16745448)
3f370000 3f371000 4036e108 0x00ffd108(16765192)
33790000 33791000 346e6328 0x00f55328(16077608)
43550000 43551000 4452fcf8 0x00fdecf8(16641272)
3b5d0000 3b5d1000 3c3b78e4 0x00de68e4(14575844)
3c5d0000 3c5d1000 3ce92284 0x008c1284(9179780)
Large object heap starts at 0x02651000
segment begin allocated size
02650000 02651000 033a4440 0x00d53440(13972544)
11040000 11041000 11b4c5b0 0x00b0b5b0(11580848)
12040000 12041000 12701580 0x006c0580(7079296)
1eca0000 1eca1000 1fb613e0 0x00ec03e0(15467488)
19ca0000 19ca1000 19eb0528 0x0020f528(2159912)
1aca0000 1aca1000 1b0e3840 0x00442840(4466752)
202d0000 202d1000 2335be68 0x0308ae68(50900584)
Total Size 0x21997e04(563707396)
------------------------------
GC Heap Size 0x21997e04(563707396)
我希望能够获取 GC 各代的起始地址,然后查看从该地址开始一直到下一代的段。 我相信堆被压缩,因此期望在第一段找到第 2 代,情况似乎是这样:
01650000 01651000 0264fcc8 0x00ffecc8(16772296)
但是我无法确定它的结束位置,因为我无法找到第 1 代从 开始的位置0x3cc9d8a0。
我认为我在这里遗漏了上述解决方案的一些基本原理。
有什么建议么?
I think I'm missing some fundamentals here so hopefully this post can clarify this.
I've taken a dump and am looking at the managed heap and am interested in looking specifically at what objects are within each heap. Here is the output from the debugger:
0:000> !eeheap -gc
Number of GC Heaps: 1
generation 0 starts at 0x3cca447c
generation 1 starts at 0x3cc9d8a0
generation 2 starts at 0x01651000
ephemeral segment allocation context: none
segment begin allocated size
01650000 01651000 0264fcc8 0x00ffecc8(16772296)
139a0000 139a1000 1499e5b0 0x00ffd5b0(16766384)
18ca0000 18ca1000 19c98a58 0x00ff7a58(16743000)
25ad0000 25ad1000 26acd454 0x00ffc454(16761940)
23ad0000 23ad1000 24acd2a0 0x00ffc2a0(16761504)
27ad0000 27ad1000 28acc724 0x00ffb724(16758564)
29ad0000 29ad1000 2aacf1e8 0x00ffe1e8(16769512)
1dca0000 1dca1000 1ec9ff50 0x00ffef50(16772944)
26ad0000 26ad1000 27acf8f8 0x00ffe8f8(16771320)
1bca0000 1bca1000 1cc9f680 0x00ffe680(16770688)
30790000 30791000 3178fe0c 0x00ffee0c(16772620)
2f790000 2f791000 3078ff74 0x00ffef74(16772980)
31790000 31791000 3278eef4 0x00ffdef4(16768756)
24ad0000 24ad1000 25acf6b4 0x00ffe6b4(16770740)
1cca0000 1cca1000 1dc78438 0x00fd7438(16610360)
2bad0000 2bad1000 2cace4fc 0x00ffd4fc(16766204)
28ad0000 28ad1000 29aca8d8 0x00ff98d8(16750808)
34790000 34791000 3578aa1c 0x00ff9a1c(16751132)
2aad0000 2aad1000 2baaa004 0x00fd9004(16617476)
32790000 32791000 337385fc 0x00fa75fc(16414204)
35790000 35791000 36779394 0x00fe8394(16679828)
149a0000 149a1000 1599f9f0 0x00ffe9f0(16771568)
42550000 42551000 435493e8 0x00ff83e8(16745448)
3f370000 3f371000 4036e108 0x00ffd108(16765192)
33790000 33791000 346e6328 0x00f55328(16077608)
43550000 43551000 4452fcf8 0x00fdecf8(16641272)
3b5d0000 3b5d1000 3c3b78e4 0x00de68e4(14575844)
3c5d0000 3c5d1000 3ce92284 0x008c1284(9179780)
Large object heap starts at 0x02651000
segment begin allocated size
02650000 02651000 033a4440 0x00d53440(13972544)
11040000 11041000 11b4c5b0 0x00b0b5b0(11580848)
12040000 12041000 12701580 0x006c0580(7079296)
1eca0000 1eca1000 1fb613e0 0x00ec03e0(15467488)
19ca0000 19ca1000 19eb0528 0x0020f528(2159912)
1aca0000 1aca1000 1b0e3840 0x00442840(4466752)
202d0000 202d1000 2335be68 0x0308ae68(50900584)
Total Size 0x21997e04(563707396)
------------------------------
GC Heap Size 0x21997e04(563707396)
I expect that I can take the start address of the GC generations and then look at the segments that start from that address all the way up to the next generation. I believe the heap is compacted thus expect to find generation 2 at the first segment, and this looks to be the case:
01650000 01651000 0264fcc8 0x00ffecc8(16772296)
However I'm not able to determine where this ends as I can't find where generation 1 starts at 0x3cc9d8a0.
I think there are some fundamentals of the above addressing that I'm missing here.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 SOSEX 扩展来单独检查每个代堆,并查看每个代堆的根每个堆上的对象。
You can use the SOSEX extensions to examine each generations heap individually and also look at the roots of each object on each heap.