From 4f3ae6f62ca5858c2b74eba5a15bad5dff580349 Mon Sep 17 00:00:00 2001 From: Mary Date: Sun, 30 Aug 2020 19:06:05 +0200 Subject: [PATCH] Remove the Ryujinx.Debugger project (#1506) This project wasn't really used by anyone and isn't worth mantaining. This commit remove the profiler entirely from Ryujinx and remove the associated CI tasks. --- .github/workflows/build.yml | 2 +- ARMeilleure/ARMeilleure.csproj | 9 - .../Ryujinx.Audio.Renderer.csproj | 14 +- Ryujinx.Audio/Ryujinx.Audio.csproj | 14 +- Ryujinx.Common/Ryujinx.Common.csproj | 14 +- Ryujinx.Debugger/Debugger.cs | 32 - Ryujinx.Debugger/Profiler/DumpProfile.cs | 35 - Ryujinx.Debugger/Profiler/InternalProfile.cs | 223 ----- Ryujinx.Debugger/Profiler/Profile.cs | 143 ---- Ryujinx.Debugger/Profiler/ProfileConfig.cs | 254 ------ Ryujinx.Debugger/Profiler/ProfileSorters.cs | 32 - .../Profiler/ProfilerConfiguration.cs | 29 - Ryujinx.Debugger/Profiler/Settings.cs | 17 - Ryujinx.Debugger/Profiler/TimingFlag.cs | 17 - Ryujinx.Debugger/Profiler/TimingInfo.cs | 174 ---- Ryujinx.Debugger/ProfilerConfig.jsonc | 28 - Ryujinx.Debugger/Ryujinx.Debugger.csproj | 43 - Ryujinx.Debugger/UI/DebuggerWidget.cs | 44 - Ryujinx.Debugger/UI/DebuggerWidget.glade | 44 - Ryujinx.Debugger/UI/ProfilerWidget.cs | 803 ------------------ Ryujinx.Debugger/UI/ProfilerWidget.glade | 232 ----- Ryujinx.Debugger/UI/SkRenderer.cs | 23 - Ryujinx.HLE/HOS/Services/IpcService.cs | 10 - Ryujinx.HLE/PerformanceStatistics.cs | 5 +- Ryujinx.HLE/Ryujinx.HLE.csproj | 15 +- .../Ryujinx.ShaderTools.csproj | 12 +- .../Ryujinx.Tests.Unicorn.csproj | 12 +- Ryujinx.Tests/Ryujinx.Tests.csproj | 12 +- Ryujinx.sln | 108 --- Ryujinx/Program.cs | 3 - Ryujinx/Ryujinx.csproj | 13 +- Ryujinx/Ui/MainWindow.cs | 54 -- Ryujinx/Ui/MainWindow.glade | 8 - 33 files changed, 10 insertions(+), 2468 deletions(-) delete mode 100644 Ryujinx.Debugger/Debugger.cs delete mode 100644 Ryujinx.Debugger/Profiler/DumpProfile.cs delete mode 100644 Ryujinx.Debugger/Profiler/InternalProfile.cs delete mode 100644 Ryujinx.Debugger/Profiler/Profile.cs delete mode 100644 Ryujinx.Debugger/Profiler/ProfileConfig.cs delete mode 100644 Ryujinx.Debugger/Profiler/ProfileSorters.cs delete mode 100644 Ryujinx.Debugger/Profiler/ProfilerConfiguration.cs delete mode 100644 Ryujinx.Debugger/Profiler/Settings.cs delete mode 100644 Ryujinx.Debugger/Profiler/TimingFlag.cs delete mode 100644 Ryujinx.Debugger/Profiler/TimingInfo.cs delete mode 100644 Ryujinx.Debugger/ProfilerConfig.jsonc delete mode 100644 Ryujinx.Debugger/Ryujinx.Debugger.csproj delete mode 100644 Ryujinx.Debugger/UI/DebuggerWidget.cs delete mode 100644 Ryujinx.Debugger/UI/DebuggerWidget.glade delete mode 100644 Ryujinx.Debugger/UI/ProfilerWidget.cs delete mode 100644 Ryujinx.Debugger/UI/ProfilerWidget.glade delete mode 100644 Ryujinx.Debugger/UI/SkRenderer.cs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cca6c60806..cd0fee4a02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] dotnet: ['3.1.100'] - environment: ['Debug', 'Release', 'Profile Debug', 'Profile Release'] + environment: ['Debug', 'Release'] name: ${{ matrix.environment }} build (Dotnet ${{ matrix.dotnet }}, OS ${{ matrix.os }}) steps: - uses: actions/checkout@master diff --git a/ARMeilleure/ARMeilleure.csproj b/ARMeilleure/ARMeilleure.csproj index 2fac4f6395..4a221e691e 100644 --- a/ARMeilleure/ARMeilleure.csproj +++ b/ARMeilleure/ARMeilleure.csproj @@ -14,15 +14,6 @@ true - - true - true - - - - true - - diff --git a/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj b/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj index 391e648add..d49b516638 100644 --- a/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj +++ b/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj @@ -3,29 +3,17 @@ netcoreapp3.1 win-x64;osx-x64;linux-x64 - Debug;Release;Profile Debug;Profile Release + Debug;Release true - - true - TRACE;USE_PROFILING - false - - true - - true - TRACE;USE_PROFILING - true - - diff --git a/Ryujinx.Audio/Ryujinx.Audio.csproj b/Ryujinx.Audio/Ryujinx.Audio.csproj index 7f283a6ef3..56a21e58f0 100644 --- a/Ryujinx.Audio/Ryujinx.Audio.csproj +++ b/Ryujinx.Audio/Ryujinx.Audio.csproj @@ -4,29 +4,17 @@ netcoreapp3.1 8.0 win-x64;osx-x64;linux-x64 - Debug;Release;Profile Debug;Profile Release + Debug;Release true - - true - TRACE;USE_DEBUGGING - false - - true - - true - TRACE;USE_DEBUGGING - true - - diff --git a/Ryujinx.Common/Ryujinx.Common.csproj b/Ryujinx.Common/Ryujinx.Common.csproj index 20cd7439d3..fdc512580c 100644 --- a/Ryujinx.Common/Ryujinx.Common.csproj +++ b/Ryujinx.Common/Ryujinx.Common.csproj @@ -4,29 +4,17 @@ netcoreapp3.1 8.0 win-x64;osx-x64;linux-x64 - Debug;Release;Profile Debug;Profile Release + Debug;Release true - - true - TRACE;USE_DEBUGGING - false - - true - - true - TRACE;USE_DEBUGGING - true - - diff --git a/Ryujinx.Debugger/Debugger.cs b/Ryujinx.Debugger/Debugger.cs deleted file mode 100644 index 6dd3354ce9..0000000000 --- a/Ryujinx.Debugger/Debugger.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using Ryujinx.Debugger.UI; - -namespace Ryujinx.Debugger -{ - public class Debugger : IDisposable - { - public DebuggerWidget Widget { get; set; } - - public Debugger() - { - Widget = new DebuggerWidget(); - } - - public void Enable() - { - Widget.Enable(); - } - - public void Disable() - { - Widget.Disable(); - } - - public void Dispose() - { - Disable(); - - Widget.Dispose(); - } - } -} diff --git a/Ryujinx.Debugger/Profiler/DumpProfile.cs b/Ryujinx.Debugger/Profiler/DumpProfile.cs deleted file mode 100644 index e73314d4a7..0000000000 --- a/Ryujinx.Debugger/Profiler/DumpProfile.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Ryujinx.Common; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; - -namespace Ryujinx.Debugger.Profiler -{ - public static class DumpProfile - { - public static void ToFile(string path, InternalProfile profile) - { - String fileData = "Category,Session Group,Session Item,Count,Average(ms),Total(ms)\r\n"; - - foreach (KeyValuePair time in profile.Timers.OrderBy(key => key.Key.Tag)) - { - fileData += $"{time.Key.Category}," + - $"{time.Key.SessionGroup}," + - $"{time.Key.SessionItem}," + - $"{time.Value.Count}," + - $"{time.Value.AverageTime / PerformanceCounter.TicksPerMillisecond}," + - $"{time.Value.TotalTime / PerformanceCounter.TicksPerMillisecond}\r\n"; - } - - // Ensure file directory exists before write - FileInfo fileInfo = new FileInfo(path); - if (fileInfo == null) - throw new Exception("Unknown logging error, probably a bad file path"); - if (fileInfo.Directory != null && !fileInfo.Directory.Exists) - Directory.CreateDirectory(fileInfo.Directory.FullName); - - File.WriteAllText(fileInfo.FullName, fileData); - } - } -} diff --git a/Ryujinx.Debugger/Profiler/InternalProfile.cs b/Ryujinx.Debugger/Profiler/InternalProfile.cs deleted file mode 100644 index 0bda9e049b..0000000000 --- a/Ryujinx.Debugger/Profiler/InternalProfile.cs +++ /dev/null @@ -1,223 +0,0 @@ -using Ryujinx.Common; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace Ryujinx.Debugger.Profiler -{ - public class InternalProfile - { - private struct TimerQueueValue - { - public ProfileConfig Config; - public long Time; - public bool IsBegin; - } - - internal Dictionary Timers { get; set; } - - private readonly object _timerQueueClearLock = new object(); - private ConcurrentQueue _timerQueue; - - private int _sessionCounter = 0; - - // Cleanup thread - private readonly Thread _cleanupThread; - private bool _cleanupRunning; - private readonly long _history; - private long _preserve; - - // Timing flags - private TimingFlag[] _timingFlags; - private long[] _timingFlagAverages; - private long[] _timingFlagLast; - private long[] _timingFlagLastDelta; - private int _timingFlagCount; - private int _timingFlagIndex; - - private int _maxFlags; - - private Action _timingFlagCallback; - - public InternalProfile(long history, int maxFlags) - { - _maxFlags = maxFlags; - Timers = new Dictionary(); - _timingFlags = new TimingFlag[_maxFlags]; - _timingFlagAverages = new long[(int)TimingFlagType.Count]; - _timingFlagLast = new long[(int)TimingFlagType.Count]; - _timingFlagLastDelta = new long[(int)TimingFlagType.Count]; - _timerQueue = new ConcurrentQueue(); - _history = history; - _cleanupRunning = true; - - // Create cleanup thread. - _cleanupThread = new Thread(CleanupLoop) - { - Name = "Profiler.CleanupThread" - }; - _cleanupThread.Start(); - } - - private void CleanupLoop() - { - bool queueCleared = false; - - while (_cleanupRunning) - { - // Ensure we only ever have 1 instance modifying timers or timerQueue - if (Monitor.TryEnter(_timerQueueClearLock)) - { - queueCleared = ClearTimerQueue(); - - // Calculate before foreach to mitigate redundant calculations - long cleanupBefore = PerformanceCounter.ElapsedTicks - _history; - long preserveStart = _preserve - _history; - - // Each cleanup is self contained so run in parallel for maximum efficiency - Parallel.ForEach(Timers, (t) => t.Value.Cleanup(cleanupBefore, preserveStart, _preserve)); - - Monitor.Exit(_timerQueueClearLock); - } - - // Only sleep if queue was successfully cleared - if (queueCleared) - { - Thread.Sleep(5); - } - } - } - - private bool ClearTimerQueue() - { - int count = 0; - - while (_timerQueue.TryDequeue(out TimerQueueValue item)) - { - if (!Timers.TryGetValue(item.Config, out TimingInfo value)) - { - value = new TimingInfo(); - Timers.Add(item.Config, value); - } - - if (item.IsBegin) - { - value.Begin(item.Time); - } - else - { - value.End(item.Time); - } - - // Don't block for too long as memory disposal is blocked while this function runs - if (count++ > 10000) - { - return false; - } - } - - return true; - } - - public void FlagTime(TimingFlagType flagType) - { - int flagId = (int)flagType; - - _timingFlags[_timingFlagIndex] = new TimingFlag() - { - FlagType = flagType, - Timestamp = PerformanceCounter.ElapsedTicks - }; - - _timingFlagCount = Math.Max(_timingFlagCount + 1, _maxFlags); - - // Work out average - if (_timingFlagLast[flagId] != 0) - { - _timingFlagLastDelta[flagId] = _timingFlags[_timingFlagIndex].Timestamp - _timingFlagLast[flagId]; - _timingFlagAverages[flagId] = (_timingFlagAverages[flagId] == 0) ? _timingFlagLastDelta[flagId] : - (_timingFlagLastDelta[flagId] + _timingFlagAverages[flagId]) >> 1; - } - _timingFlagLast[flagId] = _timingFlags[_timingFlagIndex].Timestamp; - - // Notify subscribers - _timingFlagCallback?.Invoke(_timingFlags[_timingFlagIndex]); - - if (++_timingFlagIndex >= _maxFlags) - { - _timingFlagIndex = 0; - } - } - - public void BeginProfile(ProfileConfig config) - { - _timerQueue.Enqueue(new TimerQueueValue() - { - Config = config, - IsBegin = true, - Time = PerformanceCounter.ElapsedTicks, - }); - } - - public void EndProfile(ProfileConfig config) - { - _timerQueue.Enqueue(new TimerQueueValue() - { - Config = config, - IsBegin = false, - Time = PerformanceCounter.ElapsedTicks, - }); - } - - public string GetSession() - { - // Can be called from multiple threads so we need to ensure no duplicate sessions are generated - return Interlocked.Increment(ref _sessionCounter).ToString(); - } - - public List> GetProfilingData() - { - _preserve = PerformanceCounter.ElapsedTicks; - - lock (_timerQueueClearLock) - { - ClearTimerQueue(); - return Timers.ToList(); - } - } - - public TimingFlag[] GetTimingFlags() - { - int count = Math.Max(_timingFlagCount, _maxFlags); - TimingFlag[] outFlags = new TimingFlag[count]; - - for (int i = 0, sourceIndex = _timingFlagIndex; i < count; i++, sourceIndex++) - { - if (sourceIndex >= _maxFlags) - sourceIndex = 0; - outFlags[i] = _timingFlags[sourceIndex]; - } - - return outFlags; - } - - public (long[], long[]) GetTimingAveragesAndLast() - { - return (_timingFlagAverages, _timingFlagLastDelta); - } - - public void RegisterFlagReceiver(Action receiver) - { - _timingFlagCallback = receiver; - } - - public void Dispose() - { - _cleanupRunning = false; - _cleanupThread.Join(); - } - } -} diff --git a/Ryujinx.Debugger/Profiler/Profile.cs b/Ryujinx.Debugger/Profiler/Profile.cs deleted file mode 100644 index 1be638dac2..0000000000 --- a/Ryujinx.Debugger/Profiler/Profile.cs +++ /dev/null @@ -1,143 +0,0 @@ -using Ryujinx.Common; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; - -namespace Ryujinx.Debugger.Profiler -{ - public static class Profile - { - public static float UpdateRate => _settings.UpdateRate; - public static long HistoryLength => _settings.History; - -#pragma warning disable CS0649 - private static InternalProfile _profileInstance; -#pragma warning restore CS0649 - private static ProfilerSettings _settings; - - [Conditional("USE_DEBUGGING")] - public static void Initialize() - { - var config = ProfilerConfiguration.Load(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ProfilerConfig.jsonc")); - - _settings = new ProfilerSettings() - { - Enabled = config.Enabled, - FileDumpEnabled = config.DumpPath != "", - DumpLocation = config.DumpPath, - UpdateRate = (config.UpdateRate <= 0) ? -1 : 1.0f / config.UpdateRate, - History = (long)(config.History * PerformanceCounter.TicksPerSecond), - MaxLevel = config.MaxLevel, - MaxFlags = config.MaxFlags, - }; - } - - public static bool ProfilingEnabled() - { -#if USE_DEBUGGING - if (!_settings.Enabled) - return false; - - if (_profileInstance == null) - _profileInstance = new InternalProfile(_settings.History, _settings.MaxFlags); - - return true; -#else - return false; -#endif - } - - [Conditional("USE_DEBUGGING")] - public static void FinishProfiling() - { - if (!ProfilingEnabled()) - return; - - if (_settings.FileDumpEnabled) - DumpProfile.ToFile(_settings.DumpLocation, _profileInstance); - - _profileInstance.Dispose(); - } - - [Conditional("USE_DEBUGGING")] - public static void FlagTime(TimingFlagType flagType) - { - if (!ProfilingEnabled()) - return; - _profileInstance.FlagTime(flagType); - } - - [Conditional("USE_DEBUGGING")] - public static void RegisterFlagReceiver(Action receiver) - { - if (!ProfilingEnabled()) - return; - _profileInstance.RegisterFlagReceiver(receiver); - } - - [Conditional("USE_DEBUGGING")] - public static void Begin(ProfileConfig config) - { - if (!ProfilingEnabled()) - return; - if (config.Level > _settings.MaxLevel) - return; - _profileInstance.BeginProfile(config); - } - - [Conditional("USE_DEBUGGING")] - public static void End(ProfileConfig config) - { - if (!ProfilingEnabled()) - return; - if (config.Level > _settings.MaxLevel) - return; - _profileInstance.EndProfile(config); - } - - public static string GetSession() - { -#if USE_DEBUGGING - if (!ProfilingEnabled()) - return null; - return _profileInstance.GetSession(); -#else - return ""; -#endif - } - - public static List> GetProfilingData() - { -#if USE_DEBUGGING - if (!ProfilingEnabled()) - return new List>(); - return _profileInstance.GetProfilingData(); -#else - return new List>(); -#endif - } - - public static TimingFlag[] GetTimingFlags() - { -#if USE_DEBUGGING - if (!ProfilingEnabled()) - return new TimingFlag[0]; - return _profileInstance.GetTimingFlags(); -#else - return new TimingFlag[0]; -#endif - } - - public static (long[], long[]) GetTimingAveragesAndLast() - { -#if USE_DEBUGGING - if (!ProfilingEnabled()) - return (new long[0], new long[0]); - return _profileInstance.GetTimingAveragesAndLast(); -#else - return (new long[0], new long[0]); -#endif - } - } -} diff --git a/Ryujinx.Debugger/Profiler/ProfileConfig.cs b/Ryujinx.Debugger/Profiler/ProfileConfig.cs deleted file mode 100644 index 0ec3e26db2..0000000000 --- a/Ryujinx.Debugger/Profiler/ProfileConfig.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; - -namespace Ryujinx.Debugger.Profiler -{ - public struct ProfileConfig : IEquatable - { - public string Category; - public string SessionGroup; - public string SessionItem; - - public int Level; - - // Private cached variables - private string _cachedTag; - private string _cachedSession; - private string _cachedSearch; - - // Public helpers to get config in more user friendly format, - // Cached because they never change and are called often - public string Search - { - get - { - if (_cachedSearch == null) - { - _cachedSearch = $"{Category}.{SessionGroup}.{SessionItem}"; - } - - return _cachedSearch; - } - } - - public string Tag - { - get - { - if (_cachedTag == null) - _cachedTag = $"{Category}{(Session == "" ? "" : $" ({Session})")}"; - return _cachedTag; - } - } - - public string Session - { - get - { - if (_cachedSession == null) - { - if (SessionGroup != null && SessionItem != null) - { - _cachedSession = $"{SessionGroup}: {SessionItem}"; - } - else if (SessionGroup != null) - { - _cachedSession = $"{SessionGroup}"; - } - else if (SessionItem != null) - { - _cachedSession = $"---: {SessionItem}"; - } - else - { - _cachedSession = ""; - } - } - - return _cachedSession; - } - } - - /// - /// The default comparison is far too slow for the number of comparisons needed because it doesn't know what's important to compare - /// - /// Object to compare to - /// - public bool Equals(ProfileConfig cmpObj) - { - // Order here is important. - // Multiple entries with the same item is considerable less likely that multiple items with the same group. - // Likewise for group and category. - return (cmpObj.SessionItem == SessionItem && - cmpObj.SessionGroup == SessionGroup && - cmpObj.Category == Category); - } - } - - /// - /// Predefined configs to make profiling easier, - /// nested so you can reference as Profiles.Category.Group.Item where item and group may be optional - /// - public static class Profiles - { - public static class CPU - { - public static ProfileConfig TranslateTier0 = new ProfileConfig() - { - Category = "CPU", - SessionGroup = "TranslateTier0" - }; - - public static ProfileConfig TranslateTier1 = new ProfileConfig() - { - Category = "CPU", - SessionGroup = "TranslateTier1" - }; - } - - public static class Input - { - public static ProfileConfig ControllerInput = new ProfileConfig - { - Category = "Input", - SessionGroup = "ControllerInput" - }; - - public static ProfileConfig TouchInput = new ProfileConfig - { - Category = "Input", - SessionGroup = "TouchInput" - }; - } - - public static class GPU - { - public static class Engine2d - { - public static ProfileConfig TextureCopy = new ProfileConfig() - { - Category = "GPU.Engine2D", - SessionGroup = "TextureCopy" - }; - } - - public static class Engine3d - { - public static ProfileConfig CallMethod = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "CallMethod", - }; - - public static ProfileConfig VertexEnd = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "VertexEnd" - }; - - public static ProfileConfig ClearBuffers = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "ClearBuffers" - }; - - public static ProfileConfig SetFrameBuffer = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "SetFrameBuffer", - }; - - public static ProfileConfig SetZeta = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "SetZeta" - }; - - public static ProfileConfig UploadShaders = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "UploadShaders" - }; - - public static ProfileConfig UploadTextures = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "UploadTextures" - }; - - public static ProfileConfig UploadTexture = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "UploadTexture" - }; - - public static ProfileConfig UploadConstBuffers = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "UploadConstBuffers" - }; - - public static ProfileConfig UploadVertexArrays = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "UploadVertexArrays" - }; - - public static ProfileConfig ConfigureState = new ProfileConfig() - { - Category = "GPU.Engine3D", - SessionGroup = "ConfigureState" - }; - } - - public static class EngineM2mf - { - public static ProfileConfig CallMethod = new ProfileConfig() - { - Category = "GPU.EngineM2mf", - SessionGroup = "CallMethod", - }; - - public static ProfileConfig Execute = new ProfileConfig() - { - Category = "GPU.EngineM2mf", - SessionGroup = "Execute", - }; - } - - public static class EngineP2mf - { - public static ProfileConfig CallMethod = new ProfileConfig() - { - Category = "GPU.EngineP2mf", - SessionGroup = "CallMethod", - }; - - public static ProfileConfig Execute = new ProfileConfig() - { - Category = "GPU.EngineP2mf", - SessionGroup = "Execute", - }; - - public static ProfileConfig PushData = new ProfileConfig() - { - Category = "GPU.EngineP2mf", - SessionGroup = "PushData", - }; - } - - public static class Shader - { - public static ProfileConfig Decompile = new ProfileConfig() - { - Category = "GPU.Shader", - SessionGroup = "Decompile", - }; - } - } - - public static ProfileConfig ServiceCall = new ProfileConfig() - { - Category = "ServiceCall", - }; - } -} diff --git a/Ryujinx.Debugger/Profiler/ProfileSorters.cs b/Ryujinx.Debugger/Profiler/ProfileSorters.cs deleted file mode 100644 index 2b730af58a..0000000000 --- a/Ryujinx.Debugger/Profiler/ProfileSorters.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Ryujinx.Debugger.Profiler -{ - public static class ProfileSorters - { - public class InstantAscending : IComparer> - { - public int Compare(KeyValuePair pair1, KeyValuePair pair2) - => pair2.Value.Instant.CompareTo(pair1.Value.Instant); - } - - public class AverageAscending : IComparer> - { - public int Compare(KeyValuePair pair1, KeyValuePair pair2) - => pair2.Value.AverageTime.CompareTo(pair1.Value.AverageTime); - } - - public class TotalAscending : IComparer> - { - public int Compare(KeyValuePair pair1, KeyValuePair pair2) - => pair2.Value.TotalTime.CompareTo(pair1.Value.TotalTime); - } - - public class TagAscending : IComparer> - { - public int Compare(KeyValuePair pair1, KeyValuePair pair2) - => StringComparer.CurrentCulture.Compare(pair1.Key.Search, pair2.Key.Search); - } - } -} diff --git a/Ryujinx.Debugger/Profiler/ProfilerConfiguration.cs b/Ryujinx.Debugger/Profiler/ProfilerConfiguration.cs deleted file mode 100644 index 73ef8f5555..0000000000 --- a/Ryujinx.Debugger/Profiler/ProfilerConfiguration.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Ryujinx.Common.Utilities; -using System.IO; - -namespace Ryujinx.Debugger.Profiler -{ - public class ProfilerConfiguration - { - public bool Enabled { get; private set; } - public string DumpPath { get; private set; } - public float UpdateRate { get; private set; } - public int MaxLevel { get; private set; } - public int MaxFlags { get; private set; } - public float History { get; private set; } - - /// - /// Loads a configuration file from disk - /// - /// The path to the JSON configuration file - public static ProfilerConfiguration Load(string path) - { - if (!File.Exists(path)) - { - throw new FileNotFoundException($"Profiler configuration file {path} not found"); - } - - return JsonHelper.DeserializeFromFile(path); - } - } -} diff --git a/Ryujinx.Debugger/Profiler/Settings.cs b/Ryujinx.Debugger/Profiler/Settings.cs deleted file mode 100644 index 52aa0d8427..0000000000 --- a/Ryujinx.Debugger/Profiler/Settings.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Ryujinx.Debugger.Profiler -{ - public class ProfilerSettings - { - // Default settings for profiler - public bool Enabled { get; set; } = false; - public bool FileDumpEnabled { get; set; } = false; - public string DumpLocation { get; set; } = ""; - public float UpdateRate { get; set; } = 0.1f; - public int MaxLevel { get; set; } = 0; - public int MaxFlags { get; set; } = 1000; - - // 19531225 = 5 seconds in ticks on most pc's. - // It should get set on boot to the time specified in config - public long History { get; set; } = 19531225; - } -} diff --git a/Ryujinx.Debugger/Profiler/TimingFlag.cs b/Ryujinx.Debugger/Profiler/TimingFlag.cs deleted file mode 100644 index 8a34ac99f3..0000000000 --- a/Ryujinx.Debugger/Profiler/TimingFlag.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Ryujinx.Debugger.Profiler -{ - public enum TimingFlagType - { - FrameSwap = 0, - SystemFrame = 1, - - // Update this for new flags - Count = 2, - } - - public struct TimingFlag - { - public TimingFlagType FlagType; - public long Timestamp; - } -} diff --git a/Ryujinx.Debugger/Profiler/TimingInfo.cs b/Ryujinx.Debugger/Profiler/TimingInfo.cs deleted file mode 100644 index 90bd63d291..0000000000 --- a/Ryujinx.Debugger/Profiler/TimingInfo.cs +++ /dev/null @@ -1,174 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Ryujinx.Debugger.Profiler -{ - public struct Timestamp - { - public long BeginTime; - public long EndTime; - } - - public class TimingInfo - { - // Timestamps - public long TotalTime { get; set; } - public long Instant { get; set; } - - // Measurement counts - public int Count { get; set; } - public int InstantCount { get; set; } - - // Work out average - public long AverageTime => (Count == 0) ? -1 : TotalTime / Count; - - // Intentionally not locked as it's only a get count - public bool IsActive => _timestamps.Count > 0; - - public long BeginTime - { - get - { - lock (_timestampLock) - { - if (_depth > 0) - { - return _currentTimestamp.BeginTime; - } - - return -1; - } - } - } - - // Timestamp collection - private List _timestamps; - private readonly object _timestampLock = new object(); - private readonly object _timestampListLock = new object(); - private Timestamp _currentTimestamp; - - // Depth of current timer, - // each begin call increments and each end call decrements - private int _depth; - - public TimingInfo() - { - _timestamps = new List(); - _depth = 0; - } - - public void Begin(long beginTime) - { - lock (_timestampLock) - { - // Finish current timestamp if already running - if (_depth > 0) - { - EndUnsafe(beginTime); - } - - BeginUnsafe(beginTime); - _depth++; - } - } - - private void BeginUnsafe(long beginTime) - { - _currentTimestamp.BeginTime = beginTime; - _currentTimestamp.EndTime = -1; - } - - public void End(long endTime) - { - lock (_timestampLock) - { - _depth--; - - if (_depth < 0) - { - throw new Exception("Timing info end called without corresponding begin"); - } - - EndUnsafe(endTime); - - // Still have others using this timing info so recreate start for them - if (_depth > 0) - { - BeginUnsafe(endTime); - } - } - } - - private void EndUnsafe(long endTime) - { - _currentTimestamp.EndTime = endTime; - lock (_timestampListLock) - { - _timestamps.Add(_currentTimestamp); - } - - long delta = _currentTimestamp.EndTime - _currentTimestamp.BeginTime; - TotalTime += delta; - Instant += delta; - - Count++; - InstantCount++; - } - - // Remove any timestamps before given timestamp to free memory - public void Cleanup(long before, long preserveStart, long preserveEnd) - { - lock (_timestampListLock) - { - int toRemove = 0; - int toPreserveStart = 0; - int toPreserveLen = 0; - - for (int i = 0; i < _timestamps.Count; i++) - { - if (_timestamps[i].EndTime < preserveStart) - { - toPreserveStart++; - InstantCount--; - Instant -= _timestamps[i].EndTime - _timestamps[i].BeginTime; - } - else if (_timestamps[i].EndTime < preserveEnd) - { - toPreserveLen++; - } - else if (_timestamps[i].EndTime < before) - { - toRemove++; - InstantCount--; - Instant -= _timestamps[i].EndTime - _timestamps[i].BeginTime; - } - else - { - // Assume timestamps are in chronological order so no more need to be removed - break; - } - } - - if (toPreserveStart > 0) - { - _timestamps.RemoveRange(0, toPreserveStart); - } - - if (toRemove > 0) - { - _timestamps.RemoveRange(toPreserveLen, toRemove); - } - } - } - - public Timestamp[] GetAllTimestamps() - { - lock (_timestampListLock) - { - Timestamp[] returnTimestamps = new Timestamp[_timestamps.Count]; - _timestamps.CopyTo(returnTimestamps); - return returnTimestamps; - } - } - } -} diff --git a/Ryujinx.Debugger/ProfilerConfig.jsonc b/Ryujinx.Debugger/ProfilerConfig.jsonc deleted file mode 100644 index e671438695..0000000000 --- a/Ryujinx.Debugger/ProfilerConfig.jsonc +++ /dev/null @@ -1,28 +0,0 @@ -{ - // Enable profiling (Only available on a profiling enabled builds) - "enabled": true, - - // Set profile file dump location, if blank file dumping disabled. (e.g. `ProfileDump.csv`) - "dump_path": "", - - // Update rate for profiler UI, in hertz. -1 updates every time a frame is issued - "update_rate": 4.0, - - // Set how long to keep profiling data in seconds, reduce if profiling is taking too much RAM - "history": 5.0, - - // Set the maximum profiling level. Higher values may cause a heavy load on your system but will allow you to profile in more detail - "max_level": 0, - - // Sets the maximum number of flags to keep - "max_flags": 1000, - - // Keyboard Controls - // https://github.com/opentk/opentk/blob/master/src/OpenTK/Input/Key.cs - "controls": { - "buttons": { - // Show/Hide the profiler - "toggle_profiler": "F2" - } - } -} \ No newline at end of file diff --git a/Ryujinx.Debugger/Ryujinx.Debugger.csproj b/Ryujinx.Debugger/Ryujinx.Debugger.csproj deleted file mode 100644 index 4888d75659..0000000000 --- a/Ryujinx.Debugger/Ryujinx.Debugger.csproj +++ /dev/null @@ -1,43 +0,0 @@ - - - - netcoreapp3.1 - 8.0 - Debug;Release;Profile Release;Profile Debug - - - - TRACE;USE_DEBUGGING - - - - TRACE;USE_DEBUGGING - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - diff --git a/Ryujinx.Debugger/UI/DebuggerWidget.cs b/Ryujinx.Debugger/UI/DebuggerWidget.cs deleted file mode 100644 index 1eb45735df..0000000000 --- a/Ryujinx.Debugger/UI/DebuggerWidget.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Gtk; -using System; -using GUI = Gtk.Builder.ObjectAttribute; - -namespace Ryujinx.Debugger.UI -{ - public class DebuggerWidget : Box - { - public event EventHandler DebuggerEnabled; - public event EventHandler DebuggerDisabled; - -#pragma warning disable CS0649 - [GUI] Notebook _widgetNotebook; -#pragma warning restore CS0649 - - public DebuggerWidget() : this(new Builder("Ryujinx.Debugger.UI.DebuggerWidget.glade")) { } - - public DebuggerWidget(Builder builder) : base(builder.GetObject("_debuggerBox").Handle) - { - builder.Autoconnect(this); - - LoadProfiler(); - } - - public void LoadProfiler() - { - ProfilerWidget widget = new ProfilerWidget(); - - widget.RegisterParentDebugger(this); - - _widgetNotebook.AppendPage(widget, new Label("Profiler")); - } - - public void Enable() - { - DebuggerEnabled.Invoke(this, null); - } - - public void Disable() - { - DebuggerDisabled.Invoke(this, null); - } - } -} diff --git a/Ryujinx.Debugger/UI/DebuggerWidget.glade b/Ryujinx.Debugger/UI/DebuggerWidget.glade deleted file mode 100644 index 7e6e691de1..0000000000 --- a/Ryujinx.Debugger/UI/DebuggerWidget.glade +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - DebuggerBox - 1024 - 720 - True - False - vertical - - - True - True - True - True - - - - - - - - - - - - - - - - - - - - - True - True - 0 - - - - diff --git a/Ryujinx.Debugger/UI/ProfilerWidget.cs b/Ryujinx.Debugger/UI/ProfilerWidget.cs deleted file mode 100644 index 84dff5def0..0000000000 --- a/Ryujinx.Debugger/UI/ProfilerWidget.cs +++ /dev/null @@ -1,803 +0,0 @@ -using Gtk; -using Ryujinx.Common; -using Ryujinx.Debugger.Profiler; -using SkiaSharp; -using SkiaSharp.Views.Desktop; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; -using System.Threading; - -using GUI = Gtk.Builder.ObjectAttribute; - -namespace Ryujinx.Debugger.UI -{ - public class ProfilerWidget : Box - { - private Thread _profilerThread; - private double _prevTime; - private bool _profilerRunning; - - private TimingFlag[] _timingFlags; - - private bool _initComplete = false; - private bool _redrawPending = true; - private bool _doStep = false; - - // Layout - private const int LineHeight = 16; - private const int MinimumColumnWidth = 200; - private const int TitleHeight = 24; - private const int TitleFontHeight = 16; - private const int LinePadding = 2; - private const int ColumnSpacing = 15; - private const int FilterHeight = 24; - private const int BottomBarHeight = FilterHeight + LineHeight; - - // Sorting - private List> _unsortedProfileData; - private IComparer> _sortAction = new ProfileSorters.TagAscending(); - - // Flag data - private long[] _timingFlagsAverages; - private long[] _timingFlagsLast; - - // Filtering - private string _filterText = ""; - private bool _regexEnabled = false; - - // Scrolling - private float _scrollPos = 0; - - // Profile data storage - private List> _sortedProfileData; - private long _captureTime; - - // Graph - private SKColor[] _timingFlagColors = new[] - { - new SKColor(150, 25, 25, 50), // FrameSwap = 0 - new SKColor(25, 25, 150, 50), // SystemFrame = 1 - }; - - private const float GraphMoveSpeed = 40000; - private const float GraphZoomSpeed = 50; - - private float _graphZoom = 1; - private float _graphPosition = 0; - private int _rendererHeight => _renderer.AllocatedHeight; - private int _rendererWidth => _renderer.AllocatedWidth; - - // Event management - private long _lastOutputUpdate; - private long _lastOutputDraw; - private long _lastOutputUpdateDuration; - private long _lastOutputDrawDuration; - private double _lastFrameTimeMs; - private double _updateTimer; - private bool _profileUpdated = false; - private readonly object _profileDataLock = new object(); - - private SkRenderer _renderer; - -#pragma warning disable CS0649 - [GUI] ScrolledWindow _scrollview; - [GUI] CheckButton _enableCheckbutton; - [GUI] Scrollbar _outputScrollbar; - [GUI] Entry _filterBox; - [GUI] ComboBox _modeBox; - [GUI] CheckButton _showFlags; - [GUI] CheckButton _showInactive; - [GUI] Button _stepButton; - [GUI] CheckButton _pauseCheckbutton; -#pragma warning restore CS0649 - - public ProfilerWidget() : this(new Builder("Ryujinx.Debugger.UI.ProfilerWidget.glade")) { } - - public ProfilerWidget(Builder builder) : base(builder.GetObject("_profilerBox").Handle) - { - builder.Autoconnect(this); - - this.KeyPressEvent += ProfilerWidget_KeyPressEvent; - - this.Expand = true; - - _renderer = new SkRenderer(); - _renderer.Expand = true; - - _outputScrollbar.ValueChanged += _outputScrollbar_ValueChanged; - - _renderer.DrawGraphs += _renderer_DrawGraphs; - - _filterBox.Changed += _filterBox_Changed; - - _stepButton.Clicked += _stepButton_Clicked; - - _scrollview.Add(_renderer); - - if (Profile.UpdateRate <= 0) - { - // Perform step regardless of flag type - Profile.RegisterFlagReceiver((t) => - { - if (_pauseCheckbutton.Active) - { - _doStep = true; - } - }); - } - } - - private void _stepButton_Clicked(object sender, EventArgs e) - { - if (_pauseCheckbutton.Active) - { - _doStep = true; - } - - _profileUpdated = true; - } - - private void _filterBox_Changed(object sender, EventArgs e) - { - _filterText = _filterBox.Text; - _profileUpdated = true; - } - - private void _outputScrollbar_ValueChanged(object sender, EventArgs e) - { - _scrollPos = -(float)Math.Max(0, _outputScrollbar.Value); - _profileUpdated = true; - } - - private void _renderer_DrawGraphs(object sender, EventArgs e) - { - if (e is SKPaintSurfaceEventArgs se) - { - Draw(se.Surface.Canvas); - } - } - - public void RegisterParentDebugger(DebuggerWidget debugger) - { - debugger.DebuggerEnabled += Debugger_DebuggerAttached; - debugger.DebuggerDisabled += Debugger_DebuggerDettached; - } - - private void Debugger_DebuggerDettached(object sender, EventArgs e) - { - _profilerRunning = false; - - if (_profilerThread != null) - { - _profilerThread.Join(); - } - } - - private void Debugger_DebuggerAttached(object sender, EventArgs e) - { - _profilerRunning = false; - - if (_profilerThread != null) - { - _profilerThread.Join(); - } - - _profilerRunning = true; - - _profilerThread = new Thread(UpdateLoop) - { - Name = "Profiler.UpdateThread" - }; - _profilerThread.Start(); - } - - private void ProfilerWidget_KeyPressEvent(object o, Gtk.KeyPressEventArgs args) - { - switch (args.Event.Key) - { - case Gdk.Key.Left: - _graphPosition += (long)(GraphMoveSpeed * _lastFrameTimeMs); - break; - - case Gdk.Key.Right: - _graphPosition = Math.Max(_graphPosition - (long)(GraphMoveSpeed * _lastFrameTimeMs), 0); - break; - - case Gdk.Key.Up: - _graphZoom = MathF.Min(_graphZoom + (float)(GraphZoomSpeed * _lastFrameTimeMs), 100.0f); - break; - - case Gdk.Key.Down: - _graphZoom = MathF.Max(_graphZoom - (float)(GraphZoomSpeed * _lastFrameTimeMs), 1f); - break; - } - _profileUpdated = true; - } - - public void UpdateLoop() - { - _lastOutputUpdate = PerformanceCounter.ElapsedTicks; - _lastOutputDraw = PerformanceCounter.ElapsedTicks; - - while (_profilerRunning) - { - _lastOutputUpdate = PerformanceCounter.ElapsedTicks; - int timeToSleepMs = (_pauseCheckbutton.Active || !_enableCheckbutton.Active) ? 33 : 1; - - if (Profile.ProfilingEnabled() && _enableCheckbutton.Active) - { - double time = (double)PerformanceCounter.ElapsedTicks / PerformanceCounter.TicksPerSecond; - - Update(time - _prevTime); - - _lastOutputUpdateDuration = PerformanceCounter.ElapsedTicks - _lastOutputUpdate; - _prevTime = time; - - Gdk.Threads.AddIdle(1000, ()=> - { - _renderer.QueueDraw(); - - return true; - }); - } - - Thread.Sleep(timeToSleepMs); - } - } - - public void Update(double frameTime) - { - _lastFrameTimeMs = frameTime; - - // Get timing data if enough time has passed - _updateTimer += frameTime; - - if (_doStep || ((Profile.UpdateRate > 0) && (!_pauseCheckbutton.Active && (_updateTimer > Profile.UpdateRate)))) - { - _updateTimer = 0; - _captureTime = PerformanceCounter.ElapsedTicks; - _timingFlags = Profile.GetTimingFlags(); - _doStep = false; - _profileUpdated = true; - - _unsortedProfileData = Profile.GetProfilingData(); - - (_timingFlagsAverages, _timingFlagsLast) = Profile.GetTimingAveragesAndLast(); - } - - // Filtering - if (_profileUpdated) - { - lock (_profileDataLock) - { - _sortedProfileData = _showInactive.Active ? _unsortedProfileData : _unsortedProfileData.FindAll(kvp => kvp.Value.IsActive); - - if (_sortAction != null) - { - _sortedProfileData.Sort(_sortAction); - } - - if (_regexEnabled) - { - try - { - Regex filterRegex = new Regex(_filterText, RegexOptions.IgnoreCase); - if (_filterText != "") - { - _sortedProfileData = _sortedProfileData.Where((pair => filterRegex.IsMatch(pair.Key.Search))).ToList(); - } - } - catch (ArgumentException) - { - // Skip filtering for invalid regex - } - } - else - { - // Regular filtering - _sortedProfileData = _sortedProfileData.Where((pair => pair.Key.Search.ToLower().Contains(_filterText.ToLower()))).ToList(); - } - } - - _profileUpdated = false; - _redrawPending = true; - _initComplete = true; - } - } - - private string GetTimeString(long timestamp) - { - float time = (float)timestamp / PerformanceCounter.TicksPerMillisecond; - - return (time < 1) ? $"{time * 1000:F3}us" : $"{time:F3}ms"; - } - - private void FilterBackspace() - { - if (_filterText.Length <= 1) - { - _filterText = ""; - } - else - { - _filterText = _filterText.Remove(_filterText.Length - 1, 1); - } - } - - private float GetLineY(float offset, float lineHeight, float padding, bool centre, int line) - { - return offset + lineHeight + padding + ((lineHeight + padding) * line) - ((centre) ? padding : 0); - } - - public void Draw(SKCanvas canvas) - { - _lastOutputDraw = PerformanceCounter.ElapsedTicks; - if (!Visible || - !_initComplete || - !_enableCheckbutton.Active || - !_redrawPending) - { - return; - } - - float viewTop = TitleHeight + 5; - float viewBottom = _rendererHeight - FilterHeight - LineHeight; - - float columnWidth; - float maxColumnWidth = MinimumColumnWidth; - float yOffset = _scrollPos + viewTop; - float xOffset = 10; - float timingWidth; - - float contentHeight = GetLineY(0, LineHeight, LinePadding, false, _sortedProfileData.Count - 1); - - _outputScrollbar.Adjustment.Upper = contentHeight; - _outputScrollbar.Adjustment.Lower = 0; - _outputScrollbar.Adjustment.PageSize = viewBottom - viewTop; - - - SKPaint textFont = new SKPaint() - { - Color = SKColors.White, - TextSize = LineHeight - }; - - SKPaint titleFont = new SKPaint() - { - Color = SKColors.White, - TextSize = TitleFontHeight - }; - - SKPaint evenItemBackground = new SKPaint() - { - Color = SKColors.Gray - }; - - canvas.Save(); - canvas.ClipRect(new SKRect(0, viewTop, _rendererWidth, viewBottom), SKClipOperation.Intersect); - - for (int i = 1; i < _sortedProfileData.Count; i += 2) - { - float top = GetLineY(yOffset, LineHeight, LinePadding, false, i - 1); - float bottom = GetLineY(yOffset, LineHeight, LinePadding, false, i); - - canvas.DrawRect(new SKRect(0, top, _rendererWidth, bottom), evenItemBackground); - } - - lock (_profileDataLock) - { - // Display category - - for (int verticalIndex = 0; verticalIndex < _sortedProfileData.Count; verticalIndex++) - { - KeyValuePair entry = _sortedProfileData[verticalIndex]; - - if (entry.Key.Category == null) - { - continue; - } - - float y = GetLineY(yOffset, LineHeight, LinePadding, true, verticalIndex); - - canvas.DrawText(entry.Key.Category, new SKPoint(xOffset, y), textFont); - - columnWidth = textFont.MeasureText(entry.Key.Category); - - if (columnWidth > maxColumnWidth) - { - maxColumnWidth = columnWidth; - } - } - - canvas.Restore(); - canvas.DrawText("Category", new SKPoint(xOffset, TitleFontHeight + 2), titleFont); - - columnWidth = titleFont.MeasureText("Category"); - - if (columnWidth > maxColumnWidth) - { - maxColumnWidth = columnWidth; - } - - xOffset += maxColumnWidth + ColumnSpacing; - - canvas.DrawLine(new SKPoint(xOffset - ColumnSpacing / 2, 0), new SKPoint(xOffset - ColumnSpacing / 2, viewBottom), textFont); - - // Display session group - maxColumnWidth = MinimumColumnWidth; - - canvas.Save(); - canvas.ClipRect(new SKRect(0, viewTop, _rendererWidth, viewBottom), SKClipOperation.Intersect); - - for (int verticalIndex = 0; verticalIndex < _sortedProfileData.Count; verticalIndex++) - { - KeyValuePair entry = _sortedProfileData[verticalIndex]; - - if (entry.Key.SessionGroup == null) - { - continue; - } - - float y = GetLineY(yOffset, LineHeight, LinePadding, true, verticalIndex); - - canvas.DrawText(entry.Key.SessionGroup, new SKPoint(xOffset, y), textFont); - - columnWidth = textFont.MeasureText(entry.Key.SessionGroup); - - if (columnWidth > maxColumnWidth) - { - maxColumnWidth = columnWidth; - } - } - - canvas.Restore(); - canvas.DrawText("Group", new SKPoint(xOffset, TitleFontHeight + 2), titleFont); - - columnWidth = titleFont.MeasureText("Group"); - - if (columnWidth > maxColumnWidth) - { - maxColumnWidth = columnWidth; - } - - xOffset += maxColumnWidth + ColumnSpacing; - - canvas.DrawLine(new SKPoint(xOffset - ColumnSpacing / 2, 0), new SKPoint(xOffset - ColumnSpacing / 2, viewBottom), textFont); - - // Display session item - maxColumnWidth = MinimumColumnWidth; - - canvas.Save(); - canvas.ClipRect(new SKRect(0, viewTop, _rendererWidth, viewBottom), SKClipOperation.Intersect); - - for (int verticalIndex = 0; verticalIndex < _sortedProfileData.Count; verticalIndex++) - { - KeyValuePair entry = _sortedProfileData[verticalIndex]; - - if (entry.Key.SessionItem == null) - { - continue; - } - - float y = GetLineY(yOffset, LineHeight, LinePadding, true, verticalIndex); - - canvas.DrawText(entry.Key.SessionItem, new SKPoint(xOffset, y), textFont); - - columnWidth = textFont.MeasureText(entry.Key.SessionItem); - - if (columnWidth > maxColumnWidth) - { - maxColumnWidth = columnWidth; - } - } - - canvas.Restore(); - canvas.DrawText("Item", new SKPoint(xOffset, TitleFontHeight + 2), titleFont); - - columnWidth = titleFont.MeasureText("Item"); - - if (columnWidth > maxColumnWidth) - { - maxColumnWidth = columnWidth; - } - - xOffset += maxColumnWidth + ColumnSpacing; - - timingWidth = _rendererWidth - xOffset - 370; - - canvas.Save(); - canvas.ClipRect(new SKRect(0, viewTop, _rendererWidth, viewBottom), SKClipOperation.Intersect); - canvas.DrawLine(new SKPoint(xOffset, 0), new SKPoint(xOffset, _rendererHeight), textFont); - - int mode = _modeBox.Active; - - canvas.Save(); - canvas.ClipRect(new SKRect(xOffset, yOffset,xOffset + timingWidth,yOffset + contentHeight), - SKClipOperation.Intersect); - - switch (mode) - { - case 0: - DrawGraph(xOffset, yOffset, timingWidth, canvas); - break; - case 1: - DrawBars(xOffset, yOffset, timingWidth, canvas); - - canvas.DrawText("Blue: Instant, Green: Avg, Red: Total", - new SKPoint(xOffset, _rendererHeight - TitleFontHeight), titleFont); - break; - } - - canvas.Restore(); - canvas.DrawLine(new SKPoint(xOffset + timingWidth, 0), new SKPoint(xOffset + timingWidth, _rendererHeight), textFont); - - xOffset = _rendererWidth - 360; - - // Display timestamps - long totalInstant = 0; - long totalAverage = 0; - long totalTime = 0; - long totalCount = 0; - - for (int verticalIndex = 0; verticalIndex < _sortedProfileData.Count; verticalIndex++) - { - KeyValuePair entry = _sortedProfileData[verticalIndex]; - - float y = GetLineY(yOffset, LineHeight, LinePadding, true, verticalIndex); - - canvas.DrawText($"{GetTimeString(entry.Value.Instant)} ({entry.Value.InstantCount})", new SKPoint(xOffset, y), textFont); - canvas.DrawText(GetTimeString(entry.Value.AverageTime), new SKPoint(150 + xOffset, y), textFont); - canvas.DrawText(GetTimeString(entry.Value.TotalTime), new SKPoint(260 + xOffset, y), textFont); - - totalInstant += entry.Value.Instant; - totalAverage += entry.Value.AverageTime; - totalTime += entry.Value.TotalTime; - totalCount += entry.Value.InstantCount; - } - - canvas.Restore(); - canvas.DrawLine(new SKPoint(0, viewTop), new SKPoint(_rendererWidth, viewTop), titleFont); - - float yHeight = 0 + TitleFontHeight; - - canvas.DrawText("Instant (Count)", new SKPoint(xOffset, yHeight), titleFont); - canvas.DrawText("Average", new SKPoint(150 + xOffset, yHeight), titleFont); - canvas.DrawText("Total (ms)", new SKPoint(260 + xOffset, yHeight), titleFont); - - // Totals - yHeight = _rendererHeight - FilterHeight + 3; - - int textHeight = LineHeight - 2; - - SKPaint detailFont = new SKPaint() - { - Color = new SKColor(100, 100, 255, 255), - TextSize = textHeight - }; - - canvas.DrawLine(new SkiaSharp.SKPoint(0, viewBottom), new SkiaSharp.SKPoint(_rendererWidth,viewBottom), textFont); - - string hostTimeString = $"Host {GetTimeString(_timingFlagsLast[(int)TimingFlagType.SystemFrame])} " + - $"({GetTimeString(_timingFlagsAverages[(int)TimingFlagType.SystemFrame])})"; - - canvas.DrawText(hostTimeString, new SKPoint(5, yHeight), detailFont); - - float tempWidth = detailFont.MeasureText(hostTimeString); - - detailFont.Color = SKColors.Red; - - string gameTimeString = $"Game {GetTimeString(_timingFlagsLast[(int)TimingFlagType.FrameSwap])} " + - $"({GetTimeString(_timingFlagsAverages[(int)TimingFlagType.FrameSwap])})"; - - canvas.DrawText(gameTimeString, new SKPoint(15 + tempWidth, yHeight), detailFont); - - tempWidth += detailFont.MeasureText(gameTimeString); - - detailFont.Color = SKColors.White; - - canvas.DrawText($"Profiler: Update {GetTimeString(_lastOutputUpdateDuration)} Draw {GetTimeString(_lastOutputDrawDuration)}", - new SKPoint(20 + tempWidth, yHeight), detailFont); - - detailFont.Color = SKColors.White; - - canvas.DrawText($"{GetTimeString(totalInstant)} ({totalCount})", new SKPoint(xOffset, yHeight), detailFont); - canvas.DrawText(GetTimeString(totalAverage), new SKPoint(150 + xOffset, yHeight), detailFont); - canvas.DrawText(GetTimeString(totalTime), new SKPoint(260 + xOffset, yHeight), detailFont); - - _lastOutputDrawDuration = PerformanceCounter.ElapsedTicks - _lastOutputDraw; - } - } - - private void DrawGraph(float xOffset, float yOffset, float width, SKCanvas canvas) - { - if (_sortedProfileData.Count != 0) - { - int left, right; - float top, bottom; - - float graphRight = xOffset + width; - float barHeight = (LineHeight - LinePadding); - long history = Profile.HistoryLength; - double timeWidthTicks = history / (double)_graphZoom; - long graphPositionTicks = (long)(_graphPosition * PerformanceCounter.TicksPerMillisecond); - long ticksPerPixel = (long)(timeWidthTicks / width); - - // Reset start point if out of bounds - if (timeWidthTicks + graphPositionTicks > history) - { - graphPositionTicks = history - (long)timeWidthTicks; - _graphPosition = (float)graphPositionTicks / PerformanceCounter.TicksPerMillisecond; - } - - graphPositionTicks = _captureTime - graphPositionTicks; - - // Draw timing flags - if (_showFlags.Active) - { - TimingFlagType prevType = TimingFlagType.Count; - - SKPaint timingPaint = new SKPaint - { - Color = _timingFlagColors.First() - }; - - foreach (TimingFlag timingFlag in _timingFlags) - { - if (prevType != timingFlag.FlagType) - { - prevType = timingFlag.FlagType; - timingPaint.Color = _timingFlagColors[(int)prevType]; - } - - int x = (int)(graphRight - ((graphPositionTicks - timingFlag.Timestamp) / timeWidthTicks) * width); - - if (x > xOffset) - { - canvas.DrawLine(new SKPoint(x, yOffset), new SKPoint(x, _rendererHeight), timingPaint); - } - } - } - - SKPaint barPaint = new SKPaint() - { - Color = SKColors.Green, - }; - - // Draw bars - for (int verticalIndex = 0; verticalIndex < _sortedProfileData.Count; verticalIndex++) - { - KeyValuePair entry = _sortedProfileData[verticalIndex]; - long furthest = 0; - - bottom = GetLineY(yOffset, LineHeight, LinePadding, false, verticalIndex); - top = bottom + barHeight; - - // Skip rendering out of bounds bars - if (top < 0 || bottom > _rendererHeight) - { - continue; - } - - barPaint.Color = SKColors.Green; - - foreach (Timestamp timestamp in entry.Value.GetAllTimestamps()) - { - // Skip drawing multiple timestamps on same pixel - if (timestamp.EndTime < furthest) - { - continue; - } - - furthest = timestamp.EndTime + ticksPerPixel; - - left = (int)(graphRight - ((graphPositionTicks - timestamp.BeginTime) / timeWidthTicks) * width); - right = (int)(graphRight - ((graphPositionTicks - timestamp.EndTime) / timeWidthTicks) * width); - - left = (int)Math.Max(xOffset +1, left); - - // Make sure width is at least 1px - right = Math.Max(left + 1, right); - - canvas.DrawRect(new SKRect(left, top, right, bottom), barPaint); - } - - // Currently capturing timestamp - barPaint.Color = SKColors.Red; - - long entryBegin = entry.Value.BeginTime; - - if (entryBegin != -1) - { - left = (int)(graphRight - ((graphPositionTicks - entryBegin) / timeWidthTicks) * width); - - // Make sure width is at least 1px - left = Math.Min(left - 1, (int)graphRight); - - left = (int)Math.Max(xOffset + 1, left); - - canvas.DrawRect(new SKRect(left, top, graphRight, bottom), barPaint); - } - } - - string label = $"-{MathF.Round(_graphPosition, 2)} ms"; - - SKPaint labelPaint = new SKPaint() - { - Color = SKColors.White, - TextSize = LineHeight - }; - - float labelWidth = labelPaint.MeasureText(label); - - canvas.DrawText(label,new SKPoint(graphRight - labelWidth - LinePadding, FilterHeight + LinePadding) , labelPaint); - - canvas.DrawText($"-{MathF.Round((float)((timeWidthTicks / PerformanceCounter.TicksPerMillisecond) + _graphPosition), 2)} ms", - new SKPoint(xOffset + LinePadding, FilterHeight + LinePadding), labelPaint); - } - } - - private void DrawBars(float xOffset, float yOffset, float width, SKCanvas canvas) - { - if (_sortedProfileData.Count != 0) - { - long maxAverage = 0; - long maxTotal = 0; - long maxInstant = 0; - - float barHeight = (LineHeight - LinePadding) / 3.0f; - - // Get max values - foreach (KeyValuePair kvp in _sortedProfileData) - { - maxInstant = Math.Max(maxInstant, kvp.Value.Instant); - maxAverage = Math.Max(maxAverage, kvp.Value.AverageTime); - maxTotal = Math.Max(maxTotal, kvp.Value.TotalTime); - } - - SKPaint barPaint = new SKPaint() - { - Color = SKColors.Blue - }; - - for (int verticalIndex = 0; verticalIndex < _sortedProfileData.Count; verticalIndex++) - { - KeyValuePair entry = _sortedProfileData[verticalIndex]; - // Instant - barPaint.Color = SKColors.Blue; - - float bottom = GetLineY(yOffset, LineHeight, LinePadding, false, verticalIndex); - float top = bottom + barHeight; - float right = (float)entry.Value.Instant / maxInstant * width + xOffset; - - // Skip rendering out of bounds bars - if (top < 0 || bottom > _rendererHeight) - { - continue; - } - - canvas.DrawRect(new SKRect(xOffset, top, right, bottom), barPaint); - - // Average - barPaint.Color = SKColors.Green; - - top += barHeight; - bottom += barHeight; - right = (float)entry.Value.AverageTime / maxAverage * width + xOffset; - - canvas.DrawRect(new SKRect(xOffset, top, right, bottom), barPaint); - - // Total - barPaint.Color = SKColors.Red; - - top += barHeight; - bottom += barHeight; - right = (float)entry.Value.TotalTime / maxTotal * width + xOffset; - - canvas.DrawRect(new SKRect(xOffset, top, right, bottom), barPaint); - } - } - } - } -} diff --git a/Ryujinx.Debugger/UI/ProfilerWidget.glade b/Ryujinx.Debugger/UI/ProfilerWidget.glade deleted file mode 100644 index 00dd4f7044..0000000000 --- a/Ryujinx.Debugger/UI/ProfilerWidget.glade +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - - - - - - - 0 - Graph - - - 1 - Bars - - - - - ProfilerBox - True - False - 5 - 5 - 5 - 5 - vertical - 10 - - - Enable Profiler - True - True - False - True - - - False - True - 0 - - - - - True - False - - - True - True - never - in - - - - - - True - True - 0 - - - - - True - False - vertical - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - 10 - - - Show Inactive - True - True - False - True - True - - - False - True - 0 - - - - - Show Flags - True - True - False - True - True - - - False - True - 1 - - - - - Paused - True - True - False - True - - - False - True - 2 - - - - - True - False - - - True - False - View Mode: - - - False - True - 0 - - - - - True - False - viewMode - 0 - - - - 1 - - - - - False - True - 1 - - - - - False - True - 3 - - - - - True - False - - - True - False - Filter: - - - False - True - 0 - - - - - True - True - - - False - True - 1 - - - - - False - True - 4 - - - - - Step - True - True - True - - - False - True - 5 - - - - - False - True - 2 - - - - diff --git a/Ryujinx.Debugger/UI/SkRenderer.cs b/Ryujinx.Debugger/UI/SkRenderer.cs deleted file mode 100644 index a95e4542cc..0000000000 --- a/Ryujinx.Debugger/UI/SkRenderer.cs +++ /dev/null @@ -1,23 +0,0 @@ -using SkiaSharp; -using SkiaSharp.Views.Gtk; -using System; - -namespace Ryujinx.Debugger.UI -{ - public class SkRenderer : SKDrawingArea - { - public event EventHandler DrawGraphs; - - public SkRenderer() - { - this.PaintSurface += SkRenderer_PaintSurface; - } - - private void SkRenderer_PaintSurface(object sender, SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs e) - { - e.Surface.Canvas.Clear(SKColors.Black); - - DrawGraphs.Invoke(this, e); - } - } -} diff --git a/Ryujinx.HLE/HOS/Services/IpcService.cs b/Ryujinx.HLE/HOS/Services/IpcService.cs index 0583e8bad8..cff1b816af 100644 --- a/Ryujinx.HLE/HOS/Services/IpcService.cs +++ b/Ryujinx.HLE/HOS/Services/IpcService.cs @@ -6,7 +6,6 @@ using Ryujinx.HLE.HOS.Kernel.Ipc; using System; using System.Collections.Generic; using System.IO; -using Ryujinx.Debugger.Profiler; using System.Reflection; using System.Linq; @@ -111,16 +110,7 @@ namespace Ryujinx.HLE.HOS.Services { Logger.Debug?.Print(LogClass.KernelIpc, $"{service.GetType().Name}: {processRequest.Name}"); - ProfileConfig profile = Profiles.ServiceCall; - - profile.SessionGroup = service.GetType().Name; - profile.SessionItem = processRequest.Name; - - Profile.Begin(profile); - result = (ResultCode)processRequest.Invoke(service, new object[] { context }); - - Profile.End(profile); } else { diff --git a/Ryujinx.HLE/PerformanceStatistics.cs b/Ryujinx.HLE/PerformanceStatistics.cs index 5abf2628ee..408e5d72ad 100644 --- a/Ryujinx.HLE/PerformanceStatistics.cs +++ b/Ryujinx.HLE/PerformanceStatistics.cs @@ -1,5 +1,4 @@ -using Ryujinx.Debugger.Profiler; -using System.Diagnostics; +using System.Diagnostics; using System.Timers; namespace Ryujinx.HLE @@ -83,13 +82,11 @@ namespace Ryujinx.HLE public void RecordSystemFrameTime() { RecordFrameTime(FrameTypeSystem); - Profile.FlagTime(TimingFlagType.SystemFrame); } public void RecordGameFrameTime() { RecordFrameTime(FrameTypeGame); - Profile.FlagTime(TimingFlagType.FrameSwap); } private void RecordFrameTime(int frameType) diff --git a/Ryujinx.HLE/Ryujinx.HLE.csproj b/Ryujinx.HLE/Ryujinx.HLE.csproj index 0c5855a11f..9fea6e4352 100644 --- a/Ryujinx.HLE/Ryujinx.HLE.csproj +++ b/Ryujinx.HLE/Ryujinx.HLE.csproj @@ -4,29 +4,17 @@ netcoreapp3.1 8.0 win-x64;osx-x64;linux-x64 - Debug;Release;Profile Debug;Profile Release + Debug;Release true - - true - TRACE;USE_DEBUGGING - false - - true - - true - TRACE;USE_DEBUGGING - true - - NU1605 @@ -47,7 +35,6 @@ - diff --git a/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj b/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj index cf3b7ec20a..ad643f49a4 100644 --- a/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj +++ b/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj @@ -9,17 +9,7 @@ 8.0 win-x64;osx-x64;linux-x64 Exe - Debug;Release;Profile Debug;Profile Release - - - - TRACE;USE_DEBUGGING - true - - - - TRACE;USE_DEBUGGING - false + Debug;Release diff --git a/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj b/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj index efd84a0840..c009e6a503 100644 --- a/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj +++ b/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj @@ -5,21 +5,11 @@ 8.0 win-x64;osx-x64;linux-x64 true - Debug;Release;Profile Debug;Profile Release + Debug;Release false - - TRACE;USE_DEBUGGING - true - - - - TRACE;USE_DEBUGGING - false - - diff --git a/Ryujinx.Tests/Ryujinx.Tests.csproj b/Ryujinx.Tests/Ryujinx.Tests.csproj index 3047f05049..60ccc960f9 100644 --- a/Ryujinx.Tests/Ryujinx.Tests.csproj +++ b/Ryujinx.Tests/Ryujinx.Tests.csproj @@ -10,23 +10,13 @@ windows osx linux - Debug;Release;Profile Debug;Profile Release + Debug;Release false - - TRACE;USE_DEBUGGING - true - - - - TRACE;USE_DEBUGGING - false - - diff --git a/Ryujinx.sln b/Ryujinx.sln index 40ee938202..44ab576f6c 100644 --- a/Ryujinx.sln +++ b/Ryujinx.sln @@ -33,8 +33,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Nvdec", "R EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Audio.Renderer", "Ryujinx.Audio.Renderer\Ryujinx.Audio.Renderer.csproj", "{806ACF6D-90B0-45D0-A1AC-5F220F3B3985}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Debugger", "Ryujinx.Debugger\Ryujinx.Debugger.csproj", "{79E4EE34-9C5F-4BE6-8529-A49D32B5B0CC}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{36F870C1-3E5F-485F-B426-F0645AF78751}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig @@ -61,209 +59,103 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Profile Debug|Any CPU = Profile Debug|Any CPU - Profile Release|Any CPU = Profile Release|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU - {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU - {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU - {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Release|Any CPU.Build.0 = Release|Any CPU {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU - {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU - {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU - {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Release|Any CPU.ActiveCfg = Release|Any CPU {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Release|Any CPU.Build.0 = Release|Any CPU {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU - {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU - {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU - {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Release|Any CPU.ActiveCfg = Release|Any CPU {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Release|Any CPU.Build.0 = Release|Any CPU {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU - {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU - {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU - {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Release|Any CPU.ActiveCfg = Release|Any CPU {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Release|Any CPU.Build.0 = Release|Any CPU {5C1D818E-682A-46A5-9D54-30006E26C270}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5C1D818E-682A-46A5-9D54-30006E26C270}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5C1D818E-682A-46A5-9D54-30006E26C270}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU - {5C1D818E-682A-46A5-9D54-30006E26C270}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU - {5C1D818E-682A-46A5-9D54-30006E26C270}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU - {5C1D818E-682A-46A5-9D54-30006E26C270}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {5C1D818E-682A-46A5-9D54-30006E26C270}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C1D818E-682A-46A5-9D54-30006E26C270}.Release|Any CPU.Build.0 = Release|Any CPU {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU - {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU - {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU - {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Release|Any CPU.ActiveCfg = Release|Any CPU {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Release|Any CPU.Build.0 = Release|Any CPU {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU - {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU - {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU - {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Release|Any CPU.ActiveCfg = Release|Any CPU {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Release|Any CPU.Build.0 = Release|Any CPU {ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}.Profile Release|Any CPU.Build.0 = Release|Any CPU {ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABF09A5E-2D8B-4B6F-A51D-5CE414DDB15A}.Release|Any CPU.Build.0 = Release|Any CPU {ADA7EA87-0D63-4D97-9433-922A2124401F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ADA7EA87-0D63-4D97-9433-922A2124401F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ADA7EA87-0D63-4D97-9433-922A2124401F}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ADA7EA87-0D63-4D97-9433-922A2124401F}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {ADA7EA87-0D63-4D97-9433-922A2124401F}.Profile Release|Any CPU.ActiveCfg = Debug|Any CPU - {ADA7EA87-0D63-4D97-9433-922A2124401F}.Profile Release|Any CPU.Build.0 = Debug|Any CPU {ADA7EA87-0D63-4D97-9433-922A2124401F}.Release|Any CPU.ActiveCfg = Release|Any CPU {ADA7EA87-0D63-4D97-9433-922A2124401F}.Release|Any CPU.Build.0 = Release|Any CPU {A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}.Profile Release|Any CPU.ActiveCfg = Debug|Any CPU - {A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}.Profile Release|Any CPU.Build.0 = Debug|Any CPU {A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}.Release|Any CPU.ActiveCfg = Release|Any CPU {A602AE97-91A5-4608-8DF1-EBF4ED7A0B9E}.Release|Any CPU.Build.0 = Release|Any CPU {9558FB96-075D-4219-8FFF-401979DC0B69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9558FB96-075D-4219-8FFF-401979DC0B69}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9558FB96-075D-4219-8FFF-401979DC0B69}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9558FB96-075D-4219-8FFF-401979DC0B69}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {9558FB96-075D-4219-8FFF-401979DC0B69}.Profile Release|Any CPU.ActiveCfg = Debug|Any CPU - {9558FB96-075D-4219-8FFF-401979DC0B69}.Profile Release|Any CPU.Build.0 = Debug|Any CPU {9558FB96-075D-4219-8FFF-401979DC0B69}.Release|Any CPU.ActiveCfg = Release|Any CPU {9558FB96-075D-4219-8FFF-401979DC0B69}.Release|Any CPU.Build.0 = Release|Any CPU {E1B1AD28-289D-47B7-A106-326972240207}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E1B1AD28-289D-47B7-A106-326972240207}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E1B1AD28-289D-47B7-A106-326972240207}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E1B1AD28-289D-47B7-A106-326972240207}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {E1B1AD28-289D-47B7-A106-326972240207}.Profile Release|Any CPU.ActiveCfg = Debug|Any CPU - {E1B1AD28-289D-47B7-A106-326972240207}.Profile Release|Any CPU.Build.0 = Debug|Any CPU {E1B1AD28-289D-47B7-A106-326972240207}.Release|Any CPU.ActiveCfg = Release|Any CPU {E1B1AD28-289D-47B7-A106-326972240207}.Release|Any CPU.Build.0 = Release|Any CPU {03B955CD-AD84-4B93-AAA7-BF17923BBAA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {03B955CD-AD84-4B93-AAA7-BF17923BBAA5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {03B955CD-AD84-4B93-AAA7-BF17923BBAA5}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {03B955CD-AD84-4B93-AAA7-BF17923BBAA5}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {03B955CD-AD84-4B93-AAA7-BF17923BBAA5}.Profile Release|Any CPU.ActiveCfg = Debug|Any CPU - {03B955CD-AD84-4B93-AAA7-BF17923BBAA5}.Profile Release|Any CPU.Build.0 = Debug|Any CPU {03B955CD-AD84-4B93-AAA7-BF17923BBAA5}.Release|Any CPU.ActiveCfg = Release|Any CPU {03B955CD-AD84-4B93-AAA7-BF17923BBAA5}.Release|Any CPU.Build.0 = Release|Any CPU {85A0FA56-DC01-4A42-8808-70DAC76BD66D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {85A0FA56-DC01-4A42-8808-70DAC76BD66D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85A0FA56-DC01-4A42-8808-70DAC76BD66D}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85A0FA56-DC01-4A42-8808-70DAC76BD66D}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {85A0FA56-DC01-4A42-8808-70DAC76BD66D}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {85A0FA56-DC01-4A42-8808-70DAC76BD66D}.Profile Release|Any CPU.Build.0 = Release|Any CPU {85A0FA56-DC01-4A42-8808-70DAC76BD66D}.Release|Any CPU.ActiveCfg = Release|Any CPU {85A0FA56-DC01-4A42-8808-70DAC76BD66D}.Release|Any CPU.Build.0 = Release|Any CPU {806ACF6D-90B0-45D0-A1AC-5F220F3B3985}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {806ACF6D-90B0-45D0-A1AC-5F220F3B3985}.Debug|Any CPU.Build.0 = Debug|Any CPU - {806ACF6D-90B0-45D0-A1AC-5F220F3B3985}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {806ACF6D-90B0-45D0-A1AC-5F220F3B3985}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {806ACF6D-90B0-45D0-A1AC-5F220F3B3985}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {806ACF6D-90B0-45D0-A1AC-5F220F3B3985}.Profile Release|Any CPU.Build.0 = Release|Any CPU {806ACF6D-90B0-45D0-A1AC-5F220F3B3985}.Release|Any CPU.ActiveCfg = Release|Any CPU {806ACF6D-90B0-45D0-A1AC-5F220F3B3985}.Release|Any CPU.Build.0 = Release|Any CPU - {79E4EE34-9C5F-4BE6-8529-A49D32B5B0CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {79E4EE34-9C5F-4BE6-8529-A49D32B5B0CC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {79E4EE34-9C5F-4BE6-8529-A49D32B5B0CC}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU - {79E4EE34-9C5F-4BE6-8529-A49D32B5B0CC}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU - {79E4EE34-9C5F-4BE6-8529-A49D32B5B0CC}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU - {79E4EE34-9C5F-4BE6-8529-A49D32B5B0CC}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU - {79E4EE34-9C5F-4BE6-8529-A49D32B5B0CC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {79E4EE34-9C5F-4BE6-8529-A49D32B5B0CC}.Release|Any CPU.Build.0 = Release|Any CPU {A5E6C691-9E22-4263-8F40-42F002CE66BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A5E6C691-9E22-4263-8F40-42F002CE66BE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A5E6C691-9E22-4263-8F40-42F002CE66BE}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A5E6C691-9E22-4263-8F40-42F002CE66BE}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {A5E6C691-9E22-4263-8F40-42F002CE66BE}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {A5E6C691-9E22-4263-8F40-42F002CE66BE}.Profile Release|Any CPU.Build.0 = Release|Any CPU {A5E6C691-9E22-4263-8F40-42F002CE66BE}.Release|Any CPU.ActiveCfg = Release|Any CPU {A5E6C691-9E22-4263-8F40-42F002CE66BE}.Release|Any CPU.Build.0 = Release|Any CPU {D1CC5322-7325-4F6B-9625-194B30BE1296}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D1CC5322-7325-4F6B-9625-194B30BE1296}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D1CC5322-7325-4F6B-9625-194B30BE1296}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D1CC5322-7325-4F6B-9625-194B30BE1296}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {D1CC5322-7325-4F6B-9625-194B30BE1296}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {D1CC5322-7325-4F6B-9625-194B30BE1296}.Profile Release|Any CPU.Build.0 = Release|Any CPU {D1CC5322-7325-4F6B-9625-194B30BE1296}.Release|Any CPU.ActiveCfg = Release|Any CPU {D1CC5322-7325-4F6B-9625-194B30BE1296}.Release|Any CPU.Build.0 = Release|Any CPU {3DF35E3D-D844-4399-A9A1-A9E923264C17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3DF35E3D-D844-4399-A9A1-A9E923264C17}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3DF35E3D-D844-4399-A9A1-A9E923264C17}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3DF35E3D-D844-4399-A9A1-A9E923264C17}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {3DF35E3D-D844-4399-A9A1-A9E923264C17}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {3DF35E3D-D844-4399-A9A1-A9E923264C17}.Profile Release|Any CPU.Build.0 = Release|Any CPU {3DF35E3D-D844-4399-A9A1-A9E923264C17}.Release|Any CPU.ActiveCfg = Release|Any CPU {3DF35E3D-D844-4399-A9A1-A9E923264C17}.Release|Any CPU.Build.0 = Release|Any CPU {C3002C3C-7B09-4FE7-894A-372EDA22FC6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C3002C3C-7B09-4FE7-894A-372EDA22FC6E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C3002C3C-7B09-4FE7-894A-372EDA22FC6E}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C3002C3C-7B09-4FE7-894A-372EDA22FC6E}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {C3002C3C-7B09-4FE7-894A-372EDA22FC6E}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {C3002C3C-7B09-4FE7-894A-372EDA22FC6E}.Profile Release|Any CPU.Build.0 = Release|Any CPU {C3002C3C-7B09-4FE7-894A-372EDA22FC6E}.Release|Any CPU.ActiveCfg = Release|Any CPU {C3002C3C-7B09-4FE7-894A-372EDA22FC6E}.Release|Any CPU.Build.0 = Release|Any CPU {C35F1536-7DE5-4F9D-9604-B5B4E1561947}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C35F1536-7DE5-4F9D-9604-B5B4E1561947}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C35F1536-7DE5-4F9D-9604-B5B4E1561947}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C35F1536-7DE5-4F9D-9604-B5B4E1561947}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {C35F1536-7DE5-4F9D-9604-B5B4E1561947}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {C35F1536-7DE5-4F9D-9604-B5B4E1561947}.Profile Release|Any CPU.Build.0 = Release|Any CPU {C35F1536-7DE5-4F9D-9604-B5B4E1561947}.Release|Any CPU.ActiveCfg = Release|Any CPU {C35F1536-7DE5-4F9D-9604-B5B4E1561947}.Release|Any CPU.Build.0 = Release|Any CPU {B9AECA11-E248-4886-A10B-81B631CAAF29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B9AECA11-E248-4886-A10B-81B631CAAF29}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B9AECA11-E248-4886-A10B-81B631CAAF29}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B9AECA11-E248-4886-A10B-81B631CAAF29}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {B9AECA11-E248-4886-A10B-81B631CAAF29}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {B9AECA11-E248-4886-A10B-81B631CAAF29}.Profile Release|Any CPU.Build.0 = Release|Any CPU {B9AECA11-E248-4886-A10B-81B631CAAF29}.Release|Any CPU.ActiveCfg = Release|Any CPU {B9AECA11-E248-4886-A10B-81B631CAAF29}.Release|Any CPU.Build.0 = Release|Any CPU {81BB2C11-9408-4EA3-822E-42987AF54429}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {81BB2C11-9408-4EA3-822E-42987AF54429}.Debug|Any CPU.Build.0 = Debug|Any CPU - {81BB2C11-9408-4EA3-822E-42987AF54429}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {81BB2C11-9408-4EA3-822E-42987AF54429}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {81BB2C11-9408-4EA3-822E-42987AF54429}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {81BB2C11-9408-4EA3-822E-42987AF54429}.Profile Release|Any CPU.Build.0 = Release|Any CPU {81BB2C11-9408-4EA3-822E-42987AF54429}.Release|Any CPU.ActiveCfg = Release|Any CPU {81BB2C11-9408-4EA3-822E-42987AF54429}.Release|Any CPU.Build.0 = Release|Any CPU {990F9601-343E-46CB-8529-B498FA761A92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {990F9601-343E-46CB-8529-B498FA761A92}.Debug|Any CPU.Build.0 = Debug|Any CPU - {990F9601-343E-46CB-8529-B498FA761A92}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {990F9601-343E-46CB-8529-B498FA761A92}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {990F9601-343E-46CB-8529-B498FA761A92}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {990F9601-343E-46CB-8529-B498FA761A92}.Profile Release|Any CPU.Build.0 = Release|Any CPU {990F9601-343E-46CB-8529-B498FA761A92}.Release|Any CPU.ActiveCfg = Release|Any CPU {990F9601-343E-46CB-8529-B498FA761A92}.Release|Any CPU.Build.0 = Release|Any CPU {FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}.Profile Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}.Profile Debug|Any CPU.Build.0 = Debug|Any CPU - {FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}.Profile Release|Any CPU.ActiveCfg = Release|Any CPU - {FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}.Profile Release|Any CPU.Build.0 = Release|Any CPU {FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}.Release|Any CPU.ActiveCfg = Release|Any CPU {FD4A2C14-8E3D-4957-ABBE-3C38897B3E2D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/Ryujinx/Program.cs b/Ryujinx/Program.cs index 5320a1eb6d..caa8c6f054 100644 --- a/Ryujinx/Program.cs +++ b/Ryujinx/Program.cs @@ -4,7 +4,6 @@ using Ryujinx.Common.Configuration; using Ryujinx.Common.Logging; using Ryujinx.Common.SystemInfo; using Ryujinx.Configuration; -using Ryujinx.Debugger.Profiler; using Ryujinx.Ui; using OpenTK; using System; @@ -105,8 +104,6 @@ namespace Ryujinx PrintSystemInfo(); - Profile.Initialize(); - Application.Init(); bool hasGlobalProdKeys = File.Exists(Path.Combine(AppDataManager.KeysDirPath, "prod.keys")); diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj index b458c5f449..ffb1d019a8 100644 --- a/Ryujinx/Ryujinx.csproj +++ b/Ryujinx/Ryujinx.csproj @@ -6,20 +6,10 @@ win-x64;osx-x64;linux-x64 Exe true - Debug;Release;Profile Debug;Profile Release + Debug;Release 1.0.0-dirty - - TRACE;USE_DEBUGGING - true - - - - TRACE;USE_DEBUGGING - false - - false @@ -90,7 +80,6 @@ - diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index 0501b96e58..4c9381ac5d 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -7,17 +7,13 @@ using Ryujinx.Common.Configuration; using Ryujinx.Common.Logging; using Ryujinx.Common.System; using Ryujinx.Configuration; -using Ryujinx.Configuration.System; -using Ryujinx.Debugger.Profiler; using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.OpenGL; using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.FileSystem.Content; -using Ryujinx.HLE.HOS.Services.Hid; using System; using System.Diagnostics; using System.IO; -using System.Linq; using System.Reflection; using System.Threading; using System.Threading.Tasks; @@ -45,12 +41,6 @@ namespace Ryujinx.Ui private static bool _gameLoaded; private static bool _ending; -#pragma warning disable CS0169 - private static bool _debuggerOpened; - - private static Debugger.Debugger _debugger; -#pragma warning restore CS0169 - #pragma warning disable CS0169, CS0649, IDE0044 [GUI] MenuBar _menuBar; @@ -62,7 +52,6 @@ namespace Ryujinx.Ui [GUI] MenuItem _firmwareInstallDirectory; [GUI] MenuItem _firmwareInstallFile; [GUI] Label _hostStatus; - [GUI] MenuItem _openDebugger; [GUI] CheckMenuItem _iconToggle; [GUI] CheckMenuItem _developerToggle; [GUI] CheckMenuItem _appToggle; @@ -150,13 +139,6 @@ namespace Ryujinx.Ui if (ConfigurationState.Instance.Ui.GuiColumns.FileSizeColumn) _fileSizeToggle.Active = true; if (ConfigurationState.Instance.Ui.GuiColumns.PathColumn) _pathToggle.Active = true; -#if USE_DEBUGGING - _debugger = new Debugger.Debugger(); - _openDebugger.Activated += _openDebugger_Opened; -#else - _openDebugger.Hide(); -#endif - _gameTable.Model = _tableStore = new ListStore( typeof(bool), typeof(Gdk.Pixbuf), @@ -205,36 +187,6 @@ namespace Ryujinx.Ui _fullScreen.Label = args.Event.NewWindowState.HasFlag(Gdk.WindowState.Fullscreen) ? "Exit Fullscreen" : "Enter Fullscreen"; } -#if USE_DEBUGGING - private void _openDebugger_Opened(object sender, EventArgs e) - { - if (_debuggerOpened) - { - return; - } - - Window debugWindow = new Window("Debugger"); - - debugWindow.SetSizeRequest(1280, 640); - debugWindow.Child = _debugger.Widget; - debugWindow.DeleteEvent += DebugWindow_DeleteEvent; - debugWindow.ShowAll(); - - _debugger.Enable(); - - _debuggerOpened = true; - } - - private void DebugWindow_DeleteEvent(object o, DeleteEventArgs args) - { - _debuggerOpened = false; - - _debugger.Disable(); - - (_debugger.Widget.Parent as Window)?.Remove(_debugger.Widget); - } -#endif - internal static void ApplyTheme() { if (!ConfigurationState.Instance.Ui.EnableCustomTheme) @@ -640,11 +592,6 @@ namespace Ryujinx.Ui private void End(HLE.Switch device) { - -#if USE_DEBUGGING - _debugger.Dispose(); -#endif - if (_ending) { return; @@ -668,7 +615,6 @@ namespace Ryujinx.Ui Dispose(); - Profile.FinishProfiling(); DiscordIntegrationModule.Exit(); Ptc.Dispose(); diff --git a/Ryujinx/Ui/MainWindow.glade b/Ryujinx/Ui/MainWindow.glade index 854e450678..cf8d9a223c 100644 --- a/Ryujinx/Ui/MainWindow.glade +++ b/Ryujinx/Ui/MainWindow.glade @@ -295,14 +295,6 @@ - - - True - False - Open Debugger - True - -