我應該如何解釋GCC的-fmem-report
標誌給出的輸出?瞭解海灣合作委員會'-fmem-report`的輸出
我可以從表格和後續統計中檢索哪些信息?
我試過在編譯期間檢索峯值內存消耗,並直覺地認爲表格的最後一行(Total
)爲我提供了值。但是這些與我在top
中看到的不一樣。
編譯我的項目時,gcc
進程的最高峯值大約爲1.7GB,但在構建日誌中可以找到的最大值大約爲750MB。
其他GCC標誌可以幫助我監控這些〜1.7GB?或者我是否需要將make
內部的腳本監控gcc
和ld
進程?
鑑於以下輸出,什麼值是最重要和最具信息性的?
Memory still allocated at the end of the compilation process
Size Allocated Used Overhead
8 40k 38k 1200
16 104k 100k 2288
32 296k 295k 5328
64 20k 16k 320
128 4096 384 56
256 48k 45k 672
512 188k 187k 2632
1024 888k 887k 12k
2048 156k 154k 2184
4096 188k 188k 2632
8192 56k 48k 392
16384 16k 16k 56
32768 32k 0 56
65536 64k 0 56
131072 128k 128k 56
24 236k 232k 4248
40 36k 33k 576
48 12k 8496 192
56 4096 2016 64
72 12k 8136 168
80 4096 480 56
88 1448k 1429k 19k
96 12k 10k 168
112 4096 1568 56
120 8192 5040 112
184 16k 14k 224
160 4096 960 56
168 36k 35k 504
152 56k 51k 784
104 4096 416 56
352 516k 486k 7224
136 4096 408 56
Total 4640k 4424k 63k
String pool
entries 16631
identifiers 16631 (100.00%)
slots 32768
deleted 0
bytes 252k (17592186044415M overhead)
table size 256k
coll/search 0.4904
ins/search 0.0345
avg. entry 15.55 bytes (+/- 9.75)
longest entry 66
??? tree nodes created
(No per-node statistics)
Type hash: size 1021, 27 elements, 0.140351 collisions
DECL_DEBUG_EXPR hash: size 1021, 0 elements, 0.000000 collisions
DECL_VALUE_EXPR hash: size 1021, 0 elements, 0.000000 collisions
no search statistics
decl_specializations: size 61, 0 elements, 0.000000 collisions
type_specializations: size 61, 0 elements, 0.000000 collisions
No gimple statistics
Alias oracle query stats:
refs_may_alias_p: 0 disambiguations, 0 queries
ref_maybe_used_by_call_p: 0 disambiguations, 0 queries
call_may_clobber_ref_p: 0 disambiguations, 0 queries
PTA query stats:
pt_solution_includes: 0 disambiguations, 0 queries
pt_solutions_intersect: 0 disambiguations, 0 queries
不知道它與'17592186044415M架空'# – Dani 2012-07-14 13:38:55