To enable this feature use the --roctx-rename rocprof option. This
implementation records all messages received in roctxPush calls and
use them to replace corresponding kernel names.
Tested with the following HIP program:
\#include <hip/hip_runtime.h>
\#include <roctracer/roctx.h>
__global__ void
ThisIsALongKernelName ()
{
}
int
main (int argc, char* argv[])
{
hipSetDevice (0);
// Not in a roctx range.
ThisIsALongKernelName<<<1, 1>>> ();
roctxRangePush ("A");
// In a simple first level roctx range.
ThisIsALongKernelName<<<1, 1>>> ();
roctxRangePop ();
roctxRangePush ("B");
roctxRangePush ("C");
// In a nested roctx range.
ThisIsALongKernelName<<<1, 1>>> ();
roctxRangePop ();
roctxRangePop ();
roctxRangePush ("D");
roctxRangePush ("E");
roctxRangePop ();
// In a first level roctx range, but after a nested range.
ThisIsALongKernelName<<<1, 1>>> ();
roctxRangePop ();
hipDeviceSynchronize ();
return 0;
}
Change-Id: I629312234468daff8b017caa5cb0773707d98cce
When building the json data flow, from_us_list has (timestamp, stream_id, thread_id).
stream_id used to be interpreted as from_tid and tid as to_tid. But that's not correct.
stream_id is always a destination and tid is the initiator (source).
Change-Id: I2f5bb86a387b4003b17271c90bdf9de4b59a79bf