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

-2
View File
@@ -497,7 +497,6 @@ void ArmJit::UnlinkBlock(u8 *checkedEntry, u32 originalAddress) {
}
bool ArmJit::ReplaceJalTo(u32 dest) {
#if PPSSPP_ARCH(ARM)
const ReplacementTableEntry *entry = nullptr;
u32 funcSize = 0;
if (!CanReplaceJalTo(dest, &entry, &funcSize)) {
@@ -546,7 +545,6 @@ bool ArmJit::ReplaceJalTo(u32 dest) {
// Add a trigger so that if the inlined code changes, we invalidate this block.
blocks.ProxyBlock(js.blockStart, dest, funcSize / sizeof(u32), GetCodePtr());
#endif
return true;
}
+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 {
-8
View File
@@ -51,10 +51,6 @@ enum class DestroyType {
CLEAR,
};
// Define this in order to get VTune profile support for the Jit generated code.
// Add the VTune include/lib directories to the project directories to get this to build.
// #define USE_VTUNE
// We should be careful not to access these block structures during runtime as they are large.
// Fine to mess with them at block compile time though.
struct JitBlock {
@@ -76,10 +72,6 @@ struct JitBlock {
bool invalid;
bool linkStatus[MAX_JIT_BLOCK_EXITS];
#ifdef USE_VTUNE
char blockName[32];
#endif
// By having a pointer, we avoid a constructor/destructor being generated and dog slow
// performance in debug.
std::vector<u32> *proxyFor;