diff --git a/FEXCore/Source/CMakeLists.txt b/FEXCore/Source/CMakeLists.txt index 971271a789..0690c870cf 100644 --- a/FEXCore/Source/CMakeLists.txt +++ b/FEXCore/Source/CMakeLists.txt @@ -86,7 +86,6 @@ set (SRCS Common/SoftFloat-3e/s_f32UIToCommonNaN.c Interface/Context/Context.cpp Interface/Core/LookupCache.cpp - Interface/Core/BlockSamplingData.cpp Interface/Core/Core.cpp Interface/Core/CPUBackend.cpp Interface/Core/CPUID.cpp diff --git a/FEXCore/Source/Interface/Context/Context.h b/FEXCore/Source/Interface/Context/Context.h index 7863ed6d4f..b44fff4850 100644 --- a/FEXCore/Source/Interface/Context/Context.h +++ b/FEXCore/Source/Interface/Context/Context.h @@ -260,10 +260,6 @@ class ContextImpl final : public FEXCore::Context::Context { FEXCore::Context::ExitHandler CustomExitHandler; -#ifdef BLOCKSTATS - fextl::unique_ptr BlockData; -#endif - SignalDelegator* SignalDelegation {}; X86GeneratedCode X86CodeGen; diff --git a/FEXCore/Source/Interface/Core/BlockSamplingData.cpp b/FEXCore/Source/Interface/Core/BlockSamplingData.cpp deleted file mode 100644 index 6608633065..0000000000 --- a/FEXCore/Source/Interface/Core/BlockSamplingData.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: MIT -#include "Interface/Core/BlockSamplingData.h" -#include -#include -#include -#include - -namespace FEXCore { -void BlockSamplingData::DumpBlockData() { - std::fstream Output; - Output.open("output.csv", std::fstream::out | std::fstream::binary); - - if (!Output.is_open()) { - return; - } - - Output << "Entry, Min, Max, Total, Calls, Average" << std::endl; - - for (auto it : SamplingMap) { - if (!it.second->TotalCalls) { - continue; - } - - Output << "0x" << std::hex << it.first << ", " << std::dec << it.second->Min << ", " << std::dec << it.second->Max << ", " << std::dec - << it.second->TotalTime << ", " << std::dec << it.second->TotalCalls << ", " << std::dec - << ((double)it.second->TotalTime / (double)it.second->TotalCalls) << std::endl; - } - Output.close(); - LogMan::Msg::DFmt("Dumped {} blocks of sampling data", SamplingMap.size()); -} - -BlockSamplingData::BlockData* BlockSamplingData::GetBlockData(uint64_t RIP) { - auto it = SamplingMap.find(RIP); - if (it != SamplingMap.end()) { - return it->second; - } - BlockData* NewData = new BlockData {}; - memset(NewData, 0, sizeof(BlockData)); - NewData->Min = ~0ULL; - SamplingMap[RIP] = NewData; - return NewData; -} - -BlockSamplingData::~BlockSamplingData() { - DumpBlockData(); - for (auto it : SamplingMap) { - delete it.second; - } - SamplingMap.clear(); -} -} // namespace FEXCore diff --git a/FEXCore/Source/Interface/Core/BlockSamplingData.h b/FEXCore/Source/Interface/Core/BlockSamplingData.h deleted file mode 100644 index 8460d832d6..0000000000 --- a/FEXCore/Source/Interface/Core/BlockSamplingData.h +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: MIT -#pragma once - -#include -#include - -namespace FEXCore { -class BlockSamplingData { -public: - struct BlockData { - uint64_t Start, End; - uint64_t Min, Max; - uint64_t TotalTime; - uint64_t TotalCalls; - }; - - BlockData* GetBlockData(uint64_t RIP); - ~BlockSamplingData(); - - void DumpBlockData(); - -private: - std::unordered_map SamplingMap; -}; -} // namespace FEXCore diff --git a/FEXCore/Source/Interface/Core/Core.cpp b/FEXCore/Source/Interface/Core/Core.cpp index 46cedca69b..9408bc9a97 100644 --- a/FEXCore/Source/Interface/Core/Core.cpp +++ b/FEXCore/Source/Interface/Core/Core.cpp @@ -78,9 +78,6 @@ ContextImpl::ContextImpl(const FEXCore::HostFeatures& Features) : HostFeatures {Features} , CPUID {this} , IRCaptureCache {this} { -#ifdef BLOCKSTATS - BlockData = std::make_unique(); -#endif if (Config.CacheObjectCodeCompilation() != FEXCore::Config::ConfigObjectCodeHandler::CONFIG_NONE) { CodeObjectCacheService = fextl::make_unique(this); }