LLDB mainline
lldb_private::FormatCache Class Reference

#include <FormatCache.h>

Classes

struct  Entry

Public Member Functions

 FormatCache ()=default
template<typename ImplSP>
bool Get (llvm::StringRef type, ImplSP &format_impl_sp)
void Set (llvm::StringRef type, lldb::TypeFormatImplSP &format_sp)
void Set (llvm::StringRef type, lldb::TypeSummaryImplSP &summary_sp)
void Set (llvm::StringRef type, lldb::SyntheticChildrenSP &synthetic_sp)
void Clear ()
uint64_t GetCacheHits ()
uint64_t GetCacheMisses ()

Private Attributes

llvm::StringMap< Entry > m_entries
std::recursive_mutex m_mutex
uint64_t m_cache_hits = 0
uint64_t m_cache_misses = 0

Detailed Description

Definition at line 20 of file FormatCache.h.

Constructor & Destructor Documentation

◆ FormatCache()

lldb_private::FormatCache::FormatCache ( )
default

Member Function Documentation

◆ Clear()

void FormatCache::Clear ( )

Definition at line 112 of file FormatCache.cpp.

References m_entries, and m_mutex.

◆ Get()

template<typename ImplSP>
bool FormatCache::Get ( llvm::StringRef type,
ImplSP & format_impl_sp )

◆ GetCacheHits()

uint64_t lldb_private::FormatCache::GetCacheHits ( )
inline

Definition at line 65 of file FormatCache.h.

References m_cache_hits.

◆ GetCacheMisses()

uint64_t lldb_private::FormatCache::GetCacheMisses ( )
inline

Definition at line 67 of file FormatCache.h.

References m_cache_misses.

◆ Set() [1/3]

void lldb_private::FormatCache::Set ( llvm::StringRef type,
lldb::SyntheticChildrenSP & synthetic_sp )

◆ Set() [2/3]

void FormatCache::Set ( llvm::StringRef type,
lldb::TypeFormatImplSP & format_sp )

Definition at line 95 of file FormatCache.cpp.

References m_entries, and m_mutex.

◆ Set() [3/3]

void lldb_private::FormatCache::Set ( llvm::StringRef type,
lldb::TypeSummaryImplSP & summary_sp )

Member Data Documentation

◆ m_cache_hits

uint64_t lldb_private::FormatCache::m_cache_hits = 0
private

Definition at line 51 of file FormatCache.h.

Referenced by Get(), and GetCacheHits().

◆ m_cache_misses

uint64_t lldb_private::FormatCache::m_cache_misses = 0
private

Definition at line 52 of file FormatCache.h.

Referenced by Get(), and GetCacheMisses().

◆ m_entries

llvm::StringMap<Entry> lldb_private::FormatCache::m_entries
private

Definition at line 48 of file FormatCache.h.

Referenced by Clear(), Get(), and Set().

◆ m_mutex

std::recursive_mutex lldb_private::FormatCache::m_mutex
private

Definition at line 49 of file FormatCache.h.

Referenced by Clear(), Get(), and Set().


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