On 9/2/20 7:28 AM, Martin Liška wrote: > On 9/1/20 4:04 PM, Jan Hubicka wrote: >>> The patch is about usage of MiB in memory allocation reports. >>> I see it much better readable than values displayed in KiB: >>> >>> Reading object files: tramp3d-v4.o {GC released 1 MiB} {GC 19 MiB -> >>> 19 MiB} {GC 19 MiB} {heap 12 MiB} >>> Reading the symbol table: >>> Merging declarations: {GC released 1 MiB madv_dontneed 0 MiB} {GC 27 >>> MiB -> 27 MiB} {GC 27 MiB} {heap 15 MiB} >>> Reading summaries: <odr> {GC 27 MiB} {heap 15 MiB} >>> <profile_estimate> {GC 27 MiB} {heap 15 MiB} <icf> {GC 27 MiB} >>> {heap 15 MiB} <cp> {GC 27 MiB} {heap 15 MiB} <sra> {GC 27 MiB} >>> {heap 15 MiB} <fnsummary> {GC 30 MiB} {heap 15 MiB} <pure-const> >>> {GC 30 MiB} {heap 15 MiB} {GC 30 MiB} >>> Merging symbols: {heap 15 MiB}Materializing decls: >>> <odr> {heap 15 MiB} <whole-program> {heap 15 MiB} >>> <profile_estimate> {heap 15 MiB} <icf> {heap 15 MiB} <devirt> {heap >>> 15 MiB} <cp> {heap 15 MiB} <sra> {heap 15 MiB} <cdtor> {heap 15 MiB} >>> <fnsummary> {heap 15 MiB} <inline> {heap 15 MiB} <pure-const> {heap >>> 15 MiB} <free-fnsummary> {GC released 1 MiB madv_dontneed 2 MiB} {GC >>> trimmed to 27 MiB, 28 MiB mapped} {heap 15 MiB} <static-var> {heap >>> 15 MiB} <single-use> {heap 15 MiB} <comdats> {heap 15 MiB} >>> Streaming out {GC trimmed to 27 MiB, 28 MiB mapped} {heap 15 MiB} >>> ./a.ltrans0.o ( 11257 insns) ./a.ltrans1.o ( 11293 insns) >>> ./a.ltrans2.o ( 8669 insns) ./a.ltrans3.o ( 138934 insns) >> >> One problem I see here is that while it is OK for Firefox builds it is >> bit too coarse for smaller testcases where the memory use is still >> importnat. I guess we may just print KBs before the large gets too >> large, just like norton commander does? :) > > Sure, let's do it using SIZE_AMOUNT macro. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > >> >> Honza >>> >>> Thoughts? >>> Thanks, >>> Martin > > > 0002-Use-SIZE_AMOUNT-macro-for-GGC-memory-allocation-numb.patch > > From 8826f267175d456121612332b838e41a9542a513 Mon Sep 17 00:00:00 2001 > From: Martin Liska <mli...@suse.cz> > Date: Wed, 2 Sep 2020 14:30:16 +0200 > Subject: [PATCH 2/3] Use SIZE_AMOUNT macro for GGC memory allocation numbers. > > gcc/ChangeLog: > > * ggc-common.c (ggc_prune_overhead_list): Use SIZE_AMOUNT. > * ggc-page.c (release_pages): Likewise. > (ggc_collect): Likewise. > (ggc_trim): Likewise. > (ggc_grow): Likewise. > * timevar.c (timer::print): Likewise. > > gcc/testsuite/ChangeLog: > > * g++.dg/ext/timevar1.C: Prune more possible number values. > * g++.dg/ext/timevar2.C: Likewise. > --- > gcc/ggc-common.c | 6 +++--- > gcc/ggc-page.c | 15 +++++++-------- > gcc/testsuite/g++.dg/ext/timevar1.C | 3 ++- > gcc/testsuite/g++.dg/ext/timevar2.C | 3 ++- > gcc/timevar.c | 8 ++++---- > 5 files changed, 18 insertions(+), 17 deletions(-) > > diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c > index b8782c5824b..50c52fe525b 100644 > --- a/gcc/ggc-common.c > +++ b/gcc/ggc-common.c > @@ -1008,7 +1008,7 @@ ggc_prune_overhead_list (void) > } > } > > -/* Print memory used by heap in kb if this info is not available. */ > +/* Print memory used by heap if this info is not available. */
Seems like the same problem as the prior patch ;-) OK with that nit fixed. jeff
pEpkey.asc
Description: application/pgp-keys