Delete some outdated profiler integrations

This commit is contained in:
Henrik Rydgård committed 2026-01-01 13:55:30 +01:00
1 parent 6c324c6782
commit 8631e77db2
3 files changed
+1 -62

No files matched your search

+1 -52
View File
@@ -40,27 +40,7 @@
#include "Core/MIPS/JitCommon/JitBlockCache.h"
#include "Core/MIPS/JitCommon/JitCommon.h"
// #include "JitBase.h"
// Enable define below to enable oprofile integration. For this to work,
// it requires at least oprofile version 0.9.4, and changing the build
// system to link the Dolphin executable against libopagent. Since the
// dependency is a little inconvenient and this is possibly a slight
// performance hit, it's not enabled by default, but it's useful for
// locating performance issues.
#if defined USE_OPROFILE && USE_OPROFILE
#include <opagent.h>
op_agent_t agent;
#endif
#if defined USE_VTUNE
#include <jitprofiling.h>
#pragma comment(lib, "libittnotify.lib")
#pragma comment(lib, "jitprofiling.lib")
#endif
const u32 INVALID_EXIT = 0xFFFFFFFF;
constexpr u32 INVALID_EXIT = 0xFFFFFFFF;
static uint64_t HashJitBlock(const JitBlock &b) {
PROFILE_THIS_SCOPE("jithash");
@@ -96,9 +76,6 @@ bool JitBlockCache::IsFull() const {
}
void JitBlockCache::Init() {
#if defined USE_OPROFILE && USE_OPROFILE
agent = op_open_agent();
#endif
blocks_ = new JitBlock[MAX_NUM_BLOCKS];
Clear();
}
@@ -108,13 +85,6 @@ void JitBlockCache::Shutdown() {
delete [] blocks_;
blocks_ = 0;
num_blocks_ = 0;
#if defined USE_OPROFILE && USE_OPROFILE
op_close_agent(agent);
#endif
#ifdef USE_VTUNE
iJIT_NotifyEvent(iJVM_EVENT_TYPE_SHUTDOWN, NULL);
#endif
}
// This clears the JIT cache. It's called from JitCache.cpp when the JIT cache
@@ -287,27 +257,6 @@ void JitBlockCache::FinalizeBlock(int block_num, bool block_link) {
if (blockEnd > PSP_GetUserMemoryBase() + halfUserMemory) {
ExpandRange(blockMemRanges_[JITBLOCK_RANGE_RAMTOP], b.originalAddress, blockEnd);
}
#if defined USE_OPROFILE && USE_OPROFILE
char buf[100];
snprintf(buf, sizeof(buf), "EmuCode%x", b.originalAddress);
const u8* blockStart = blocks_[block_num].checkedEntry;
op_write_native_code(agent, buf, (uint64_t)blockStart, blockStart, b.normalEntry + b.codeSize - b.checkedEntry);
#endif
#ifdef USE_VTUNE
snprintf(b.blockName, sizeof(b.blockName), "EmuCode_0x%08x", b.originalAddress);
iJIT_Method_Load jmethod = {0};
jmethod.method_id = iJIT_GetNewMethodID();
jmethod.class_file_name = "";
jmethod.source_file_name = __FILE__;
jmethod.method_load_address = (void*)blocks_[block_num].checkedEntry;
jmethod.method_size = b.normalEntry + b.codeSize - b.checkedEntry;
jmethod.line_number_size = 0;
jmethod.method_name = b.blockName;
iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, (void*)&jmethod);
#endif
}
bool JitBlockCache::RangeMayHaveEmuHacks(u32 start, u32 end) const {