From: Jan Hubicka <hubicka@ucw.cz>
To: Teresa Johnson <tejohnson@google.com>
Cc: reply@codereview.appspotmail.com, hubicka@ucw.cz,
davidxl@google.com, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Add working-set size and hotness information to fdo summary (issue6465057)
Date: Sat, 18 Aug 2012 08:20:00 -0000 [thread overview]
Message-ID: <20120818081956.GD26255@kam.mff.cuni.cz> (raw)
In-Reply-To: <20120816142137.7F5EA61414@tjsboxrox.mtv.corp.google.com>
> + {
> + cs_prg->num = cs_tprg->num;
> + /* Allocate the working set array for the merged summary. */
> + if (ws_cnt)
> + {
> + cs_prg->working_set_count = ws_cnt;
> + cs_prg->working_sets = (gcov_ws_info_t *) malloc (
> + ws_cnt * sizeof (gcov_ws_info_t));
> + }
> + }
> + else if (cs_prg->num != cs_tprg->num
> + || ws_cnt != cs_prg->working_set_count)
> + goto read_mismatch;
> + /* Copy over this run's working set information if either this is
> + the first run, the total size of the profile (sum_all) is much
> + (50%) larger for this run (need to check this before updating
> + cs_prg->sum_all below), or this run has a larger working
> + set in the largest (99.99% of sum_all) bucket. */
> + if (ws_cnt
> + && (cs_prg->runs == 1
> + || (cs_tprg->sum_all
> + > (cs_prg->sum_all + cs_prg->sum_all / 2))
> + || (cs_tprg->working_sets[ws_cnt - 1].num_counters
> + > cs_prg->working_sets[ws_cnt - 1].num_counters)))
> + memcpy (cs_prg->working_sets,
> + cs_tprg->working_sets,
> + ws_cnt * sizeof (gcov_ws_info_t));
> cs_prg->sum_all += cs_tprg->sum_all;
Hmm, when you run i.e. gcc bootstrap where the program is run couple hundred
times, this will end up really inaccurate, since it will probably just store
the histogram of insn-attrtab compilation, right?
Why you don't simply write the histogram into gcov file and don't merge the values
here (i.e. doing the cummulation loop in GCC instead of within libgcov)?
By default you are streaming 128 values that is the same as needed to stream the histogram.
I suppose we can have environment variable to reduce the histogram size - I guess in smaller
setups smaller histogram will run just fine...
Honza
next prev parent reply other threads:[~2012-08-18 8:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 14:22 Teresa Johnson
2012-08-18 8:20 ` Jan Hubicka [this message]
2012-08-20 4:59 ` Teresa Johnson
2012-08-20 5:41 ` Xinliang David Li
2012-08-20 9:48 ` Jan Hubicka
2012-08-20 14:53 ` Teresa Johnson
2012-08-20 17:05 ` Xinliang David Li
2012-08-20 15:36 ` Steven Bosscher
2012-08-20 17:44 ` Teresa Johnson
2012-08-20 17:52 ` Steven Bosscher
2012-08-20 16:57 ` Xinliang David Li
2012-08-20 19:03 ` Andi Kleen
2012-08-20 19:58 ` Xinliang David Li
2012-08-21 1:27 ` Jan Hubicka
2012-08-21 5:14 ` Teresa Johnson
2012-08-21 5:29 ` Jan Hubicka
2012-08-21 6:15 ` Xinliang David Li
2012-08-21 6:33 ` Jan Hubicka
2012-08-21 7:15 ` Xinliang David Li
2012-08-21 7:34 ` Jan Hubicka
2012-08-21 17:10 ` Xinliang David Li
[not found] ` <CAAe5K+XeEc68t9g57UosvX6YoWnVthV2iwgfdjk=zys7vep+SA@mail.gmail.com>
[not found] ` <CAAkRFZK=AGWpjoxM2z8aBaepBX-FoQfZEFfYvDqfGmwmnDW8KA@mail.gmail.com>
2012-08-22 1:56 ` Jan Hubicka
2012-08-22 5:34 ` Teresa Johnson
2012-08-22 6:18 ` Jan Hubicka
2012-08-23 2:07 ` Teresa Johnson
2012-08-23 2:29 ` Jan Hubicka
2012-08-21 14:59 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120818081956.GD26255@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=davidxl@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=reply@codereview.appspotmail.com \
--cc=tejohnson@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).