Preparing to merge debug profiler in to main dev line.
This commit is contained in:
parent
157b8531a2
commit
d0d822447d
|
@ -230,10 +230,14 @@ MsgLogViewDialog_t::MsgLogViewDialog_t(QWidget *parent)
|
||||||
|
|
||||||
updateTimer->start(500); // 2hz
|
updateTimer->start(500); // 2hz
|
||||||
|
|
||||||
|
FCEU_WRAPPER_LOCK();
|
||||||
|
|
||||||
msgLog.loadTextViewer(txtView);
|
msgLog.loadTextViewer(txtView);
|
||||||
|
|
||||||
totalLines = msgLog.getTotalLineCount();
|
totalLines = msgLog.getTotalLineCount();
|
||||||
|
|
||||||
|
FCEU_WRAPPER_UNLOCK();
|
||||||
|
|
||||||
txtView->moveCursor(QTextCursor::End);
|
txtView->moveCursor(QTextCursor::End);
|
||||||
|
|
||||||
restoreGeometry(settings.value("MsgLogWindow/geometry").toByteArray());
|
restoreGeometry(settings.value("MsgLogWindow/geometry").toByteArray());
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "utils/mutex.h"
|
#include "utils/mutex.h"
|
||||||
|
#include "fceu.h"
|
||||||
#include "profiler.h"
|
#include "profiler.h"
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
|
@ -84,7 +85,7 @@ static void calibrateTSC(void)
|
||||||
printf("QueryPerformanceFrequency FAILED!\n");
|
printf("QueryPerformanceFrequency FAILED!\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
printf("Running TSC Calibration: %i sec...\n", numSamples);
|
FCEU_printf("Running TSC Calibration: %i sec...\n", numSamples);
|
||||||
|
|
||||||
for (int i=0; i<numSamples; i++)
|
for (int i=0; i<numSamples; i++)
|
||||||
{
|
{
|
||||||
|
@ -104,7 +105,7 @@ static void calibrateTSC(void)
|
||||||
|
|
||||||
timeStampRecord::tscFreq = static_cast<uint64_t>( td_avg / td.toSeconds() );
|
timeStampRecord::tscFreq = static_cast<uint64_t>( td_avg / td.toSeconds() );
|
||||||
|
|
||||||
printf("%i Calibration: %f sec TSC:%llu TSC Freq: %f MHz\n", i, td.toSeconds(),
|
FCEU_printf("%i Calibration: %f sec TSC:%llu TSC Freq: %f MHz\n", i, td.toSeconds(),
|
||||||
static_cast<unsigned long long>(td.tsc), static_cast<double>(timeStampRecord::tscFreq) * 1.0e-6 );
|
static_cast<unsigned long long>(td.tsc), static_cast<double>(timeStampRecord::tscFreq) * 1.0e-6 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -195,13 +196,13 @@ profileFuncScoped::~profileFuncScoped(void)
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
profilerFuncMap::profilerFuncMap(void)
|
profilerFuncMap::profilerFuncMap(void)
|
||||||
{
|
{
|
||||||
printf("profilerFuncMap Constructor: %p\n", this);
|
//printf("profilerFuncMap Constructor: %p\n", this);
|
||||||
pMgr.addThreadProfiler(this);
|
pMgr.addThreadProfiler(this);
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
profilerFuncMap::~profilerFuncMap(void)
|
profilerFuncMap::~profilerFuncMap(void)
|
||||||
{
|
{
|
||||||
printf("profilerFuncMap Destructor: %p\n", this);
|
//printf("profilerFuncMap Destructor: %p\n", this);
|
||||||
pMgr.removeThreadProfiler(this);
|
pMgr.removeThreadProfiler(this);
|
||||||
|
|
||||||
for (auto it = _map.begin(); it != _map.end(); it++)
|
for (auto it = _map.begin(); it != _map.end(); it++)
|
||||||
|
@ -260,7 +261,7 @@ profilerManager::profilerManager(void)
|
||||||
{
|
{
|
||||||
calibrateTSC();
|
calibrateTSC();
|
||||||
|
|
||||||
printf("profilerManager Constructor\n");
|
//printf("profilerManager Constructor\n");
|
||||||
if (pLog == nullptr)
|
if (pLog == nullptr)
|
||||||
{
|
{
|
||||||
pLog = stdout;
|
pLog = stdout;
|
||||||
|
@ -269,7 +270,7 @@ profilerManager::profilerManager(void)
|
||||||
|
|
||||||
profilerManager::~profilerManager(void)
|
profilerManager::~profilerManager(void)
|
||||||
{
|
{
|
||||||
printf("profilerManager Destructor\n");
|
//printf("profilerManager Destructor\n");
|
||||||
{
|
{
|
||||||
autoScopedLock aLock(threadListMtx);
|
autoScopedLock aLock(threadListMtx);
|
||||||
threadList.clear();
|
threadList.clear();
|
||||||
|
|
|
@ -1007,6 +1007,7 @@ xcopy /y /d "$(ProjectDir)\..\src\drivers\win\7z_64.dll" "$(OutDir)"</Command>
|
||||||
<ClCompile Include="..\src\oldmovie.cpp" />
|
<ClCompile Include="..\src\oldmovie.cpp" />
|
||||||
<ClCompile Include="..\src\palette.cpp" />
|
<ClCompile Include="..\src\palette.cpp" />
|
||||||
<ClCompile Include="..\src\ppu.cpp" />
|
<ClCompile Include="..\src\ppu.cpp" />
|
||||||
|
<ClCompile Include="..\src\profiler.cpp" />
|
||||||
<ClCompile Include="..\src\sound.cpp" />
|
<ClCompile Include="..\src\sound.cpp" />
|
||||||
<ClCompile Include="..\src\state.cpp" />
|
<ClCompile Include="..\src\state.cpp" />
|
||||||
<ClCompile Include="..\src\unif.cpp" />
|
<ClCompile Include="..\src\unif.cpp" />
|
||||||
|
@ -1136,6 +1137,7 @@ xcopy /y /d "$(ProjectDir)\..\src\drivers\win\7z_64.dll" "$(OutDir)"</Command>
|
||||||
<ClInclude Include="..\src\oldmovie.h" />
|
<ClInclude Include="..\src\oldmovie.h" />
|
||||||
<ClInclude Include="..\src\palette.h" />
|
<ClInclude Include="..\src\palette.h" />
|
||||||
<ClInclude Include="..\src\ppu.h" />
|
<ClInclude Include="..\src\ppu.h" />
|
||||||
|
<ClInclude Include="..\src\profiler.h" />
|
||||||
<ClInclude Include="..\src\sound.h" />
|
<ClInclude Include="..\src\sound.h" />
|
||||||
<ClInclude Include="..\src\state.h" />
|
<ClInclude Include="..\src\state.h" />
|
||||||
<ClInclude Include="..\src\types-des.h" />
|
<ClInclude Include="..\src\types-des.h" />
|
||||||
|
|
Loading…
Reference in New Issue