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 #ifndef RESSCHED_INTERFACES_INNERKITS_RESSCHED_CLIENT_INCLUDE_RES_SCHED_KILL_REASON_H 17 #define RESSCHED_INTERFACES_INNERKITS_RESSCHED_CLIENT_INCLUDE_RES_SCHED_KILL_REASON_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace ResourceSchedule { 23 class KillReason { 24 public: 25 static constexpr char CPU_HIGHLOAD[] = "Kill Reason:CPU Highload"; 26 static constexpr char CPU_EXT_HIGHLOAD[] = "Kill Reason:CPU_EXT Highload"; 27 static constexpr char IO_MANAGE_CONTROL[] = "Kill Reason:IO Manage Control"; 28 static constexpr char ION_MANAGE_CONTROL[] = "Kill Reason:ResourceLeak:Ion Leak"; 29 static constexpr char MEMORY_SOFT_DETERIORATION[] = "Kill Reason:ResourceLeak:Pss Soft Kill"; 30 static constexpr char MEMORY_DETERIORATION[] = "Kill Reason:ResourceLeak:Pss Kill"; 31 static constexpr char GPU_RS_HIGHLOAD[] = "Kill Reason:ResourceLeak:Gpu_rs Leak"; 32 static constexpr char GPU_HIGHLOAD[] = "Kill Reason:ResourceLeak:Gpu Leak"; 33 static constexpr char VMA_LEAK_HIGHLOAD[] = "Kill Reason:ResourceLeak:Vma Leak"; 34 static constexpr char FD_HIGHLOAD[] = "Kill Reason:ResourceLeak:Fd Leak"; 35 static constexpr char THREAD_HIGHLOAD[] = "Kill Reason:ResourceLeak:Thread Leak"; 36 static constexpr char ASHMEM_HIGHLOAD[] = "Kill Reason:ResourceLeak:Ashmem Leak"; 37 static constexpr char MEMORY_PRESSURE[] = "Kill Reason:Memory Pressure"; 38 static constexpr char TEMPERATURE_CONTROL[] = "Kill Reason:Temperature Control"; 39 static constexpr char RESOURCE_OVERLIMIT[] = "Kill Reason:Resource Overlimit"; 40 }; 41 } // namespace ResourceSchedule 42 } // namespace OHOS 43 44 #endif // RESSCHED_INTERFACES_INNERKITS_RESSCHED_CLIENT_INCLUDE_RES_SCHED_KILL_REASON_H 45