mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
sys_tty: Reduce thread dump log spam
Some games just log random errors.
This commit is contained in:
parent
89299eb1f7
commit
164c3fa9cb
@ -128,14 +128,14 @@ error_code sys_tty_write([[maybe_unused]] ppu_thread& ppu, s32 ch, vm::cptr<char
|
|||||||
|
|
||||||
sample = {}; // Remove reference to string
|
sample = {}; // Remove reference to string
|
||||||
|
|
||||||
if (msg.size() >= 2u && ([&]()
|
if (msg.size() >= 2u && [&]()
|
||||||
{
|
{
|
||||||
static thread_local u64 last_write = 0;
|
static thread_local u64 last_write = 0;
|
||||||
|
|
||||||
// Dump thread about every period which TTY was not being touched for about half a second
|
// Dump thread about every period which TTY was not being touched for about half a second
|
||||||
const u64 current = get_system_time();
|
const u64 current = get_system_time();
|
||||||
return current - std::exchange(last_write, current) >= 3'000'000;
|
return current - std::exchange(last_write, current) >= (warning ? 500'000 : 3'000'000);
|
||||||
}() || warning))
|
}())
|
||||||
{
|
{
|
||||||
ppu_log.notice("\n%s", dump_useful_thread_info());
|
ppu_log.notice("\n%s", dump_useful_thread_info());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user