GDB (xrefs)
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
index_cache Class Reference

#include "index-cache.h"

Public Member Functions

void set_directory (std::string dir)
 
bool enabled () const
 
void enable ()
 
void disable ()
 
void store (dwarf2_per_objfile *per_objfile)
 
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
 

Detailed Description

Definition at line 37 of file index-cache.h.

Member Function Documentation

◆ disable()

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().

◆ enable()

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().

◆ enabled()

bool index_cache::enabled ( ) const
inline

◆ hit()

void index_cache::hit ( )
inline

Definition at line 73 of file index-cache.h.

References enabled(), and m_n_hits.

Referenced by dwarf2_initialize_objfile().

◆ lookup_gdb_index()

gdb::array_view< const gdb_byte > index_cache::lookup_gdb_index ( const bfd_build_id *  build_id,
std::unique_ptr< index_cache_resource > *  resource 
)

◆ make_index_filename()

std::string index_cache::make_index_filename ( const bfd_build_id *  build_id,
const char *  suffix 
) const
private

Definition at line 241 of file index-cache.c.

References build_id_to_string(), and m_dir.

◆ miss()

void index_cache::miss ( )
inline

Definition at line 84 of file index-cache.h.

References enabled(), and m_n_misses.

Referenced by dwarf2_initialize_objfile().

◆ n_hits()

unsigned int index_cache::n_hits ( ) const
inline

Definition at line 69 of file index-cache.h.

References m_n_hits.

Referenced by show_index_cache_stats_command().

◆ n_misses()

unsigned int index_cache::n_misses ( ) const
inline

Definition at line 80 of file index-cache.h.

References m_n_misses.

Referenced by show_index_cache_stats_command().

◆ set_directory()

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().

◆ store()

void index_cache::store ( dwarf2_per_objfile per_objfile)

Member Data Documentation

◆ m_dir

std::string index_cache::m_dir
private

Definition at line 99 of file index-cache.h.

Referenced by enable(), make_index_filename(), set_directory(), and store().

◆ m_enabled

bool index_cache::m_enabled = false
private

Definition at line 102 of file index-cache.h.

Referenced by disable(), enable(), and enabled().

◆ m_n_hits

unsigned int index_cache::m_n_hits = 0
private

Definition at line 105 of file index-cache.h.

Referenced by hit(), and n_hits().

◆ m_n_misses

unsigned int index_cache::m_n_misses = 0
private

Definition at line 106 of file index-cache.h.

Referenced by miss(), and n_misses().


The documentation for this class was generated from the following files: