我应该如何解释 GCC-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