From ebf16e2a5a9777fdbc62a53ab703dd5d66ffa624 Mon Sep 17 00:00:00 2001 From: LunaMoo Date: Sun, 17 Dec 2017 02:30:29 +0100 Subject: [PATCH] Make Frame Profiling a normal option and add simple % frame stats. Might need tweaking.:] --- Core/Config.cpp | 4 +- Core/Config.h | 1 + Core/MIPS/ARM/ArmCompBranch.cpp | 30 ++- Core/MIPS/ARM64/Arm64CompBranch.cpp | 29 +-- Core/MIPS/x86/CompBranch.cpp | 20 +- UI/DevScreens.cpp | 6 +- UI/EmuScreen.cpp | 6 +- UI/GameSettingsScreen.cpp | 2 + UI/ProfilerDraw.cpp | 299 ++++++++++++++++------------ UI/ProfilerDraw.h | 6 +- ext/native/profiler/profiler.h | 12 -- 11 files changed, 227 insertions(+), 188 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index df65545ffd..b4a80fd2db 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -351,6 +351,8 @@ static ConfigSetting generalSettings[] = { ConfigSetting("ShowDebuggerOnLoad", &g_Config.bShowDebuggerOnLoad, false), ConfigSetting("SimpleUI", &g_Config.bSimpleUI, true), ConfigSetting("SimpleUIhide", &g_Config.bSimpleUIhide, false), + ConfigSetting("SimpleUIhide", &g_Config.bShowFrameProfiler, false), + ConfigSetting("SimpleUIhide", &g_Config.bSimpleFrameStats, false), ConfigSetting("CheckForNewVersion", &g_Config.bCheckForNewVersion, false), ConfigSetting("Language", &g_Config.sLanguageIni, &DefaultLangRegion), ConfigSetting("ForceLagSync", &g_Config.bForceLagSync, false, true, true), @@ -933,8 +935,6 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { INFO_LOG(LOADER, "Loading config: %s", iniFilename_.c_str()); bSaveSettings = true; - bShowFrameProfiler = true; - IniFile iniFile; if (!iniFile.Load(iniFilename_)) { ERROR_LOG(LOADER, "Failed to read %s. Setting config to default.", iniFilename_.c_str()); diff --git a/Core/Config.h b/Core/Config.h index 295808b97b..c96ef33af0 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -463,6 +463,7 @@ public: // Volatile development settings bool bShowFrameProfiler; + bool bSimpleFrameStats; std::string currentDirectory; std::string externalDirectory; diff --git a/Core/MIPS/ARM/ArmCompBranch.cpp b/Core/MIPS/ARM/ArmCompBranch.cpp index af18735e82..e96643643d 100644 --- a/Core/MIPS/ARM/ArmCompBranch.cpp +++ b/Core/MIPS/ARM/ArmCompBranch.cpp @@ -620,25 +620,23 @@ void ArmJit::Comp_Syscall(MIPSOpcode op) FlushAll(); SaveDowncount(); -#ifdef USE_PROFILER - // When profiling, we can't skip CallSyscall, since it times syscalls. - gpr.SetRegImm(R0, op.encoding); - QuickCallFunction(R1, (void *)&CallSyscall); -#else - // Skip the CallSyscall where possible. - void *quickFunc = GetQuickSyscallFunc(op); - if (quickFunc) - { - gpr.SetRegImm(R0, (u32)(intptr_t)GetSyscallFuncPointer(op)); - // Already flushed, so R1 is safe. - QuickCallFunction(R1, quickFunc); - } - else - { + if (g_Config.bShowFrameProfiler || g_Config.bSimpleFrameStats) { + // When profiling, we can't skip CallSyscall, since it times syscalls. gpr.SetRegImm(R0, op.encoding); QuickCallFunction(R1, (void *)&CallSyscall); + } else { + // Skip the CallSyscall where possible. + void *quickFunc = GetQuickSyscallFunc(op); + if (quickFunc) { + gpr.SetRegImm(R0, (u32)(intptr_t)GetSyscallFuncPointer(op)); + // Already flushed, so R1 is safe. + QuickCallFunction(R1, quickFunc); + } else { + gpr.SetRegImm(R0, op.encoding); + QuickCallFunction(R1, (void *)&CallSyscall); + } } -#endif + ApplyRoundingMode(); RestoreDowncount(); diff --git a/Core/MIPS/ARM64/Arm64CompBranch.cpp b/Core/MIPS/ARM64/Arm64CompBranch.cpp index beb9ab7777..dc6355f709 100644 --- a/Core/MIPS/ARM64/Arm64CompBranch.cpp +++ b/Core/MIPS/ARM64/Arm64CompBranch.cpp @@ -602,22 +602,23 @@ void Arm64Jit::Comp_Syscall(MIPSOpcode op) FlushAll(); SaveStaticRegisters(); -#ifdef USE_PROFILER - // When profiling, we can't skip CallSyscall, since it times syscalls. - MOVI2R(W0, op.encoding); - QuickCallFunction(X1, (void *)&CallSyscall); -#else - // Skip the CallSyscall where possible. - void *quickFunc = GetQuickSyscallFunc(op); - if (quickFunc) { - MOVI2R(X0, (uintptr_t)GetSyscallFuncPointer(op)); - // Already flushed, so X1 is safe. - QuickCallFunction(X1, quickFunc); - } else { + if (g_Config.bShowFrameProfiler || g_Config.bSimpleFrameStats) { + // When profiling, we can't skip CallSyscall, since it times syscalls. MOVI2R(W0, op.encoding); QuickCallFunction(X1, (void *)&CallSyscall); - } -#endif + } else { + // Skip the CallSyscall where possible. + void *quickFunc = GetQuickSyscallFunc(op); + if (quickFunc) { + MOVI2R(X0, (uintptr_t)GetSyscallFuncPointer(op)); + // Already flushed, so X1 is safe. + QuickCallFunction(X1, quickFunc); + } else { + MOVI2R(W0, op.encoding); + QuickCallFunction(X1, (void *)&CallSyscall); + } + }| + LoadStaticRegisters(); ApplyRoundingMode(); diff --git a/Core/MIPS/x86/CompBranch.cpp b/Core/MIPS/x86/CompBranch.cpp index 7d3a52091a..2cfce8486b 100644 --- a/Core/MIPS/x86/CompBranch.cpp +++ b/Core/MIPS/x86/CompBranch.cpp @@ -784,17 +784,17 @@ void Jit::Comp_Syscall(MIPSOpcode op) MOV(32, MIPSSTATE_VAR(pc), Imm32(GetCompilerPC() + 4)); } -#ifdef USE_PROFILER - // When profiling, we can't skip CallSyscall, since it times syscalls. - ABI_CallFunctionC(&CallSyscall, op.encoding); -#else - // Skip the CallSyscall where possible. - void *quickFunc = GetQuickSyscallFunc(op); - if (quickFunc) - ABI_CallFunctionP(quickFunc, (void *)GetSyscallFuncPointer(op)); - else + if (g_Config.bShowFrameProfiler || g_Config.bSimpleFrameStats) { + // When profiling, we can't skip CallSyscall, since it times syscalls. ABI_CallFunctionC(&CallSyscall, op.encoding); -#endif + } else { + // Skip the CallSyscall where possible. + void *quickFunc = GetQuickSyscallFunc(op); + if (quickFunc) + ABI_CallFunctionP(quickFunc, (void *)GetSyscallFuncPointer(op)); + else + ABI_CallFunctionC(&CallSyscall, op.encoding); + } ApplyRoundingMode(); WriteSyscallExit(); diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 9f8242383a..60a8bc8a67 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -63,6 +63,8 @@ void DevMenu::CreatePopupContents(UI::ViewGroup *parent) { ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); LinearLayout *items = new LinearLayout(ORIENT_VERTICAL); + items->Add(new CheckBox(&g_Config.bShowFrameProfiler, dev->T("Frame Profiler"), "")); + items->Add(new CheckBox(&g_Config.bSimpleFrameStats, dev->T("Simple Frame Stats"), "")); #if !defined(MOBILE_DEVICE) items->Add(new Choice(dev->T("Log View")))->OnClick.Handle(this, &DevMenu::OnLogView); #endif @@ -73,9 +75,7 @@ void DevMenu::CreatePopupContents(UI::ViewGroup *parent) { items->Add(new Choice(dev->T("Toggle Freeze")))->OnClick.Handle(this, &DevMenu::OnFreezeFrame); items->Add(new Choice(dev->T("Dump Frame GPU Commands")))->OnClick.Handle(this, &DevMenu::OnDumpFrame); items->Add(new Choice(dev->T("Toggle Audio Debug")))->OnClick.Handle(this, &DevMenu::OnToggleAudioDebug); -#ifdef USE_PROFILER - items->Add(new CheckBox(&g_Config.bShowFrameProfiler, dev->T("Frame Profiler"), "")); -#endif + items->Add(new Choice(" ")); //Workaround for scrollView scroll->Add(items); parent->Add(scroll); diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 2925883e64..dcb2da690a 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -1133,7 +1133,7 @@ void EmuScreen::render() { return; const bool hasVisibleUI = !osm.IsEmpty() || saveStatePreview_->GetVisibility() != UI::V_GONE || g_Config.bShowTouchControls || loadingView_->GetVisibility() == UI::V_VISIBLE; - const bool showDebugUI = g_Config.bShowDebugStats || g_Config.bShowDeveloperMenu || g_Config.bShowAudioDebug || g_Config.bShowFrameProfiler; + const bool showDebugUI = g_Config.bShowDebugStats || g_Config.bShowDeveloperMenu || g_Config.bShowAudioDebug || g_Config.bShowFrameProfiler || g_Config.bSimpleFrameStats; if (hasVisibleUI || showDebugUI || g_Config.iShowFPSCounter != 0) { renderUI(); } @@ -1192,11 +1192,9 @@ void EmuScreen::renderUI() { DrawFPS(draw2d, screenManager()->getUIContext()->GetBounds()); } -#ifdef USE_PROFILER - if (g_Config.bShowFrameProfiler && !invalid_) { + if ((g_Config.bShowFrameProfiler || g_Config.bSimpleFrameStats) && !invalid_) { DrawProfile(*screenManager()->getUIContext()); } -#endif screenManager()->getUIContext()->End(); } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index e50e6496f5..3e44ab0cb6 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1322,6 +1322,8 @@ void OtherSettingsScreen::CreateViews() { PopupSliderChoice *emulatedSpeed = list->Add(new PopupSliderChoice(&g_Config.iForceMaxEmulatedFPS, 0, 60, gr->T("Force Max Emulated FPS(affects speed in most games!)"), 1, screenManager(), gr->T("FPS, 0:Disabled"))); emulatedSpeed->SetFormat("%i FPS"); emulatedSpeed->SetZeroLabel(gr->T("Disabled")); + list->Add(new CheckBox(&g_Config.bShowFrameProfiler, gr->T("Display frame profiler(heavy!)"))); + list->Add(new CheckBox(&g_Config.bSimpleFrameStats, gr->T("Display simple frame stats(heavy!)"))); } void OtherSettingsScreen::onFinish(DialogResult result) { diff --git a/UI/ProfilerDraw.cpp b/UI/ProfilerDraw.cpp index f90427df44..e7f5df36c3 100644 --- a/UI/ProfilerDraw.cpp +++ b/UI/ProfilerDraw.cpp @@ -18,10 +18,13 @@ #include #include +#include "Core/Config.h" +#include "Core/HLE/sceDisplay.h" #include "gfx_es2/draw_buffer.h" #include "ui/ui_context.h" #include "ui/view.h" #include "profiler/profiler.h" +#include "StringUtils.h" static const uint32_t nice_colors[] = { 0xFF8040, @@ -52,144 +55,196 @@ enum ProfileCatStatus { }; void DrawProfile(UIContext &ui) { -#ifdef USE_PROFILER - PROFILE_THIS_SCOPE("timing"); - int numCategories = Profiler_GetNumCategories(); - int historyLength = Profiler_GetHistoryLength(); + if (g_Config.bShowFrameProfiler) { + PROFILE_THIS_SCOPE("timing"); + int numCategories = Profiler_GetNumCategories(); + int historyLength = Profiler_GetHistoryLength(); - ui.SetFontStyle(ui.theme->uiFont); + ui.SetFontStyle(ui.theme->uiFont); - static float lastMaxVal = 1.0f / 60.0f; - float legendMinVal = lastMaxVal * (1.0f / 120.0f); + static float lastMaxVal = 1.0f / 60.0f; + float legendMinVal = lastMaxVal * (1.0f / 120.0f); - std::vector history(historyLength); - std::vector catStatus(numCategories); + std::vector history(historyLength); + std::vector catStatus(numCategories); - float rowH = 30.0f; - float legendHeight = 0.0f; - float legendWidth = 80.0f; - for (int i = 0; i < numCategories; i++) { - const char *name = Profiler_GetCategoryName(i); - if (!strcmp(name, "timing")) { - catStatus[i] = PROFILE_CAT_IGNORE; - continue; + float rowH = 30.0f; + float legendHeight = 0.0f; + float legendWidth = 80.0f; + for (int i = 0; i < numCategories; i++) { + const char *name = Profiler_GetCategoryName(i); + if (!strcmp(name, "timing")) { + catStatus[i] = PROFILE_CAT_IGNORE; + continue; + } + + Profiler_GetHistory(i, &history[0], historyLength); + catStatus[i] = PROFILE_CAT_NOLEGEND; + for (int j = 0; j < historyLength; ++j) { + if (history[j] > legendMinVal) { + catStatus[i] = PROFILE_CAT_VISIBLE; + break; + } + } + + // So they don't move horizontally, we always measure. + float w = 0.0f, h = 0.0f; + ui.MeasureText(ui.GetFontStyle(), 1.0f, 1.0f, name, &w, &h); + if (w * 1.5f > legendWidth) { + legendWidth = w * 1.5f; + } + legendHeight += rowH; } + legendWidth += 20.0f; - Profiler_GetHistory(i, &history[0], historyLength); - catStatus[i] = PROFILE_CAT_NOLEGEND; - for (int j = 0; j < historyLength; ++j) { - if (history[j] > legendMinVal) { - catStatus[i] = PROFILE_CAT_VISIBLE; - break; + float legendStartY = legendHeight > ui.GetBounds().centerY() ? ui.GetBounds().y2() - legendHeight : ui.GetBounds().centerY(); + float legendStartX = ui.GetBounds().x2() - std::min(legendWidth, 200.0f); + + const uint32_t opacity = 140 << 24; + + int legendNum = 0; + for (int i = 0; i < numCategories; i++) { + const char *name = Profiler_GetCategoryName(i); + uint32_t color = nice_colors[i % ARRAY_SIZE(nice_colors)]; + + if (catStatus[i] == PROFILE_CAT_VISIBLE) { + float y = legendStartY + legendNum++ * rowH; + ui.FillRect(UI::Drawable(opacity | color), Bounds(legendStartX, y, rowH - 2, rowH - 2)); + ui.DrawTextShadow(name, legendStartX + rowH + 2, y, 0xFFFFFFFF, ALIGN_VBASELINE); } } - // So they don't move horizontally, we always measure. - float w = 0.0f, h = 0.0f; - ui.MeasureText(ui.GetFontStyle(), 1.0f, 1.0f, name, &w, &h); - if (w > legendWidth) { - legendWidth = w; + float graphWidth = ui.GetBounds().x2() - legendWidth - 20.0f; + float graphHeight = ui.GetBounds().h * 0.8f; + + float dx = graphWidth / historyLength; + + /* + ui.Flush(); + + ui.BeginNoTex(); + */ + + bool area = true; + float minVal = 0.0f; + float maxVal = lastMaxVal; // TODO - adjust to frame length + if (maxVal < 0.001f) + maxVal = 0.001f; + if (maxVal > 1.0f / 15.0f) + maxVal = 1.0f / 15.0f; + + float scale = (graphHeight) / (maxVal - minVal); + + float y_60th = ui.GetBounds().y2() - 10 - (1.0f / 60.0f) * scale; + float y_1ms = ui.GetBounds().y2() - 10 - (1.0f / 1000.0f) * scale; + + ui.FillRect(UI::Drawable(0x80FFFF00), Bounds(0, y_60th, graphWidth, 2)); + ui.FillRect(UI::Drawable(0x80FFFF00), Bounds(0, y_1ms, graphWidth, 2)); + ui.DrawTextShadow("1/60s", 5, y_60th, 0x80FFFF00); + ui.DrawTextShadow("1ms", 5, y_1ms, 0x80FFFF00); + + std::vector total; + total.resize(historyLength); + + maxVal = 0.0f; + float maxTotal = 0.0f; + for (int i = 0; i < numCategories; i++) { + if (catStatus[i] == PROFILE_CAT_IGNORE) { + continue; + } + Profiler_GetHistory(i, &history[0], historyLength); + + float x = 10; + uint32_t col = nice_colors[i % ARRAY_SIZE(nice_colors)]; + if (area) + col = opacity | (col & 0xFFFFFF); + UI::Drawable color(col); + UI::Drawable outline((opacity >> 1) | 0xFFFFFF); + + float bottom = ui.GetBounds().y2(); + if (area) { + for (int n = 0; n < historyLength; n++) { + float val = history[n]; + float valY1 = bottom - 10 - (val + total[n]) * scale; + float valY2 = bottom - 10 - total[n] * scale; + ui.FillRect(outline, Bounds(x, valY2, dx, 1.0f)); + ui.FillRect(color, Bounds(x, valY1, dx, valY2 - valY1)); + x += dx; + total[n] += val; + } + } else { + for (int n = 0; n < historyLength; n++) { + float val = history[n]; + if (val > maxVal) + maxVal = val; + float valY = bottom - 10 - history[n] * scale; + ui.FillRect(color, Bounds(x, valY, dx, 5)); + x += dx; + } + } } - legendHeight += rowH; - } - legendWidth += 20.0f; - float legendStartY = legendHeight > ui.GetBounds().centerY() ? ui.GetBounds().y2() - legendHeight : ui.GetBounds().centerY(); - float legendStartX = ui.GetBounds().x2() - std::min(legendWidth, 200.0f); - - const uint32_t opacity = 140 << 24; - - int legendNum = 0; - for (int i = 0; i < numCategories; i++) { - const char *name = Profiler_GetCategoryName(i); - uint32_t color = nice_colors[i % ARRAY_SIZE(nice_colors)]; - - if (catStatus[i] == PROFILE_CAT_VISIBLE) { - float y = legendStartY + legendNum++ * rowH; - ui.FillRect(UI::Drawable(opacity | color), Bounds(legendStartX, y, rowH - 2, rowH - 2)); - ui.DrawTextShadow(name, legendStartX + rowH + 2, y, 0xFFFFFFFF, ALIGN_VBASELINE); + for (int n = 0; n < historyLength; n++) { + if (total[n] > maxTotal) + maxTotal = total[n]; } - } - float graphWidth = ui.GetBounds().x2() - legendWidth - 20.0f; - float graphHeight = ui.GetBounds().h * 0.8f; - - float dx = graphWidth / historyLength; - - /* - ui.Flush(); - - ui.BeginNoTex(); - */ - - bool area = true; - float minVal = 0.0f; - float maxVal = lastMaxVal; // TODO - adjust to frame length - if (maxVal < 0.001f) - maxVal = 0.001f; - if (maxVal > 1.0f / 15.0f) - maxVal = 1.0f / 15.0f; - - float scale = (graphHeight) / (maxVal - minVal); - - float y_60th = ui.GetBounds().y2() - 10 - (1.0f / 60.0f) * scale; - float y_1ms = ui.GetBounds().y2() - 10 - (1.0f / 1000.0f) * scale; - - ui.FillRect(UI::Drawable(0x80FFFF00), Bounds(0, y_60th, graphWidth, 2)); - ui.FillRect(UI::Drawable(0x80FFFF00), Bounds(0, y_1ms, graphWidth, 2)); - ui.DrawTextShadow("1/60s", 5, y_60th, 0x80FFFF00); - ui.DrawTextShadow("1ms", 5, y_1ms, 0x80FFFF00); - - std::vector total; - total.resize(historyLength); - - maxVal = 0.0f; - float maxTotal = 0.0f; - for (int i = 0; i < numCategories; i++) { - if (catStatus[i] == PROFILE_CAT_IGNORE) { - continue; - } - Profiler_GetHistory(i, &history[0], historyLength); - - float x = 10; - uint32_t col = nice_colors[i % ARRAY_SIZE(nice_colors)]; - if (area) - col = opacity | (col & 0xFFFFFF); - UI::Drawable color(col); - UI::Drawable outline((opacity >> 1) | 0xFFFFFF); - - float bottom = ui.GetBounds().y2(); if (area) { - for (int n = 0; n < historyLength; n++) { - float val = history[n]; - float valY1 = bottom - 10 - (val + total[n]) * scale; - float valY2 = bottom - 10 - total[n] * scale; - ui.FillRect(outline, Bounds(x, valY2, dx, 1.0f)); - ui.FillRect(color, Bounds(x, valY1, dx, valY2 - valY1)); - x += dx; - total[n] += val; + maxVal = maxTotal; + } + + lastMaxVal = lastMaxVal * 0.95f + maxVal * 0.05f; + } + if (g_Config.bSimpleFrameStats) { + PROFILE_THIS_SCOPE("timing"); + int numCategories = Profiler_GetNumCategories(); + int historyLength = Profiler_GetHistoryLength(); + + ui.SetFontStyle(ui.theme->uiFont); + + static float lastMaxVal = 1.0f / 60.0f; + float legendMinVal = lastMaxVal * (1.0f / 120.0f); + + std::vector history(historyLength); + std::vector catStatus(numCategories); + + float rowH = 30.0f; + float legendHeight = 0.0f; + float legendWidth = 80.0f; +/* for (int i = 0; i < numCategories; i++) { + const char *name = Profiler_GetCategoryName(i); + if (!strcmp(name, "timing")) { + catStatus[i] = PROFILE_CAT_IGNORE; + continue; } - } else { - for (int n = 0; n < historyLength; n++) { - float val = history[n]; - if (val > maxVal) - maxVal = val; - float valY = bottom - 10 - history[n] * scale; - ui.FillRect(color, Bounds(x, valY, dx, 5)); - x += dx; + }*/ + + float legendStartY = 40.0f; + float legendStartX = 5.0f; + + int legendNum = 0; + float total = 0; + + for (int i = 0; i < numCategories; i++) { + const char *name = Profiler_GetCategoryName(i); + Profiler_GetHistory(i, &history[0], 30); + float val = 0; + for (int n = 0; n < 30; n++) { + val += history[n]; + } + val /= 30; + float vps, fps, actual_fps; + __DisplayGetFPS(&vps, &fps, &actual_fps); + val *= 1000.0f; // Value in ms ("%.2f ms") + val = (100.0f * val) / (1.0f / fps * 1000.0f); // Value in % ("%.1f%%") + total += val; + if (catStatus[i] == PROFILE_CAT_VISIBLE) { + float y = legendStartY + legendNum++ * rowH; + ui.DrawTextShadow(name, legendStartX, y, 0xFFFFFFFF, ALIGN_VBASELINE); + ui.DrawTextShadow(StringFromFormat("%.1f%%", val).c_str(), legendStartX + 128, y, 0xFFFFFFFF, ALIGN_VBASELINE); } } + ui.DrawTextShadow("Total:", legendStartX, legendStartY + legendNum * rowH, 0xFFFFFFFF, ALIGN_VBASELINE); + ui.DrawTextShadow(StringFromFormat("%.1f%%", total).c_str(), legendStartX + 128, legendStartY + legendNum * rowH, 0xFFFFFFFF, ALIGN_VBASELINE); } - - for (int n = 0; n < historyLength; n++) { - if (total[n] > maxTotal) - maxTotal = total[n]; - } - - if (area) { - maxVal = maxTotal; - } - - lastMaxVal = lastMaxVal * 0.95f + maxVal * 0.05f; -#endif } diff --git a/UI/ProfilerDraw.h b/UI/ProfilerDraw.h index 4de6d4c806..e415179833 100644 --- a/UI/ProfilerDraw.h +++ b/UI/ProfilerDraw.h @@ -2,8 +2,4 @@ class UIContext; -#ifdef USE_PROFILER - -void DrawProfile(UIContext &ui); - -#endif \ No newline at end of file +void DrawProfile(UIContext &ui); \ No newline at end of file diff --git a/ext/native/profiler/profiler.h b/ext/native/profiler/profiler.h index f615e2e88c..46a276c536 100644 --- a/ext/native/profiler/profiler.h +++ b/ext/native/profiler/profiler.h @@ -4,10 +4,6 @@ // NOTE : This profiler is very single-threaded. Cannot be used from multiple threads yet. -// #define USE_PROFILER - -#ifdef USE_PROFILER - class DrawBuffer; void internal_profiler_init(); @@ -36,11 +32,3 @@ private: #define PROFILE_INIT() internal_profiler_init(); #define PROFILE_THIS_SCOPE(cat) ProfileThis _profile_scoped(cat); #define PROFILE_END_FRAME() internal_profiler_end_frame(); - -#else - -#define PROFILE_INIT() -#define PROFILE_THIS_SCOPE(cat) -#define PROFILE_END_FRAME() - -#endif