31#ifndef DWTRACE_CORE_TRACE_TYPES_HPP_
32#define DWTRACE_CORE_TRACE_TYPES_HPP_
38#include <cuda_runtime_api.h>
39#include <dwshared/dwfoundation/dw/core/container/VectorFixed.hpp>
40#include <dwshared/dwfoundation/dw/core/container/HashContainer.hpp>
41#include <dwshared/dwfoundation/dw/core/container/BaseString.hpp>
42#include <dwshared/dwfoundation/dw/core/container/RingBuffer.hpp>
57template <
typename typeKey,
typename typeValue>
58using dwtHashMap_t = dw::core::StaticHashMap<typeKey, typeValue, 384>;
59template <
typename typeT,
size_t C = 0>
61template <
typename typeT,
size_t C>
64using sv = dw::core::StringView;
158 dwtFixedString_t const& evtPayload,
const char*
const evtFunc,
const char*
const evtDeviceName,
159 size_t const evtDeviceMemFree,
const int32_t evtHostMemUsed, uint64_t
const evtNvMapMemUsed, uint64_t
const evtReadBytes, uint64_t
const evtWriteBytes, uint64_t
const evtIOWaitTime,
dwtTime_t const evtStamp)
160 :
level(evtLevel),
channel(evtChannel),
type(evtType),
tag(evtTag.c_str()),
duration(evtDuration),
payload(evtPayload.c_str()),
func(evtFunc),
deviceName(evtDeviceName),
deviceMemFree(evtDeviceMemFree),
hostMemUsed(evtHostMemUsed),
nvMapMemUsed(evtNvMapMemUsed),
readBytes(evtReadBytes),
writeBytes(evtWriteBytes),
ioWaitTime(evtIOWaitTime),
stamp(evtStamp)
Trace channel contains traces from particular module.
void pushEvent(dwtEvent_t &&event)
DWTraceChannel(DWTraceChannel &&other)
DWTraceChannel(uint32_t const id, uint32_t const capacity)
dwtVectorFixed_t< dwtEvent_t > const & events()
DWTraceChannel & operator=(const DWTraceChannel &other)=default
float float32_t
Specifies POD types.
Level
Tracing can be controlled through tracing levels.
TraceChannel
DWTrace channels are used for capturing similar traces in one place.
dw::core::VectorFixed< typeT, C > dwtVectorFixed_t
dw::core::RingBuffer< typeT, C > dwtBufferQueue_t
static constexpr size_t NUM_LEVELS
static constexpr uint32_t DW_TRACE_MAX_PAYLOAD_SIZE
static constexpr uint32_t DW_TRACE_MAX_NUM_EVENTS_PER_CHAN
dw::core::FixedString< DW_TRACE_MAX_TAG_SIZE > dwtFixedString_t
dw::core::FixedString< 384 > dwtStringFilepath_t
dwtVectorFixed_t< DWTraceChannel > TraceBuf
Level getTraceLevel(const sv &level)
static constexpr uint32_t DW_TRACE_SUCCESS
dw::core::FixedString< 16 > dwtStringIPAddr_t
dw::core::StaticHashMap< typeKey, typeValue, 384 > dwtHashMap_t
std::unique_ptr< TraceBuf > TraceBufPtr
static constexpr uint32_t DW_TRACE_MAX_TAG_SIZE
void(*)(TraceBuf *&, void *) avtFlushCb_t
static constexpr dwtTime_t DWTRACE_TIMEOUT_INFINITE
uint64_t const ioWaitTime
const int32_t hostMemUsed
size_t const deviceMemFree
uint64_t const nvMapMemUsed
uint64_t const writeBytes
dwtEvent_t(Level const evtLevel, TraceChannel const evtChannel, TraceHeaderType const evtType, dwtFixedString_t const &evtTag, float32_t const evtDuration, dwtFixedString_t const &evtPayload, const char *const evtFunc, const char *const evtDeviceName, size_t const evtDeviceMemFree, const int32_t evtHostMemUsed, uint64_t const evtNvMapMemUsed, uint64_t const evtReadBytes, uint64_t const evtWriteBytes, uint64_t const evtIOWaitTime, dwtTime_t const evtStamp)