GDB (xrefs)
|
#include "index-cache.h"
Public Member Functions | |
void | set_directory (std::string dir) |
bool | enabled () const |
void | enable () |
void | disable () |
void | store (dwarf2_per_bfd *per_bfd, const index_cache_store_context &) |
gdb::array_view< const gdb_byte > | lookup_gdb_index (const bfd_build_id *build_id, std::unique_ptr< index_cache_resource > *resource) |
unsigned int | n_hits () const |
void | hit () |
unsigned int | n_misses () const |
void | miss () |
Private Member Functions | |
std::string | make_index_filename (const bfd_build_id *build_id, const char *suffix) const |
Private Attributes | |
std::string | m_dir |
bool | m_enabled = false |
unsigned int | m_n_hits = 0 |
unsigned int | m_n_misses = 0 |
Friends | |
struct | index_cache_store_context |
Definition at line 60 of file index-cache.h.
void index_cache::disable | ( | ) |
Definition at line 82 of file index-cache.c.
References index_cache_debug, and m_enabled.
Referenced by set_index_cache_enabled_command().
void index_cache::enable | ( | ) |
Definition at line 72 of file index-cache.c.
References index_cache_debug, m_dir, and m_enabled.
Referenced by set_index_cache_enabled_command().
|
inline |
Definition at line 68 of file index-cache.h.
References m_enabled.
Referenced by gdb.printing.FlagEnumerationPrinter::__call__(), gdb.printing.SubPrettyPrinter::__init__(), gdb.types.TypePrinter::__init__(), gdb.xmethod.XMethod::__init__(), gdb.xmethod.XMethodMatcher::__init__(), gdb.printing.PrettyPrinter::__init__(), get_index_cache_enabled_command(), hit(), miss(), and show_index_cache_command().
|
inline |
Definition at line 98 of file index-cache.h.
References enabled(), and m_n_hits.
Referenced by dwarf2_initialize_objfile().
gdb::array_view< const gdb_byte > index_cache::lookup_gdb_index | ( | const bfd_build_id * | build_id, |
std::unique_ptr< index_cache_resource > * | resource ) |
Definition at line 248 of file index-cache.c.
Referenced by get_gdb_index_contents_from_cache(), and get_gdb_index_contents_from_cache_dwz().
|
private |
Definition at line 259 of file index-cache.c.
References build_id_to_string(), and m_dir.
|
inline |
Definition at line 109 of file index-cache.h.
References enabled(), and m_n_misses.
Referenced by dwarf2_initialize_objfile().
|
inline |
Definition at line 94 of file index-cache.h.
References m_n_hits.
Referenced by show_index_cache_stats_command().
|
inline |
Definition at line 105 of file index-cache.h.
References m_n_misses.
Referenced by show_index_cache_stats_command().
void index_cache::set_directory | ( | std::string | dir | ) |
Definition at line 60 of file index-cache.c.
References index_cache_debug, and m_dir.
Referenced by set_index_cache_directory_command().
void index_cache::store | ( | dwarf2_per_bfd * | per_bfd, |
const index_cache_store_context & | ctx ) |
Definition at line 156 of file index-cache.c.
References index_cache_store_context::build_id_str, index_cache_store_context::dwz_build_id_str, GDB_INDEX, index_cache_debug, m_dir, index_cache_store_context::m_enabled, dwarf2_per_bfd::obfd, and write_dwarf_index().
Referenced by cooked_index::maybe_write_index().
|
friend |
Definition at line 62 of file index-cache.h.
|
private |
Definition at line 124 of file index-cache.h.
Referenced by enable(), index_cache_store_context::index_cache_store_context(), make_index_filename(), set_directory(), and store().
|
private |
Definition at line 127 of file index-cache.h.
|
private |
Definition at line 130 of file index-cache.h.
|
private |
Definition at line 131 of file index-cache.h.
Referenced by miss(), and n_misses().