From d67701f7bb963d4aad5344c568c21d393e8fe3b1 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 15 Sep 2016 13:02:18 -0700 Subject: [PATCH] new logging category for deadlock debug prints --- interface/src/Application.cpp | 8 ++++---- interface/src/InterfaceLogging.cpp | 1 + interface/src/InterfaceLogging.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 4d12e05e87..ebe7124d46 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -264,7 +264,7 @@ public: auto elapsedMovingAverage = _movingAverage.getAverage(); if (elapsedMovingAverage > _maxElapsedAverage) { - qCDebug(interfaceapp) << "DEADLOCK WATCHDOG WARNING:" + qCDebug(interfaceapp_deadlock) << "DEADLOCK WATCHDOG WARNING:" << "lastHeartbeatAge:" << lastHeartbeatAge << "elapsedMovingAverage:" << elapsedMovingAverage << "maxElapsed:" << _maxElapsed @@ -274,7 +274,7 @@ public: _maxElapsedAverage = elapsedMovingAverage; } if (lastHeartbeatAge > _maxElapsed) { - qCDebug(interfaceapp) << "DEADLOCK WATCHDOG WARNING:" + qCDebug(interfaceapp_deadlock) << "DEADLOCK WATCHDOG WARNING:" << "lastHeartbeatAge:" << lastHeartbeatAge << "elapsedMovingAverage:" << elapsedMovingAverage << "PREVIOUS maxElapsed:" << _maxElapsed @@ -284,7 +284,7 @@ public: _maxElapsed = lastHeartbeatAge; } if (elapsedMovingAverage > WARNING_ELAPSED_HEARTBEAT) { - qCDebug(interfaceapp) << "DEADLOCK WATCHDOG WARNING:" + qCDebug(interfaceapp_deadlock) << "DEADLOCK WATCHDOG WARNING:" << "lastHeartbeatAge:" << lastHeartbeatAge << "elapsedMovingAverage:" << elapsedMovingAverage << "** OVER EXPECTED VALUE **" << "maxElapsed:" << _maxElapsed @@ -293,7 +293,7 @@ public: } if (lastHeartbeatAge > MAX_HEARTBEAT_AGE_USECS) { - qCDebug(interfaceapp) << "DEADLOCK DETECTED -- " + qCDebug(interfaceapp_deadlock) << "DEADLOCK DETECTED -- " << "lastHeartbeatAge:" << lastHeartbeatAge << "[ lastHeartbeat :" << lastHeartbeat << "now:" << now << " ]" diff --git a/interface/src/InterfaceLogging.cpp b/interface/src/InterfaceLogging.cpp index 0afcb30c27..49fb0bd640 100644 --- a/interface/src/InterfaceLogging.cpp +++ b/interface/src/InterfaceLogging.cpp @@ -13,3 +13,4 @@ Q_LOGGING_CATEGORY(interfaceapp, "hifi.interface") Q_LOGGING_CATEGORY(interfaceapp_timing, "hifi.interface.timing") +Q_LOGGING_CATEGORY(interfaceapp_deadlock, "hifi.interface.deadlock") diff --git a/interface/src/InterfaceLogging.h b/interface/src/InterfaceLogging.h index be2ee73fba..64eedbda4d 100644 --- a/interface/src/InterfaceLogging.h +++ b/interface/src/InterfaceLogging.h @@ -16,5 +16,6 @@ Q_DECLARE_LOGGING_CATEGORY(interfaceapp) Q_DECLARE_LOGGING_CATEGORY(interfaceapp_timing) +Q_DECLARE_LOGGING_CATEGORY(interfaceapp_deadlock) #endif // hifi_InterfaceLogging_h