diff --git a/rpcs3/Emu/Cell/Modules/cellGem.cpp b/rpcs3/Emu/Cell/Modules/cellGem.cpp index c7867f0acb..616cf47072 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGem.cpp @@ -1496,7 +1496,7 @@ error_code cellGemGetInertialState(u32 gem_num, u32 state_flag, u64 timestamp, v error_code cellGemGetInfo(vm::ptr info) { - cellGem.warning("cellGemGetInfo(info=*0x%x)", info); + cellGem.trace("cellGemGetInfo(info=*0x%x)", info); auto& gem = g_fxo->get(); diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.cpp index 537a5e7c24..2d9bfcff85 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_raw.cpp @@ -4,6 +4,23 @@ LOG_CHANNEL(sys_net); +template +struct socket_raw_logging +{ + socket_raw_logging() = default; + + socket_raw_logging(const socket_raw_logging&) = delete; + socket_raw_logging& operator=(const socket_raw_logging&) = delete; + + atomic_t logged = false; +}; + +#define LOG_ONCE(raw_var, message) \ + if (!g_fxo->get>().logged.exchange(true)) \ + { \ + sys_net.todo(message); \ + } + lv2_socket_raw::lv2_socket_raw(lv2_socket_family family, lv2_socket_type type, lv2_ip_protocol protocol) : lv2_socket(family, type, protocol) { @@ -39,37 +56,37 @@ s32 lv2_socket_raw::connect_followup() std::pair lv2_socket_raw::getpeername() { - sys_net.todo("[RAW] getpeername() called on a RAW socket"); + LOG_ONCE(raw_getpeername, "[RAW] getpeername() called on a RAW socket"); return {}; } s32 lv2_socket_raw::listen([[maybe_unused]] s32 backlog) { - sys_net.todo("[RAW] listen() called on a RAW socket"); + LOG_ONCE(raw_listen, "[RAW] listen() called on a RAW socket"); return {}; } s32 lv2_socket_raw::bind([[maybe_unused]] const sys_net_sockaddr& addr) { - sys_net.todo("lv2_socket_raw::bind"); + LOG_ONCE(raw_bind, "lv2_socket_raw::bind"); return {}; } std::pair lv2_socket_raw::getsockname() { - sys_net.todo("lv2_socket_raw::getsockname"); + LOG_ONCE(raw_getsockname, "lv2_socket_raw::getsockname"); return {}; } std::tuple lv2_socket_raw::getsockopt([[maybe_unused]] s32 level, [[maybe_unused]] s32 optname, [[maybe_unused]] u32 len) { - sys_net.todo("lv2_socket_raw::getsockopt"); + LOG_ONCE(raw_getsockopt, "lv2_socket_raw::getsockopt"); return {}; } s32 lv2_socket_raw::setsockopt(s32 level, s32 optname, const std::vector& optval) { - sys_net.todo("lv2_socket_raw::setsockopt"); + LOG_ONCE(raw_setsockopt, "lv2_socket_raw::setsockopt"); // TODO int native_int = *reinterpret_cast*>(optval.data()); @@ -84,7 +101,7 @@ s32 lv2_socket_raw::setsockopt(s32 level, s32 optname, const std::vector& op std::optional, sys_net_sockaddr>> lv2_socket_raw::recvfrom(s32 flags, [[maybe_unused]] u32 len, [[maybe_unused]] bool is_lock) { - sys_net.todo("lv2_socket_raw::recvfrom"); + LOG_ONCE(raw_recvfrom, "lv2_socket_raw::recvfrom"); if (so_nbio || (flags & SYS_NET_MSG_DONTWAIT)) { @@ -96,35 +113,35 @@ std::optional, sys_net_sockaddr>> lv2_socket_raw std::optional lv2_socket_raw::sendto([[maybe_unused]] s32 flags, [[maybe_unused]] const std::vector& buf, [[maybe_unused]] std::optional opt_sn_addr, [[maybe_unused]] bool is_lock) { - sys_net.todo("lv2_socket_raw::sendto"); + LOG_ONCE(raw_sendto, "lv2_socket_raw::sendto"); return ::size32(buf); } std::optional lv2_socket_raw::sendmsg([[maybe_unused]] s32 flags, [[maybe_unused]] const sys_net_msghdr& msg, [[maybe_unused]] bool is_lock) { - sys_net.todo("lv2_socket_raw::sendmsg"); + LOG_ONCE(raw_sendmsg, "lv2_socket_raw::sendmsg"); return {}; } void lv2_socket_raw::close() { - sys_net.todo("lv2_socket_raw::close"); + LOG_ONCE(raw_close, "lv2_socket_raw::close"); } s32 lv2_socket_raw::shutdown([[maybe_unused]] s32 how) { - sys_net.todo("lv2_socket_raw::shutdown"); + LOG_ONCE(raw_shutdown, "lv2_socket_raw::shutdown"); return {}; } s32 lv2_socket_raw::poll([[maybe_unused]] sys_net_pollfd& sn_pfd, [[maybe_unused]] pollfd& native_pfd) { - sys_net.todo("lv2_socket_raw::poll"); + LOG_ONCE(raw_poll, "lv2_socket_raw::poll"); return {}; } std::tuple lv2_socket_raw::select([[maybe_unused]] bs_t selected, [[maybe_unused]] pollfd& native_pfd) { - sys_net.todo("lv2_socket_raw::select"); + LOG_ONCE(raw_select, "lv2_socket_raw::select"); return {}; }