DriveWorks SDK Reference
5.16.65 Release
For Test and Development only

dw::trace Namespace Reference

Data Structures

struct  dwtEvent_t
 
class  DWTraceChannel
 Trace channel contains traces from particular module. More...
 
struct  TracerConfig
 DWTrace initialisation and configuration structure. More...
 

Typedefs

using avtFlushCb_t = void(*)(TraceBuf *&, void *)
 
template<typename typeT , size_t C>
using dwtBufferQueue_t = dw::core::RingBuffer< typeT, C >
 
using dwtFixedString_t = dw::core::FixedString< DW_TRACE_MAX_TAG_SIZE >
 
template<typename typeKey , typename typeValue >
using dwtHashMap_t = dw::core::StaticHashMap< typeKey, typeValue, 384 >
 
using dwtStringFilepath_t = dw::core::FixedString< 384 >
 
using dwtStringIPAddr_t = dw::core::FixedString< 16 >
 
using dwtTime_t = uint64_t
 
template<typename typeT , size_t C = 0>
using dwtVectorFixed_t = dw::core::VectorFixed< typeT, C >
 
using sv = dw::core::StringView
 
using TraceBuf = dwtVectorFixed_t< DWTraceChannel >
 
using TraceBufPtr = std::unique_ptr< TraceBuf >
 

Enumerations

enum class  Backend {
  FILEBASED = 0 ,
  NETWORK ,
  IBACKEND ,
  NVTX = IBACKEND ,
  FTRACE ,
  MAX_BACKEND
}
 
enum class  Level {
  NONE = 0 ,
  LEVEL_10 = 10 ,
  LEVEL_20 = 20 ,
  LEVEL_30 = 30 ,
  LEVEL_50 = 50 ,
  LEVEL_70 = 70 ,
  LEVEL_100 = 100
}
 Tracing can be controlled through tracing levels. More...
 
enum class  TraceChannel {
  DEFAULT = 0 ,
  LATENCY ,
  CAMERA ,
  PIPELINE ,
  COMM ,
  RENDER ,
  RADAR ,
  STARTUP ,
  DATA_LATENCY ,
  ROADCAST ,
  VDC ,
  DW ,
  PROFILING ,
  SHUTDOWN ,
  MAX_CHANNEL
}
 DWTrace channels are used for capturing similar traces in one place. More...
 
enum class  TraceHeaderType {
  NONE = 0 ,
  MARKER ,
  RANGE_BEGIN ,
  RANGE_END ,
  ASYNC_RANGE_BEGIN ,
  ASYNC_RANGE_END ,
  CUDA_BEGIN ,
  CUDA_END ,
  SCOPE
}
 

Functions

uint32_t getPreferredBlockingFlags ()
 
Level getTraceLevel (const sv &level)
 
bool isBlockingSyncPreferred ()
 

Variables

static constexpr uint64_t DW_TRACE_CHAN_ENABLE_ALL {(0xFFFFFFFF)}
 
static const auto DW_TRACE_CHAN_MASK = [](uint32_t const idx) { return (1U << idx); }
 
static constexpr uint64_t DW_TRACE_CHAN_MASK_NONE {0}
 
static constexpr uint32_t DW_TRACE_FLUSH_INTERVAL_DEFAULT {5500}
 Default number of channel traces before flush. More...
 
static constexpr Level DW_TRACE_LEVEL_DEFAULT {Level::LEVEL_30}
 If not sure about tracing level at the time of using DWTrace API, then use default trace level. More...
 
static constexpr size_t DW_TRACE_MAX_CUDA_EVENTS {425}
 Cuda events are required for measuring execution time on GPU/DLA. More...
 
static constexpr uint32_t DW_TRACE_MAX_FILE_SIZE_MB {8192}
 Default Max file size of generate DWTrace in MBs. More...
 
static constexpr uint32_t DW_TRACE_MAX_NUM_EVENTS_PER_CHAN {(20 * 1024)}
 
static constexpr uint32_t DW_TRACE_MAX_PAYLOAD_SIZE {64U}
 
static constexpr uint32_t DW_TRACE_MAX_TAG_SIZE {256U}
 
static constexpr char8_t const * DW_TRACE_STR_TAG {"[TRACE]: "}
 
