log, sync: add LOCK logging category, apply it to lock contention

This commit is contained in:
Jon Atack
2021-08-18 12:29:36 +02:00
parent bb9f76a719
commit b7a17444e0
4 changed files with 5 additions and 3 deletions

View File

@@ -29,8 +29,8 @@ static_assert(false, "thread_local is not supported");
#endif
void PrintLockContention(const char* pszName, const char* pszFile, int nLine)
{
LogPrintf("LOCKCONTENTION: %s\n", pszName);
LogPrintf("Locker: %s:%d\n", pszFile, nLine);
LogPrint(BCLog::LOCK, "LOCKCONTENTION: %s\n", pszName);
LogPrint(BCLog::LOCK, "Locker: %s:%d\n", pszFile, nLine);
}
#endif /* DEBUG_LOCKCONTENTION */