diff --git a/ipc/native/src/core/source/ipc_object_proxy.cpp b/ipc/native/src/core/source/ipc_object_proxy.cpp index ed55ff70..0c1bfd09 100644 --- a/ipc/native/src/core/source/ipc_object_proxy.cpp +++ b/ipc/native/src/core/source/ipc_object_proxy.cpp @@ -56,6 +56,8 @@ using namespace IPC_SINGLE; handle, error, (desc).c_str()) static constexpr HiviewDFX::HiLogLabel LABEL = { LOG_CORE, LOG_ID_IPC_PROXY, "IPCObjectProxy" }; +static constexpr uint32_t IPC_OBJECT_MASK = 0xffffff; + IPCObjectProxy::IPCObjectProxy(int handle, std::u16string descriptor, int proto) : IRemoteObject(std::move(descriptor)), handle_(handle), proto_(proto), isFinishInit_(false), isRemoteDead_(false) { @@ -65,7 +67,9 @@ IPCObjectProxy::IPCObjectProxy(int handle, std::u16string descriptor, int proto) invoker->LinkRemoteInvoker(&invokerData_); } #endif - ZLOGD(LABEL, "create, handle:%{public}u desc:%{public}s", handle_, Str16ToStr8(descriptor_).c_str()); + ZLOGD(LABEL, "handle:%{public}u desc:%{public}s %{public}u", handle_, + IPCProcessSkeleton::ConvertToSecureDesc(Str16ToStr8(descriptor_)).c_str(), + static_cast(reinterpret_cast(this)) & IPC_OBJECT_MASK); ExtendObjectLifetime(); } @@ -77,7 +81,9 @@ IPCObjectProxy::~IPCObjectProxy() invoker->UnlinkRemoteInvoker(&invokerData_); } #endif - ZLOGI(LABEL, "destroy, handle:%{public}u desc:%{public}s", handle_, Str16ToStr8(remoteDescriptor_).c_str()); + ZLOGI(LABEL, "handle:%{public}u desc:%{public}s %{public}u", handle_, + IPCProcessSkeleton::ConvertToSecureDesc(Str16ToStr8(descriptor_)).c_str(), + static_cast(reinterpret_cast(this)) & IPC_OBJECT_MASK); } int32_t IPCObjectProxy::GetObjectRefCount() diff --git a/ipc/native/src/core/source/ipc_thread_skeleton.cpp b/ipc/native/src/core/source/ipc_thread_skeleton.cpp index 58107bab..978ffa95 100644 --- a/ipc/native/src/core/source/ipc_thread_skeleton.cpp +++ b/ipc/native/src/core/source/ipc_thread_skeleton.cpp @@ -16,6 +16,7 @@ #include "ipc_thread_skeleton.h" #include +#include #include "binder_invoker.h" #include "hilog/log_c.h" @@ -45,7 +46,6 @@ void IPCThreadSkeleton::TlsDestructor(void *args) auto *current = static_cast(args); auto it = current->invokers_.find(IRemoteObject::IF_PROT_BINDER); if (it != current->invokers_.end()) { - ZLOGW(LABEL, "thread exit, flush commands"); BinderInvoker *invoker = reinterpret_cast(it->second); invoker->FlushCommands(nullptr); invoker->ExitCurrentThread(); @@ -82,7 +82,8 @@ IPCThreadSkeleton::IPCThreadSkeleton() IPCThreadSkeleton::~IPCThreadSkeleton() { std::lock_guard lockGuard(mutex_); - ZLOGE(LABEL, "IPCThreadSkeleton delete"); + ZLOGI(LABEL, "%{public}u_%{public}u", static_cast(getpid()), + static_cast(syscall(SYS_gettid))); for (auto it = invokers_.begin(); it != invokers_.end();) { delete it->second; it = invokers_.erase(it); diff --git a/ipc/native/src/mock/source/binder_invoker.cpp b/ipc/native/src/mock/source/binder_invoker.cpp index 23c1efc0..cfa76e9f 100644 --- a/ipc/native/src/mock/source/binder_invoker.cpp +++ b/ipc/native/src/mock/source/binder_invoker.cpp @@ -717,7 +717,6 @@ void BinderInvoker::JoinProcessThread(bool initiative) {} int BinderInvoker::TransactWithDriver(bool doRead) { if ((binderConnector_ == nullptr) || (!binderConnector_->IsDriverAlive())) { - ZLOGE(LABEL, "Binder Driver died"); return IPC_INVOKER_CONNECT_ERR; }