From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26864 invoked by alias); 29 Nov 2012 16:55:10 -0000 Received: (qmail 26832 invoked by uid 22791); 29 Nov 2012 16:55:08 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Nov 2012 16:55:02 +0000 Received: from occam.kam.mff.cuni.cz (occam.kam.mff.cuni.cz [195.113.17.166]) by nikam.ms.mff.cuni.cz (Postfix) with ESMTP id E1042544208; Thu, 29 Nov 2012 17:55:00 +0100 (CET) Received: by occam.kam.mff.cuni.cz (Postfix, from userid 16202) id D9DB82202CE; Thu, 29 Nov 2012 17:55:00 +0100 (CET) Date: Thu, 29 Nov 2012 16:55:00 -0000 From: Jan Hubicka To: Teresa Johnson Cc: Jan Hubicka , reply@codereview.appspotmail.com, "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Stream profile summary histogram through LTO files (issue6782131) Message-ID: <20121129165500.GC25651@kam.mff.cuni.cz> References: <20121129041116.DB81E61422@tjsboxrox.mtv.corp.google.com> <20121129161744.GA26688@atrey.karlin.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg02460.txt.bz2 > > I assume you mean use the bitpack streaming functionality used other > places in lto-cgraph.c, and not change the way it is done in gcov-io.c > where this was cloned from? I will change the lto-cgraph.c code to use > the bitpacking. Yes, we don't have the facility on gcov-io, so we need to do that by hand. > > >> + lto_gcov_summary.sum_all = MAX (lto_gcov_summary.sum_all, > >> + (file_data->profile_info.sum_all > >> + * scale > >> + + REG_BR_PROB_BASE / 2) > >> + / REG_BR_PROB_BASE); > > > > Use RDIV for the scaling. > > ok. This was cloned from the way we do other scalings in the same > function, I will change them all to use RDIV. Yes, thanks! > > >> -#if IN_LIBGCOV || !IN_GCOV > >> +#if !IN_GCOV > >> /* Determine the index into histogram for VALUE. */ > >> > >> -static unsigned > >> +GCOV_LINKAGE unsigned > > I would probably go around the trouble of declaring this static in GCOV, > > so it is inlined at we do not bload libgcov more than needed. > > Do you mean leave it static when IN_LIBGCOV? It isn't included when > IN_GCOV. I just need it extern when in the compiler. So do you mean > make it static when IN_LIBGCOV and GCOV_LINKAGE (i.e. extern) when > !IN_LIBGCOV? Yes, it should help inliner to do the right things for libgcov... Thanks, Honza > > Thanks, > Teresa > > > > > Thanks, > > Honza > > > > -- > Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413