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
18 namespace panda::ecmascript {
19 #ifdef JIT_ESCAPE_ENABLE
GetSignalHandler(int signal, siginfo_t *info, void *context)20 void GetSignalHandler(int signal, siginfo_t *info, void *context)
21 {
22 (void)signal;
23 (void)info;
24 (void)context;
25 }
26
SignalReg(int signo)27 void SignalReg(int signo)
28 {
29 (void)signo;
30 }
31 #endif
32
SignalAllReg()33 void SignalAllReg()
34 {
35 }
36
IsAotEscapedOrNotInEnableList(EcmaVM *vm, const std::string &bundleName) const37 bool AotCrashInfo::IsAotEscapedOrNotInEnableList(EcmaVM *vm, const std::string &bundleName) const
38 {
39 (void)vm;
40 (void)bundleName;
41 return false;
42 }
43
IsAotEscapedOrCompiledOnce(AotCompilerPreprocessor &cPreprocessor, int32_t &ret) const44 bool AotCrashInfo::IsAotEscapedOrCompiledOnce(AotCompilerPreprocessor &cPreprocessor, int32_t &ret) const
45 {
46 (void)cPreprocessor;
47 (void)ret;
48 return false;
49 }
50
SetOptionPGOProfiler(JSRuntimeOptions *options, const std::string &bundleName) const51 void AotCrashInfo::SetOptionPGOProfiler(JSRuntimeOptions *options, const std::string &bundleName) const
52 {
53 (void)options;
54 (void)bundleName;
55 }
56
IsAotEscaped(const std::string &pgoRealPath)57 bool AotCrashInfo::IsAotEscaped(const std::string &pgoRealPath)
58 {
59 (void)pgoRealPath;
60 return false;
61 }
62
IsJitEscape()63 bool AotCrashInfo::IsJitEscape()
64 {
65 return false;
66 }
67
GetAotEscapeDisable()68 bool AotCrashInfo::GetAotEscapeDisable()
69 {
70 return false;
71 }
72
GetSandBoxPath()73 std::string AotCrashInfo::GetSandBoxPath()
74 {
75 return ohos::OhosConstants::SANDBOX_ARK_PROFILE_PATH;
76 }
77
GetAotCrashCount()78 int AotCrashInfo::GetAotCrashCount()
79 {
80 return AOT_CRASH_COUNT;
81 }
82
GetJitCrashCount()83 int AotCrashInfo::GetJitCrashCount()
84 {
85 return JIT_CRASH_COUNT;
86 }
87
GetJsCrashCount()88 int AotCrashInfo::GetJsCrashCount()
89 {
90 return JS_CRASH_COUNT;
91 }
92
GetOthersCrashCount()93 int AotCrashInfo::GetOthersCrashCount()
94 {
95 return OTHERS_CRASH_COUNT;
96 }
97 } // namespace panda::ecmascript