kernel-explorer: Implement PPU scheduler state information

This commit is contained in:
Eladash 2021-05-21 08:48:37 +03:00 committed by Megamouse
parent a7d0c4fb1e
commit dcfd29c2d9
6 changed files with 84 additions and 14 deletions

View file

@ -553,8 +553,13 @@ void kernel_explorer::Update()
idm::select<named_thread<ppu_thread>>([&](u32 id, ppu_thread& ppu)
{
const auto func = ppu.last_function;
add_leaf(find_node(root, additional_nodes::ppu_threads), qstr(fmt::format(u8"PPU 0x%07x: “%s”, PRIO: %d, Joiner: %s, State: %s, %s func: “%s”", id, *ppu.ppu_tname.load(), +ppu.prio, ppu.joiner.load(), ppu.state.load()
, ppu.current_function ? "In" : "Last", func ? func : "")));
const ppu_thread_status status = lv2_obj::ppu_state(&ppu, false);
if (status != PPU_THREAD_STATUS_DELETED)
{
add_leaf(find_node(root, additional_nodes::ppu_threads), qstr(fmt::format(u8"PPU 0x%07x: “%s”, PRIO: %d, Joiner: %s, Status: %s, State: %s, %s func: “%s”", id, *ppu.ppu_tname.load(), +ppu.prio, ppu.joiner.load(), status, ppu.state.load()
, ppu.current_function ? "In" : "Last", func ? func : "")));
}
});
idm::select<named_thread<spu_thread>>([&](u32 /*id*/, spu_thread& spu)