static constexpr uint32_t DW_TRACE_SUCCESS {0U}
 
static constexpr dwtTime_t DWTRACE_TIMEOUT_INFINITE {std::numeric_limits<dwtTime_t>::max()}
 
static constexpr size_t NUM_LEVELS {static_cast<size_t>(Level::LEVEL_100) + 1UL}
 

Typedef Documentation

◆ avtFlushCb_t

using dw::trace::avtFlushCb_t = typedef void (*)(TraceBuf*&, void*)

Definition at line 190 of file TraceTypes.hpp.

◆ dwtBufferQueue_t

template<typename typeT , size_t C>
using dw::trace::dwtBufferQueue_t = typedef dw::core::RingBuffer<typeT, C>

Definition at line 62 of file TraceTypes.hpp.

◆ dwtFixedString_t

using dw::trace::dwtFixedString_t = typedef dw::core::FixedString<DW_TRACE_MAX_TAG_SIZE>

Definition at line 54 of file TraceTypes.hpp.

◆ dwtHashMap_t

template<typename typeKey , typename typeValue >
using dw::trace::dwtHashMap_t = typedef dw::core::StaticHashMap<typeKey, typeValue, 384>

Definition at line 58 of file TraceTypes.hpp.

◆ dwtStringFilepath_t

using dw::trace::dwtStringFilepath_t = typedef dw::core::FixedString<384>

Definition at line 55 of file TraceTypes.hpp.

◆ dwtStringIPAddr_t

using dw::trace::dwtStringIPAddr_t = typedef dw::core::FixedString<16>

Definition at line 56 of file TraceTypes.hpp.

◆ dwtTime_t

using dw::trace::dwtTime_t = typedef uint64_t

Definition at line 53 of file TraceTypes.hpp.

◆ dwtVectorFixed_t

template<typename typeT , size_t C = 0>
using dw::trace::dwtVectorFixed_t = typedef dw::core::VectorFixed<typeT, C>

Definition at line 60 of file TraceTypes.hpp.

◆ sv

using dw::trace::sv = typedef dw::core::StringView

Definition at line 64 of file TraceTypes.hpp.

◆ TraceBuf

Definition at line 188 of file TraceTypes.hpp.

◆ TraceBufPtr

using dw::trace::TraceBufPtr = typedef std::unique_ptr<TraceBuf>

Definition at line 189 of file TraceTypes.hpp.

Enumeration Type Documentation

◆ Backend

enum class dw::trace::Backend
strong
Enumerator
FILEBASED 
NETWORK 
IBACKEND 
NVTX 
FTRACE 
MAX_BACKEND 

Definition at line 126 of file TraceTypes.hpp.

◆ Level

enum class dw::trace::Level
strong

Tracing can be controlled through tracing levels.

Important/higher priority traces should have lower tracing levels. Verbose/lower priority traces should have higher tracing levels. For example, if Trace API is called with Level::LEVEL_10 then it is considered to be higher priority trace.

Enumerator
NONE 
LEVEL_10 
LEVEL_20 
LEVEL_30 
LEVEL_50 
LEVEL_70 
LEVEL_100 

Definition at line 113 of file TraceTypes.hpp.

◆ TraceChannel

enum class dw::trace::TraceChannel
strong

DWTrace channels are used for capturing similar traces in one place.

Channels plays important role in dwtrace post processing scripts. Following channels have been created based on RR application. Channels can be renamed, added or removed from DWTrace, but similar changes need to be made in dwtrace post processing scripts.

Enumerator
DEFAULT 
LATENCY 
CAMERA 
PIPELINE 
COMM 
RENDER 
RADAR 
STARTUP 
DATA_LATENCY 
ROADCAST 
VDC 
DW 
PROFILING 
SHUTDOWN 
MAX_CHANNEL 

Definition at line 87 of file TraceTypes.hpp.

◆ TraceHeaderType

enum class dw::trace::TraceHeaderType
strong
Enumerator
NONE 
MARKER 
RANGE_BEGIN 
RANGE_END 
ASYNC_RANGE_BEGIN 
ASYNC_RANGE_END 
CUDA_BEGIN 
CUDA_END 
SCOPE 

Definition at line 66 of file TraceTypes.hpp.

Function Documentation

◆ getPreferredBlockingFlags()

