[Bug gcov-profile/54487] [4.8 Regression] profiledbootstrap broken by r190952
tejohnson at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Sep 14 21:07:00 GMT 2012
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 <tejohnson@google.com>
* 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
More information about the Gcc-bugs
mailing list