Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEXCore: Remove DebugStore map #3533

Merged
merged 1 commit into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading