Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
TraceAllocator Class Reference

A custom unidirectional memory allocator so we can take traces from interrupts. More...

#include <cpu_profile.hxx>

Public Member Functions

void * alloc (unsigned size)
 

Public Attributes

unsigned limitReached {0}
 how many times did we run into the MAX_STRACE limit.
 
unsigned singleLenHack {0}
 How many times did we apply the backtrace hack to work around single-entry backtraces.
 

Private Attributes

unsigned buffer [TRACE_BUFFER_LENGTH_WORDS]
 Storage of the trace buffer.
 
unsigned endOffset {0}
 index into buffer[] to denote first free element.
 

Detailed Description

A custom unidirectional memory allocator so we can take traces from interrupts.

Definition at line 55 of file cpu_profile.hxx.

Member Function Documentation

◆ alloc()

void * TraceAllocator::alloc ( unsigned  size)
inline

Definition at line 58 of file cpu_profile.hxx.

Member Data Documentation

◆ buffer

unsigned TraceAllocator::buffer[TRACE_BUFFER_LENGTH_WORDS]
private

Storage of the trace buffer.

Definition at line 73 of file cpu_profile.hxx.

◆ endOffset

unsigned TraceAllocator::endOffset {0}
private

index into buffer[] to denote first free element.

Definition at line 75 of file cpu_profile.hxx.

◆ limitReached

unsigned TraceAllocator::limitReached {0}

how many times did we run into the MAX_STRACE limit.

Definition at line 79 of file cpu_profile.hxx.

◆ singleLenHack

unsigned TraceAllocator::singleLenHack {0}

How many times did we apply the backtrace hack to work around single-entry backtraces.

Definition at line 82 of file cpu_profile.hxx.


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