mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-16 03:38:30 +12:00
Debugging: Add minimalist PPC profiler
This commit is contained in:
parent
45072fccb2
commit
9499870cc9
7 changed files with 281 additions and 43 deletions
|
@ -83,6 +83,20 @@ RPLStoredSymbol* rplSymbolStorage_getByAddress(MPTR address)
|
|||
return rplSymbolStorage.map_symbolByAddress[address];
|
||||
}
|
||||
|
||||
RPLStoredSymbol* rplSymbolStorage_getByClosestAddress(MPTR address)
|
||||
{
|
||||
// highly inefficient but doesn't matter for now
|
||||
std::unique_lock<std::mutex> lck(rplSymbolStorage.m_symbolStorageMutex);
|
||||
for(uint32 i=0; i<4096; i++)
|
||||
{
|
||||
RPLStoredSymbol* symbol = rplSymbolStorage.map_symbolByAddress[address];
|
||||
if(symbol)
|
||||
return symbol;
|
||||
address -= 4;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void rplSymbolStorage_remove(RPLStoredSymbol* storedSymbol)
|
||||
{
|
||||
std::unique_lock<std::mutex> lck(rplSymbolStorage.m_symbolStorageMutex);
|
||||
|
|
|
@ -12,6 +12,7 @@ RPLStoredSymbol* rplSymbolStorage_store(const char* libName, const char* symbolN
|
|||
void rplSymbolStorage_remove(RPLStoredSymbol* storedSymbol);
|
||||
void rplSymbolStorage_removeRange(MPTR address, sint32 length);
|
||||
RPLStoredSymbol* rplSymbolStorage_getByAddress(MPTR address);
|
||||
RPLStoredSymbol* rplSymbolStorage_getByClosestAddress(MPTR address);
|
||||
void rplSymbolStorage_createJumpProxySymbol(MPTR jumpAddress, MPTR destAddress);
|
||||
|
||||
std::unordered_map<uint32, RPLStoredSymbol*>& rplSymbolStorage_lockSymbolMap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue