From ad8f37d1ba63a4d799f35e2244b2facb0fedf59b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 5 Dec 2007 00:48:49 +0000 Subject: Stringpool stats. Also make Symbol_table support functions inline. --- gold/symtab.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'gold/symtab.cc') diff --git a/gold/symtab.cc b/gold/symtab.cc index 6094c2a..40b3080 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -306,20 +306,18 @@ Symbol_table::~Symbol_table() { } -// The hash function. The key is always canonicalized, so we use a -// simple combination of the pointers. +// The hash function. The key values are Stringpool keys. -size_t +inline size_t Symbol_table::Symbol_table_hash::operator()(const Symbol_table_key& key) const { return key.first ^ key.second; } -// The symbol table key equality function. This is only called with -// canonicalized name and version strings, so we can use pointer -// comparison. +// The symbol table key equality function. This is called with +// Stringpool keys. -bool +inline bool Symbol_table::Symbol_table_eq::operator()(const Symbol_table_key& k1, const Symbol_table_key& k2) const { @@ -1909,6 +1907,7 @@ Symbol_table::print_stats() const fprintf(stderr, _("%s: symbol table entries: %zu\n"), program_name, this->table_.size()); #endif + this->namepool_.print_stats("symbol table stringpool"); } // We check for ODR violations by looking for symbols with the same -- cgit v1.1