diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-19 01:08:02 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-19 01:08:02 +0000 |
commit | 5dbddbd9cba08722841cff67404dd01e2654c099 (patch) | |
tree | f4598c72acf723eafdb6f592105a09364d00bb14 /libgcc | |
parent | 810e0e82dc08e1da7c3aef31b937bac1808d7620 (diff) | |
download | gcc-5dbddbd9cba08722841cff67404dd01e2654c099.tar.gz |
* libgcov-driver.c (run_accounted): Make global level static.
(gcov_exit_merge_summary): Silence warning; do not clear
run_accounted here.
(gcov_exit): Clear it here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204993 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 5 | ||||
-rw-r--r-- | libgcc/libgcov-driver.c | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 12d4938b4b4..b5224f1989e 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,5 +1,10 @@ 2013-11-18 Jan Hubicka <jh@suse.cz> + * libgcov-driver.c (run_accounted): Make global level static. + (gcov_exit_merge_summary): Silence warning; do not clear + run_accounted here. + (gcov_exit): Clear it here. + * libgcov-driver.c (gcov_exit_merge_summary): Fix setting run_accounted. diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c index 763e0244bca..ec6dffd76b3 100644 --- a/libgcc/libgcov-driver.c +++ b/libgcc/libgcov-driver.c @@ -325,6 +325,10 @@ static char *gi_filename; static struct gcov_fn_buffer *fn_buffer; /* buffer for summary from other programs to be written out. */ static struct gcov_summary_buffer *sum_buffer; +/* If application calls fork or exec multiple times, we end up storing + profile repeadely. We should not account this as multiple runs or + functions executed once may mistakely become cold. */ +static int run_accounted = 0; /* This funtions computes the program level summary and the histo-gram. It computes and returns CRC32 and stored summari in THIS_PRG. */ @@ -646,14 +650,11 @@ gcov_exit_write_gcda (const struct gcov_info *gi_ptr, static int gcov_exit_merge_summary (const struct gcov_info *gi_ptr, struct gcov_summary *prg, - gcov_unsigned_t crc32, struct gcov_summary *all_prg) + gcov_unsigned_t crc32, + struct gcov_summary *all_prg __attribute__ ((unused))) { struct gcov_ctr_summary *cs_prg, *cs_tprg; unsigned t_ix; - /* If application calls fork or exec multiple times, we end up storing - profile repeadely. We should not account this as multiple runs or - functions executed once may mistakely become cold. */ - static int run_accounted = 0; #if !GCOV_LOCKED /* summary for all instances of program. */ struct gcov_ctr_summary *cs_all; @@ -718,7 +719,6 @@ gcov_exit_merge_summary (const struct gcov_info *gi_ptr, struct gcov_summary *pr #endif } - run_accounted = 1; prg->checksum = crc32; return 0; @@ -817,6 +817,7 @@ gcov_exit (void) /* Now merge each file. */ for (gi_ptr = gcov_list; gi_ptr; gi_ptr = gi_ptr->next) gcov_exit_dump_gcov (gi_ptr, &gf, crc32, &all_prg); + run_accounted = 1; if (gi_filename) free (gi_filename); |