GDB (xrefs)
|
#include "bcache.h"
Classes | |
struct | m_cache |
Public Member Functions | |
virtual | ~bcache () |
const void * | insert (const void *addr, int length, bool *added=nullptr) |
void | print_statistics (const char *type) |
int | memory_used () |
Protected Member Functions | |
virtual unsigned long | hash (const void *addr, int length) |
virtual int | compare (const void *left, const void *right, int length) |
Private Member Functions | |
void | expand_hash_table () |
Private Attributes | |
unsigned int | m_num_buckets = 0 |
struct bstring ** | m_bucket = nullptr |
unsigned long | m_unique_count = 0 |
long | m_total_count = 0 |
long | m_unique_size = 0 |
long | m_total_size = 0 |
long | m_structure_size = 0 |
unsigned long | m_expand_count = 0 |
unsigned long | m_expand_hash_count = 0 |
unsigned long | m_half_hash_miss_count = 0 |
|
virtual |
Definition at line 231 of file bcache.c.
References m_bucket, m_total_count, and xfree().
|
protectedvirtual |
Reimplemented in psymbol_bcache.
|
private |
Definition at line 64 of file bcache.c.
References gdb::bstring::d, gdb::bstring::data, hash(), gdb::bstring::length, m_bucket, m_expand_count, m_expand_hash_count, m_num_buckets, m_structure_size, m_unique_count, gdb::bstring::next, xfree(), and xmalloc().
Referenced by insert().
|
protectedvirtual |
Reimplemented in psymbol_bcache.
Definition at line 217 of file bcache.c.
Referenced by expand_hash_table(), and insert().
const void * gdb::bcache::insert | ( | const void * | addr, |
int | length, | ||
bool * | added = nullptr ) |
Definition at line 143 of file bcache.c.
References BSTRING_SIZE, CHAIN_LENGTH_THRESHOLD, gdb::bstring::d, gdb::bstring::data, expand_hash_table(), gdb::bstring::half_hash, hash(), gdb::bstring::length, m_bucket, m_half_hash_miss_count, m_num_buckets, m_structure_size, m_total_count, m_total_size, m_unique_count, m_unique_size, and gdb::bstring::next.
Referenced by partial_symtab::add_psymbol(), check_types_worklist(), objfile_per_bfd_storage::intern(), objfile_per_bfd_storage::intern(), and macro_bcache().
int gdb::bcache::memory_used | ( | ) |
Definition at line 384 of file bcache.c.
References m_total_count.
Referenced by print_objfile_statistics().
void gdb::bcache::print_statistics | ( | const char * | type | ) |
Definition at line 259 of file bcache.c.
References gdb_printf(), gdb::bstring::length, m_bucket, m_expand_count, m_expand_hash_count, m_half_hash_miss_count, m_num_buckets, m_structure_size, m_total_count, m_total_size, m_unique_count, m_unique_size, gdb::bstring::next, gdb::print_percentage(), and xfree().
Referenced by print_objfile_statistics().
Definition at line 184 of file bcache.h.
Referenced by expand_hash_table(), insert(), print_statistics(), and ~bcache().
|
private |
Definition at line 197 of file bcache.h.
Referenced by expand_hash_table(), and print_statistics().
|
private |
Definition at line 198 of file bcache.h.
Referenced by expand_hash_table(), and print_statistics().
|
private |
Definition at line 202 of file bcache.h.
Referenced by insert(), and print_statistics().
|
private |
Definition at line 180 of file bcache.h.
Referenced by expand_hash_table(), insert(), and print_statistics().
|
private |
Definition at line 191 of file bcache.h.
Referenced by expand_hash_table(), insert(), and print_statistics().
|
private |
Definition at line 188 of file bcache.h.
Referenced by insert(), memory_used(), print_statistics(), and ~bcache().
|
private |
Definition at line 190 of file bcache.h.
Referenced by insert(), and print_statistics().
|
private |
Definition at line 187 of file bcache.h.
Referenced by expand_hash_table(), insert(), and print_statistics().
|
private |
Definition at line 189 of file bcache.h.
Referenced by insert(), and print_statistics().