LLDB  mainline
Public Member Functions | Protected Types | Protected Attributes | List of all members
lldb_private::MemoryCache Class Reference

#include <Memory.h>

Collaboration diagram for lldb_private::MemoryCache:
Collaboration graph
[legend]

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::DataBufferSP > BlockMap
 
typedef RangeArray< 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
 

Detailed Description

Definition at line 21 of file Memory.h.

Member Typedef Documentation

◆ AddrRange

Definition at line 49 of file Memory.h.

◆ BlockMap

typedef std::map<lldb::addr_t, lldb::DataBufferSP> lldb_private::MemoryCache::BlockMap
protected

Definition at line 47 of file Memory.h.

◆ InvalidRanges

Definition at line 48 of file Memory.h.

Constructor & Destructor Documentation

◆ MemoryCache()

MemoryCache::MemoryCache ( Process process)

Definition at line 23 of file Memory.cpp.

◆ ~MemoryCache()

MemoryCache::~MemoryCache ( )

Definition at line 29 of file Memory.cpp.

Member Function Documentation

◆ AddInvalidRange()

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

◆ AddL1CacheData() [1/2]

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

◆ AddL1CacheData() [2/2]

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

◆ Clear()

void MemoryCache::Clear ( bool  clear_invalid_ranges = false)

◆ Flush()

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

Definition at line 52 of file Memory.cpp.

References m_L1_cache, m_L2_cache, m_L2_cache_line_byte_size, m_mutex, and UINT64_MAX.

◆ GetMemoryCacheLineSize()

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

◆ Read()

size_t MemoryCache::Read ( lldb::addr_t  addr,
void *  dst,
size_t  dst_len,
Status error 
)

◆ 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(), 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(), 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(), and Read().

◆ 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(), GetMemoryCacheLineSize(), and Read().

◆ m_mutex

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

Definition at line 51 of file Memory.h.

Referenced by AddInvalidRange(), AddL1CacheData(), Clear(), Flush(), Read(), and RemoveInvalidRange().

◆ m_process

Process& lldb_private::MemoryCache::m_process
protected

Definition at line 58 of file Memory.h.

Referenced by Clear(), and Read().


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