Loading...
Searching...
No Matches
OpenCSD Library : Generic Trace Elements

Generic trace elements output by the PE trace decode and SW stim decode stages. More...

## Classes

class | OcsdTraceElement
| Generic trace element class. More...
struct | _trace_event_t
struct | _trace_marker_payload_t
struct | _sw_ite_t
struct | _ocsd_generic_trace_elem

## Typedefs

typedef enum _ocsd_gen_trc_elem_t | ocsd_gen_trc_elem_t
typedef enum _trace_on_reason_t | trace_on_reason_t
typedef struct _trace_event_t | trace_event_t
typedef enum _unsync_info_t | unsync_info_t
typedef enum _trace_sync_marker_t | trace_sync_marker_t
typedef struct _trace_marker_payload_t | trace_marker_payload_t
typedef enum _memtrans_t | trace_memtrans_t
typedef struct _sw_ite_t | trace_sw_ite_t
typedef struct _ocsd_generic_trace_elem | ocsd_generic_trace_elem
typedef enum _event_t | event_t

## Enumerations

enum

_ocsd_gen_trc_elem_t {
OCSD_GEN_TRC_ELEM_UNKNOWN = 0 , OCSD_GEN_TRC_ELEM_NO_SYNC , OCSD_GEN_TRC_ELEM_TRACE_ON , OCSD_GEN_TRC_ELEM_EO_TRACE ,
OCSD_GEN_TRC_ELEM_PE_CONTEXT , OCSD_GEN_TRC_ELEM_INSTR_RANGE , OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH , OCSD_GEN_TRC_ELEM_ADDR_NACC ,
OCSD_GEN_TRC_ELEM_ADDR_UNKNOWN , OCSD_GEN_TRC_ELEM_EXCEPTION , OCSD_GEN_TRC_ELEM_EXCEPTION_RET , OCSD_GEN_TRC_ELEM_TIMESTAMP ,
OCSD_GEN_TRC_ELEM_CYCLE_COUNT , OCSD_GEN_TRC_ELEM_EVENT , OCSD_GEN_TRC_ELEM_SWTRACE , OCSD_GEN_TRC_ELEM_SYNC_MARKER ,
OCSD_GEN_TRC_ELEM_MEMTRANS , OCSD_GEN_TRC_ELEM_INSTRUMENTATION , OCSD_GEN_TRC_ELEM_CUSTOM
}

enum | _trace_on_reason_t { TRACE_ON_NORMAL = 0 , TRACE_ON_OVERFLOW , TRACE_ON_EX_DEBUG }
enum | _unsync_info_t { UNSYNC_UNKNOWN , UNSYNC_INIT_DECODER , UNSYNC_RESET_DECODER , UNSYNC_OVERFLOW , UNSYNC_DISCARD , UNSYNC_BAD_PACKET , UNSYNC_BAD_IMAGE , UNSYNC_EOT }
enum | _trace_sync_marker_t { ELEM_MARKER_TS }
enum | _memtrans_t { OCSD_MEM_TRANS_TRACE_INIT , OCSD_MEM_TRANS_START , OCSD_MEM_TRANS_COMMIT , OCSD_MEM_TRANS_FAIL }
enum | _event_t { EVENT_UNKNOWN = 0 , EVENT_TRIGGER , EVENT_NUMBERED }

## Functions

| OcsdTraceElement::OcsdTraceElement (ocsd_gen_trc_elem_t type)
| OcsdTraceElement::OcsdTraceElement ()
void | OcsdTraceElement::setCycleCount (const uint32_t cycleCount)
void | OcsdTraceElement::setEvent (const event_t ev_type, const uint16_t number)
void | OcsdTraceElement::setAddrRange (const ocsd_vaddr_t st_addr, const ocsd_vaddr_t en_addr, const int num_instr=1)
void | OcsdTraceElement::setLastInstrInfo (const bool exec, const ocsd_instr_type last_i_type, const ocsd_instr_subtype last_i_subtype, const uint8_t size)
void | OcsdTraceElement::setType (const ocsd_gen_trc_elem_t type)
| set type and init flags
void | OcsdTraceElement::updateType (const ocsd_gen_trc_elem_t type)
| change type only - no init
void | OcsdTraceElement::init ()
void | OcsdTraceElement::setTraceOnReason (const trace_on_reason_t reason)
void | OcsdTraceElement::setUnSyncEOTReason (const unsync_info_t reason)
void | OcsdTraceElement::setISA (const ocsd_isa isa_update)
void | OcsdTraceElement::setTS (const uint64_t ts, const bool freqChange=false)
void | OcsdTraceElement::setExtendedDataPtr (const void *data_ptr)
void | OcsdTraceElement::setSyncMarker (const trace_marker_payload_t &marker)
void | OcsdTraceElement::copyPersistentData (const OcsdTraceElement &src)

