From 6740fff17931a42cf3d80c5d801830d81fda6a59 Mon Sep 17 00:00:00 2001 From: Ty Lamontagne Date: Thu, 4 May 2023 19:12:15 -0400 Subject: [PATCH] Profiling: Fix missing cast breaking VTune builds on Linux Also remove now-pointless SW-JIT VTune code. --- common/Perf.cpp | 2 +- pcsx2/GS/Renderers/Common/GSFunctionMap.h | 40 ----------------------- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/common/Perf.cpp b/common/Perf.cpp index 4b280378f2..9246cbbaba 100644 --- a/common/Perf.cpp +++ b/common/Perf.cpp @@ -177,7 +177,7 @@ namespace Perf iJIT_Method_Load_V2 ml = {}; ml.method_id = iJIT_GetNewMethodID(); ml.method_name = const_cast(symbol); - ml.method_load_address = ptr; + ml.method_load_address = const_cast(ptr); ml.method_size = static_cast(size); iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2, &ml); } diff --git a/pcsx2/GS/Renderers/Common/GSFunctionMap.h b/pcsx2/GS/Renderers/Common/GSFunctionMap.h index 573d7188ae..e7ffd75aa1 100644 --- a/pcsx2/GS/Renderers/Common/GSFunctionMap.h +++ b/pcsx2/GS/Renderers/Common/GSFunctionMap.h @@ -215,46 +215,6 @@ public: ret = (VALUE)cg.getCode(); m_cgmap[key] = ret; - -#ifdef ENABLE_VTUNE - - // vtune method registration - - // if(iJIT_IsProfilingActive()) // always > 0 - { - std::string name = fmt::format("%s<%016llx>()", m_name.c_str(), (u64)key); - - iJIT_Method_Load ml; - - memset(&ml, 0, sizeof(ml)); - - ml.method_id = iJIT_GetNewMethodID(); - ml.method_name = (char*)name.c_str(); - ml.method_load_address = (void*)cg.getCode(); - ml.method_size = (unsigned int)cg.getSize(); - - iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, &ml); -/* - name = format("c:/temp1/%s_%016llx.bin", m_name.c_str(), (u64)key); - - if(FILE* fp = fopen(name.c_str(), "wb")) - { - fputc(0x0F, fp); fputc(0x0B, fp); - fputc(0xBB, fp); fputc(0x6F, fp); fputc(0x00, fp); fputc(0x00, fp); fputc(0x00, fp); - fputc(0x64, fp); fputc(0x67, fp); fputc(0x90, fp); - - fwrite(cg.getCode(), cg.getSize(), 1, fp); - - fputc(0xBB, fp); fputc(0xDE, fp); fputc(0x00, fp); fputc(0x00, fp); fputc(0x00, fp); - fputc(0x64, fp); fputc(0x67, fp); fputc(0x90, fp); - fputc(0x0F, fp); fputc(0x0B, fp); - - fclose(fp); - } -*/ - } - -#endif } return ret;