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/dfx_hisys_event.h" 17 #include "ecmascript/mem/long_gc_stats.h" 18 #include "ecmascript/log.h" 19 #include "ecmascript/log_wrapper.h" 20 21 namespace panda::ecmascript { 22 SendLongGCEvent(LongGCStats * longGCStats)23void DFXHiSysEvent::SendLongGCEvent([[maybe_unused]]LongGCStats *longGCStats) 24 { 25 LOG_GC(FATAL) << "Send LongGCEvent is not support in macos/ios."; 26 } 27 IsEnableDFXHiSysEvent()28bool DFXHiSysEvent::IsEnableDFXHiSysEvent() 29 { 30 return false; 31 } 32 GetCpuUsage()33double DFXHiSysEvent::GetCpuUsage() 34 { 35 LOG_GC(WARN) << "Get CpuUsage is not support in mac."; 36 return -1.0; 37 } 38 } // namespace panda::ecmascript 39