LLVM  5.0.0
Public Types | Public Attributes | List of all members
FDRState Struct Reference

When reading from a Flight Data Recorder mode log, metadata records are sparse compared to packed function records, so we must maintain state as we read through the sequence of entries. More...

Collaboration diagram for FDRState:
[legend]

Public Types

enum  Token {
  Token::NEW_BUFFER_RECORD_OR_EOF, Token::WALLCLOCK_RECORD, Token::NEW_CPU_ID_RECORD, Token::FUNCTION_SEQUENCE,
  Token::SCAN_TO_END_OF_THREAD_BUF, Token::CUSTOM_EVENT_DATA
}
 Encode some of the state transitions for the FDR log reader as explicit checks. More...
 

Public Attributes

uint16_t CPUId
 
uint16_t ThreadId
 
uint64_t BaseTSC
 
Token Expects
 
uint64_t CurrentBufferSize
 
uint64_t CurrentBufferConsumed
 

Detailed Description

When reading from a Flight Data Recorder mode log, metadata records are sparse compared to packed function records, so we must maintain state as we read through the sequence of entries.

This allows the reader to denormalize the CPUId and Thread Id onto each Function Record and transform delta encoded TSC values into absolute encodings on each record.

Definition at line 114 of file Trace.cpp.

Member Enumeration Documentation

enum FDRState::Token
strong

Encode some of the state transitions for the FDR log reader as explicit checks.

These are expectations for the next Record in the stream.

Enumerator
NEW_BUFFER_RECORD_OR_EOF 
WALLCLOCK_RECORD 
NEW_CPU_ID_RECORD 
FUNCTION_SEQUENCE 
SCAN_TO_END_OF_THREAD_BUF 
CUSTOM_EVENT_DATA 

Definition at line 121 of file Trace.cpp.

Member Data Documentation

uint64_t FDRState::BaseTSC
uint16_t FDRState::CPUId

Definition at line 115 of file Trace.cpp.

Referenced by processFDRFunctionRecord(), and processFDRNewCPUIdRecord().

uint64_t FDRState::CurrentBufferConsumed

Definition at line 134 of file Trace.cpp.

uint64_t FDRState::CurrentBufferSize

Definition at line 133 of file Trace.cpp.

Token FDRState::Expects
uint16_t FDRState::ThreadId

Definition at line 116 of file Trace.cpp.

Referenced by processFDRFunctionRecord(), and processFDRNewBufferRecord().


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