1# Copyright (c) 2021 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//base/hiviewdfx/hiview/hiview.gni") 15import("//build/ohos.gni") 16 17config("freeze_detector_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "//base/hiviewdfx/hiview/base/include", 21 "//base/hiviewdfx/hiview/utility/smart_parser", 22 "//base/hiviewdfx/hiview/base/event_store/include", 23 "//base/hiviewdfx/hiview/plugins/faultlogger/interfaces/cpp/innerkits/include", 24 ".", 25 ] 26} 27 28ohos_source_set("freeze_detector") { 29 part_name = "hiview" 30 subsystem_name = "hiviewdfx" 31 include_dirs = 32 [ "$hiview_framework/native/unified_collection/process/include" ] 33 34 sources = [ 35 "db_helper.cpp", 36 "freeze_common.cpp", 37 "freeze_detector_plugin.cpp", 38 "resolver.cpp", 39 "rule_cluster.cpp", 40 "vendor.cpp", 41 "watch_point.cpp", 42 ] 43 44 configs = [ ":freeze_detector_config" ] 45 46 external_deps = [ 47 "c_utils:utils", 48 "ffrt:libffrt", 49 "hilog:libhilog", 50 "ipc:ipc_single", 51 "libxml2:libxml2", 52 "power_manager:powermgr_client", 53 ] 54 55 deps = [ 56 "$hiview_base:hiviewbase", 57 "$hiview_interfaces/inner_api/unified_collection/utility:libucollection_utility", 58 "$hiview_plugin/faultlogger:libfaultlogger", 59 "config:config", 60 ] 61} 62 63group("unittest") { 64 testonly = true 65 deps = [] 66 if (hiview_freeze_collect_enable) { 67 deps += [ 68 "test:FreezeDetectorTest", 69 "test:FreezeDetectorUnittest", 70 ] 71 } 72} 73 74group("moduletest") { 75 testonly = true 76 deps = [] 77} 78