1 /* 2 * Copyright (c) 2023 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 "sched/load_tracking.h" 17 18 #include <unordered_set> 19 #include <unordered_map> 20 21 #include <unistd.h> 22 23 #include "core/entity.h" 24 #include "dm/dependence_manager.h" 25 #include "sched/interval.h" 26 27 namespace ffrt { 28 #define perf_mmap_read_current() (static_cast<uint64_t>(0)) 29 BeginImpl()30void KernelLoadTracking::BeginImpl() 31 { 32 it.Ctrl().Begin(); 33 } 34 EndImpl()35void KernelLoadTracking::EndImpl() 36 { 37 it.Ctrl().End(); 38 } 39 GetLoadImpl()40uint64_t KernelLoadTracking::GetLoadImpl() 41 { 42 return it.Ctrl().GetLoad(); 43 } 44 }; // namespace ffrt 45