aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-03-07 16:27:33 +0000
committerIan Lance Taylor <iant@google.com>2008-03-07 16:27:33 +0000
commita8627968fb4c8ffef2e12f915c0230f8924e3a62 (patch)
tree92c71b97da04433dcaa5d50bd09c28415602bafe
parentc4b347c7ca7af66966d69ad0a1bafc2a59257a99 (diff)
downloadgdb-a8627968fb4c8ffef2e12f915c0230f8924e3a62.zip
gdb-a8627968fb4c8ffef2e12f915c0230f8924e3a62.tar.gz
gdb-a8627968fb4c8ffef2e12f915c0230f8924e3a62.tar.bz2
From Craig Silverstein: implement --hash-bucket-empty-fraction for real.
-rw-r--r--gold/dynobj.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/dynobj.cc b/gold/dynobj.cc
index 6c0a4b2..5581298 100644
--- a/gold/dynobj.cc
+++ b/gold/dynobj.cc
@@ -698,9 +698,11 @@ Dynobj::compute_bucket_count(const std::vector<uint32_t>& hashcodes,
unsigned int symcount = hashcodes.size();
unsigned int ret = 1;
+ const double full_fraction
+ = 1.0 - parameters->options().hash_bucket_empty_fraction();
for (int i = 0; i < buckets_count; ++i)
{
- if (symcount < buckets[i])
+ if (symcount < buckets[i] * full_fraction)
break;
ret = buckets[i];
}