[Bug libstdc++/80290] [6/7 Regression] g++ uses unreasonable amount of memory compiling nested string maps
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 4 11:09:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80290
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:
#include <utility>
typedef std::pair<unsigned, std::pair<const char *, std::pair<const char *,
std::pair<const char *, std::pair<const char *, const char *> > > > > FruMap;
#define INIT { 1, \
{ "/system/chassis/motherboard/cpu0", \
{ "xyz.openbmc_project.Inventory.Decorator.Asset", \
{ "PartNumber", \
{"IPMIFruSection","Board"}, \
}, \
} \
}, \
}
extern const FruMap frus[] = {
INIT,
INIT,
INIT,
INIT,
INIT,
};
GCC 5:
Execution times (seconds)
phase setup : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 (17%) wall
1323 kB (15%) ggc
phase parsing : 0.04 (100%) usr 0.01 (100%) sys 0.05 (83%)
wall 7520 kB (84%) ggc
|name lookup : 0.01 (25%) usr 0.00 ( 0%) sys 0.03 (50%) wall
581 kB ( 7%) ggc
|overload resolution : 0.01 (25%) usr 0.00 ( 0%) sys 0.01 (17%) wall
1867 kB (21%) ggc
parser (global) : 0.02 (50%) usr 0.00 ( 0%) sys 0.02 (33%) wall
2692 kB (30%) ggc
parser struct body : 0.01 (25%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
911 kB (10%) ggc
template instantiation : 0.01 (25%) usr 0.01 (100%) sys 0.03 (50%) wall
3239 kB (36%) ggc
TOTAL : 0.04 0.01 0.06
8941 kB
GCC 6:
Execution times (seconds)
phase setup : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 1%) wall
1397 kB ( 1%) ggc
phase parsing : 0.62 (98%) usr 0.19 (100%) sys 0.81 (96%) wall
125355 kB (99%) ggc
phase opt and generate : 0.01 ( 2%) usr 0.00 ( 0%) sys 0.02 ( 2%) wall
231 kB ( 0%) ggc
|name lookup : 0.01 ( 2%) usr 0.01 ( 5%) sys 0.00 ( 0%) wall
1155 kB ( 1%) ggc
|overload resolution : 0.24 (38%) usr 0.04 (21%) sys 0.27 (32%) wall
68949 kB (54%) ggc
callgraph construction : 0.01 ( 2%) usr 0.00 ( 0%) sys 0.01 ( 1%) wall
231 kB ( 0%) ggc
callgraph optimization : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 1%) wall
0 kB ( 0%) ggc
preprocessing : 0.01 ( 2%) usr 0.00 ( 0%) sys 0.01 ( 1%) wall
187 kB ( 0%) ggc
parser (global) : 0.36 (57%) usr 0.10 (53%) sys 0.55 (65%) wall
103307 kB (81%) ggc
parser struct body : 0.01 ( 2%) usr 0.00 ( 0%) sys 0.01 ( 1%) wall
1227 kB ( 1%) ggc
parser inl. meth. body : 0.01 ( 2%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
95 kB ( 0%) ggc
template instantiation : 0.21 (33%) usr 0.09 (47%) sys 0.24 (29%) wall
19154 kB (15%) ggc
symout : 0.02 ( 3%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
1387 kB ( 1%) ggc
TOTAL : 0.63 0.19 0.84
127016 kB
More information about the Gcc-bugs
mailing list