diff options
author | Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> | 2003-08-02 12:30:48 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2003-08-02 10:30:48 +0000 |
commit | 50612a04e59e7e68cd2ecedf34e9bad1ec2b5827 (patch) | |
tree | c24ca8a30aa1c180b963e821ab1e55f1685897e2 /gcc/profile.c | |
parent | 7575931c17b4ce70f4b8cdd857225973767e96a9 (diff) | |
download | gcc-50612a04e59e7e68cd2ecedf34e9bad1ec2b5827.zip gcc-50612a04e59e7e68cd2ecedf34e9bad1ec2b5827.tar.gz gcc-50612a04e59e7e68cd2ecedf34e9bad1ec2b5827.tar.bz2 |
libgcov.c (gcov_exit): Cleanup and fix.
* libgcov.c (gcov_exit): Cleanup and fix.
* profile.c (compute_value_histograms): Don't try to read profiles
that are not present.
From-SVN: r70100
Diffstat (limited to 'gcc/profile.c')
-rw-r--r-- | gcc/profile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index 37a5ecb..0994981 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -622,9 +622,15 @@ compute_value_histograms (unsigned n_values, struct histogram_value *values) any = 0; for (t = 0; t < GCOV_N_VALUE_COUNTERS; t++) { + if (!n_histogram_counters[t]) + { + histogram_counts[t] = NULL; + continue; + } + histogram_counts[t] = get_coverage_counts (COUNTER_FOR_HIST_TYPE (t), - n_histogram_counters[t], &profile_info); + n_histogram_counters[t], NULL); if (histogram_counts[t]) any = 1; act_count[t] = histogram_counts[t]; |