1# Copyright (c) 2021-2022 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("../../hidumper.gni") 15 16config("dump_usage_config") { 17 visibility = [ "*:*" ] 18 19 include_dirs = [ 20 "include", 21 "${hidumper_frameworks_path}", 22 "${hidumper_frameworks_path}/include", 23 "${hidumper_utils_path}/native/include", 24 "${hidumper_interface}/innerkits/include", 25 ] 26} 27 28ohos_shared_library("lib_dump_usage") { 29 branch_protector_ret = "pac_ret" 30 public_configs = [ 31 ":dump_usage_config", 32 "${hidumper_service_path}:hidumpercpuservice_gen_config", 33 ] 34 35 sources = [ 36 "${hidumper_frameworks_path}/src/executor/memory/dma_info.cpp", 37 "${hidumper_frameworks_path}/src/executor/memory/memory_util.cpp", 38 "${hidumper_frameworks_path}/src/executor/memory/parse/parse_smaps_rollup_info.cpp", 39 "${hidumper_frameworks_path}/src/util/file_utils.cpp", 40 "${hidumper_frameworks_path}/src/util/string_utils.cpp", 41 "../../interfaces/innerkits/dump_usage.cpp", 42 ] 43 44 defines = [] 45 if (hidumper_hiviewdfx_hiview_enable) { 46 defines += [ "HIDUMPER_HIVIEWDFX_HIVIEW_ENABLE" ] 47 } 48 49 deps = [ "${hidumper_service_path}:hidumper_client" ] 50 51 external_deps = [ 52 "c_utils:utils", 53 "hilog:libhilog", 54 "hiview:libucollection_utility", 55 "ipc:ipc_core", 56 "safwk:system_ability_fwk", 57 "samgr:samgr_proxy", 58 ] 59 version_script = "libdumpusage.map" 60 subsystem_name = "hiviewdfx" 61 innerapi_tags = [ "platformsdk" ] 62 part_name = "hidumper" 63} 64