Control Trace Insertion

The syntax for this pragma is:
#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 SDSbound to the function declaration.

This pragma specifies the trace insertion for the accelerator with different granularity. The user can set thevarto be the accelerator function name or individual argument name. The kind of trace can be eitherSWorHWor both.HWtrace 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.SWtrace means thestub commandfor the accelerator and arguments.

Example 1

The following code snippet shows an example of using this pragma to trace the accelerator foo:
#pragma SDS monitor trace(foo) void foo(int a, int b);

In the example shown above, bothHWandSWtraces are inserted for the acceleratorfoo.

Example 2

The following code snippet shows an example of using this pragma to trace an argument.
#pragma SDS monitor trace(a, b:SW, c:HW) void foo(int a, int b, int *c);

In the above example, bothHWandSWtraces are inserted for argumenta. For argumentb, only theSWtrace is inserted. For argumentc, only theHWtrace is inserted.