Merge pull request #6638 from GPUCode/new-log

common: Backport yuzu log improvements
This commit is contained in:
GPUCode 2023-07-06 23:44:54 +03:00 committed by GitHub
commit 4ccd9f24fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 1201 additions and 750 deletions

View file

@ -203,7 +203,7 @@ void Process::Run(s32 main_thread_priority, u32 stack_size) {
status = ProcessStatus::Running;
vm_manager.LogLayout(Log::Level::Debug);
vm_manager.LogLayout(Common::Log::Level::Debug);
Kernel::SetupMainThread(kernel, codeset->entrypoint, main_thread_priority, SharedFrom(this));
}

View file

@ -529,7 +529,7 @@ ResultCode SVC::ControlMemory(u32* out_addr, u32 addr0, u32 addr1, u32 size, u32
return ERR_INVALID_COMBINATION;
}
process.vm_manager.LogLayout(Log::Level::Trace);
process.vm_manager.LogLayout(Common::Log::Level::Trace);
return RESULT_SUCCESS;
}

View file

@ -239,10 +239,10 @@ ResultCode VMManager::ReprotectRange(VAddr target, u32 size, VMAPermission new_p
return RESULT_SUCCESS;
}
void VMManager::LogLayout(Log::Level log_level) const {
void VMManager::LogLayout(Common::Log::Level log_level) const {
for (const auto& p : vma_map) {
const VirtualMemoryArea& vma = p.second;
LOG_GENERIC(::Log::Class::Kernel, log_level, "{:08X} - {:08X} size: {:8X} {}{}{} {}",
LOG_GENERIC(Common::Log::Class::Kernel, log_level, "{:08X} - {:08X} size: {:8X} {}{}{} {}",
vma.base, vma.base + vma.size, vma.size,
(u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-',
(u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-',

View file

@ -202,7 +202,7 @@ public:
ResultCode ReprotectRange(VAddr target, u32 size, VMAPermission new_perms);
/// Dumps the address space layout to the log, for debugging
void LogLayout(Log::Level log_level) const;
void LogLayout(Common::Log::Level log_level) const;
/// Gets a list of backing memory blocks for the specified range
ResultVal<std::vector<std::pair<MemoryRef, u32>>> GetBackingBlocksForRange(VAddr address,

View file

@ -9,6 +9,7 @@
#include <boost/serialization/unique_ptr.hpp>
#include <cryptopp/osrng.h>
#include <cryptopp/sha.h>
#include <fmt/format.h>
#include "common/archives.h"
#include "common/file_util.h"
#include "common/logging/log.h"

View file

@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <fmt/format.h>
#include "common/alignment.h"
#include "common/settings.h"
#include "common/string_util.h"

View file

@ -7,6 +7,7 @@
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/unique_ptr.hpp>
#include <fmt/format.h>
#include "common/string_util.h"
#include "common/swap.h"
#include "core/core.h"