1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

LV2: Silence logging of mutex and cond syscalls

This commit is contained in:
Eladash 2024-03-28 13:24:01 +02:00 committed by Elad Ashkenazi
parent ac034040ce
commit 2f579311b8
3 changed files with 29 additions and 7 deletions

View File

@ -74,7 +74,7 @@ error_code sys_cond_create(ppu_thread& ppu, vm::ptr<u32> cond_id, u32 mutex_id,
{
ppu.state += cpu_flag::wait;
sys_cond.warning("sys_cond_create(cond_id=*0x%x, mutex_id=0x%x, attr=*0x%x)", cond_id, mutex_id, attr);
sys_cond.trace("sys_cond_create(cond_id=*0x%x, mutex_id=0x%x, attr=*0x%x)", cond_id, mutex_id, attr);
auto mutex = idm::get<lv2_obj, lv2_mutex>(mutex_id);
@ -87,6 +87,11 @@ error_code sys_cond_create(ppu_thread& ppu, vm::ptr<u32> cond_id, u32 mutex_id,
const u64 ipc_key = lv2_obj::get_key(_attr);
if (ipc_key)
{
sys_cond.warning("sys_cond_create(cond_id=*0x%x, attr=*0x%x): IPC=0x%016x", cond_id, attr, ipc_key);
}
if (const auto error = lv2_obj::create<lv2_cond>(_attr.pshared, ipc_key, _attr.flags, [&]
{
return std::make_shared<lv2_cond>(
@ -108,7 +113,7 @@ error_code sys_cond_destroy(ppu_thread& ppu, u32 cond_id)
{
ppu.state += cpu_flag::wait;
sys_cond.warning("sys_cond_destroy(cond_id=0x%x)", cond_id);
sys_cond.trace("sys_cond_destroy(cond_id=0x%x)", cond_id);
const auto cond = idm::withdraw<lv2_obj, lv2_cond>(cond_id, [&](lv2_cond& cond) -> CellError
{
@ -129,6 +134,11 @@ error_code sys_cond_destroy(ppu_thread& ppu, u32 cond_id)
return CELL_ESRCH;
}
if (cond->key)
{
sys_cond.warning("sys_cond_destroy(cond_id=0x%x): IPC=0x%016x", cond_id, cond->key);
}
if (cond.ret)
{
return cond.ret;

View File

@ -29,7 +29,7 @@ error_code _sys_lwcond_create(ppu_thread& ppu, vm::ptr<u32> lwcond_id, u32 lwmut
{
ppu.state += cpu_flag::wait;
sys_lwcond.warning(u8"_sys_lwcond_create(lwcond_id=*0x%x, lwmutex_id=0x%x, control=*0x%x, name=0x%llx (“%s”))", lwcond_id, lwmutex_id, control, name, lv2_obj::name_64{std::bit_cast<be_t<u64>>(name)});
sys_lwcond.trace(u8"_sys_lwcond_create(lwcond_id=*0x%x, lwmutex_id=0x%x, control=*0x%x, name=0x%llx (“%s”))", lwcond_id, lwmutex_id, control, name, lv2_obj::name_64{std::bit_cast<be_t<u64>>(name)});
u32 protocol;
@ -62,7 +62,7 @@ error_code _sys_lwcond_destroy(ppu_thread& ppu, u32 lwcond_id)
{
ppu.state += cpu_flag::wait;
sys_lwcond.warning("_sys_lwcond_destroy(lwcond_id=0x%x)", lwcond_id);
sys_lwcond.trace("_sys_lwcond_destroy(lwcond_id=0x%x)", lwcond_id);
std::shared_ptr<lv2_lwcond> _cond;

View File

@ -40,7 +40,7 @@ error_code sys_mutex_create(ppu_thread& ppu, vm::ptr<u32> mutex_id, vm::ptr<sys_
{
ppu.state += cpu_flag::wait;
sys_mutex.warning("sys_mutex_create(mutex_id=*0x%x, attr=*0x%x)", mutex_id, attr);
sys_mutex.trace("sys_mutex_create(mutex_id=*0x%x, attr=*0x%x)", mutex_id, attr);
if (!mutex_id || !attr)
{
@ -49,6 +49,13 @@ error_code sys_mutex_create(ppu_thread& ppu, vm::ptr<u32> mutex_id, vm::ptr<sys_
const auto _attr = *attr;
const u64 ipc_key = lv2_obj::get_key(_attr);
if (ipc_key)
{
sys_mutex.warning("sys_mutex_create(mutex_id=*0x%x, attr=*0x%x): IPC=0x%016x", mutex_id, attr, ipc_key);
}
switch (_attr.protocol)
{
case SYS_SYNC_FIFO: break;
@ -85,7 +92,7 @@ error_code sys_mutex_create(ppu_thread& ppu, vm::ptr<u32> mutex_id, vm::ptr<sys_
_attr.protocol,
_attr.recursive,
_attr.adaptive,
_attr.ipc_key,
ipc_key,
_attr.name_u64);
}))
{
@ -101,7 +108,7 @@ error_code sys_mutex_destroy(ppu_thread& ppu, u32 mutex_id)
{
ppu.state += cpu_flag::wait;
sys_mutex.warning("sys_mutex_destroy(mutex_id=0x%x)", mutex_id);
sys_mutex.trace("sys_mutex_destroy(mutex_id=0x%x)", mutex_id);
const auto mutex = idm::withdraw<lv2_obj, lv2_mutex>(mutex_id, [](lv2_mutex& mutex) -> CellError
{
@ -126,6 +133,11 @@ error_code sys_mutex_destroy(ppu_thread& ppu, u32 mutex_id)
return CELL_ESRCH;
}
if (mutex->key)
{
sys_mutex.warning("sys_mutex_destroy(mutex_id=0x%x): IPC=0x%016x", mutex_id, mutex->key);
}
if (mutex.ret)
{
return mutex.ret;