提交 b6d9595d 编写于 作者: X xuyong

Rename HiTrace to HiTraceChain

Signed-off-by: Nxuyong <xuyong59@huawei.com>
上级 a50910db
...@@ -74,7 +74,7 @@ ohos_shared_library("ipc_core") { ...@@ -74,7 +74,7 @@ ohos_shared_library("ipc_core") {
"access_token:libaccesstoken_sdk", "access_token:libaccesstoken_sdk",
"c_utils:utils", "c_utils:utils",
"dsoftbus:softbus_client", "dsoftbus:softbus_client",
"hitrace_native:libhitrace", "hitrace_native:libhitracechain",
"hiviewdfx_hilog_native:libhilog", "hiviewdfx_hilog_native:libhilog",
] ]
......
...@@ -59,7 +59,7 @@ ohos_shared_library("ipc_single") { ...@@ -59,7 +59,7 @@ ohos_shared_library("ipc_single") {
external_deps = [ external_deps = [
"c_utils:utils", "c_utils:utils",
"hitrace_native:libhitrace", "hitrace_native:libhitracechain",
"hiviewdfx_hilog_native:libhilog", "hiviewdfx_hilog_native:libhilog",
] ]
......
...@@ -701,7 +701,7 @@ int DBinderBaseInvoker<T>::SendRequest(int32_t handle, uint32_t code, MessagePar ...@@ -701,7 +701,7 @@ int DBinderBaseInvoker<T>::SendRequest(int32_t handle, uint32_t code, MessagePar
int userWaitTime = option.GetWaitTime(); int userWaitTime = option.GetWaitTime();
MessageParcel &newData = const_cast<MessageParcel &>(data); MessageParcel &newData = const_cast<MessageParcel &>(data);
size_t oldWritePosition = newData.GetWritePosition(); size_t oldWritePosition = newData.GetWritePosition();
HiTraceId traceId = HiTrace::GetId(); HiTraceId traceId = HiTraceChain::GetId();
// set client send trace point if trace is enabled // set client send trace point if trace is enabled
HiTraceId childId = HitraceInvoker::TraceClientSend(handle, code, newData, flags, traceId); HiTraceId childId = HitraceInvoker::TraceClientSend(handle, code, newData, flags, traceId);
std::shared_ptr<T> session = WriteTransaction(BC_TRANSACTION, flags, handle, 0, code, data, seqNumber, 0); std::shared_ptr<T> session = WriteTransaction(BC_TRANSACTION, flags, handle, 0, code, data, seqNumber, 0);
......
...@@ -100,7 +100,7 @@ int BinderInvoker::SendRequest(int handle, uint32_t code, MessageParcel &data, M ...@@ -100,7 +100,7 @@ int BinderInvoker::SendRequest(int handle, uint32_t code, MessageParcel &data, M
ZLOGD(LABEL, "%{public}s: handle=%d ,flags:%u", __func__, handle, flags); ZLOGD(LABEL, "%{public}s: handle=%d ,flags:%u", __func__, handle, flags);
MessageParcel &newData = const_cast<MessageParcel &>(data); MessageParcel &newData = const_cast<MessageParcel &>(data);
size_t oldWritePosition = newData.GetWritePosition(); size_t oldWritePosition = newData.GetWritePosition();
HiTraceId traceId = HiTrace::GetId(); HiTraceId traceId = HiTraceChain::GetId();
// set client send trace point if trace is enabled // set client send trace point if trace is enabled
HiTraceId childId = HitraceInvoker::TraceClientSend(handle, code, newData, flags, traceId); HiTraceId childId = HitraceInvoker::TraceClientSend(handle, code, newData, flags, traceId);
if (!WriteTransaction(BC_TRANSACTION, flags, handle, code, data, nullptr)) { if (!WriteTransaction(BC_TRANSACTION, flags, handle, code, data, nullptr)) {
......
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
#include "hilog/log_c.h" #include "hilog/log_c.h"
#include "hilog/log_cpp.h" #include "hilog/log_cpp.h"
#include "hitrace/hitrace.h" #include "hitrace/trace.h"
#include "hitrace/hitracec.h"
#include "hitrace/hitraceid.h"
#include "ipc_debug.h" #include "ipc_debug.h"
#include "log_tags.h" #include "log_tags.h"
#include "parcel.h" #include "parcel.h"
...@@ -45,7 +43,7 @@ HiTraceId HitraceInvoker::TraceClientSend(int32_t handle, uint32_t code, Parcel ...@@ -45,7 +43,7 @@ HiTraceId HitraceInvoker::TraceClientSend(int32_t handle, uint32_t code, Parcel
HiTraceId childId = traceId; HiTraceId childId = traceId;
bool isClientTraced = IsClientTraced(handle, flags, traceId); bool isClientTraced = IsClientTraced(handle, flags, traceId);
if (isClientTraced) { if (isClientTraced) {
childId = HiTrace::CreateSpan(); childId = HiTraceChain::CreateSpan();
// add childid to parcel data // add childid to parcel data
uint8_t idBytes[HITRACE_ID_LEN]; uint8_t idBytes[HITRACE_ID_LEN];
size_t idLen = (size_t)(childId.ToBytes(idBytes, HITRACE_ID_LEN)); size_t idLen = (size_t)(childId.ToBytes(idBytes, HITRACE_ID_LEN));
...@@ -70,7 +68,8 @@ HiTraceId HitraceInvoker::TraceClientSend(int32_t handle, uint32_t code, Parcel ...@@ -70,7 +68,8 @@ HiTraceId HitraceInvoker::TraceClientSend(int32_t handle, uint32_t code, Parcel
return childId; return childId;
} }
// tracepoint: CS(Client Send) // tracepoint: CS(Client Send)
HiTrace::Tracepoint(HITRACE_TP_CS, childId, "%s handle=%d,code=%u", (flags & TF_ONE_WAY) ? "ASYNC" : "SYNC", HiTraceChain::Tracepoint(HITRACE_TP_CS, childId, "%s handle=%d,code=%u",
(flags & TF_ONE_WAY) ? "ASYNC" : "SYNC",
handle, code); handle, code);
flags |= TF_HITRACE; flags |= TF_HITRACE;
} }
...@@ -87,9 +86,9 @@ void HitraceInvoker::TraceClientReceieve(int32_t handle, uint32_t code, uint32_t ...@@ -87,9 +86,9 @@ void HitraceInvoker::TraceClientReceieve(int32_t handle, uint32_t code, uint32_t
if (isClientTraced) { if (isClientTraced) {
if (!(flags & TF_ONE_WAY)) { if (!(flags & TF_ONE_WAY)) {
// restore thread trace id // restore thread trace id
HiTrace::SetId(traceId); HiTraceChain::SetId(traceId);
// tracepoint: CR(Client Receive) // tracepoint: CR(Client Receive)
HiTrace::Tracepoint(HITRACE_TP_CR, childId, "%s handle=%d,code=%u", "SYNC", handle, code); HiTraceChain::Tracepoint(HITRACE_TP_CR, childId, "%s handle=%d,code=%u", "SYNC", handle, code);
} }
} }
} }
...@@ -123,9 +122,10 @@ bool HitraceInvoker::TraceServerReceieve(int32_t handle, uint32_t code, Parcel & ...@@ -123,9 +122,10 @@ bool HitraceInvoker::TraceServerReceieve(int32_t handle, uint32_t code, Parcel &
return isServerTraced; return isServerTraced;
} }
HiTraceId traceId(idBytes, sizeof(HiTraceIdStruct)); HiTraceId traceId(idBytes, sizeof(HiTraceIdStruct));
HiTrace::SetId(traceId); HiTraceChain::SetId(traceId);
// tracepoint: SR(Server Receive) // tracepoint: SR(Server Receive)
HiTrace::Tracepoint(HITRACE_TP_SR, traceId, "%s handle=%d,code=%u", (flags & TF_ONE_WAY) ? "ASYNC" : "SYNC", HiTraceChain::Tracepoint(HITRACE_TP_SR, traceId,
"%s handle=%d,code=%u", (flags & TF_ONE_WAY) ? "ASYNC" : "SYNC",
handle, code); handle, code);
} }
...@@ -138,9 +138,9 @@ void HitraceInvoker::TraceServerSend(int32_t handle, uint32_t code, bool isServe ...@@ -138,9 +138,9 @@ void HitraceInvoker::TraceServerSend(int32_t handle, uint32_t code, bool isServe
{ {
if (isServerTraced) { if (isServerTraced) {
// tracepoint: SS(Server Send) // tracepoint: SS(Server Send)
HiTrace::Tracepoint(HITRACE_TP_SS, HiTrace::GetId(), "%s handle=%d,code=%u", HiTraceChain::Tracepoint(HITRACE_TP_SS, HiTraceChain::GetId(), "%s handle=%d,code=%u",
(flags & TF_ONE_WAY) ? "ASYNC" : "SYNC", handle, code); (flags & TF_ONE_WAY) ? "ASYNC" : "SYNC", handle, code);
} }
HiTrace::ClearId(); HiTraceChain::ClearId();
} }
} // namespace OHOS } // namespace OHOS
...@@ -88,7 +88,7 @@ ohos_unittest("IPCHiTraceUnitTest") { ...@@ -88,7 +88,7 @@ ohos_unittest("IPCHiTraceUnitTest") {
external_deps = [ external_deps = [
"c_utils:utils", "c_utils:utils",
"hitrace_native:libhitrace", "hitrace_native:libhitracechain",
"hiviewdfx_hilog_native:libhilog", "hiviewdfx_hilog_native:libhilog",
"ipc:ipc_core", "ipc:ipc_core",
"samgr:samgr_proxy", "samgr:samgr_proxy",
......
...@@ -154,9 +154,9 @@ static std::string PrintTagLog(const std::string &tag) ...@@ -154,9 +154,9 @@ static std::string PrintTagLog(const std::string &tag)
HWTEST_F(BinderTraceTest, Sync001, TestSize.Level1) HWTEST_F(BinderTraceTest, Sync001, TestSize.Level1)
{ {
HiTraceId getId = HiTrace::GetId(); HiTraceId getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
HiTraceId traceId = HiTrace::Begin("ipc hitrace", 0); HiTraceId traceId = HiTraceChain::Begin("ipc hitrace", 0);
std::string chainId = HitraceLongToString(traceId.GetChainId()); std::string chainId = HitraceLongToString(traceId.GetChainId());
EXPECT_NE(0UL, chainId.size()); EXPECT_NE(0UL, chainId.size());
IPCTestHelper helper; IPCTestHelper helper;
...@@ -185,10 +185,10 @@ HWTEST_F(BinderTraceTest, Sync001, TestSize.Level1) ...@@ -185,10 +185,10 @@ HWTEST_F(BinderTraceTest, Sync001, TestSize.Level1)
HiLog::Info(LOG_LABEL, "Got Stub node\n"); HiLog::Info(LOG_LABEL, "Got Stub node\n");
} }
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(1, getId.IsValid()); EXPECT_EQ(1, getId.IsValid());
HiTrace::End(traceId); HiTraceChain::End(traceId);
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
std::string remainLogMsgs = BinderTraceGetRemainLog(logTag); std::string remainLogMsgs = BinderTraceGetRemainLog(logTag);
EXPECT_EQ(0, BinderTraceCheckLog(remainLogMsgs, "HITRACE_TP_CS", chainId)); EXPECT_EQ(0, BinderTraceCheckLog(remainLogMsgs, "HITRACE_TP_CS", chainId));
...@@ -207,9 +207,9 @@ HWTEST_F(BinderTraceTest, Sync002, TestSize.Level1) ...@@ -207,9 +207,9 @@ HWTEST_F(BinderTraceTest, Sync002, TestSize.Level1)
"\\[[a-f0-9]{1,16}, [a-f0-9]{1,16}, 0\\] <HITRACE_TP_SS,chain=[0-9a-f]{1,16},span=[0-9a-f]{1,16},pspan="; "\\[[a-f0-9]{1,16}, [a-f0-9]{1,16}, 0\\] <HITRACE_TP_SS,chain=[0-9a-f]{1,16},span=[0-9a-f]{1,16},pspan=";
const std::string HITRACE_TP_CR_LOG = const std::string HITRACE_TP_CR_LOG =
"\\[[a-f0-9]{1,16}, 0, 0\\] <HITRACE_TP_CR,chain=[0-9a-f]{1,16},span=[0-9a-f]{1,16},pspan="; "\\[[a-f0-9]{1,16}, 0, 0\\] <HITRACE_TP_CR,chain=[0-9a-f]{1,16},span=[0-9a-f]{1,16},pspan=";
HiTraceId getId = HiTrace::GetId(); HiTraceId getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
HiTraceId traceId = HiTrace::Begin("ipc hitrace", HITRACE_FLAG_TP_INFO); HiTraceId traceId = HiTraceChain::Begin("ipc hitrace", HITRACE_FLAG_TP_INFO);
std::string chainId = HitraceLongToString(traceId.GetChainId()); std::string chainId = HitraceLongToString(traceId.GetChainId());
EXPECT_NE(0UL, chainId.size()); EXPECT_NE(0UL, chainId.size());
IPCTestHelper helper; IPCTestHelper helper;
...@@ -238,10 +238,10 @@ HWTEST_F(BinderTraceTest, Sync002, TestSize.Level1) ...@@ -238,10 +238,10 @@ HWTEST_F(BinderTraceTest, Sync002, TestSize.Level1)
HiLog::Info(LOG_LABEL, "Got Stub node\n"); HiLog::Info(LOG_LABEL, "Got Stub node\n");
} }
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(1, getId.IsValid()); EXPECT_EQ(1, getId.IsValid());
HiTrace::End(traceId); HiTraceChain::End(traceId);
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
} }
...@@ -251,9 +251,9 @@ HWTEST_F(BinderTraceTest, Sync003, TestSize.Level1) ...@@ -251,9 +251,9 @@ HWTEST_F(BinderTraceTest, Sync003, TestSize.Level1)
const std::string HITRACE_TP_SR_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_SR,chain=[0-9a-f]{1,16},span=0,pspan="; const std::string HITRACE_TP_SR_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_SR,chain=[0-9a-f]{1,16},span=0,pspan=";
const std::string HITRACE_TP_SS_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_SS,chain=[0-9a-f]{1,16},span=0,pspan="; const std::string HITRACE_TP_SS_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_SS,chain=[0-9a-f]{1,16},span=0,pspan=";
const std::string HITRACE_TP_CR_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_CR,chain=[0-9a-f]{1,16},span=0,pspan="; const std::string HITRACE_TP_CR_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_CR,chain=[0-9a-f]{1,16},span=0,pspan=";
HiTraceId getId = HiTrace::GetId(); HiTraceId getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
HiTraceId traceId = HiTrace::Begin("ipc hitrace", HITRACE_FLAG_TP_INFO | HITRACE_FLAG_DONOT_CREATE_SPAN); HiTraceId traceId = HiTraceChain::Begin("ipc hitrace", HITRACE_FLAG_TP_INFO | HITRACE_FLAG_DONOT_CREATE_SPAN);
std::string chainId = HitraceLongToString(traceId.GetChainId()); std::string chainId = HitraceLongToString(traceId.GetChainId());
EXPECT_NE(0UL, chainId.size()); EXPECT_NE(0UL, chainId.size());
IPCTestHelper helper; IPCTestHelper helper;
...@@ -280,18 +280,18 @@ HWTEST_F(BinderTraceTest, Sync003, TestSize.Level1) ...@@ -280,18 +280,18 @@ HWTEST_F(BinderTraceTest, Sync003, TestSize.Level1)
HiLog::Info(LOG_LABEL, "Got Stub node\n"); HiLog::Info(LOG_LABEL, "Got Stub node\n");
} }
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(1, getId.IsValid()); EXPECT_EQ(1, getId.IsValid());
HiTrace::End(traceId); HiTraceChain::End(traceId);
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
} }
HWTEST_F(BinderTraceTest, Async001, TestSize.Level1) HWTEST_F(BinderTraceTest, Async001, TestSize.Level1)
{ {
HiTraceId getId = HiTrace::GetId(); HiTraceId getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
HiTraceId traceId = HiTrace::Begin("ipc hitrace", HITRACE_FLAG_INCLUDE_ASYNC); HiTraceId traceId = HiTraceChain::Begin("ipc hitrace", HITRACE_FLAG_INCLUDE_ASYNC);
std::string chainId = HitraceLongToString(traceId.GetChainId()); std::string chainId = HitraceLongToString(traceId.GetChainId());
EXPECT_NE(0UL, chainId.size()); EXPECT_NE(0UL, chainId.size());
IPCTestHelper helper; IPCTestHelper helper;
...@@ -318,10 +318,10 @@ HWTEST_F(BinderTraceTest, Async001, TestSize.Level1) ...@@ -318,10 +318,10 @@ HWTEST_F(BinderTraceTest, Async001, TestSize.Level1)
HiLog::Info(LOG_LABEL, "Got Stub node\n"); HiLog::Info(LOG_LABEL, "Got Stub node\n");
} }
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(1, getId.IsValid()); EXPECT_EQ(1, getId.IsValid());
HiTrace::End(traceId); HiTraceChain::End(traceId);
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
std::string remainLogMsgs = BinderTraceGetRemainLog(logTag); std::string remainLogMsgs = BinderTraceGetRemainLog(logTag);
EXPECT_EQ(0, BinderTraceCheckLog(remainLogMsgs, "HITRACE_TP_CS", chainId)); EXPECT_EQ(0, BinderTraceCheckLog(remainLogMsgs, "HITRACE_TP_CS", chainId));
...@@ -336,9 +336,9 @@ HWTEST_F(BinderTraceTest, Async002, TestSize.Level1) ...@@ -336,9 +336,9 @@ HWTEST_F(BinderTraceTest, Async002, TestSize.Level1)
"\\[[a-f0-9]{1,16}, 0, 0\\] <HITRACE_TP_CS,chain=[0-9a-f]{1,16},span=[0-9a-f]{1,16},pspan="; "\\[[a-f0-9]{1,16}, 0, 0\\] <HITRACE_TP_CS,chain=[0-9a-f]{1,16},span=[0-9a-f]{1,16},pspan=";
const std::string HITRACE_TP_SR_LOG = const std::string HITRACE_TP_SR_LOG =
"\\[[a-f0-9]{1,16}, [a-f0-9]{1,16}, 0\\] <HITRACE_TP_SR,chain=[0-9a-f]{1,16},span=[0-9a-f]{1,16},pspan="; "\\[[a-f0-9]{1,16}, [a-f0-9]{1,16}, 0\\] <HITRACE_TP_SR,chain=[0-9a-f]{1,16},span=[0-9a-f]{1,16},pspan=";
HiTraceId getId = HiTrace::GetId(); HiTraceId getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
HiTraceId traceId = HiTrace::Begin("ipc hitrace", HITRACE_FLAG_TP_INFO | HITRACE_FLAG_INCLUDE_ASYNC); HiTraceId traceId = HiTraceChain::Begin("ipc hitrace", HITRACE_FLAG_TP_INFO | HITRACE_FLAG_INCLUDE_ASYNC);
std::string chainId = HitraceLongToString(traceId.GetChainId()); std::string chainId = HitraceLongToString(traceId.GetChainId());
EXPECT_NE(0UL, chainId.size()); EXPECT_NE(0UL, chainId.size());
IPCTestHelper helper; IPCTestHelper helper;
...@@ -365,10 +365,10 @@ HWTEST_F(BinderTraceTest, Async002, TestSize.Level1) ...@@ -365,10 +365,10 @@ HWTEST_F(BinderTraceTest, Async002, TestSize.Level1)
HiLog::Info(LOG_LABEL, "Got Stub node\n"); HiLog::Info(LOG_LABEL, "Got Stub node\n");
} }
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(1, getId.IsValid()); EXPECT_EQ(1, getId.IsValid());
HiTrace::End(traceId); HiTraceChain::End(traceId);
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
} }
...@@ -376,9 +376,9 @@ HWTEST_F(BinderTraceTest, Async003, TestSize.Level1) ...@@ -376,9 +376,9 @@ HWTEST_F(BinderTraceTest, Async003, TestSize.Level1)
{ {
const std::string HITRACE_TP_CS_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_CS,chain=[0-9a-f]{1,16},span=0,pspan="; const std::string HITRACE_TP_CS_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_CS,chain=[0-9a-f]{1,16},span=0,pspan=";
const std::string HITRACE_TP_SR_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_SR,chain=[0-9a-f]{1,16},span=0,pspan="; const std::string HITRACE_TP_SR_LOG = "\\[[a-f0-9]{1,16}\\] <HITRACE_TP_SR,chain=[0-9a-f]{1,16},span=0,pspan=";
HiTraceId getId = HiTrace::GetId(); HiTraceId getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
HiTraceId traceId = HiTrace::Begin("ipc hitrace", HiTraceId traceId = HiTraceChain::Begin("ipc hitrace",
HITRACE_FLAG_TP_INFO | HITRACE_FLAG_INCLUDE_ASYNC | HITRACE_FLAG_DONOT_CREATE_SPAN); HITRACE_FLAG_TP_INFO | HITRACE_FLAG_INCLUDE_ASYNC | HITRACE_FLAG_DONOT_CREATE_SPAN);
std::string chainId = HitraceLongToString(traceId.GetChainId()); std::string chainId = HitraceLongToString(traceId.GetChainId());
EXPECT_NE(0UL, chainId.size()); EXPECT_NE(0UL, chainId.size());
...@@ -406,9 +406,9 @@ HWTEST_F(BinderTraceTest, Async003, TestSize.Level1) ...@@ -406,9 +406,9 @@ HWTEST_F(BinderTraceTest, Async003, TestSize.Level1)
HiLog::Info(LOG_LABEL, "Got Stub node\n"); HiLog::Info(LOG_LABEL, "Got Stub node\n");
} }
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(1, getId.IsValid()); EXPECT_EQ(1, getId.IsValid());
HiTrace::End(traceId); HiTraceChain::End(traceId);
getId = HiTrace::GetId(); getId = HiTraceChain::GetId();
EXPECT_EQ(0, getId.IsValid()); EXPECT_EQ(0, getId.IsValid());
} }
...@@ -1079,7 +1079,7 @@ HWTEST_F(DbinderTest, DbinderRemoteCall024, TestSize.Level3) ...@@ -1079,7 +1079,7 @@ HWTEST_F(DbinderTest, DbinderRemoteCall024, TestSize.Level3)
{ {
DBINDER_LOGI(LOG_LABEL, ""); DBINDER_LOGI(LOG_LABEL, "");
SetCurrentTestCase(DBINDER_TEST_TRACE_001); SetCurrentTestCase(DBINDER_TEST_TRACE_001);
HiTraceId traceId = HiTrace::Begin("rpc hitrace", 0); HiTraceId traceId = HiTraceChain::Begin("rpc hitrace", 0);
/* /*
* @tc.steps: step1.Get a proxy (called testService) from remote server. * @tc.steps: step1.Get a proxy (called testService) from remote server.
......
...@@ -494,7 +494,7 @@ int DBinderTestServiceStub::OnReverseInt(MessageParcel &data, MessageParcel &rep ...@@ -494,7 +494,7 @@ int DBinderTestServiceStub::OnReverseInt(MessageParcel &data, MessageParcel &rep
int DBinderTestServiceStub::OnGetChildId(MessageParcel &data, MessageParcel &reply) int DBinderTestServiceStub::OnGetChildId(MessageParcel &data, MessageParcel &reply)
{ {
uint64_t reqData = HiTrace::GetId().GetChainId(); uint64_t reqData = HiTraceChain::GetId().GetChainId();
if (!reply.WriteUint64(reqData)) { if (!reply.WriteUint64(reqData)) {
DBINDER_LOGE(LOG_LABEL, "fail to write parcel"); DBINDER_LOGE(LOG_LABEL, "fail to write parcel");
return ERR_INVALID_STATE; return ERR_INVALID_STATE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册