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

Replace sys_io log channel with cell module log channels

For more granular log filtering
This commit is contained in:
Megamouse 2024-06-23 09:22:42 +02:00
parent 7e274a1ff4
commit c2899ad4cb
3 changed files with 47 additions and 47 deletions

View File

@ -11,7 +11,7 @@ error_code sys_config_stop(ppu_thread& ppu);
extern bool is_input_allowed();
LOG_CHANNEL(sys_io);
LOG_CHANNEL(cellKb);
template<>
void fmt_class_string<CellKbError>::format(std::string& out, u64 arg)
@ -77,7 +77,7 @@ void KeyboardHandlerBase::save(utils::serial& ar)
error_code cellKbInit(ppu_thread& ppu, u32 max_connect)
{
sys_io.warning("cellKbInit(max_connect=%d)", max_connect);
cellKb.warning("cellKbInit(max_connect=%d)", max_connect);
auto& handler = g_fxo->get<KeyboardHandlerBase>();
@ -102,7 +102,7 @@ error_code cellKbInit(ppu_thread& ppu, u32 max_connect)
error_code cellKbEnd(ppu_thread& ppu)
{
sys_io.notice("cellKbEnd()");
cellKb.notice("cellKbEnd()");
auto& handler = g_fxo->get<KeyboardHandlerBase>();
@ -123,7 +123,7 @@ error_code cellKbEnd(ppu_thread& ppu)
error_code cellKbClearBuf(u32 port_no)
{
sys_io.trace("cellKbClearBuf(port_no=%d)", port_no);
cellKb.trace("cellKbClearBuf(port_no=%d)", port_no);
auto& handler = g_fxo->get<KeyboardHandlerBase>();
@ -158,7 +158,7 @@ error_code cellKbClearBuf(u32 port_no)
u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode)
{
sys_io.trace("cellKbCnvRawCode(arrange=%d, mkey=%d, led=%d, rawcode=0x%x)", arrange, mkey, led, rawcode);
cellKb.trace("cellKbCnvRawCode(arrange=%d, mkey=%d, led=%d, rawcode=0x%x)", arrange, mkey, led, rawcode);
// CELL_KB_RAWDAT
if (rawcode <= CELL_KEYC_E_UNDEF ||
@ -308,7 +308,7 @@ u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode)
error_code cellKbGetInfo(vm::ptr<CellKbInfo> info)
{
sys_io.trace("cellKbGetInfo(info=*0x%x)", info);
cellKb.trace("cellKbGetInfo(info=*0x%x)", info);
auto& handler = g_fxo->get<KeyboardHandlerBase>();
@ -340,7 +340,7 @@ error_code cellKbGetInfo(vm::ptr<CellKbInfo> info)
error_code cellKbRead(u32 port_no, vm::ptr<CellKbData> data)
{
sys_io.trace("cellKbRead(port_no=%d, data=*0x%x)", port_no, data);
cellKb.trace("cellKbRead(port_no=%d, data=*0x%x)", port_no, data);
auto& handler = g_fxo->get<KeyboardHandlerBase>();
@ -397,7 +397,7 @@ error_code cellKbRead(u32 port_no, vm::ptr<CellKbData> data)
error_code cellKbSetCodeType(u32 port_no, u32 type)
{
sys_io.trace("cellKbSetCodeType(port_no=%d, type=%d)", port_no, type);
cellKb.trace("cellKbSetCodeType(port_no=%d, type=%d)", port_no, type);
auto& handler = g_fxo->get<KeyboardHandlerBase>();
@ -425,7 +425,7 @@ error_code cellKbSetCodeType(u32 port_no, u32 type)
error_code cellKbSetLEDStatus(u32 port_no, u8 led)
{
sys_io.trace("cellKbSetLEDStatus(port_no=%d, led=%d)", port_no, led);
cellKb.trace("cellKbSetLEDStatus(port_no=%d, led=%d)", port_no, led);
auto& handler = g_fxo->get<KeyboardHandlerBase>();
@ -454,7 +454,7 @@ error_code cellKbSetLEDStatus(u32 port_no, u8 led)
error_code cellKbSetReadMode(u32 port_no, u32 rmode)
{
sys_io.trace("cellKbSetReadMode(port_no=%d, rmode=%d)", port_no, rmode);
cellKb.trace("cellKbSetReadMode(port_no=%d, rmode=%d)", port_no, rmode);
auto& handler = g_fxo->get<KeyboardHandlerBase>();
@ -486,7 +486,7 @@ error_code cellKbSetReadMode(u32 port_no, u32 rmode)
error_code cellKbGetConfiguration(u32 port_no, vm::ptr<CellKbConfig> config)
{
sys_io.trace("cellKbGetConfiguration(port_no=%d, config=*0x%x)", port_no, config);
cellKb.trace("cellKbGetConfiguration(port_no=%d, config=*0x%x)", port_no, config);
auto& handler = g_fxo->get<KeyboardHandlerBase>();

View File

@ -12,7 +12,7 @@ error_code sys_config_stop(ppu_thread& ppu);
extern bool is_input_allowed();
LOG_CHANNEL(sys_io);
LOG_CHANNEL(cellMouse);
template<>
void fmt_class_string<CellMouseError>::format(std::string& out, u64 arg)
@ -37,7 +37,7 @@ void fmt_class_string<CellMouseError>::format(std::string& out, u64 arg)
error_code cellMouseInit(ppu_thread& ppu, u32 max_connect)
{
sys_io.notice("cellMouseInit(max_connect=%d)", max_connect);
cellMouse.notice("cellMouseInit(max_connect=%d)", max_connect);
auto& handler = g_fxo->get<MouseHandlerBase>();
@ -60,7 +60,7 @@ error_code cellMouseInit(ppu_thread& ppu, u32 max_connect)
error_code cellMouseClearBuf(u32 port_no)
{
sys_io.trace("cellMouseClearBuf(port_no=%d)", port_no);
cellMouse.trace("cellMouseClearBuf(port_no=%d)", port_no);
auto& handler = g_fxo->get<MouseHandlerBase>();
@ -97,7 +97,7 @@ error_code cellMouseClearBuf(u32 port_no)
error_code cellMouseEnd(ppu_thread& ppu)
{
sys_io.notice("cellMouseEnd()");
cellMouse.notice("cellMouseEnd()");
auto& handler = g_fxo->get<MouseHandlerBase>();
@ -113,7 +113,7 @@ error_code cellMouseEnd(ppu_thread& ppu)
error_code cellMouseGetInfo(vm::ptr<CellMouseInfo> info)
{
sys_io.trace("cellMouseGetInfo(info=*0x%x)", info);
cellMouse.trace("cellMouseGetInfo(info=*0x%x)", info);
auto& handler = g_fxo->get<MouseHandlerBase>();
@ -146,7 +146,7 @@ error_code cellMouseGetInfo(vm::ptr<CellMouseInfo> info)
error_code cellMouseInfoTabletMode(u32 port_no, vm::ptr<CellMouseInfoTablet> info)
{
sys_io.trace("cellMouseInfoTabletMode(port_no=%d, info=*0x%x)", port_no, info);
cellMouse.trace("cellMouseInfoTabletMode(port_no=%d, info=*0x%x)", port_no, info);
auto& handler = g_fxo->get<MouseHandlerBase>();
@ -183,7 +183,7 @@ error_code cellMouseInfoTabletMode(u32 port_no, vm::ptr<CellMouseInfoTablet> inf
error_code cellMouseGetData(u32 port_no, vm::ptr<CellMouseData> data)
{
sys_io.trace("cellMouseGetData(port_no=%d, data=*0x%x)", port_no, data);
cellMouse.trace("cellMouseGetData(port_no=%d, data=*0x%x)", port_no, data);
auto& handler = g_fxo->get<MouseHandlerBase>();
@ -233,7 +233,7 @@ error_code cellMouseGetData(u32 port_no, vm::ptr<CellMouseData> data)
error_code cellMouseGetDataList(u32 port_no, vm::ptr<CellMouseDataList> data)
{
sys_io.trace("cellMouseGetDataList(port_no=%d, data=0x%x)", port_no, data);
cellMouse.trace("cellMouseGetDataList(port_no=%d, data=0x%x)", port_no, data);
auto& handler = g_fxo->get<MouseHandlerBase>();
@ -288,7 +288,7 @@ error_code cellMouseGetDataList(u32 port_no, vm::ptr<CellMouseDataList> data)
error_code cellMouseSetTabletMode(u32 port_no, u32 mode)
{
sys_io.warning("cellMouseSetTabletMode(port_no=%d, mode=%d)", port_no, mode);
cellMouse.warning("cellMouseSetTabletMode(port_no=%d, mode=%d)", port_no, mode);
auto& handler = g_fxo->get<MouseHandlerBase>();
@ -324,7 +324,7 @@ error_code cellMouseSetTabletMode(u32 port_no, u32 mode)
error_code cellMouseGetTabletDataList(u32 port_no, vm::ptr<CellMouseTabletDataList> data)
{
sys_io.warning("cellMouseGetTabletDataList(port_no=%d, data=0x%x)", port_no, data);
cellMouse.warning("cellMouseGetTabletDataList(port_no=%d, data=0x%x)", port_no, data);
auto& handler = g_fxo->get<MouseHandlerBase>();
@ -380,7 +380,7 @@ error_code cellMouseGetTabletDataList(u32 port_no, vm::ptr<CellMouseTabletDataLi
error_code cellMouseGetRawData(u32 port_no, vm::ptr<CellMouseRawData> data)
{
sys_io.trace("cellMouseGetRawData(port_no=%d, data=*0x%x)", port_no, data);
cellMouse.trace("cellMouseGetRawData(port_no=%d, data=*0x%x)", port_no, data);
auto& handler = g_fxo->get<MouseHandlerBase>();

View File

@ -14,7 +14,7 @@ error_code sys_config_stop(ppu_thread& ppu);
extern bool is_input_allowed();
LOG_CHANNEL(sys_io);
LOG_CHANNEL(cellPad);
template<>
void fmt_class_string<CellPadError>::format(std::string& out, u64 arg)
@ -148,7 +148,7 @@ extern void pad_state_notify_state_change(usz index, u32 state)
error_code cellPadInit(ppu_thread& ppu, u32 max_connect)
{
sys_io.warning("cellPadInit(max_connect=%d)", max_connect);
cellPad.warning("cellPadInit(max_connect=%d)", max_connect);
std::lock_guard lock(pad::g_pad_mutex);
@ -182,7 +182,7 @@ error_code cellPadInit(ppu_thread& ppu, u32 max_connect)
error_code cellPadEnd(ppu_thread& ppu)
{
sys_io.notice("cellPadEnd()");
cellPad.notice("cellPadEnd()");
std::lock_guard lock(pad::g_pad_mutex);
@ -218,7 +218,7 @@ void clear_pad_buffer(const std::shared_ptr<Pad>& pad)
error_code cellPadClearBuf(u32 port_no)
{
sys_io.trace("cellPadClearBuf(port_no=%d)", port_no);
cellPad.trace("cellPadClearBuf(port_no=%d)", port_no);
std::lock_guard lock(pad::g_pad_mutex);
@ -579,7 +579,7 @@ void pad_get_data(u32 port_no, CellPadData* data, bool get_periph_data = false)
error_code cellPadGetData(u32 port_no, vm::ptr<CellPadData> data)
{
sys_io.trace("cellPadGetData(port_no=%d, data=*0x%x)", port_no, data);
cellPad.trace("cellPadGetData(port_no=%d, data=*0x%x)", port_no, data);
std::lock_guard lock(pad::g_pad_mutex);
@ -607,7 +607,7 @@ error_code cellPadGetData(u32 port_no, vm::ptr<CellPadData> data)
error_code cellPadPeriphGetInfo(vm::ptr<CellPadPeriphInfo> info)
{
sys_io.trace("cellPadPeriphGetInfo(info=*0x%x)", info);
cellPad.trace("cellPadPeriphGetInfo(info=*0x%x)", info);
std::lock_guard lock(pad::g_pad_mutex);
@ -658,7 +658,7 @@ error_code cellPadPeriphGetInfo(vm::ptr<CellPadPeriphInfo> info)
error_code cellPadPeriphGetData(u32 port_no, vm::ptr<CellPadPeriphData> data)
{
sys_io.trace("cellPadPeriphGetData(port_no=%d, data=*0x%x)", port_no, data);
cellPad.trace("cellPadPeriphGetData(port_no=%d, data=*0x%x)", port_no, data);
std::lock_guard lock(pad::g_pad_mutex);
@ -691,7 +691,7 @@ error_code cellPadPeriphGetData(u32 port_no, vm::ptr<CellPadPeriphData> data)
error_code cellPadGetRawData(u32 port_no, vm::ptr<CellPadData> data)
{
sys_io.todo("cellPadGetRawData(port_no=%d, data=*0x%x)", port_no, data);
cellPad.todo("cellPadGetRawData(port_no=%d, data=*0x%x)", port_no, data);
std::lock_guard lock(pad::g_pad_mutex);
@ -720,7 +720,7 @@ error_code cellPadGetRawData(u32 port_no, vm::ptr<CellPadData> data)
error_code cellPadGetDataExtra(u32 port_no, vm::ptr<u32> device_type, vm::ptr<CellPadData> data)
{
sys_io.trace("cellPadGetDataExtra(port_no=%d, device_type=*0x%x, data=*0x%x)", port_no, device_type, data);
cellPad.trace("cellPadGetDataExtra(port_no=%d, device_type=*0x%x, data=*0x%x)", port_no, device_type, data);
// TODO: This is used just to get data from a BD/CEC remote,
// but if the port isnt a remote, device type is set to CELL_PAD_DEV_TYPE_STANDARD and just regular cellPadGetData is returned
@ -744,7 +744,7 @@ error_code cellPadGetDataExtra(u32 port_no, vm::ptr<u32> device_type, vm::ptr<Ce
error_code cellPadSetActDirect(u32 port_no, vm::ptr<CellPadActParam> param)
{
sys_io.trace("cellPadSetActDirect(port_no=%d, param=*0x%x)", port_no, param);
cellPad.trace("cellPadSetActDirect(port_no=%d, param=*0x%x)", port_no, param);
std::lock_guard lock(pad::g_pad_mutex);
@ -788,7 +788,7 @@ error_code cellPadSetActDirect(u32 port_no, vm::ptr<CellPadActParam> param)
error_code cellPadGetInfo(vm::ptr<CellPadInfo> info)
{
sys_io.trace("cellPadGetInfo(info=*0x%x)", info);
cellPad.trace("cellPadGetInfo(info=*0x%x)", info);
std::lock_guard lock(pad::g_pad_mutex);
@ -833,7 +833,7 @@ error_code cellPadGetInfo(vm::ptr<CellPadInfo> info)
error_code cellPadGetInfo2(vm::ptr<CellPadInfo2> info)
{
sys_io.trace("cellPadGetInfo2(info=*0x%x)", info);
cellPad.trace("cellPadGetInfo2(info=*0x%x)", info);
std::lock_guard lock(pad::g_pad_mutex);
@ -882,7 +882,7 @@ error_code cellPadGetInfo2(vm::ptr<CellPadInfo2> info)
error_code cellPadGetCapabilityInfo(u32 port_no, vm::ptr<CellPadCapabilityInfo> info)
{
sys_io.trace("cellPadGetCapabilityInfo(port_no=%d, data_addr:=0x%x)", port_no, info.addr());
cellPad.trace("cellPadGetCapabilityInfo(port_no=%d, data_addr:=0x%x)", port_no, info.addr());
std::lock_guard lock(pad::g_pad_mutex);
@ -913,7 +913,7 @@ error_code cellPadGetCapabilityInfo(u32 port_no, vm::ptr<CellPadCapabilityInfo>
error_code cellPadSetPortSetting(u32 port_no, u32 port_setting)
{
sys_io.trace("cellPadSetPortSetting(port_no=%d, port_setting=0x%x)", port_no, port_setting);
cellPad.trace("cellPadSetPortSetting(port_no=%d, port_setting=0x%x)", port_no, port_setting);
std::lock_guard lock(pad::g_pad_mutex);
@ -938,7 +938,7 @@ error_code cellPadSetPortSetting(u32 port_no, u32 port_setting)
error_code cellPadInfoPressMode(u32 port_no)
{
sys_io.trace("cellPadInfoPressMode(port_no=%d)", port_no);
cellPad.trace("cellPadInfoPressMode(port_no=%d)", port_no);
std::lock_guard lock(pad::g_pad_mutex);
@ -965,7 +965,7 @@ error_code cellPadInfoPressMode(u32 port_no)
error_code cellPadInfoSensorMode(u32 port_no)
{
sys_io.trace("cellPadInfoSensorMode(port_no=%d)", port_no);
cellPad.trace("cellPadInfoSensorMode(port_no=%d)", port_no);
std::lock_guard lock(pad::g_pad_mutex);
@ -992,7 +992,7 @@ error_code cellPadInfoSensorMode(u32 port_no)
error_code cellPadSetPressMode(u32 port_no, u32 mode)
{
sys_io.trace("cellPadSetPressMode(port_no=%d, mode=%d)", port_no, mode);
cellPad.trace("cellPadSetPressMode(port_no=%d, mode=%d)", port_no, mode);
std::lock_guard lock(pad::g_pad_mutex);
@ -1026,7 +1026,7 @@ error_code cellPadSetPressMode(u32 port_no, u32 mode)
error_code cellPadSetSensorMode(u32 port_no, u32 mode)
{
sys_io.trace("cellPadSetSensorMode(port_no=%d, mode=%d)", port_no, mode);
cellPad.trace("cellPadSetSensorMode(port_no=%d, mode=%d)", port_no, mode);
std::lock_guard lock(pad::g_pad_mutex);
@ -1060,7 +1060,7 @@ error_code cellPadSetSensorMode(u32 port_no, u32 mode)
error_code cellPadLddRegisterController()
{
sys_io.warning("cellPadLddRegisterController()");
cellPad.warning("cellPadLddRegisterController()");
std::lock_guard lock(pad::g_pad_mutex);
@ -1085,7 +1085,7 @@ error_code cellPadLddRegisterController()
error_code cellPadLddDataInsert(s32 handle, vm::ptr<CellPadData> data)
{
sys_io.trace("cellPadLddDataInsert(handle=%d, data=*0x%x)", handle, data);
cellPad.trace("cellPadLddDataInsert(handle=%d, data=*0x%x)", handle, data);
std::lock_guard lock(pad::g_pad_mutex);
@ -1110,7 +1110,7 @@ error_code cellPadLddDataInsert(s32 handle, vm::ptr<CellPadData> data)
error_code cellPadLddGetPortNo(s32 handle)
{
sys_io.trace("cellPadLddGetPortNo(handle=%d)", handle);
cellPad.trace("cellPadLddGetPortNo(handle=%d)", handle);
std::lock_guard lock(pad::g_pad_mutex);
@ -1134,7 +1134,7 @@ error_code cellPadLddGetPortNo(s32 handle)
error_code cellPadLddUnregisterController(s32 handle)
{
sys_io.warning("cellPadLddUnregisterController(handle=%d)", handle);
cellPad.warning("cellPadLddUnregisterController(handle=%d)", handle);
std::lock_guard lock(pad::g_pad_mutex);
@ -1160,7 +1160,7 @@ error_code cellPadLddUnregisterController(s32 handle)
error_code cellPadFilterIIRInit(vm::ptr<CellPadFilterIIRSos> pSos, s32 cutoff)
{
sys_io.todo("cellPadFilterIIRInit(pSos=*0x%x, cutoff=%d)", pSos, cutoff);
cellPad.todo("cellPadFilterIIRInit(pSos=*0x%x, cutoff=%d)", pSos, cutoff);
if (!pSos) // TODO: does this check for cutoff > 2 ?
{
@ -1172,7 +1172,7 @@ error_code cellPadFilterIIRInit(vm::ptr<CellPadFilterIIRSos> pSos, s32 cutoff)
u32 cellPadFilterIIRFilter(vm::ptr<CellPadFilterIIRSos> pSos, u32 filterIn)
{
sys_io.todo("cellPadFilterIIRFilter(pSos=*0x%x, filterIn=%d)", pSos, filterIn);
cellPad.todo("cellPadFilterIIRFilter(pSos=*0x%x, filterIn=%d)", pSos, filterIn);
// TODO: apply filter
@ -1183,7 +1183,7 @@ s32 sys_io_3733EA3C(u32 port_no, vm::ptr<u32> device_type, vm::ptr<CellPadData>
{
// Used by the ps1 emulator built into the firmware
// Seems to call the same function that getdataextra does
sys_io.trace("sys_io_3733EA3C(port_no=%d, device_type=*0x%x, data=*0x%x)", port_no, device_type, data);
cellPad.trace("sys_io_3733EA3C(port_no=%d, device_type=*0x%x, data=*0x%x)", port_no, device_type, data);
return cellPadGetDataExtra(port_no, device_type, data);
}