Windbg!heap -stat -h命令如何获得超过20个条目

时间:2013-04-04 04:34:10

标签: debugging windbg

我正在研究一个堆,它有很多分配,条目数超过20,这是!heap -stat -h命令的默认值。例如,如果你看到下面的数字,那么这些数字不会达到100.我有什么方法可以获得该堆中的所有条目吗?

!heap -stat -h 0000000006eb0000

堆@ 0000000006eb0000

分组:TOTSIZE 最大显示:20

size     #blocks     total     ( %) (percent of total busy bytes)
3a00 92e - 2146c00  (1.11)
27da8 c0 - 1de3e00  (1.00)
4fb48 5c - 1ca4de0  (0.95)
3bc78 6e - 19afb90  (0.86)
14c18 127 - 17eafa8  (0.80)
778e8 2b - 1414ef8  (0.67)
6f30 29d - 1229070  (0.61)
13ed8 a5 - cd8138  (0.43)
4c00 2a0 - c78000  (0.42)
10a18 a4 - aa7760  (0.36)
63a18 1a - a1e670  (0.34)
18e18 61 - 96d718  (0.31)
9f688 c - 778e60  (0.25)
20 3551e - 6aa3c0  (0.22)
a0 a776 - 68a9c0  (0.22)
8b7b8 b - 5fe4e8  (0.20)
1e08 2b0 - 50b580  (0.17)
30 168fc - 43af40  (0.14)
a898 60 - 3f3900  (0.13)
18 287ae - 3cb850  (0.13)

-Thanks,

Brajesh

1 个答案:

答案 0 :(得分:3)

您可以通过指定group by参数后跟一个数字来增加此总数,例如:

!heap -stat -h 07300000 -grp A 0n100

给出输出:

0:275> !heap -stat -h 07300000 -grp A 0n100  
heap @ 07300000 group-by: ALLOCATIONSIZE max-display: 100
    size     #blocks    total     ( %) (percent of total busy bytes)
    7ecc10 1 - 7ecc10  (41.60)
    1fc210 1 - 1fc210  (10.42)
    1fb310 1 - 1fb310  (10.40)
    17d110 1 - 17d110  (7.81)
    2c4e0 2 - 589c0  (1.82)
    2b330 1 - 2b330  (0.89)
    20420 3 - 60c60  (1.98)
    20020 4 - 80080  (2.63)
    14320 1 - 14320  (0.41)
    10020 1 - 10020  (0.33)
    fab8 1 - fab8  (0.32)
    eb4c 2 - 1d698  (0.60)
    c020 1 - c020  (0.25)
    9c60 4c - 2e6c80  (15.23)
    82c0 3 - 18840  (0.50)
    8020 3 - 18060  (0.49)
    6420 1 - 6420  (0.13)
    5ea0 1 - 5ea0  (0.12)
    517c 1 - 517c  (0.10)
    4f40 1 - 4f40  (0.10)
    4ba4 1 - 4ba4  (0.10)
    4750 1 - 4750  (0.09)
    4020 2 - 8040  (0.16)
    3f78 1 - 3f78  (0.08)
    2c38 1 - 2c38  (0.06)
    25d8 1 - 25d8  (0.05)
    21dc 1 - 21dc  (0.04)
    2040 1 - 2040  (0.04)
    2020 3 - 6060  (0.12)
    1de0 1 - 1de0  (0.04)
    1da8 10 - 1da80  (0.61)
    1b6c 3 - 5244  (0.11)
    19f0 1 - 19f0  (0.03)
    18e4 2 - 31c8  (0.06)
    1890 1 - 1890  (0.03)
    183c 2 - 3078  (0.06)
    1820 1 - 1820  (0.03)
    15e8 1 - 15e8  (0.03)
    1560 1 - 1560  (0.03)
    151c 2 - 2a38  (0.05)
    14b0 1 - 14b0  (0.03)
    1384 1 - 1384  (0.03)
    1098 1 - 1098  (0.02)
    102c 3 - 3084  (0.06)
    1020 2 - 2040  (0.04)
    101f 1 - 101f  (0.02)
    101c 1 - 101c  (0.02)

将转储该堆的句柄,按分配大小分组,最多100行(0n指定我们是基于小数的,没有该前缀,它变为十六进制值)

有关!heap

的详细信息,请参阅此link