From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5630 invoked by alias); 14 Sep 2012 21:07:26 -0000 Received: (qmail 5620 invoked by uid 22791); 14 Sep 2012 21:07:24 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Sep 2012 21:07:11 +0000 From: "tejohnson at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/54487] [4.8 Regression] profiledbootstrap broken by r190952 Date: Fri, 14 Sep 2012 21:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: tejohnson at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-09/txt/msg01137.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54487 --- Comment #32 from tejohnson at gcc dot gnu.org 2012-09-14 21:06:54 UTC --- Author: tejohnson Date: Fri Sep 14 21:06:49 2012 New Revision: 191312 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191312 Log: Backport from trunk r190952 to add counter histogram to gcov program summary, and follow-on fixes for PR gcov-profile/54487 (r191074 and r191238). 2012-09-14 Teresa Johnson * libgcc/libgcov.c (gcov_histogram_insert): New function. (gcov_compute_histogram): Ditto. (sort_by_reverse_gcov_value): Remove function. (gcov_compute_cutoff_values): Ditto. (gcov_merge_gcda_file): Merge histogram while merging summary. (gcov_gcda_file_size): Include histogram in summary size computation. (gcov_write_gcda_file): Remove assert that is no longer valid. (gcov_exit_init): Invoke gcov_compute_histogram. * gcc/gcov-io.c (gcov_write_summary): Write out non-zero histogram entries to function summary along with an occupancy bit vector. (gcov_read_summary): Read in the histogram entries. (gcov_histo_index): New function. (gcov_histogram_merge): Ditto. * gcc/gcov-io.h (gcov_type_unsigned): New type. (struct gcov_bucket_type): Ditto. (struct gcov_ctr_summary): Include histogram. (GCOV_TAG_SUMMARY_LENGTH): Update to include histogram entries. (GCOV_HISTOGRAM_SIZE): New macro. (GCOV_HISTOGRAM_BITVECTOR_SIZE): Ditto. (gcov_gcda_file_size): New parameter. * gcc/profile.c (NUM_GCOV_WORKING_SETS): Ditto. (gcov_working_sets): New global variable. (compute_working_sets): New function. (find_working_set): Ditto. (get_exec_counts): Invoke compute_working_sets. * gcc/loop-unroll.c (code_size_limit_factor): Call new function find_working_set to obtain working set information. * gcc/coverage.c (read_counts_file): Merge histograms, and fix bug with accessing summary info for non-summable counters. * gcc/basic-block.h (gcov_type_unsigned): New type. (struct gcov_working_set_info): Ditto. (find_working_set): Declare. * gcc/gcov-dump.c (tag_summary): Dump out histogram. * gcc/configure.ac (HOST_HAS_F_SETLKW): Set based on compile test using F_SETLKW with fcntl. * gcc/configure, gcc/config.in: Regenerate. Modified: branches/google/gcc-4_7/gcc/ChangeLog.google-4_7 branches/google/gcc-4_7/gcc/basic-block.h branches/google/gcc-4_7/gcc/config.in branches/google/gcc-4_7/gcc/configure branches/google/gcc-4_7/gcc/configure.ac branches/google/gcc-4_7/gcc/coverage.c branches/google/gcc-4_7/gcc/gcov-dump.c branches/google/gcc-4_7/gcc/gcov-io.c branches/google/gcc-4_7/gcc/gcov-io.h branches/google/gcc-4_7/gcc/loop-unroll.c branches/google/gcc-4_7/gcc/profile.c branches/google/gcc-4_7/libgcc/ChangeLog.google-4_7 branches/google/gcc-4_7/libgcc/libgcov.c