mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-27 00:51:47 +00:00
!2043 修改DfxArk类的使用方式
Merge pull request !2043 from wenlong_12/OpenHarmony_feature_20241121
This commit is contained in:
commit
c508a23ed5
@ -722,7 +722,7 @@ public:
|
||||
{
|
||||
#if defined(is_ohos) && is_ohos
|
||||
if (arkExtractorptr_ != 0) {
|
||||
DfxArk::ArkDestoryJsSymbolExtractor(arkExtractorptr_);
|
||||
DfxArk::Instance().ArkDestoryJsSymbolExtractor(arkExtractorptr_);
|
||||
arkExtractorptr_ = 0;
|
||||
}
|
||||
#endif
|
||||
@ -773,7 +773,7 @@ public:
|
||||
HLOGD("symbol file name %s loadOffSet %u abcDataSize_ %u abcDataPtr_ %s",
|
||||
filePath_.c_str(), (uint32_t)loadOffSet_, (uint32_t)abcDataSize_, abcDataPtr_.get());
|
||||
}
|
||||
auto ret = DfxArk::ArkCreateJsSymbolExtractor(&arkExtractorptr_);
|
||||
auto ret = DfxArk::Instance().ArkCreateJsSymbolExtractor(&arkExtractorptr_);
|
||||
if (ret < 0) {
|
||||
arkExtractorptr_ = 0;
|
||||
HLOGE("failed to call ArkCreateJsSymbolExtractor, the symbol file is:%s", filePath_.c_str());
|
||||
@ -841,9 +841,10 @@ public:
|
||||
std::string module = map->name;
|
||||
HLOGD("map->name module:%s", module.c_str());
|
||||
// symbolization based on ark bytecode
|
||||
auto ret = DfxArk::ParseArkFrameInfo(static_cast<uintptr_t>(ip), static_cast<uintptr_t>(map->begin),
|
||||
loadOffSet_, abcDataPtr_.get(), abcDataSize_,
|
||||
arkExtractorptr_, &jsFunc);
|
||||
auto ret = DfxArk::Instance().ParseArkFrameInfo(static_cast<uintptr_t>(ip),
|
||||
static_cast<uintptr_t>(map->begin),
|
||||
loadOffSet_, abcDataPtr_.get(), abcDataSize_,
|
||||
arkExtractorptr_, &jsFunc);
|
||||
if (ret == -1) {
|
||||
HLOGD("failed to call ParseArkFrameInfo, the symbol file is : %s", map->name.c_str());
|
||||
return DfxSymbol(ip, "");
|
||||
|
Loading…
Reference in New Issue
Block a user