TRACE_START
Function Usage
Performs logging in any running phase of the operator when the CAModel is used for operator performance simulation. This helps to analyze the pipelines of different instructions for further performance optimization.
Indicates logging at the start point. This API is used together with TRACE_STOP.
Prototype
#define TRACE_START(apid)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
apid |
Input |
Currently, the following 10 user-defined types are reserved:
|
Returns
None
Availability
This macro supports all product models. However, the actual product models must be the same as those supported by the debugging tool.
Precautions
- TRACE_START and TRACE_STOP must be used together. If no log is displayed on the trace chart, they are not paired.
- This API cannot be used across cores. For example, if TRACE_START is logged in the AI Cube, TRACE_STOP must also be recorded in the AI Cube instead of the AI Vector.
Example
Add TRACE_START and TRACE_STOP to the specific instruction position in the kernel code.
TRACE_START(0x2); Add(zLocal, xLocal, yLocal, dataSize); TRACE_STOP(0x2);
Parent topic: Operator Debugging APIs