mirror of
https://gitee.com/openharmony/developtools_hiperf
synced 2024-11-23 07:29:42 +00:00
JS symbol parse
Signed-off-by: yuyanqinghw <yuyanqing539@huawei.com>
This commit is contained in:
parent
afb6a65c93
commit
1ffe995a15
@ -343,7 +343,7 @@ bool IsArkJsFile(const std::string& filepath);
|
||||
std::string GetProcessName(int pid);
|
||||
bool NeedAdaptSandboxPath(char *filename, int pid, u16 &headerSize);
|
||||
bool NeedAdaptHMBundlePath(std::string& filename, const std::string& threadname);
|
||||
bool checkApplicationEncryped(int pid);
|
||||
bool IsApplicationEncryped(const int pid);
|
||||
|
||||
template <typename Func>
|
||||
class ScopeGuard {
|
||||
|
@ -906,7 +906,7 @@ public:
|
||||
}
|
||||
hapExtracted_ = true;
|
||||
HLOGD("the symbol file is %s, pid is %d.", filePath_.c_str(), pid_);
|
||||
if (checkApplicationEncryped(pid_)) {
|
||||
if (IsApplicationEncryped(pid_)) {
|
||||
HLOGD("no need to parse js symbols");
|
||||
return false;
|
||||
}
|
||||
|
@ -842,12 +842,12 @@ bool IsHiviewCall()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool checkApplicationEncryped(int pid)
|
||||
bool IsApplicationEncryped(const int pid)
|
||||
{
|
||||
#if defined(is_ohos) && is_ohos && defined(BUNDLE_FRAMEWORK_ENABLE)
|
||||
CHECK_TRUE(pid <= 0, false, LOG_TYPE_PRINTF, "Invalid -p value '%d', the pid should be larger than 0\n", pid);
|
||||
std::string bundleName = GetProcessName(pid);
|
||||
CHECK_TRUE(bundleName.empty(), false, LOG_TYPE_PRINTF, "bundleName is empty!\n");
|
||||
CHECK_TRUE(bundleName.empty(), false, 1, "bundleName is empty,pid is %d", pid);
|
||||
sptr<ISystemAbilityManager> sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
|
||||
CHECK_TRUE(sam == nullptr, false, LOG_TYPE_PRINTF, "GetSystemAbilityManager failed!\n");
|
||||
sptr<IRemoteObject> remoteObject = sam->GetSystemAbility(BUNDLE_MGR_SERVICE_SYS_ABILITY_ID);
|
||||
|
Loading…
Reference in New Issue
Block a user