## Detailed Description

Generic trace elements output by the PE trace decode and SW stim decode stages.

## Typedef Documentation

## event_t

typedef enum _event_t event_t

## ocsd_gen_trc_elem_t

typedef enum _ocsd_gen_trc_elem_t ocsd_gen_trc_elem_t

Enum for generic element types

## ocsd_generic_trace_elem

typedef struct _ocsd_generic_trace_elem ocsd_generic_trace_elem

## trace_event_t

typedef struct _trace_event_t trace_event_t

## trace_marker_payload_t

typedef struct _trace_marker_payload_t trace_marker_payload_t

## trace_memtrans_t

typedef enum _memtrans_t trace_memtrans_t

## trace_on_reason_t

typedef enum _trace_on_reason_t trace_on_reason_t

## trace_sw_ite_t

typedef struct _sw_ite_t trace_sw_ite_t

## trace_sync_marker_t

typedef enum _trace_sync_marker_t trace_sync_marker_t

## unsync_info_t

typedef enum _unsync_info_t unsync_info_t

## Enumeration Type Documentation

## _event_t

enum _event_t

Enumerator
EVENT_UNKNOWN |
EVENT_TRIGGER |
EVENT_NUMBERED |

Definition at line 161 of file trc_gen_elem_types.h.

## _memtrans_t

enum _memtrans_t

Enumerator
OCSD_MEM_TRANS_TRACE_INIT | Trace started while PE in transactional state
OCSD_MEM_TRANS_START | Trace after this packet is part of a transactional memory sequence
OCSD_MEM_TRANS_COMMIT | Transactional memory sequence valid.
OCSD_MEM_TRANS_FAIL | Transactional memory sequence failed - operations since start of transaction have been unwound.

Definition at line 102 of file trc_gen_elem_types.h.

## _ocsd_gen_trc_elem_t

enum _ocsd_gen_trc_elem_t

Enum for generic element types

Enumerator
OCSD_GEN_TRC_ELEM_UNKNOWN | Unknown trace element - default value or indicate error in stream to client
OCSD_GEN_TRC_ELEM_NO_SYNC | Waiting for sync - either at start of decode, or after overflow / bad packet
OCSD_GEN_TRC_ELEM_TRACE_ON | Start of trace - beginning of elements or restart after discontinuity (overflow, trace filtering).
OCSD_GEN_TRC_ELEM_EO_TRACE | end of the available trace in the buffer.
OCSD_GEN_TRC_ELEM_PE_CONTEXT | PE status update / change (arch, ctxtid, vmid etc).
OCSD_GEN_TRC_ELEM_INSTR_RANGE | traced N consecutive instructions from addr (no intervening events or data elements), may have data assoc key
OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH | traced N instructions in a range, but incomplete information as to program execution path from start to end of range
OCSD_GEN_TRC_ELEM_ADDR_NACC | tracing in inaccessible memory area
OCSD_GEN_TRC_ELEM_ADDR_UNKNOWN | address currently unknown - need address packet update
OCSD_GEN_TRC_ELEM_EXCEPTION | exception - start address may be exception target, end address may be preferred ret addr.
OCSD_GEN_TRC_ELEM_EXCEPTION_RET | expection return
OCSD_GEN_TRC_ELEM_TIMESTAMP | Timestamp - preceding elements happeded before this time.
OCSD_GEN_TRC_ELEM_CYCLE_COUNT | Cycle count - cycles since last cycle count value - associated with a preceding instruction range.
OCSD_GEN_TRC_ELEM_EVENT | Event - trigger or numbered event
OCSD_GEN_TRC_ELEM_SWTRACE | Software trace packet - may contain data payload. STM / ITM hardware trace with channel protocol
OCSD_GEN_TRC_ELEM_SYNC_MARKER | Synchronisation marker - marks position in stream of an element that is output later.
OCSD_GEN_TRC_ELEM_MEMTRANS | Trace indication of transactional memory operations.
OCSD_GEN_TRC_ELEM_INSTRUMENTATION | PE instrumentation trace - PE generated SW trace, application dependent protocol.
OCSD_GEN_TRC_ELEM_CUSTOM | Fully custom packet type - used by none-ARM architecture decoders

Definition at line 47 of file trc_gen_elem_types.h.

## _trace_on_reason_t

