Add debug checking of time stamps validity.

Can only check that the signal has some time stamp, can't check if
the translating agent matches the last used agent or not.

Change-Id: I62943a864318808059c617280bb65a269dfadd1b


[ROCm/ROCR-Runtime commit: aca00b7238]
This commit is contained in:
Sean Keely authored and Evgeny Shcherbakov committed 2018-08-26 12:36:35 -04:00
1 parent fe44e57a6c
commit 94f2f17cb0
1 file changed
+5
@@ -1034,6 +1034,11 @@ void GpuAgent::TranslateTime(core::Signal* signal,
SyncClocks();
}
if ((signal->signal_.start_ts == 0) || (signal->signal_.end_ts == 0) ||
(signal->signal_.start_ts > t1_.GPUClockCounter) ||
(signal->signal_.end_ts > t1_.GPUClockCounter))
debug_print("Signal %p time stamps may be invalid.", &signal->signal_);
time.start = uint64_t(
(double(int64_t(t0_.SystemClockCounter - t1_.SystemClockCounter)) /
double(int64_t(t0_.GPUClockCounter - t1_.GPUClockCounter))) *