summaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-02 10:30:48 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-02 10:30:48 +0000
commit72bb94b7d8379925bf914cc50a63c8aabfebc07c (patch)
treec24ca8a30aa1c180b963e821ab1e55f1685897e2 /gcc/profile.c
parent143348268aef1cf326db44e58ad1f973e70a297b (diff)
downloadgcc-72bb94b7d8379925bf914cc50a63c8aabfebc07c.tar.gz
* libgcov.c (gcov_exit): Cleanup and fix.
* profile.c (compute_value_histograms): Don't try to read profiles that are not present. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70100 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 37a5ecb5c11..09949819064 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];