- added a very useful way to track mutex usage and performance timings of mutex locking to discover thread lock issues

This commit is contained in:
Mark Vejvoda
2011-01-31 23:01:39 +00:00
parent b8075eaf01
commit 0b4eef10c5
15 changed files with 195 additions and 172 deletions

View File

@@ -441,7 +441,7 @@ void SystemFlags::logDebugEntry(DebugType type, string debugEntry, time_t debugT
}
if(currentDebugLog.fileStream->is_open() == true) {
MutexSafeWrapper safeMutex(currentDebugLog.mutex);
MutexSafeWrapper safeMutex(currentDebugLog.mutex,string(__FILE__) + "_" + intToStr(__LINE__));
(*currentDebugLog.fileStream) << "Starting Mega-Glest logging for type: " << type << "\n";
(*currentDebugLog.fileStream).flush();
@@ -453,7 +453,7 @@ void SystemFlags::logDebugEntry(DebugType type, string debugEntry, time_t debugT
assert(currentDebugLog.fileStream != NULL);
if(currentDebugLog.fileStream->is_open() == true) {
MutexSafeWrapper safeMutex(currentDebugLog.mutex);
MutexSafeWrapper safeMutex(currentDebugLog.mutex,string(__FILE__) + "_" + intToStr(__LINE__));
// All items in the if clause we don't want timestamps
if (type != debugPathFinder && type != debugError && type != debugWorldSynch) {