LLDB mainline
lldb_private::MemoryCache Class Reference

#include <Memory.h>

Public Member Functions

 MemoryCache (Process &process)
 ~MemoryCache ()
void Clear (bool clear_invalid_ranges=false)
void Flush (lldb::addr_t addr, size_t size)
size_t Read (lldb::addr_t addr, void *dst, size_t dst_len, Status &error)
uint32_t GetMemoryCacheLineSize () const
void AddInvalidRange (lldb::addr_t base_addr, lldb::addr_t byte_size)
bool RemoveInvalidRange (lldb::addr_t base_addr, lldb::addr_t byte_size)
void AddL1CacheData (lldb::addr_t addr, const void *src, size_t src_len)
void AddL1CacheData (lldb::addr_t addr, const lldb::DataBufferSP &data_buffer_sp)

Protected Types

typedef std::map< lldb::addr_t, lldb::DataBufferSPBlockMap
typedef RangeVector< lldb::addr_t, lldb::addr_t, 4 > InvalidRanges
typedef Range< lldb::addr_t, lldb::addr_tAddrRange

Protected Attributes

std::recursive_mutex m_mutex
BlockMap m_L1_cache
BlockMap m_L2_cache
InvalidRanges m_invalid_ranges
Processm_process
uint32_t m_L2_cache_line_byte_size

Private Member Functions

 MemoryCache (const MemoryCache &)=delete
const MemoryCacheoperator= (const MemoryCache &)=delete
lldb::DataBufferSP GetL2CacheLine (lldb::addr_t addr, Status &error)

Detailed Description

Definition at line 21 of file Memory.h.

Member Typedef Documentation

◆ AddrRange

Definition at line 49 of file Memory.h.

◆ BlockMap

Definition at line 47 of file Memory.h.

◆ InvalidRanges

Definition at line 48 of file Memory.h.

Constructor & Destructor Documentation

◆ MemoryCache() [1/2]

MemoryCache::MemoryCache ( Process & process)

◆ ~MemoryCache()

MemoryCache::~MemoryCache ( )
default

References error().

◆ MemoryCache() [2/2]

lldb_private::MemoryCache::MemoryCache ( const MemoryCache & )
privatedelete

References MemoryCache().

Member Function Documentation

◆ AddInvalidRange()

void MemoryCache::AddInvalidRange ( lldb::addr_t base_addr,
lldb::addr_t byte_size )

Definition at line 101 of file Memory.cpp.

References m_invalid_ranges, and m_mutex.

◆ AddL1CacheData() [1/2]

void MemoryCache::AddL1CacheData ( lldb::addr_t addr,
const lldb::DataBufferSP & data_buffer_sp )

Definition at line 47 of file Memory.cpp.

References m_L1_cache, and m_mutex.

◆ AddL1CacheData() [2/2]

void MemoryCache::AddL1CacheData ( lldb::addr_t addr,
const void * src,
size_t src_len )

Definition at line 41 of file Memory.cpp.

References AddL1CacheData().

Referenced by AddL1CacheData(), and Read().

◆ Clear()

void MemoryCache::Clear ( bool clear_invalid_ranges = false)

◆ Flush()

void MemoryCache::Flush ( lldb::addr_t addr,
size_t size )

◆ GetL2CacheLine()

lldb::DataBufferSP MemoryCache::GetL2CacheLine ( lldb::addr_t addr,
Status & error )
private

Definition at line 126 of file Memory.cpp.

References error(), m_L2_cache, m_L2_cache_line_byte_size, m_mutex, and m_process.

Referenced by Read().

◆ GetMemoryCacheLineSize()

uint32_t lldb_private::MemoryCache::GetMemoryCacheLineSize ( ) const
inline

Definition at line 34 of file Memory.h.

References m_L2_cache_line_byte_size.

Referenced by MemoryCache().

◆ operator=()

const MemoryCache & lldb_private::MemoryCache::operator= ( const MemoryCache & )
privatedelete

References error(), and MemoryCache().

◆ Read()

◆ RemoveInvalidRange()

bool MemoryCache::RemoveInvalidRange ( lldb::addr_t base_addr,
lldb::addr_t byte_size )

Member Data Documentation

◆ m_invalid_ranges

InvalidRanges lldb_private::MemoryCache::m_invalid_ranges
protected

Definition at line 57 of file Memory.h.

Referenced by AddInvalidRange(), Clear(), MemoryCache(), Read(), and RemoveInvalidRange().

◆ m_L1_cache

BlockMap lldb_private::MemoryCache::m_L1_cache
protected

Definition at line 52 of file Memory.h.

Referenced by AddL1CacheData(), Clear(), Flush(), MemoryCache(), and Read().

◆ m_L2_cache

BlockMap lldb_private::MemoryCache::m_L2_cache
protected

Definition at line 55 of file Memory.h.

Referenced by Clear(), Flush(), GetL2CacheLine(), and MemoryCache().

◆ m_L2_cache_line_byte_size

uint32_t lldb_private::MemoryCache::m_L2_cache_line_byte_size
protected

Definition at line 59 of file Memory.h.

Referenced by Clear(), Flush(), GetL2CacheLine(), GetMemoryCacheLineSize(), MemoryCache(), and Read().

◆ m_mutex

std::recursive_mutex lldb_private::MemoryCache::m_mutex
protected

◆ m_process

Process& lldb_private::MemoryCache::m_process
protected

Definition at line 58 of file Memory.h.

Referenced by Clear(), GetL2CacheLine(), MemoryCache(), and Read().


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