mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 06:21:19 +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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue