summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp7
-rw-r--r--src/core/hle/service/gsp_gpu.cpp5
-rw-r--r--src/core/hle/svc.cpp4
-rw-r--r--src/core/hw/gpu.cpp8
4 files changed, 24 insertions, 0 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index 422e80b50..01c712f24 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -9,6 +9,7 @@
9 9
10#include "common/common_types.h" 10#include "common/common_types.h"
11#include "common/logging/log.h" 11#include "common/logging/log.h"
12#include "common/microprofile.h"
12#include "common/profiler.h" 13#include "common/profiler.h"
13 14
14#include "core/memory.h" 15#include "core/memory.h"
@@ -3522,8 +3523,11 @@ enum {
3522 FETCH_EXCEPTION 3523 FETCH_EXCEPTION
3523}; 3524};
3524 3525
3526MICROPROFILE_DEFINE(DynCom_Decode, "DynCom", "Decode", MP_RGB(255, 64, 64));
3527
3525static int InterpreterTranslate(ARMul_State* cpu, int& bb_start, u32 addr) { 3528static int InterpreterTranslate(ARMul_State* cpu, int& bb_start, u32 addr) {
3526 Common::Profiling::ScopeTimer timer_decode(profile_decode); 3529 Common::Profiling::ScopeTimer timer_decode(profile_decode);
3530 MICROPROFILE_SCOPE(DynCom_Decode);
3527 3531
3528 // Decode instruction, get index 3532 // Decode instruction, get index
3529 // Allocate memory and init InsCream 3533 // Allocate memory and init InsCream
@@ -3588,8 +3592,11 @@ static int clz(unsigned int x) {
3588 return n; 3592 return n;
3589} 3593}
3590 3594
3595MICROPROFILE_DEFINE(DynCom_Execute, "DynCom", "Execute", MP_RGB(255, 0, 0));
3596
3591unsigned InterpreterMainLoop(ARMul_State* cpu) { 3597unsigned InterpreterMainLoop(ARMul_State* cpu) {
3592 Common::Profiling::ScopeTimer timer_execute(profile_execute); 3598 Common::Profiling::ScopeTimer timer_execute(profile_execute);
3599 MICROPROFILE_SCOPE(DynCom_Execute);
3593 3600
3594 #undef RM 3601 #undef RM
3595 #undef RS 3602 #undef RS
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) {
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 68ae38289..bc7bde903 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -9,6 +9,7 @@
9#include "common/color.h" 9#include "common/color.h"
10#include "common/common_types.h" 10#include "common/common_types.h"
11#include "common/logging/log.h" 11#include "common/logging/log.h"
12#include "common/microprofile.h"
12#include "common/vector_math.h" 13#include "common/vector_math.h"
13 14
14#include "core/settings.h" 15#include "core/settings.h"
@@ -85,6 +86,9 @@ static Math::Vec4<u8> DecodePixel(Regs::PixelFormat input_format, const u8* src_
85 } 86 }
86} 87}
87 88
89MICROPROFILE_DEFINE(GPU_DisplayTransfer, "GPU", "DisplayTransfer", MP_RGB(100, 100, 255));
90MICROPROFILE_DEFINE(GPU_CmdlistProcessing, "GPU", "Cmdlist Processing", MP_RGB(100, 255, 100));
91
88template <typename T> 92template <typename T>
89inline void Write(u32 addr, const T data) { 93inline void Write(u32 addr, const T data) {
90 addr -= HW::VADDR_GPU; 94 addr -= HW::VADDR_GPU;
@@ -150,6 +154,8 @@ inline void Write(u32 addr, const T data) {
150 154
151 case GPU_REG_INDEX(display_transfer_config.trigger): 155 case GPU_REG_INDEX(display_transfer_config.trigger):
152 { 156 {
157 MICROPROFILE_SCOPE(GPU_DisplayTransfer);
158
153 const auto& config = g_regs.display_transfer_config; 159 const auto& config = g_regs.display_transfer_config;
154 if (config.trigger & 1) { 160 if (config.trigger & 1) {
155 161
@@ -344,6 +350,8 @@ inline void Write(u32 addr, const T data) {
344 const auto& config = g_regs.command_processor_config; 350 const auto& config = g_regs.command_processor_config;
345 if (config.trigger & 1) 351 if (config.trigger & 1)
346 { 352 {
353 MICROPROFILE_SCOPE(GPU_CmdlistProcessing);
354
347 u32* buffer = (u32*)Memory::GetPhysicalPointer(config.GetPhysicalAddress()); 355 u32* buffer = (u32*)Memory::GetPhysicalPointer(config.GetPhysicalAddress());
348 356
349 if (Pica::g_debug_context && Pica::g_debug_context->recorder) { 357 if (Pica::g_debug_context && Pica::g_debug_context->recorder) {