Add debug option to print ThreadID with each message.

Also print messages with single fprintf to prevents threads from
interleaving.

Change-Id: Ib3999fe6b1e67b4a16cd7dcde82f3dfc99dd48ff


[ROCm/hip commit: 6de9136002]
This commit is contained in:
Ben Sander
2016-09-27 14:53:13 -05:00
parent 1b24a93b79
commit 7f7340fb29
2 changed files with 26 additions and 4 deletions
+2
View File
@@ -1359,6 +1359,7 @@ bool ihipStream_t::canSeePeerMemory(const ihipCtx_t *thisCtx, ihipCtx_t *dstCtx,
// Use blocks to control scope of critical sections.
{
LockedAccessor_CtxCrit_t ctxCrit(dstCtx->criticalData());
tprintf(DB_SYNC, "dstCrit lock succeeded\n");
if (!ctxCrit->isPeer(thisCtx)) {
return false;
};
@@ -1366,6 +1367,7 @@ bool ihipStream_t::canSeePeerMemory(const ihipCtx_t *thisCtx, ihipCtx_t *dstCtx,
{
LockedAccessor_CtxCrit_t ctxCrit(srcCtx->criticalData());
tprintf(DB_SYNC, "srcCrit lock succeeded\n");
if (!ctxCrit->isPeer(thisCtx)) {
return false;
};