1/* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16#include "ecmascript/platform/aot_crash_info.h" 17 18namespace panda::ecmascript { 19#ifdef JIT_ESCAPE_ENABLE 20void GetSignalHandler(int signal, siginfo_t *info, void *context) 21{ 22 (void)signal; 23 (void)info; 24 (void)context; 25} 26 27void SignalReg(int signo) 28{ 29 (void)signo; 30} 31#endif 32 33void SignalAllReg() 34{ 35} 36 37bool AotCrashInfo::IsAotEscapedOrNotInEnableList(EcmaVM *vm, const std::string &bundleName) const 38{ 39 (void)vm; 40 (void)bundleName; 41 return false; 42} 43 44bool AotCrashInfo::IsAotEscapedOrCompiledOnce(AotCompilerPreprocessor &cPreprocessor, int32_t &ret) const 45{ 46 (void)cPreprocessor; 47 (void)ret; 48 return false; 49} 50 51void AotCrashInfo::SetOptionPGOProfiler(JSRuntimeOptions *options, const std::string &bundleName) const 52{ 53 (void)options; 54 (void)bundleName; 55} 56 57bool AotCrashInfo::IsAotEscaped(const std::string &pgoRealPath) 58{ 59 (void)pgoRealPath; 60 return false; 61} 62 63bool AotCrashInfo::IsJitEscape() 64{ 65 return false; 66} 67 68bool AotCrashInfo::GetAotEscapeDisable() 69{ 70 return false; 71} 72 73std::string AotCrashInfo::GetSandBoxPath() 74{ 75 return ohos::OhosConstants::SANDBOX_ARK_PROFILE_PATH; 76} 77 78int AotCrashInfo::GetAotCrashCount() 79{ 80 return AOT_CRASH_COUNT; 81} 82 83int AotCrashInfo::GetJitCrashCount() 84{ 85 return JIT_CRASH_COUNT; 86} 87 88int AotCrashInfo::GetJsCrashCount() 89{ 90 return JS_CRASH_COUNT; 91} 92 93int AotCrashInfo::GetOthersCrashCount() 94{ 95 return OTHERS_CRASH_COUNT; 96} 97} // namespace panda::ecmascript