mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-01-31 00:55:19 +01:00
Debug logging
Should give a decent idea of how nasty these AddressSpace calls are in games that lost perf.
This commit is contained in:
@@ -234,6 +234,8 @@ struct AddressSpace::Impl {
|
||||
ULONG prot = region->prot;
|
||||
s32 fd = region->fd;
|
||||
|
||||
LOG_INFO(Core, "addr = {:#x}, size = {:#x}, offset = {:#x}", virtual_addr, size, phys_addr);
|
||||
|
||||
void* ptr = nullptr;
|
||||
if (phys_addr != -1) {
|
||||
HANDLE backing = fd != -1 ? reinterpret_cast<HANDLE>(fd) : backing_handle;
|
||||
@@ -272,6 +274,8 @@ struct AddressSpace::Impl {
|
||||
PAddr phys_base = region->phys_base;
|
||||
u64 size = region->size;
|
||||
|
||||
LOG_INFO(Core, "addr = {:#x}, size = {:#x}, offset = {:#x}", virtual_addr, size, phys_base);
|
||||
|
||||
bool ret = false;
|
||||
if (phys_base != -1) {
|
||||
ret = UnmapViewOfFile2(process, reinterpret_cast<PVOID>(virtual_addr),
|
||||
@@ -318,6 +322,8 @@ struct AddressSpace::Impl {
|
||||
MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER)) {
|
||||
UNREACHABLE_MSG("Region splitting failed: {}", Common::GetLastErrorMsg());
|
||||
}
|
||||
LOG_INFO(Core, "Splitting placeholder: addr = {:#x}, size = {:#x}", region.base,
|
||||
region.size);
|
||||
|
||||
// If the mapping was mapped, remap the region.
|
||||
if (region.is_mapped) {
|
||||
@@ -357,6 +363,8 @@ struct AddressSpace::Impl {
|
||||
MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER)) {
|
||||
UNREACHABLE_MSG("Region splitting failed: {}", Common::GetLastErrorMsg());
|
||||
}
|
||||
LOG_INFO(Core, "Splitting placeholder: addr = {:#x}, size = {:#x}", region.base,
|
||||
region.size);
|
||||
|
||||
// If these regions were mapped, then map the unmapped area beyond the requested range.
|
||||
if (region.is_mapped) {
|
||||
@@ -425,6 +433,8 @@ struct AddressSpace::Impl {
|
||||
MEM_RELEASE | MEM_COALESCE_PLACEHOLDERS)) {
|
||||
UNREACHABLE_MSG("Region coalescing failed: {}", Common::GetLastErrorMsg());
|
||||
}
|
||||
LOG_INFO(Core, "Coalescing placeholders: addr = {:#x}, size = {:#x}", it->first,
|
||||
it->second.size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user