Integrate the MicroProfile profiling library
This brings goodies such as a configurable user interface and multi-threaded timeline view.
This commit is contained in:
parent
c7745408f7
commit
0fcabd2b11
24 changed files with 11142 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "common/common_types.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/profiler.h"
|
||||
|
||||
#include "core/memory.h"
|
||||
|
@ -3522,8 +3523,11 @@ enum {
|
|||
FETCH_EXCEPTION
|
||||
};
|
||||
|
||||
MICROPROFILE_DEFINE(DynCom_Decode, "DynCom", "Decode", MP_RGB(255, 64, 64));
|
||||
|
||||
static int InterpreterTranslate(ARMul_State* cpu, int& bb_start, u32 addr) {
|
||||
Common::Profiling::ScopeTimer timer_decode(profile_decode);
|
||||
MICROPROFILE_SCOPE(DynCom_Decode);
|
||||
|
||||
// Decode instruction, get index
|
||||
// Allocate memory and init InsCream
|
||||
|
@ -3588,8 +3592,11 @@ static int clz(unsigned int x) {
|
|||
return n;
|
||||
}
|
||||
|
||||
MICROPROFILE_DEFINE(DynCom_Execute, "DynCom", "Execute", MP_RGB(255, 0, 0));
|
||||
|
||||
unsigned InterpreterMainLoop(ARMul_State* cpu) {
|
||||
Common::Profiling::ScopeTimer timer_execute(profile_execute);
|
||||
MICROPROFILE_SCOPE(DynCom_Execute);
|
||||
|
||||
#undef RM
|
||||
#undef RS
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/bit_field.h"
|
||||
#include "common/microprofile.h"
|
||||
|
||||
#include "core/memory.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
|
@ -229,6 +230,10 @@ void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
|
|||
|
||||
if (Pica::g_debug_context)
|
||||
Pica::g_debug_context->OnEvent(Pica::DebugContext::Event::BufferSwapped, nullptr);
|
||||
|
||||
if (screen_id == 0) {
|
||||
MicroProfileFlip();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <map>
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/profiler.h"
|
||||
#include "common/string_util.h"
|
||||
#include "common/symbols.h"
|
||||
|
@ -969,8 +970,11 @@ static const FunctionDef* GetSVCInfo(u32 func_num) {
|
|||
return &SVC_Table[func_num];
|
||||
}
|
||||
|
||||
MICROPROFILE_DEFINE(Kernel_SVC, "Kernel", "SVC", MP_RGB(70, 200, 70));
|
||||
|
||||
void CallSVC(u32 immediate) {
|
||||
Common::Profiling::ScopeTimer timer_svc(profiler_svc);
|
||||
MICROPROFILE_SCOPE(Kernel_SVC);
|
||||
|
||||
const FunctionDef* info = GetSVCInfo(immediate);
|
||||
if (info) {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "common/color.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/vector_math.h"
|
||||
|
||||
#include "core/settings.h"
|
||||
|
@ -85,6 +86,9 @@ static Math::Vec4<u8> DecodePixel(Regs::PixelFormat input_format, const u8* src_
|
|||
}
|
||||
}
|
||||
|
||||
MICROPROFILE_DEFINE(GPU_DisplayTransfer, "GPU", "DisplayTransfer", MP_RGB(100, 100, 255));
|
||||
MICROPROFILE_DEFINE(GPU_CmdlistProcessing, "GPU", "Cmdlist Processing", MP_RGB(100, 255, 100));
|
||||
|
||||
template <typename T>
|
||||
inline void Write(u32 addr, const T data) {
|
||||
addr -= HW::VADDR_GPU;
|
||||
|
@ -150,6 +154,8 @@ inline void Write(u32 addr, const T data) {
|
|||
|
||||
case GPU_REG_INDEX(display_transfer_config.trigger):
|
||||
{
|
||||
MICROPROFILE_SCOPE(GPU_DisplayTransfer);
|
||||
|
||||
const auto& config = g_regs.display_transfer_config;
|
||||
if (config.trigger & 1) {
|
||||
|
||||
|
@ -344,6 +350,8 @@ inline void Write(u32 addr, const T data) {
|
|||
const auto& config = g_regs.command_processor_config;
|
||||
if (config.trigger & 1)
|
||||
{
|
||||
MICROPROFILE_SCOPE(GPU_CmdlistProcessing);
|
||||
|
||||
u32* buffer = (u32*)Memory::GetPhysicalPointer(config.GetPhysicalAddress());
|
||||
|
||||
if (Pica::g_debug_context && Pica::g_debug_context->recorder) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue