feat: add an in-game performance panel (#1090)

Add in-game performance panel

Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
Juan Pablo Farias
2026-10-17 09:47:51 -03:00
committed by GitHub
parent 415387f00d
commit 6aa3846fb2
35 changed files with 1788 additions and 34 deletions
+17
View File
@@ -15,6 +15,23 @@ namespace Libs::LibKernel::Memory {
void Initialize();
void Shutdown();
// Guest memory usage for the performance panel. Takes only bookkeeping locks, so it never
// waits on the GPU; call it only while the memory subsystem is initialized.
struct DebugStats {
uint64_t direct_total = 0;
uint64_t direct_allocated = 0; // sceKernelAllocateDirectMemory.
uint64_t pooled_allocated = 0; // Memory pool expansions.
uint64_t automatic_allocated = 0; // Extended memory.
uint64_t direct_mapped = 0;
uint64_t flexible_total = 0;
uint64_t flexible_used = 0;
uint64_t pool_committed = 0;
uint64_t cpu_page_entries = 0; // 2 MiB page-table entries in use.
uint64_t gpu_page_entries = 0;
uint64_t page_entries_total = 0; // Per side.
};
[[nodiscard]] DebugStats GetDebugStats();
struct Lifecycle {
static constexpr const char* name = "Memory";
static constexpr auto initialize = Libs::LibKernel::Memory::Initialize;