From ee805b2f037ed1abf02f5e4b0da68c22dae8ffa1 Mon Sep 17 00:00:00 2001 From: Zhangzhuozhou Date: Mon, 15 Jul 2024 11:18:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=8A=A8=E6=95=88=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E9=80=82=E9=85=8D=E5=A4=9A=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhangzhuozhou --- .../src/filter/animation_filter.cpp | 60 ++++++++++--------- trace_streamer/src/filter/animation_filter.h | 14 ++++- .../src/parser/print_event_parser.cpp | 3 +- .../src/parser/print_event_parser.h | 3 +- .../trace_data/trace_stdtype/base_stdtype.h | 2 +- .../ftrace/template/animation_stdtype.cpp | 28 ++++----- .../ftrace/template/animation_stdtype.h | 3 +- 7 files changed, 59 insertions(+), 54 deletions(-) diff --git a/trace_streamer/src/filter/animation_filter.cpp b/trace_streamer/src/filter/animation_filter.cpp index 844191a92..f3ca08f4c 100644 --- a/trace_streamer/src/filter/animation_filter.cpp +++ b/trace_streamer/src/filter/animation_filter.cpp @@ -90,13 +90,17 @@ bool AnimationFilter::UpdateDeviceInfoEvent(const TracePoint &point, const Bytra StartWith(point.name_, frameRateCmd_)) { return UpdateDeviceFps(line); } else if (traceDataCache_->GetConstDeviceInfo().PhysicalWidth() == INVALID_UINT32 && - StartWith(point.name_, screenSizeCmd_)) { + (StartWith(point.name_, newScreenSizeCmd_) || StartWith(point.name_, screenSizeCmd_))) { return UpdateDeviceScreenSize(point); } return false; } bool AnimationFilter::BeginDynamicFrameEvent(const TracePoint &point, size_t callStackRow) { + if (StartWith(point.name_, paralleCmd_)) { + isNewAnimation_ = true; + return true; + } if (StartWith(point.name_, frameCountCmd_)) { frameCountRows_.insert(callStackRow); return true; @@ -112,20 +116,15 @@ bool AnimationFilter::BeginDynamicFrameEvent(const TracePoint &point, size_t cal traceDataCache_->GetAnimation()->UpdateFrameInfo(animationRow, traceDataCache_->GetDataIndex(curFrameNum + curRealFrameRate)); return true; - } else if (!StartWith(point.name_, frameBeginCmd_)) { - return false; + } else if (StartWith(point.name_, newFrameBeginCmd_) || StartWith(point.name_, frameBeginCmd_)) { + // get the parent frame of data + const std::optional &parentId = callStackSlice_->ParentIdData()[callStackRow]; + uint8_t depth = callStackSlice_->Depths()[callStackRow]; + TS_CHECK_TRUE_RET(depth >= DYNAMIC_STACK_DEPTH_MIN && parentId.has_value(), false); + callstackWithDynamicFrameRows_.emplace_back(callStackRow); + return true; } - // get the parent frame of data - const std::optional &parentId = callStackSlice_->ParentIdData()[callStackRow]; - uint8_t depth = callStackSlice_->Depths()[callStackRow]; - TS_CHECK_TRUE_RET(depth >= DYNAMIC_STACK_DEPTH_MIN && parentId.has_value(), false); - // get name 'xxx' from [xxx], eg:H:RSUniRender::Process:[xxx] - auto nameSize = point.funcPrefix_.size() - frameBeginPrefix_.size() - 1; - TS_CHECK_TRUE_RET(nameSize > 0, false); - auto nameIndex = traceDataCache_->GetDataIndex(point.funcPrefix_.substr(frameBeginPrefix_.size(), nameSize)); - auto dynamicFramRow = dynamicFrame_->AppendDynamicFrame(nameIndex); - callStackRowMap_.emplace(callStackRow, dynamicFramRow); - return true; + return false; } bool AnimationFilter::EndDynamicFrameEvent(uint64_t ts, size_t callStackRow) { @@ -178,9 +177,10 @@ bool AnimationFilter::UpdateDynamicEndTime(const uint64_t curFrameRow, uint64_t } curStackRow = callStackSlice_->ParentIdData()[curStackRow].value(); // use frameEndTimeCmd_'s endTime as dynamicFrame endTime - auto nameIndex = callStackSlice_->NamesData()[curStackRow]; - if (StartWith(traceDataCache_->GetDataFromDict(nameIndex), frameEndTimeCmd_)) { - auto endTime = callStackSlice_->TimeStampData()[curStackRow] + callStackSlice_->DursData()[curStackRow]; + auto nameIndex = callStackSlice_->NamesData()[rowIndex]; + if (isNewAnimation_ && StartWith(traceDataCache_->GetDataFromDict(nameIndex), renderFrameCmd_) || + StartWith(traceDataCache_->GetDataFromDict(nameIndex), frameEndTimeCmd_)) { + auto endTime = callStackSlice_->TimeStampData()[rowIndex] + callStackSlice_->DursData()[rowIndex]; dynamicFrame_->UpdateEndTime(curFrameRow, endTime); return true; } @@ -211,24 +211,26 @@ void AnimationFilter::UpdateFrameInfo() void AnimationFilter::UpdateDynamicFrameInfo() { std::smatch matcheLine; - std::regex framePixPattern(R"((\d+),\s*(\d+),\s*(\d+),\s*(\d+)\)\s+Alpha:\s+-*(\d+\.\d+))"); - for (const auto &it : callStackRowMap_) { + for (auto it = callstackWithDynamicFrameRows_.begin(); it != callstackWithDynamicFrameRows_.end(); ++it) { // update dynamicFrame pix, eg:H:RSUniRender::Process:[xxx] (0, 0, 1344, 2772) Alpha: 1.00 - auto nameDataIndex = callStackSlice_->NamesData()[it.first]; + auto nameDataIndex = callStackSlice_->NamesData()[*it]; const std::string &curStackName = traceDataCache_->GetDataFromDict(nameDataIndex); - const std::string &funcArgs = curStackName.substr(frameBeginCmd_.size()); - if (!std::regex_search(funcArgs, matcheLine, framePixPattern)) { - TS_LOGE("Not support this event: %s\n", funcArgs.data()); + if (!std::regex_search(curStackName, matcheLine, framePixPattern_)) { + TS_LOGE("Not support this event: %s\n", curStackName.data()); + continue; + } + int32_t index = dynamicFrame_->AppendDynamicFrame( + traceDataCache_->GetDataIndex(matcheLine[1].str()), matcheLine, + traceDataCache_->GetDataIndex((matcheLine[DYNAMICFRAME_MATCH_LAST].str()))); + if (index == INVALID_INT32) { + TS_LOGE("Failed to append dynamic frame: %s\n", curStackName.data()); continue; } - dynamicFrame_->UpdatePosition( - it.second, matcheLine, - traceDataCache_->GetDataIndex((matcheLine[DYNAMICFRAME_MATCH_LAST].str()))); // alpha - UpdateDynamicEndTime(it.second, it.first); + UpdateDynamicEndTime(index, *it); } - TS_LOGI("UpdateDynamicFrame (%zu) endTime and pos finish", callStackRowMap_.size()); + TS_LOGI("UpdateDynamicFrame (%zu) endTime and pos finish", callstackWithDynamicFrameRows_.size()); // this can only be cleared by the UpdateDynamicFrameInfo function - callStackRowMap_.clear(); + callstackWithDynamicFrameRows_.clear(); } void AnimationFilter::Clear() { diff --git a/trace_streamer/src/filter/animation_filter.h b/trace_streamer/src/filter/animation_filter.h index 1c7513692..3201e06ca 100644 --- a/trace_streamer/src/filter/animation_filter.h +++ b/trace_streamer/src/filter/animation_filter.h @@ -46,18 +46,24 @@ private: bool UpdateDeviceFps(const BytraceLine &line); bool UpdateDeviceScreenSize(const TracePoint &point); bool UpdateDynamicEndTime(const uint64_t curFrameRow, uint64_t curStackRow); + const std::regex framePixPattern_ = + std::regex(R"(\[(.*?)\]\s*\(\s*-?(\d+),\s*-?(\d+),\s*(\d+),\s*(\d+)\)\s*Alpha:\s+-*(\d+\.\d+))"); // for calculate the frame rate const std::string frameRateCmd_ = "H:GenerateVsyncCount"; // if the realFrameRate present, no calculation is required - const std::string realFrameRateCmd_ = "H:RSJankStats::RecordAnimationDynamicFrameRate"; - const std::string frameBeginCmd_ = "H:RSUniRender::Process:[WindowScene_"; + const std::string realFrameRateCmd_ = "H:RSJankStats::RecordAnimationDynamicFrameRate"; // 动效过程帧率 const std::string frameCountCmd_ = "H:Repaint"; + const std::string frameBeginCmd_ = "H:RSUniRender::Process:[WindowScene_"; + const std::string newFrameBeginCmd_ = "H:RSSurfaceRenderNodeDrawable::OnDraw:[WindowScene_"; // 动效帧数据 const std::string frameBeginPrefix_ = "H:RSUniRender::Process:["; const std::string screenSizeCmd_ = "H:RSUniRender::Process:[SCBDesktop"; + const std::string newScreenSizeCmd_ = "H:RSSurfaceRenderNodeDrawable::OnDraw:[SCBDesktop"; // 设备分辨率 const std::string frameEndTimeCmd_ = "H:RSMainThread::DoComposition"; + const std::string paralleCmd_ = "H:PostAndWait, parallel type"; // 并行化标志 + const std::string renderFrameCmd_ = "H:RenderFrame"; // 并行化后动效帧结束时间相关trace点 std::unordered_set onAnimationStartEvents_ = {}; // for update dynamicFrameInfo at the end, first is callStackRow, second is dynamicFramRow - std::map callStackRowMap_ = {}; + std::deque callstackWithDynamicFrameRows_ = {}; // for update animationInfo, first is callStackRow, second is animationRow std::unordered_map animationCallIds_ = {}; // for count number of frames @@ -67,6 +73,8 @@ private: std::unordered_map realFrameRateFlagsDict_ = {}; uint64_t generateFirstTime_ = INVALID_UINT64; uint8_t generateVsyncCnt_ = 0; + std::deque parallelRows_ = {}; + bool isNewAnimation_ = false; DynamicFrame *dynamicFrame_ = nullptr; CallStack *callStackSlice_ = nullptr; const uint8_t inputTimeIndex_ = 3; diff --git a/trace_streamer/src/parser/print_event_parser.cpp b/trace_streamer/src/parser/print_event_parser.cpp index 6b3f73f69..fb566945a 100644 --- a/trace_streamer/src/parser/print_event_parser.cpp +++ b/trace_streamer/src/parser/print_event_parser.cpp @@ -142,7 +142,8 @@ void PrintEventParser::ParseStartEvent(const std::string &comm, if (point.name_ == onFrameQueeuStartEvent_ && index != INVALID_UINT64) { OnFrameQueueStart(ts, index, point.tgid_); } else if (traceDataCache_->AnimationTraceEnabled() && index != INVALID_UINT64 && - base::EndWith(comm, onAnimationProcEvent_)) { // the comm is taskName + (base::EndWith(comm, onAnimationProcEvent_) || + base::EndWith(comm, newOnAnimationProcEvent_))) { // the comm is taskName streamFilters_->animationFilter_->StartAnimationEvent(line, point, index); } } diff --git a/trace_streamer/src/parser/print_event_parser.h b/trace_streamer/src/parser/print_event_parser.h index c97da532f..0c0c68b81 100644 --- a/trace_streamer/src/parser/print_event_parser.h +++ b/trace_streamer/src/parser/print_event_parser.h @@ -89,7 +89,8 @@ private: const std::string rsOnDoCompositionStr_ = "H:RSMainThread::DoComposition"; DataIndex rsOnDoCompositionEvent_ = INVALID_DATAINDEX; const std::string onFrameQueeuStartEvent_ = "H:M: Frame queued"; - const std::string onAnimationProcEvent_ = "render_service"; + const std::string onAnimationProcEvent_ = "render_service"; // 并行化前动效过程异步trace打点线程 + const std::string newOnAnimationProcEvent_ = "RSUniRenderThre"; // 并行化后动效过程异步trace打点线程 const DataIndex marshRwTransactionData_ = traceDataCache_->GetDataIndex("H:MarshRSTransactionData"); const DataIndex rsMainThreadProcessCmd_ = traceDataCache_->GetDataIndex("H:RSMainThread::ProcessCommandUni"); const std::regex recvVsyncPattern_ = std::regex(R"((\w+):\s*(\w+))"); diff --git a/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h b/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h index ceaf74807..7dd057099 100644 --- a/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h +++ b/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h @@ -23,7 +23,7 @@ namespace SysTuning { namespace TraceStdtype { constexpr uint32_t ONE_MILLION_NANOSECONDS = 1000000; constexpr uint32_t BILLION_NANOSECONDS = 1000000000; -constexpr uint8_t DYNAMICFRAME_MATCH_LAST = 5; +constexpr uint8_t DYNAMICFRAME_MATCH_LAST = 6; class CacheBase { public: size_t Size() const; diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.cpp b/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.cpp index bf4d34221..d49a74700 100644 --- a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.cpp +++ b/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.cpp @@ -112,15 +112,20 @@ void DeviceInfo::Clear() physicalFrameRate_ = INVALID_UINT32; } -TableRowId DynamicFrame::AppendDynamicFrame(DataIndex nameId) +TableRowId DynamicFrame::AppendDynamicFrame(DataIndex nameId, const std::smatch &matcheLine, DataIndex alpha) + { + if (matcheLine.size() < DYNAMICFRAME_MATCH_LAST) { + return INVALID_INT32; + } + uint8_t matcheIndex = 1; names_.emplace_back(nameId); ids_.emplace_back(Size()); - xs_.emplace_back(INVALID_UINT32); - ys_.emplace_back(INVALID_UINT32); - widths_.emplace_back(INVALID_UINT32); - heights_.emplace_back(INVALID_UINT32); - alphas_.emplace_back(INVALID_UINT64); + xs_.emplace_back(base::StrToInt(matcheLine[++matcheIndex].str()).value()); + ys_.emplace_back(base::StrToInt(matcheLine[++matcheIndex].str()).value()); + widths_.emplace_back(base::StrToInt(matcheLine[++matcheIndex].str()).value()); + heights_.emplace_back(base::StrToInt(matcheLine[++matcheIndex].str()).value()); + alphas_.emplace_back(alpha); endTimes_.emplace_back(INVALID_TIME); return ids_.size() - 1; } @@ -130,17 +135,6 @@ void DynamicFrame::UpdateNameIndex(TableRowId index, DataIndex nameId) names_[index] = nameId; } } -void DynamicFrame::UpdatePosition(TableRowId index, const std::smatch &matcheLine, DataIndex alpha) -{ - if (index <= Size() && matcheLine.size() > DYNAMICFRAME_MATCH_LAST) { - uint8_t matcheIndex = 0; - xs_[index] = base::StrToInt(matcheLine[++matcheIndex].str()).value(); - ys_[index] = base::StrToInt(matcheLine[++matcheIndex].str()).value(); - widths_[index] = base::StrToInt(matcheLine[++matcheIndex].str()).value(); - heights_[index] = base::StrToInt(matcheLine[++matcheIndex].str()).value(); - alphas_[index] = alpha; - } -} void DynamicFrame::UpdateEndTime(TableRowId index, InternalTime endTime) { if (index <= Size()) { diff --git a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.h b/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.h index 480f61bc9..72ed0adb1 100644 --- a/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.h +++ b/trace_streamer/src/trace_data/trace_stdtype/ftrace/template/animation_stdtype.h @@ -63,9 +63,8 @@ private: class DynamicFrame { public: - TableRowId AppendDynamicFrame(DataIndex nameId); + TableRowId AppendDynamicFrame(DataIndex nameId, const std::smatch &matcheLine, DataIndex alpha); void UpdateNameIndex(TableRowId index, DataIndex nameId); - void UpdatePosition(TableRowId index, const std::smatch &matcheLine, DataIndex alpha); void UpdateEndTime(TableRowId index, InternalTime endTime); size_t Size() const; -- Gitee From 06db4d43f8ad0688fc7b062ae77b4f31b4bb5623 Mon Sep 17 00:00:00 2001 From: Zhangzhuozhou Date: Mon, 15 Jul 2024 15:13:03 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=8A=A8=E6=95=88bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhangzhuozhou --- trace_streamer/src/filter/animation_filter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trace_streamer/src/filter/animation_filter.cpp b/trace_streamer/src/filter/animation_filter.cpp index f3ca08f4c..4dbe7d94e 100644 --- a/trace_streamer/src/filter/animation_filter.cpp +++ b/trace_streamer/src/filter/animation_filter.cpp @@ -177,10 +177,10 @@ bool AnimationFilter::UpdateDynamicEndTime(const uint64_t curFrameRow, uint64_t } curStackRow = callStackSlice_->ParentIdData()[curStackRow].value(); // use frameEndTimeCmd_'s endTime as dynamicFrame endTime - auto nameIndex = callStackSlice_->NamesData()[rowIndex]; + auto nameIndex = callStackSlice_->NamesData()[curStackRow]; if (isNewAnimation_ && StartWith(traceDataCache_->GetDataFromDict(nameIndex), renderFrameCmd_) || StartWith(traceDataCache_->GetDataFromDict(nameIndex), frameEndTimeCmd_)) { - auto endTime = callStackSlice_->TimeStampData()[rowIndex] + callStackSlice_->DursData()[rowIndex]; + auto endTime = callStackSlice_->TimeStampData()[curStackRow] + callStackSlice_->DursData()[curStackRow]; dynamicFrame_->UpdateEndTime(curFrameRow, endTime); return true; } -- Gitee From 21bf6c67356e61247a3843c650a2e928f2b033b5 Mon Sep 17 00:00:00 2001 From: Zhangzhuozhou Date: Tue, 16 Jul 2024 10:44:57 +0800 Subject: [PATCH 3/4] =?UTF-8?q?Native=20Memory=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhangzhuozhou --- .../src/filter/hook_filter/native_hook_filter.cpp | 9 +++++---- .../src/filter/hook_filter/native_hook_filter.h | 4 ++-- .../types/plugins/native_hook/native_hook_result.proto | 8 ++++---- .../src/trace_data/trace_stdtype/base_stdtype.h | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp b/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp index 283a6f683..6c654713c 100644 --- a/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp +++ b/trace_streamer/src/filter/hook_filter/native_hook_filter.cpp @@ -280,7 +280,7 @@ void NativeHookFilter::ParseAllocEvent(uint64_t timeStamp, const ProtoReader::By 0, 0, allocEventReader.addr(), - allocEventReader.size()}; + static_cast(allocEventReader.size())}; auto row = traceDataCache_->GetNativeHookData()->AppendNewNativeHookData(nativeHookRow); addrToAllocEventRow_->insert(std::make_pair(allocEventReader.addr(), static_cast(row))); if (allocEventReader.size() != 0) { @@ -408,7 +408,8 @@ void NativeHookFilter::ParseMmapEvent(uint64_t timeStamp, const ProtoReader::Byt // Establish a mapping of addr and size to the mmap tag index. addrToMmapTag_[mMapAddr] = subType; // update addr to MemMapSubType } - NativeHookRow nativeHookRow = {callChainId, ipid, itid, "MmapEvent", subType, timeStamp, 0, 0, mMapAddr, mMapSize}; + NativeHookRow nativeHookRow = {callChainId, ipid, itid, "MmapEvent", subType, + timeStamp, 0, 0, mMapAddr, static_cast(mMapSize)}; auto row = traceDataCache_->GetNativeHookData()->AppendNewNativeHookData(nativeHookRow); if (subType == INVALID_UINT64) { UpdateAnonMmapDataDbIndex(mMapAddr, mMapSize, static_cast(row)); @@ -487,7 +488,7 @@ void NativeHookFilter::ParseMunmapEvent(uint64_t timeStamp, const ProtoReader::B 0, 0, mUnmapEventReader.addr(), - mUnmapEventReader.size()}; + static_cast(mUnmapEventReader.size())}; row = traceDataCache_->GetNativeHookData()->AppendNewNativeHookData(nativeHookRow); addrToMmapTag_.erase(mUnmapEventReader.addr()); // earse MemMapSubType with addr if (mUnmapEventReader.size() != 0) { @@ -530,7 +531,7 @@ inline uint64_t NativeHookFilter::GetMemMapSubTypeWithAddr(uint64_t addr) return INVALID_UINT64; } } -inline void NativeHookFilter::UpdateAnonMmapDataDbIndex(uint64_t addr, uint32_t size, uint64_t row) +inline void NativeHookFilter::UpdateAnonMmapDataDbIndex(uint64_t addr, uint64_t size, uint64_t row) { auto indexPtr = anonMmapData_.Find(addr, size); if (indexPtr == nullptr) { diff --git a/trace_streamer/src/filter/hook_filter/native_hook_filter.h b/trace_streamer/src/filter/hook_filter/native_hook_filter.h index c0533474a..acc936363 100644 --- a/trace_streamer/src/filter/hook_filter/native_hook_filter.h +++ b/trace_streamer/src/filter/hook_filter/native_hook_filter.h @@ -145,14 +145,14 @@ private: template void UpdateFilePathIdAndStValueToSymAddrMap(T *firstSymbolAddr, const int size, uint32_t filePathId); uint64_t GetMemMapSubTypeWithAddr(uint64_t addr); - void UpdateAnonMmapDataDbIndex(uint64_t addr, uint32_t size, uint64_t row); + void UpdateAnonMmapDataDbIndex(uint64_t addr, uint64_t size, uint64_t row); void UpdateLastCallerPathAndSymbolIndexs(); void UpdateFilePathIndexToCallStackRowMap(size_t row, DataIndex filePathIndex); private: // first key is addr, second key is size, value is set in db // mmap update anonymous memory tag always use the anonMmapData_ value - DoubleMap>> anonMmapData_; + DoubleMap>> anonMmapData_; std::unique_ptr hookPluginData_ = nullptr; DoubleMap ipidToSymIdToSymIndex_; DoubleMap ipidToFilePathIdToFileIndex_; diff --git a/trace_streamer/src/protos/types/plugins/native_hook/native_hook_result.proto b/trace_streamer/src/protos/types/plugins/native_hook/native_hook_result.proto index 2acc7cfb7..dbca0dabb 100644 --- a/trace_streamer/src/protos/types/plugins/native_hook/native_hook_result.proto +++ b/trace_streamer/src/protos/types/plugins/native_hook/native_hook_result.proto @@ -31,7 +31,7 @@ message AllocEvent { int32 pid = 1; int32 tid = 2; uint64 addr = 3; - uint32 size = 4; + uint64 size = 4; repeated Frame frame_info = 5; uint32 thread_name_id = 6; uint32 stack_id = 7; @@ -51,7 +51,7 @@ message MmapEvent { int32 tid = 2; uint64 addr = 3; string type = 4; - uint32 size = 5; + uint64 size = 5; repeated Frame frame_info = 6; uint32 thread_name_id = 7; uint32 stack_id = 8; @@ -61,7 +61,7 @@ message MunmapEvent { int32 pid = 1; int32 tid = 2; uint64 addr = 3; - uint32 size = 4; + uint64 size = 4; repeated Frame frame_info = 5; uint32 thread_name_id = 6; uint32 stack_id = 7; @@ -82,7 +82,7 @@ message FrameMap { message MemTagEvent { uint64 addr = 1; - uint32 size = 2; + uint64 size = 2; string tag = 3; int32 pid = 4; } diff --git a/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h b/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h index 7dd057099..aaeecbcb3 100644 --- a/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h +++ b/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h @@ -69,7 +69,7 @@ public: } virtual void ClearExportedData() = 0; template - void EraseElements(T &deq, changedata &...args) + void EraseElements(T &deq, changedata &... args) { deq.erase(deq.begin(), deq.begin() + readySize_); EraseElements(args...); -- Gitee From 95d32ecd512ba955745ad5a7172d9690c29d4302 Mon Sep 17 00:00:00 2001 From: Zhangzhuozhou Date: Tue, 16 Jul 2024 14:43:17 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhangzhuozhou --- trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h b/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h index aaeecbcb3..7dd057099 100644 --- a/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h +++ b/trace_streamer/src/trace_data/trace_stdtype/base_stdtype.h @@ -69,7 +69,7 @@ public: } virtual void ClearExportedData() = 0; template - void EraseElements(T &deq, changedata &... args) + void EraseElements(T &deq, changedata &...args) { deq.erase(deq.begin(), deq.begin() + readySize_); EraseElements(args...); -- Gitee