Control Trace Insertion
#pragma SDS monitor trace(var1[:SW|HW][,var2[:SW|HW]])
This pragma must be specified immediately preceding a function declaration, or immediately preceding another#pragma SDS
bound to the function declaration.
This pragma specifies the trace insertion for the accelerator with different granularity. The user can set thevar
to be the accelerator function name or individual argument name. The kind of trace can be eitherSW
orHW
or both.HW
trace means the "start" and "stop" of the corresponding hardware component, such as the "start" and "stop" of the hardware accelerator, or the "start of data transfer" and "stop of data transfer" of the argument.SW
trace means thestub command
for the accelerator and arguments.
Example 1
foo
:
#pragma SDS monitor trace(foo) void foo(int a, int b);
In the example shown above, bothHW
andSW
traces are inserted for the acceleratorfoo
.
Example 2
#pragma SDS monitor trace(a, b:SW, c:HW) void foo(int a, int b, int *c);
In the above example, bothHW
andSW
traces are inserted for argumenta
. For argumentb
, only theSW
trace is inserted. For argumentc
, only theHW
trace is inserted.