enum _trace_on_reason_t

Enumerator
TRACE_ON_NORMAL | Trace on at start of trace or filtering discontinuity
TRACE_ON_OVERFLOW | Trace on due to prior trace overflow discontinuity
TRACE_ON_EX_DEBUG | Trace restarted due to debug exit

Definition at line 71 of file trc_gen_elem_types.h.

## _trace_sync_marker_t

enum _trace_sync_marker_t

Enumerator
ELEM_MARKER_TS | Marker for timestamp element

Definition at line 93 of file trc_gen_elem_types.h.

## _unsync_info_t

enum _unsync_info_t

Enumerator
UNSYNC_UNKNOWN | unknown /undefined
UNSYNC_INIT_DECODER | decoder intialisation - start of trace.
UNSYNC_RESET_DECODER | decoder reset.
UNSYNC_OVERFLOW | overflow packet - need to re-sync / end of trace after overflow.
UNSYNC_DISCARD | specl trace discard - need to re-sync.
UNSYNC_BAD_PACKET | bad packet at input - resync to restart.
UNSYNC_BAD_IMAGE | bad program image - resync to restart.
UNSYNC_EOT | end of trace - no additional info

Definition at line 82 of file trc_gen_elem_types.h.

## Function Documentation

## copyPersistentData()

void OcsdTraceElement::copyPersistentData | ( | const OcsdTraceElement & | src | ) |

inline

Definition at line 220 of file trc_gen_elem.h.

## init()

void OcsdTraceElement::init | ( |  | ) |

inline

Definition at line 159 of file trc_gen_elem.h.

## OcsdTraceElement() [1/2]

OcsdTraceElement::OcsdTraceElement | ( |  | ) |

inline

Definition at line 114 of file trc_gen_elem.h.

## OcsdTraceElement() [2/2]

OcsdTraceElement::OcsdTraceElement | ( | ocsd_gen_trc_elem_t | type | ) |

inline

Definition at line 109 of file trc_gen_elem.h.

## setAddrRange()

void OcsdTraceElement::setAddrRange | ( | const ocsd_vaddr_t | st_addr,
|  | const ocsd_vaddr_t | en_addr,
|  | const int | num_instr = `1`
| ) |  |

inline

Definition at line 131 of file trc_gen_elem.h.

## setCycleCount()

void OcsdTraceElement::setCycleCount | ( | const uint32_t | cycleCount | ) |

inline

Definition at line 119 of file trc_gen_elem.h.

## setEvent()

void OcsdTraceElement::setEvent | ( | const event_t | ev_type,
|  | const uint16_t | number
| ) |  |

inline

Definition at line 125 of file trc_gen_elem.h.

## setExtendedDataPtr()

void OcsdTraceElement::setExtendedDataPtr | ( | const void * | data_ptr | ) |

inline

Definition at line 208 of file trc_gen_elem.h.

## setISA()

void OcsdTraceElement::setISA | ( | const ocsd_isa | isa_update | ) |

inline

Definition at line 194 of file trc_gen_elem.h.

## setLastInstrInfo()

void OcsdTraceElement::setLastInstrInfo | ( | const bool | exec,
|  | const ocsd_instr_type | last_i_type,
|  | const ocsd_instr_subtype | last_i_subtype,
|  | const uint8_t | size
| ) |  |

inline

Definition at line 138 of file trc_gen_elem.h.

## setSyncMarker()

void OcsdTraceElement::setSyncMarker | ( | const trace_marker_payload_t & | marker | ) |

inline

Definition at line 214 of file trc_gen_elem.h.

## setTraceOnReason()

void OcsdTraceElement::setTraceOnReason | ( | const trace_on_reason_t | reason | ) |

inline

Definition at line 184 of file trc_gen_elem.h.

## setTS()

void OcsdTraceElement::setTS | ( | const uint64_t | ts,
|  | const bool | freqChange = `false`
| ) |  |

inline

Definition at line 201 of file trc_gen_elem.h.

## setType()

void OcsdTraceElement::setType | ( | const ocsd_gen_trc_elem_t | type | ) |

inline

set type and init flags

Definition at line 146 of file trc_gen_elem.h.

## setUnSyncEOTReason()

void OcsdTraceElement::setUnSyncEOTReason | ( | const unsync_info_t | reason | ) |

inline

Definition at line 189 of file trc_gen_elem.h.

## updateType()

void OcsdTraceElement::updateType | ( | const ocsd_gen_trc_elem_t | type | ) |

inline

change type only - no init

Definition at line 154 of file trc_gen_elem.h.