!448 hiperf适配混合栈

Merge pull request !448 from yuyanqing/master
This commit is contained in:
openharmony_ci 2024-03-02 07:40:08 +00:00 committed by Gitee
commit 3fecb084ab
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -70,6 +70,11 @@ void Report::AddReportItem(const PerfRecordSample &sample, bool includeCallStack
} else {
auto frameIt = sample.callFrames_.begin();
HLOG_ASSERT(frameIt->pc < PERF_CONTEXT_MAX);
// for arkjs frame, skip the stub.an frame
if (StringEndsWith(frameIt->mapName, "stub.an")) {
HLOGV("stub.an frame, go to next, mapname %s", frameIt->mapName.c_str());
frameIt++;
}
ReportItem &item = configs_[configIndex].reportItems_.emplace_back(
sample.data_.pid, sample.data_.tid, thread.name_, frameIt->mapName,
frameIt->funcName, frameIt->funcOffset, sample.data_.period);