summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-08-17 18:25:21 -0300
committerGravatar Yuri Kunde Schlesner2015-08-24 22:16:28 -0300
commit0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237 (patch)
treea1651d48113413e2de1e6e309362511b1ff7ffa8 /src/core/hle
parentcitra-qt: Add helper function to get a monospace QFont (diff)
downloadyuzu-0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237.tar.gz
yuzu-0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237.tar.xz
yuzu-0fcabd2b11a5b1d4d16f6f6bdf1efd54d2c45237.zip
Integrate the MicroProfile profiling library
This brings goodies such as a configurable user interface and multi-threaded timeline view.
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/gsp_gpu.cpp5
-rw-r--r--src/core/hle/svc.cpp4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp
index fde508a13..c3d0d28a5 100644
--- a/src/core/hle/service/gsp_gpu.cpp
+++ b/src/core/hle/service/gsp_gpu.cpp
@@ -3,6 +3,7 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/bit_field.h" 5#include "common/bit_field.h"
6#include "common/microprofile.h"
6 7
7#include "core/memory.h" 8#include "core/memory.h"
8#include "core/hle/kernel/event.h" 9#include "core/hle/kernel/event.h"
@@ -229,6 +230,10 @@ void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
229 230
230 if (Pica::g_debug_context) 231 if (Pica::g_debug_context)
231 Pica::g_debug_context->OnEvent(Pica::DebugContext::Event::BufferSwapped, nullptr); 232 Pica::g_debug_context->OnEvent(Pica::DebugContext::Event::BufferSwapped, nullptr);
233
234 if (screen_id == 0) {
235 MicroProfileFlip();
236 }
232} 237}
233 238
234/** 239/**
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 89ac45a6f..19f750d72 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -5,6 +5,7 @@
5#include <map> 5#include <map>
6 6
7#include "common/logging/log.h" 7#include "common/logging/log.h"
8#include "common/microprofile.h"
8#include "common/profiler.h" 9#include "common/profiler.h"
9#include "common/string_util.h" 10#include "common/string_util.h"
10#include "common/symbols.h" 11#include "common/symbols.h"
@@ -969,8 +970,11 @@ static const FunctionDef* GetSVCInfo(u32 func_num) {
969 return &SVC_Table[func_num]; 970 return &SVC_Table[func_num];
970} 971}
971 972
973MICROPROFILE_DEFINE(Kernel_SVC, "Kernel", "SVC", MP_RGB(70, 200, 70));
974
972void CallSVC(u32 immediate) { 975void CallSVC(u32 immediate) {
973 Common::Profiling::ScopeTimer timer_svc(profiler_svc); 976 Common::Profiling::ScopeTimer timer_svc(profiler_svc);
977 MICROPROFILE_SCOPE(Kernel_SVC);
974 978
975 const FunctionDef* info = GetSVCInfo(immediate); 979 const FunctionDef* info = GetSVCInfo(immediate);
976 if (info) { 980 if (info) {