uint32_t dw::trace::getPreferredBlockingFlags ( )
inline

Definition at line 493 of file Trace.hpp.

References isBlockingSyncPreferred().

◆ getTraceLevel()

Level dw::trace::getTraceLevel ( const sv level)

◆ isBlockingSyncPreferred()

bool dw::trace::isBlockingSyncPreferred ( )
inline

Definition at line 484 of file Trace.hpp.

Referenced by getPreferredBlockingFlags().

Variable Documentation

◆ DW_TRACE_CHAN_ENABLE_ALL

constexpr uint64_t dw::trace::DW_TRACE_CHAN_ENABLE_ALL {(0xFFFFFFFF)}
staticconstexpr

Definition at line 43 of file Trace.hpp.

◆ DW_TRACE_CHAN_MASK

const auto dw::trace::DW_TRACE_CHAN_MASK = [](uint32_t const idx) { return (1U << idx); }
static

Definition at line 45 of file Trace.hpp.

◆ DW_TRACE_CHAN_MASK_NONE

constexpr uint64_t dw::trace::DW_TRACE_CHAN_MASK_NONE {0}
staticconstexpr

Definition at line 42 of file Trace.hpp.

◆ DW_TRACE_FLUSH_INTERVAL_DEFAULT

constexpr uint32_t dw::trace::DW_TRACE_FLUSH_INTERVAL_DEFAULT {5500}
staticconstexpr

Default number of channel traces before flush.

Definition at line 66 of file Trace.hpp.

◆ DW_TRACE_LEVEL_DEFAULT

constexpr Level dw::trace::DW_TRACE_LEVEL_DEFAULT {Level::LEVEL_30}
staticconstexpr

If not sure about tracing level at the time of using DWTrace API, then use default trace level.

Definition at line 61 of file Trace.hpp.

◆ DW_TRACE_MAX_CUDA_EVENTS

constexpr size_t dw::trace::DW_TRACE_MAX_CUDA_EVENTS {425}
staticconstexpr

Cuda events are required for measuring execution time on GPU/DLA.

This field allows DWTrace to create specified number of cudaEvents at initialisation time. Please change the value if number of tracing API's which are using cudaEvents are increased.

Definition at line 54 of file Trace.hpp.

◆ DW_TRACE_MAX_FILE_SIZE_MB

constexpr uint32_t dw::trace::DW_TRACE_MAX_FILE_SIZE_MB {8192}
staticconstexpr

Default Max file size of generate DWTrace in MBs.

After this file limit reached log rotation will start.

Definition at line 72 of file Trace.hpp.

◆ DW_TRACE_MAX_NUM_EVENTS_PER_CHAN

constexpr uint32_t dw::trace::DW_TRACE_MAX_NUM_EVENTS_PER_CHAN {(20 * 1024)}
staticconstexpr

Definition at line 48 of file TraceTypes.hpp.

◆ DW_TRACE_MAX_PAYLOAD_SIZE

constexpr uint32_t dw::trace::DW_TRACE_MAX_PAYLOAD_SIZE {64U}
staticconstexpr

Definition at line 50 of file TraceTypes.hpp.

◆ DW_TRACE_MAX_TAG_SIZE

constexpr uint32_t dw::trace::DW_TRACE_MAX_TAG_SIZE {256U}
staticconstexpr

Definition at line 49 of file TraceTypes.hpp.

◆ DW_TRACE_STR_TAG

constexpr char8_t const* dw::trace::DW_TRACE_STR_TAG {"[TRACE]: "}
staticconstexpr

Definition at line 41 of file Trace.hpp.

◆ DW_TRACE_SUCCESS

constexpr uint32_t dw::trace::DW_TRACE_SUCCESS {0U}
staticconstexpr

Definition at line 51 of file TraceTypes.hpp.

◆ DWTRACE_TIMEOUT_INFINITE

constexpr dwtTime_t dw::trace::DWTRACE_TIMEOUT_INFINITE {std::numeric_limits<dwtTime_t>::max()}
staticconstexpr

Definition at line 63 of file TraceTypes.hpp.

◆ NUM_LEVELS

constexpr size_t dw::trace::NUM_LEVELS {static_cast<size_t>(Level::LEVEL_100) + 1UL}
staticconstexpr

Definition at line 124 of file TraceTypes.hpp.