OpenCSD - CoreSight Trace Decode Library 1.5.5
|
#include <trc_mem_acc_cache.h>
Public Member Functions | |
TrcMemAccCache () | |
~TrcMemAccCache () | |
ocsd_err_t | enableCaching (bool bEnable) |
ocsd_err_t | setCacheSizes (const uint16_t page_size, const int nr_pages, const bool err_on_limit=false) |
const bool | enabled () const |
const bool | enabled_for_size (const uint32_t reqSize) const |
void | invalidateAll () |
void | invalidateByTraceID (int8_t trcID) |
void | clearPage (cache_block_t *page) |
ocsd_err_t | readBytesFromCache (TrcMemAccessorBase *p_accessor, const ocsd_vaddr_t address, const ocsd_mem_space_acc_t mem_space, const uint8_t trcID, uint32_t *numBytes, uint8_t *byteBuffer) |
void | setErrorLog (ITraceErrorLog *log) |
void | logAndClearCounts () |
Static Public Member Functions | |
static void | getenvMemaccCacheSizes (bool &enable, int &page_size, int &num_pages) |
class TrcMemAccCache - cache small amounts of data from accessors to speed up decode.
Reduce the need to read files / make callbacks into clients when walking memory images.
Caching is done on a per Core/Trace ID basis - all caches from that ID are invalidated when a context switch appears on the core. This means that we do not account for memory spaces in the cache pages as these only change via a context switch.
Memory space is used on cache miss if reading data from the underlying accessor (file / callback).
Definition at line 78 of file trc_mem_acc_cache.h.
|
inline |
Definition at line 139 of file trc_mem_acc_cache.h.
|
inline |
Definition at line 147 of file trc_mem_acc_cache.h.
|
inline |
Definition at line 190 of file trc_mem_acc_cache.h.
ocsd_err_t TrcMemAccCache::enableCaching | ( | bool | bEnable | ) |
|
inline |
Definition at line 89 of file trc_mem_acc_cache.h.
|
inline |
Definition at line 90 of file trc_mem_acc_cache.h.
|
static |
void TrcMemAccCache::invalidateAll | ( | ) |
void TrcMemAccCache::invalidateByTraceID | ( | int8_t | trcID | ) |
void TrcMemAccCache::logAndClearCounts | ( | ) |
ocsd_err_t TrcMemAccCache::readBytesFromCache | ( | TrcMemAccessorBase * | p_accessor, |
const ocsd_vaddr_t | address, | ||
const ocsd_mem_space_acc_t | mem_space, | ||
const uint8_t | trcID, | ||
uint32_t * | numBytes, | ||
uint8_t * | byteBuffer ) |
read bytes from cache if possible - load new page if needed from underlying accessor, bail out if data not available
ocsd_err_t TrcMemAccCache::setCacheSizes | ( | const uint16_t | page_size, |
const int | nr_pages, | ||
const bool | err_on_limit = false ) |
void TrcMemAccCache::setErrorLog | ( | ITraceErrorLog * | log | ) |