From 47f01d3b78c2732f7b88c35f44c25174bd8fd63f Mon Sep 17 00:00:00 2001 From: kun chen Date: Fri, 12 Sep 2025 17:14:29 +0800 Subject: [PATCH] add oom log Signed-off-by: kun chen --- src/common/channel.cpp | 4 ++++ src/host/server_for_client.cpp | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/channel.cpp b/src/common/channel.cpp index dd610e87..4b3b103f 100644 --- a/src/common/channel.cpp +++ b/src/common/channel.cpp @@ -210,6 +210,8 @@ void HdcChannelBase::WriteCallback(uv_write_t *req, int status) --hChannel->ref; HdcChannelBase *thisClass = (HdcChannelBase *)hChannel->clsChannel; CALLSTAT_GUARD(*(hChannel->loopStatus), req->handle->loop, "HdcChannelBase::WriteCallback"); + WRITE_LOG(LOG_DEBUG, "WriteCallback channelId:%u delete data:%p req:%p count:%d status:%d", + hChannel->channelId, req->data, req, ((uv_stream_t *)req->handle)->loop->active_reqs.count, status); if (status < 0) { hChannel->writeFailedTimes++; Base::TryCloseHandle((uv_handle_t *)req->handle); @@ -384,6 +386,8 @@ void HdcChannelBase::SendChannel(HChannel hChannel, uint8_t *bufPtr, const int s sendStream = (uv_stream_t *)&hChannel->hChildWorkTCP; } #endif + WRITE_LOG(LOG_DEBUG, "SendChannel channelId:%u new data:%p sizeNewBuf:%d count:%d", + hChannel->channelId, data, sizeNewBuf, sendStream->loop->active_reqs.count); if (!uv_is_closing((const uv_handle_t *)sendStream) && uv_is_writable(sendStream)) { ++hChannel->ref; if (commandFlag == CMD_FILE_DATA || commandFlag == CMD_APP_DATA) { diff --git a/src/host/server_for_client.cpp b/src/host/server_for_client.cpp index 3e551281..c843a096 100644 --- a/src/host/server_for_client.cpp +++ b/src/host/server_for_client.cpp @@ -1163,8 +1163,8 @@ int HdcServerForClient::ReadChannel(HChannel hChannel, uint8_t *bufPtr, const in } } - WRITE_LOG(LOG_INFO, "ReadChannel cid:%u sid:%u key:%s", hChannel->channelId, - hChannel->targetSessionId, Hdc::MaskString(hChannel->connectKey).c_str()); + WRITE_LOG(LOG_INFO, "ReadChannel cid:%u sid:%u key:%s %s", hChannel->channelId, + hChannel->targetSessionId, Hdc::MaskString(hChannel->connectKey).c_str(), bufPtr); if (Hdc::Base::GetCmdLogSwitch()) { #ifdef SUPPORT_DETAILE_HDC_CMD_LOG -- Gitee