未验证 提交 89eadb2d 编写于 作者: O openharmony_ci 提交者: Gitee

!630 add log for ipc crash problem

Merge pull request !630 from wanghaoxu/master
......@@ -56,10 +56,12 @@ IPCObjectProxy::IPCObjectProxy(int handle, std::u16string descriptor, int proto)
: IRemoteObject(std::move(descriptor)), handle_(handle), proto_(proto), isFinishInit_(false), isRemoteDead_(false)
{
ExtendObjectLifetime();
ZLOGI(LABEL, "handle = %{public}u create, descriptor: %{public}s", handle_, Str16ToStr8(descriptor_).c_str());
}
IPCObjectProxy::~IPCObjectProxy()
{
ZLOGW(LABEL, "handle = %{public}u destroyed, descriptor: %{public}s", handle_, Str16ToStr8(descriptor_).c_str());
}
int32_t IPCObjectProxy::GetObjectRefCount()
......
......@@ -61,11 +61,12 @@ static constexpr int HIDUMPER_SERVICE_UID = 1212;
IPCObjectStub::IPCObjectStub(std::u16string descriptor) : IRemoteObject(descriptor)
{
ZLOGI(LABEL, "create, desc: %{public}s", Str16ToStr8(descriptor_).c_str());
}
IPCObjectStub::~IPCObjectStub()
{
ZLOGD(LABEL, "destroy, desc: %{public}s", Str16ToStr8(descriptor_).c_str());
ZLOGW(LABEL, "destroy, desc: %{public}s", Str16ToStr8(descriptor_).c_str());
}
bool IPCObjectStub::IsDeviceIdIllegal(const std::string &deviceID)
......
......@@ -359,6 +359,7 @@ void BinderInvoker::OnBinderDied()
{
uintptr_t cookie = input_.ReadPointer();
auto *proxy = reinterpret_cast<IPCObjectProxy *>(cookie);
ZLOGD(LABEL, "%s, enter", __func__);
if (proxy != nullptr) {
proxy->SendObituary();
}
......@@ -420,7 +421,7 @@ void BinderInvoker::OnReleaseObject(uint32_t cmd)
ZLOGE(LABEL, "OnReleaseObject FAIL!");
return;
}
ZLOGD(LABEL, "OnReleaseObject refcount=%{public}d", refs->GetStrongRefCount());
if (cmd == BR_RELEASE) {
obj->DecStrongRef(this);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册