diff options
author | Ian Lance Taylor <iant@google.com> | 2007-12-05 00:48:49 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-12-05 00:48:49 +0000 |
commit | ad8f37d1ba63a4d799f35e2244b2facb0fedf59b (patch) | |
tree | 482c8bc7b18aa41c439f40f4d1dbe42a9229442b /gold/symtab.cc | |
parent | 055f1d8ffcf99cdc50eb47e5cbfae62635b5c041 (diff) | |
download | gdb-ad8f37d1ba63a4d799f35e2244b2facb0fedf59b.zip gdb-ad8f37d1ba63a4d799f35e2244b2facb0fedf59b.tar.gz gdb-ad8f37d1ba63a4d799f35e2244b2facb0fedf59b.tar.bz2 |
Stringpool stats. Also make Symbol_table support functions inline.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 13 |
1 files changed, 6 insertions, 7 deletions
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 |