Go to the source code of this file.
Namespaces | |
namespace | dw |
namespace | dw::trace |
Macros | |
#define | DW_CONCAT(x, y) DW_CONCAT_(x, y) |
#define | DW_CONCAT_(x, y) x##y |
#define | DW_TRACE_ASYNC_BEGIN(...) dw::trace::TraceFunctions::dwTraceAsyncBegin(__VA_ARGS__) |
This API is used to trace asynchronous functions. More... | |
#define | DW_TRACE_ASYNC_END(...) dw::trace::TraceFunctions::dwTraceAsyncEnd(__VA_ARGS__) |
This API should be paired with DW_TRACE_ASYNC_BEGIN. More... | |
#define | DW_TRACE_BEGIN(...) dw::trace::TraceFunctions::dwTraceBegin(__VA_ARGS__) |
This API is used to determine time taken by specific lines or function in code. More... | |
#define | DW_TRACE_BIND_OUTPUT(...) dw::trace::TraceFunctions::dwTraceBindOutput(__VA_ARGS__) |
#define | DW_TRACE_BOOT_PROFILER(msg) |
Interface into the bootprofiler tool. More... | |
#define | DW_TRACE_CORE_INIT(...) dw::trace::TraceFunctions::dwTraceCoreInit(__VA_ARGS__) |
Initialise DWTrace core from application. More... | |
#define | DW_TRACE_CUDA_BEGIN(...) dw::trace::TraceFunctions::dwTraceCudaBegin(__VA_ARGS__) |
This API is used to determine time taken by specific tasks on GPU/DLA. More... | |
#define | DW_TRACE_CUDA_BEGIN_ASYNC(...) DW_TRACE_CUDA_BEGIN(__VA_ARGS__) |
This API is used to determine time taken by specific tasks on GPU/DLA. More... | |
#define | DW_TRACE_CUDA_COLLECT_ALL() dw::trace::TraceFunctions::dwTraceCudaCollectAll() |
This API should be paired with DW_TRACE_CUDA_BEGIN_ASYNC and DW_TRACE_CUDA_RECORD_ASYNC. More... | |
#define | DW_TRACE_CUDA_COLLECT_ASYNC(...) dw::trace::TraceFunctions::dwTraceCudaCollectAsync(__VA_ARGS__) |
This API should be paired with DW_TRACE_CUDA_BEGIN_ASYNC and DW_TRACE_CUDA_RECORD_ASYNC. More... | |
#define | DW_TRACE_CUDA_END(...) dw::trace::TraceFunctions::dwTraceCudaEnd(__VA_ARGS__) |
This API should be paired with DW_TRACE_CUDA_BEGIN. More... | |
#define | DW_TRACE_CUDA_RECORD_ASYNC(...) dw::trace::TraceFunctions::dwTraceCudaRecordAsync(__VA_ARGS__) |
Marks end of specific task using cudaEvent in cudaStream queue. More... | |
#define | DW_TRACE_CUDA_SCOPE(...) |
This API is used to measure GPU execution time across scope. More... | |
#define | DW_TRACE_CUDA_SCOPE_ASYNC(...) |
This API is used to measure GPU execution time across scope. More... | |
#define | DW_TRACE_DISABLE(chan_mask) dw::trace::TraceFunctions::dwTraceDisable(chan_mask) |
Disables tracing for specific channels. More... | |
#define | DW_TRACE_ENABLE(chan_mask, level) dw::trace::TraceFunctions::dwTraceEnable(chan_mask, level) |
This API configures DWTrace. More... | |
#define | DW_TRACE_ENABLE_ALL() dw::trace::TraceFunctions::dwTraceEnableAll() |
Enables all channels in DWTrace. More... | |
#define | DW_TRACE_END(...) dw::trace::TraceFunctions::dwTraceEnd(__VA_ARGS__) |
This API should be paired with DW_TRACE_BEGIN. More... | |
#define | DW_TRACE_FLUSH(isForce) dw::trace::TraceFunctions::dwTraceFlush(isForce) |
DWTrace uses buffer for storing traces, these traces are written to backends periodically based on configuration value provided when DW_TRACE_INIT is called. More... | |
#define | DW_TRACE_GET_MACRO_2(_1, _2, NAME, ...) NAME |
#define | DW_TRACE_GET_MACRO_5(_1, _2, _3, _4, _5, NAME, ...) NAME |
#define | DW_TRACE_INIT(...) |
Initialise DWTrace from application. More... | |
#define | DW_TRACE_MARK(...) dw::trace::TraceFunctions::dwTraceMark(__VA_ARGS__) |
API to mark specific instant in program. More... | |
#define | DW_TRACE_PAYLOAD(...) |
#define | DW_TRACE_PAYLOAD1(STR1) dw::trace::TraceFunctions::singlePayload(STR1) |
#define | DW_TRACE_PAYLOAD2(STR1, STR2) dw::trace::TraceFunctions::joinPayloadChars(STR1, STR2) |
#define | DW_TRACE_REGISTER_CB(...) dw::trace::TraceFunctions::dwTraceRegisterCallback(__VA_ARGS__) |
#define | DW_TRACE_RESET(...) |
Reset DWTrace core and DeInitialise DWTrace Wrapper. More... | |
#define | DW_TRACE_RESET_WRAPPER(...) dw::trace::TraceFunctions::dwTraceWrapperReset(__VA_ARGS__); |
Reset DWTrace Wrapper. More... | |
#define | DW_TRACE_SCOPE(...) |
This API is used to measure CPU execution time across scope. More... | |
#define | DW_TRACE_TAG(...) dw::trace::dwtFixedString_t(DW_TRACE_GET_MACRO_5(__VA_ARGS__, DW_TRACE_TAG5, DW_TRACE_TAG4, DW_TRACE_TAG3, DW_TRACE_TAG2, DW_TRACE_TAG1)(__VA_ARGS__)) |
#define | DW_TRACE_TAG1(STR1) (STR1) |
#define | DW_TRACE_TAG2(STR1, STR2) (STR1 "@" STR2) |
#define | DW_TRACE_TAG3(STR1, STR2, STR3) (STR1 ":" STR2 "@" STR3) |
#define | DW_TRACE_TAG4(STR1, STR2, STR3, STR4) (STR1 ":" STR2 ":" STR3 "@" STR4) |
#define | DW_TRACE_TAG5(STR1, STR2, STR3, STR4, STR5) (STR1 ":" STR2 ":" STR3 ":" STR4 "@" STR5) |
#define | DW_UNIQUE_VAR(name) DW_CONCAT(name, __LINE__) |
#define DW_CONCAT | ( | x, | |
y | |||
) | DW_CONCAT_(x, y) |
#define DW_TRACE_ASYNC_BEGIN | ( | ... | ) | dw::trace::TraceFunctions::dwTraceAsyncBegin(__VA_ARGS__) |
This API is used to trace asynchronous functions.
Asynchronous function execution can start and stop on different thread/process. Measures CPU time.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string |
#define DW_TRACE_ASYNC_END | ( | ... | ) | dw::trace::TraceFunctions::dwTraceAsyncEnd(__VA_ARGS__) |
This API should be paired with DW_TRACE_ASYNC_BEGIN.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string |
#define DW_TRACE_BEGIN | ( | ... | ) | dw::trace::TraceFunctions::dwTraceBegin(__VA_ARGS__) |
This API is used to determine time taken by specific lines or function in code.
Measures CPU time.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string |
#define DW_TRACE_BIND_OUTPUT | ( | ... | ) | dw::trace::TraceFunctions::dwTraceBindOutput(__VA_ARGS__) |
#define DW_TRACE_BOOT_PROFILER | ( | msg | ) |
Interface into the bootprofiler tool.
See http://sw-mobile-docs.nvidia.com/DRAFT/V6Q_ORIN_SDK/common/topics/util_setup/boot-profiler-utilities.html for documentation.
[in] | msg | The string that should be logged alongside the timestamp |
#define DW_TRACE_CORE_INIT | ( | ... | ) | dw::trace::TraceFunctions::dwTraceCoreInit(__VA_ARGS__) |
Initialise DWTrace core from application.
This init will not include internal buffer and backend management for file backend. Application need to provide buffers using DW_TRACE_BIND_OUTPUT and register callback DW_TRACE_REGISTER_CB for getting info if application provided buffer is full. Application needs to call this API to use tracing API's.
[in] | tracerCfg | Specific configuration values for DWTrace |
#define DW_TRACE_CUDA_BEGIN | ( | ... | ) | dw::trace::TraceFunctions::dwTraceCudaBegin(__VA_ARGS__) |
This API is used to determine time taken by specific tasks on GPU/DLA.
Uses cudaDeviceSync implicitly to wait for GPU/DLA to finish its task.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | cudaStream | cudaStream on which task is queued. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string |
#define DW_TRACE_CUDA_BEGIN_ASYNC | ( | ... | ) | DW_TRACE_CUDA_BEGIN(__VA_ARGS__) |
This API is used to determine time taken by specific tasks on GPU/DLA.
Marks start of specific task using cudaEvent in cudaStream queue.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | cudaStream | cudaStream on which task is queued. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string. |
#define DW_TRACE_CUDA_COLLECT_ALL | ( | ) | dw::trace::TraceFunctions::dwTraceCudaCollectAll() |
This API should be paired with DW_TRACE_CUDA_BEGIN_ASYNC and DW_TRACE_CUDA_RECORD_ASYNC.
Measures execution time on GPU/DLA using cudaEvents. This API uses start and end cuda events pushed by DW_TRACE_CUDA_BEGIN/RECORD_ASYNC to calculate execution time on GPU/DLA. Unlike DW_TRACE_CUDA_COLLECT_ASYNC, this API does not use cudaEventSyncronize. This API should be placed in code where we are sure that tasks on GPU/DLA have been finished. (cudaStream Queue) cudaStopEvent_B <– TaskB <— cudaStartEvent_B <–cudaStopEvent_A <–TaskA <–cudaStartEvent_A ExecutionTime_TaskB = cudaEventElapsedTime(cudaEventRecord(cudaStopEvent_B) - cudaElapsedTime(cudaStopEvent_B)) ExecutionTime_TaskA = cudaEventElapsedTime(cudaEventRecord(cudaStopEvent_A) - cudaElapsedTime(cudaStopEvent_A))
#define DW_TRACE_CUDA_COLLECT_ASYNC | ( | ... | ) | dw::trace::TraceFunctions::dwTraceCudaCollectAsync(__VA_ARGS__) |
This API should be paired with DW_TRACE_CUDA_BEGIN_ASYNC and DW_TRACE_CUDA_RECORD_ASYNC.
Measures execution time on GPU/DLA using cudaEvents. Uses cudaEventSynchronize implicitly to wait for GPU/DLA to finish its task. This API uses start and end cuda events pushed by DW_TRACE_CUDA_BEGIN/RECORD_ASYNC API's to calculate execution time on GPU/DLA. (cudaStream Queue) cudaStopEvent_B <– TaskB <— cudaStartEvent_B <–cudaStopEvent_A <–TaskA <–cudaStartEvent_A ExecutionTime_TaskB = cudaEventElapsedTime(cudaEventRecord(cudaStopEvent_B) - cudaElapsedTime(cudaStopEvent_B)) ExecutionTime_TaskA = cudaEventElapsedTime(cudaEventRecord(cudaStopEvent_A) - cudaElapsedTime(cudaStopEvent_A))
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | cudaStream | cudaStream on which task is queued. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string. |
#define DW_TRACE_CUDA_END | ( | ... | ) | dw::trace::TraceFunctions::dwTraceCudaEnd(__VA_ARGS__) |
This API should be paired with DW_TRACE_CUDA_BEGIN.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | cudaStream | cudaStream on which task is queued. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string |
#define DW_TRACE_CUDA_RECORD_ASYNC | ( | ... | ) | dw::trace::TraceFunctions::dwTraceCudaRecordAsync(__VA_ARGS__) |
Marks end of specific task using cudaEvent in cudaStream queue.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | cudaStream | cudaStream on which task is queued. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string. |
#define DW_TRACE_CUDA_SCOPE | ( | ... | ) |
This API is used to measure GPU execution time across scope.
For this API, there is no need to pair with DW_TRACE_CUDA_END. DW_TRACE_CUDA_END will be inserted automatically when program execution goes out of scope.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | cudaStream | cudaStream on which task is queued. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string. |
#define DW_TRACE_CUDA_SCOPE_ASYNC | ( | ... | ) |
This API is used to measure GPU execution time across scope.
For this API, there is no need to pair with DW_TRACE_CUDA_ASYNC_END. DW_TRACE_CUDA_ASYNC_END will be inserted automatically when program execution goes out of scope.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | cudaStream | cudaStream on which task is queued. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string. |
#define DW_TRACE_DISABLE | ( | chan_mask | ) | dw::trace::TraceFunctions::dwTraceDisable(chan_mask) |
#define DW_TRACE_ENABLE | ( | chan_mask, | |
level | |||
) | dw::trace::TraceFunctions::dwTraceEnable(chan_mask, level) |
#define DW_TRACE_ENABLE_ALL | ( | ) | dw::trace::TraceFunctions::dwTraceEnableAll() |
#define DW_TRACE_END | ( | ... | ) | dw::trace::TraceFunctions::dwTraceEnd(__VA_ARGS__) |
This API should be paired with DW_TRACE_BEGIN.
Marks end of tracing for trace specified by tag string.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string |
#define DW_TRACE_FLUSH | ( | isForce | ) | dw::trace::TraceFunctions::dwTraceFlush(isForce) |
#define DW_TRACE_GET_MACRO_5 | ( | _1, | |
_2, | |||
_3, | |||
_4, | |||
_5, | |||
NAME, | |||
... | |||
) | NAME |
#define DW_TRACE_INIT | ( | ... | ) |
Initialise DWTrace from application.
Meant for application which do not wish for handling its own file backend. Application needs to call this API to use tracing API's.
[in] | tracerCfg | Specific configuration values for DWTrace |
#define DW_TRACE_MARK | ( | ... | ) | dw::trace::TraceFunctions::dwTraceMark(__VA_ARGS__) |
API to mark specific instant in program.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string. |
#define DW_TRACE_PAYLOAD | ( | ... | ) |
#define DW_TRACE_PAYLOAD1 | ( | STR1 | ) | dw::trace::TraceFunctions::singlePayload(STR1) |
#define DW_TRACE_PAYLOAD2 | ( | STR1, | |
STR2 | |||
) | dw::trace::TraceFunctions::joinPayloadChars(STR1, STR2) |
#define DW_TRACE_REGISTER_CB | ( | ... | ) | dw::trace::TraceFunctions::dwTraceRegisterCallback(__VA_ARGS__) |
#define DW_TRACE_RESET | ( | ... | ) |
Reset DWTrace core and DeInitialise DWTrace Wrapper.
#define DW_TRACE_RESET_WRAPPER | ( | ... | ) | dw::trace::TraceFunctions::dwTraceWrapperReset(__VA_ARGS__); |
#define DW_TRACE_SCOPE | ( | ... | ) |
This API is used to measure CPU execution time across scope.
For this API, there is no need to pair with DW_TRACE_END. DW_TRACE_END will be inserted automatically when program execution goes out of scope.
[in] | chan | Specifies channels where trace has to be placed. |
[in] | tag | Unique string for every trace. |
[in] | level | [optional] If not mentioned DW_TRACE_LEVEL_DEFAULT is used. |
[in] | payload | [optional] Default is null string. |
#define DW_TRACE_TAG | ( | ... | ) | dw::trace::dwtFixedString_t(DW_TRACE_GET_MACRO_5(__VA_ARGS__, DW_TRACE_TAG5, DW_TRACE_TAG4, DW_TRACE_TAG3, DW_TRACE_TAG2, DW_TRACE_TAG1)(__VA_ARGS__)) |
#define DW_TRACE_TAG3 | ( | STR1, | |
STR2, | |||
STR3 | |||
) | (STR1 ":" STR2 "@" STR3) |
#define DW_TRACE_TAG4 | ( | STR1, | |
STR2, | |||
STR3, | |||
STR4 | |||
) | (STR1 ":" STR2 ":" STR3 "@" STR4) |
#define DW_TRACE_TAG5 | ( | STR1, | |
STR2, | |||
STR3, | |||
STR4, | |||
STR5 | |||
) | (STR1 ":" STR2 ":" STR3 ":" STR4 "@" STR5) |