Skip to content

Commit

Permalink
Merge pull request #3533 from Sonicadvance1/remove_debugstore
Browse files Browse the repository at this point in the history
FEXCore: Remove DebugStore map
  • Loading branch information
lioncash authored Mar 30, 2024
2 parents aa26b62 + 8564290 commit 2ad170b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
5 changes: 0 additions & 5 deletions FEXCore/Source/Interface/Core/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ namespace FEXCore::Context {

Thread->LookupCache->ClearCache();
Thread->CPUBackend->ClearCache();
Thread->DebugStore.clear();
}

static void IRDumper(FEXCore::Core::InternalThreadState *Thread, IR::IREmitter *IREmitter, uint64_t GuestRIP, IR::RegisterAllocationData* RA) {
Expand Down Expand Up @@ -957,9 +956,6 @@ namespace FEXCore::Context {
// Only the lookup cache is cleared here, so that old code can keep running until next compilation
std::lock_guard<std::recursive_mutex> lkLookupCache(Thread->LookupCache->WriteLock);
Thread->LookupCache->ClearCache();

// DebugStore also needs to be cleared
Thread->DebugStore.clear();
}
}
}
Expand All @@ -975,7 +971,6 @@ namespace FEXCore::Context {

std::lock_guard<std::recursive_mutex> lk(Thread->LookupCache->WriteLock);

Thread->DebugStore.erase(GuestRIP);
Thread->LookupCache->Erase(Thread->CurrentFrame, GuestRIP);
}

Expand Down
2 changes: 1 addition & 1 deletion FEXCore/Source/Interface/Core/LookupCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class LookupCache {
constexpr static size_t L1_ENTRIES = 1 * 1024 * 1024; // Must be a power of 2
constexpr static size_t L1_ENTRIES_MASK = L1_ENTRIES - 1;

// This needs to be taken before reads or writes to L2, L3, CodePages, Thread::DebugStore,
// This needs to be taken before reads or writes to L2, L3, CodePages,
// and before writes to L1. Concurrent access from a thread that this LookupCache doesn't belong to
// may only happen during cross thread invalidation (::Erase).
// All other operations must be done from the owning thread.
Expand Down
11 changes: 0 additions & 11 deletions FEXCore/include/FEXCore/Debug/InternalThreadState.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <FEXCore/Utils/InterruptableConditionVariable.h>
#include <FEXCore/Utils/Threads.h>
#include <FEXCore/fextl/memory.h>
#include <FEXCore/fextl/robin_map.h>
#include <FEXCore/fextl/vector.h>
#include <FEXHeaderUtils/TypeDefines.h>

Expand Down Expand Up @@ -63,14 +62,6 @@ namespace FEXCore::Core {
fextl::vector<FEXCore::CPU::Relocation> *Relocations;
};

struct LocalIREntry {
uint64_t StartAddr;
uint64_t Length;
fextl::unique_ptr<FEXCore::IR::IRListView, FEXCore::IR::IRListViewDeleter> IR;
FEXCore::IR::RegisterAllocationData::UniquePtr RAData;
fextl::unique_ptr<FEXCore::Core::DebugData> DebugData;
};

// Buffered JIT symbol tracking.
struct JITSymbolBuffer {
// Maximum buffer size to ensure we are a page in size.
Expand Down Expand Up @@ -115,8 +106,6 @@ namespace FEXCore::Core {
fextl::unique_ptr<FEXCore::CPU::CPUBackend> CPUBackend;
fextl::unique_ptr<FEXCore::LookupCache> LookupCache;

fextl::robin_map<uint64_t, LocalIREntry> DebugStore;

fextl::unique_ptr<FEXCore::Frontend::Decoder> FrontendDecoder;
fextl::unique_ptr<FEXCore::IR::PassManager> PassManager;
FEXCore::HLE::ThreadManagement ThreadManager;
Expand Down

0 comments on commit 2ad170b

Please sign in to comment.