aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE')
-rw-r--r--Ryujinx.HLE/HOS/Services/IpcService.cs9
-rw-r--r--Ryujinx.HLE/PerformanceStatistics.cs5
-rw-r--r--Ryujinx.HLE/Ryujinx.HLE.csproj14
3 files changed, 26 insertions, 2 deletions
diff --git a/Ryujinx.HLE/HOS/Services/IpcService.cs b/Ryujinx.HLE/HOS/Services/IpcService.cs
index 2a4a9319..b93c8422 100644
--- a/Ryujinx.HLE/HOS/Services/IpcService.cs
+++ b/Ryujinx.HLE/HOS/Services/IpcService.cs
@@ -6,6 +6,7 @@ using Ryujinx.HLE.HOS.Kernel.Ipc;
using System;
using System.Collections.Generic;
using System.IO;
+using Ryujinx.Profiler;
namespace Ryujinx.HLE.HOS.Services
{
@@ -101,7 +102,13 @@ namespace Ryujinx.HLE.HOS.Services
{
Logger.PrintDebug(LogClass.KernelIpc, $"{service.GetType().Name}: {processRequest.Method.Name}");
+ ProfileConfig profile = Profiles.ServiceCall;
+ profile.SessionGroup = service.GetType().Name;
+ profile.SessionItem = processRequest.Method.Name;
+
+ Profile.Begin(profile);
result = processRequest(context);
+ Profile.End(profile);
}
else
{
@@ -203,4 +210,4 @@ namespace Ryujinx.HLE.HOS.Services
return _domainObjects.GetData<IIpcService>(id);
}
}
-} \ No newline at end of file
+}
diff --git a/Ryujinx.HLE/PerformanceStatistics.cs b/Ryujinx.HLE/PerformanceStatistics.cs
index 408e5d72..896ab67b 100644
--- a/Ryujinx.HLE/PerformanceStatistics.cs
+++ b/Ryujinx.HLE/PerformanceStatistics.cs
@@ -1,4 +1,5 @@
-using System.Diagnostics;
+using Ryujinx.Profiler;
+using System.Diagnostics;
using System.Timers;
namespace Ryujinx.HLE
@@ -82,11 +83,13 @@ 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 fd404863..a653b53f 100644
--- a/Ryujinx.HLE/Ryujinx.HLE.csproj
+++ b/Ryujinx.HLE/Ryujinx.HLE.csproj
@@ -3,16 +3,29 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RuntimeIdentifiers>win10-x64;osx-x64;linux-x64</RuntimeIdentifiers>
+ <Configurations>Debug;Release;Profile Debug;Profile Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile Debug|AnyCPU'">
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DefineConstants>TRACE;USE_PROFILING</DefineConstants>
+ <Optimize>false</Optimize>
+ </PropertyGroup>
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile Release|AnyCPU'">
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DefineConstants>TRACE;USE_PROFILING</DefineConstants>
+ <Optimize>true</Optimize>
+ </PropertyGroup>
+
<ItemGroup>
<None Remove="Homebrew.npdm" />
<None Remove="RyujinxProfileImage.jpg" />
@@ -28,6 +41,7 @@
<ProjectReference Include="..\Ryujinx.Audio\Ryujinx.Audio.csproj" />
<ProjectReference Include="..\Ryujinx.Common\Ryujinx.Common.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics\Ryujinx.Graphics.csproj" />
+ <ProjectReference Include="..\Ryujinx.Profiler\Ryujinx.Profiler.csproj" />
</ItemGroup>
<ItemGroup>