diff --git a/rosen/modules/render_service/core/pipeline/rs_main_thread.cpp b/rosen/modules/render_service/core/pipeline/rs_main_thread.cpp index 6c8403b2a2..b3a908840f 100644 --- a/rosen/modules/render_service/core/pipeline/rs_main_thread.cpp +++ b/rosen/modules/render_service/core/pipeline/rs_main_thread.cpp @@ -3154,12 +3154,12 @@ void RSMainThread::SendCommands() auto& app = appIter->second; auto transactionPtr = transactionIter.second; if (transactionPtr != nullptr) { - dfxString += "[pid:" + std::to_string(pid) + ",cmdIndex:" + std::to_string(transactionPtr->GetIndex()) - + ",cmdCount:" + std::to_string(transactionPtr->GetCommandCount()) + "]"; + dfxString += "[pid:" + std::to_string(pid) + ",index:" + std::to_string(transactionPtr->GetIndex()) + + ",cnt:" + std::to_string(transactionPtr->GetCommandCount()) + "]"; } app->OnTransaction(transactionPtr); } - RS_LOGI("RSMainThread::SendCommand to %{public}s", dfxString.c_str()); + RS_LOGI("RS send to %{public}s", dfxString.c_str()); RS_TRACE_NAME_FMT("RSMainThread::SendCommand to %s", dfxString.c_str()); }); } diff --git a/rosen/modules/render_service_base/include/command/rs_message_processor.h b/rosen/modules/render_service_base/include/command/rs_message_processor.h index ff47769c6e..a3a0762d96 100644 --- a/rosen/modules/render_service_base/include/command/rs_message_processor.h +++ b/rosen/modules/render_service_base/include/command/rs_message_processor.h @@ -48,6 +48,7 @@ private: private: mutable std::mutex transactionMapMutex_; std::unordered_map> transactionMap_; + uint32_t transactionDataIndex_ = 0; }; } // namespace Rosen } // namespace OHOS diff --git a/rosen/modules/render_service_base/src/command/rs_message_processor.cpp b/rosen/modules/render_service_base/src/command/rs_message_processor.cpp index 5b6d89681e..593b389847 100644 --- a/rosen/modules/render_service_base/src/command/rs_message_processor.cpp +++ b/rosen/modules/render_service_base/src/command/rs_message_processor.cpp @@ -38,6 +38,8 @@ void RSMessageProcessor::AddUIMessage(uint32_t pid, std::unique_ptr& std::unique_lock lock(transactionMapMutex_); if (!transactionMap_.count(pid)) { std::shared_ptr transactionData = std::make_shared(); + transactionDataIndex_++; + transactionData->SetIndex(transactionDataIndex_); transactionMap_[pid] = transactionData; } transactionMap_[pid]->AddCommand(std::move(command), 0, FollowType::NONE); @@ -48,6 +50,8 @@ void RSMessageProcessor::AddUIMessage(uint32_t pid, std::unique_ptr&& std::unique_lock lock(transactionMapMutex_); if (!transactionMap_.count(pid)) { std::shared_ptr transactionData = std::make_shared(); + transactionDataIndex_++; + transactionData->SetIndex(transactionDataIndex_); transactionMap_[pid] = transactionData; } transactionMap_[pid]->AddCommand(std::move(command), 0, FollowType::NONE);