• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/hidumper/hidumper.gni")
15
16config("hidumper_include") {
17  include_dirs = [
18    ".",
19    "//third_party/json/single_include",
20    "//third_party/json/include",
21    "${hidumper_frameworks_path}/include",
22    "//commonlibrary/c_utils/base/include",
23    "//foundation/resourceschedule/memmgr/interface/innerkits/include",
24  ]
25}
26
27ohos_source_set("dump_main") {
28  sources = [
29    "dump_utils.cpp",
30    "src/common/dump_cfg.cpp",
31    "src/common/dumper_opts.cpp",
32    "src/common/dumper_parameter.cpp",
33    "src/common/option_args.cpp",
34    "src/executor/api_dumper.cpp",
35    "src/executor/cmd_dumper.cpp",
36    "src/executor/column_rows_filter.cpp",
37    "src/executor/cpu_dumper.cpp",
38    "src/executor/dumper_group.cpp",
39    "src/executor/env_param_dumper.cpp",
40    "src/executor/fd_output.cpp",
41    "src/executor/file_format_dump_filter.cpp",
42    "src/executor/file_stream_dumper.cpp",
43    "src/executor/hidumper_executor.cpp",
44    "src/executor/list_dumper.cpp",
45    "src/executor/memory/get_cma_info.cpp",
46    "src/executor/memory/get_hardware_info.cpp",
47    "src/executor/memory/get_kernel_info.cpp",
48    "src/executor/memory/get_process_info.cpp",
49    "src/executor/memory/get_ram_info.cpp",
50    "src/executor/memory/memory_filter.cpp",
51    "src/executor/memory/memory_info.cpp",
52    "src/executor/memory/memory_util.cpp",
53    "src/executor/memory/parse/parse_meminfo.cpp",
54    "src/executor/memory/parse/parse_smaps_info.cpp",
55    "src/executor/memory/parse/parse_smaps_rollup_info.cpp",
56    "src/executor/memory/parse/parse_vmallocinfo.cpp",
57    "src/executor/memory_dumper.cpp",
58    "src/executor/properties_dumper.cpp",
59    "src/executor/sa_dumper.cpp",
60    "src/executor/version_dumper.cpp",
61    "src/executor/zip_output.cpp",
62    "src/executor/zipfolder_output.cpp",
63    "src/factory/api_dumper_factory.cpp",
64    "src/factory/cmd_dumper_factory.cpp",
65    "src/factory/column_rows_filter_factory.cpp",
66    "src/factory/cpu_dumper_factory.cpp",
67    "src/factory/dumper_group_factory.cpp",
68    "src/factory/env_param_dumper_factory.cpp",
69    "src/factory/fd_output_factory.cpp",
70    "src/factory/file_dumper_factory.cpp",
71    "src/factory/file_format_dump_filter_factory.cpp",
72    "src/factory/list_dumper_factory.cpp",
73    "src/factory/memory_dumper_factory.cpp",
74    "src/factory/properties_dumper_factory.cpp",
75    "src/factory/sa_dumper_factory.cpp",
76    "src/factory/version_dumper_factory.cpp",
77    "src/factory/zip_output_factory.cpp",
78    "src/manager/dump_implement.cpp",
79    "src/util/config_data.cpp",
80    "src/util/config_utils.cpp",
81    "src/util/dump_compressor.cpp",
82    "src/util/dump_cpu_info_util.cpp",
83    "src/util/file_utils.cpp",
84    "src/util/string_utils.cpp",
85    "src/util/zip/zip_writer.cpp",
86    "src/util/zip_utils.cpp",
87  ]
88
89  configs = [
90    "${hidumper_utils_path}:utils_config",
91    "${hidumper_service_path}:interface_include",
92    "${hidumper_service_path}:zidl_config",
93    "${hidumper_service_path}:service_config",
94    ":hidumper_include",
95  ]
96
97  deps = [
98    "${hidumper_utils_path}:utils",
99    "//third_party/zlib:shared_libz",
100  ]
101
102  external_deps = [
103    "c_utils:utils",
104    "drivers_interface_memorytracker:libmemorytracker_proxy_1.0",
105    "eventhandler:libeventhandler",
106    "hdf_core:libhdf_utils",
107    "hilog_native:libhilog",
108    "hisysevent_native:libhisysevent",
109    "init:libbegetutil",
110    "ipc:ipc_core",
111    "safwk:system_ability_fwk",
112    "samgr:samgr_proxy",
113  ]
114
115  subsystem_name = "hiviewdfx"
116
117  part_name = "hidumper"
118}
119
120ohos_shared_library("hidumperclient") {
121  install_enable = true
122  sources = [
123    "${hidumper_client_path}/native/dump_client_main.cpp",
124    "dump_utils.cpp",
125  ]
126
127  configs = [
128    "${hidumper_utils_path}:utils_config",
129    "${hidumper_service_path}:interface_include",
130    "${hidumper_service_path}:zidl_config",
131    "${hidumper_service_path}:service_config",
132    ":hidumper_include",
133  ]
134
135  deps = [
136    "${hidumper_service_path}:hidumper_client",
137    "${hidumper_utils_path}:utils",
138  ]
139
140  external_deps = [
141    "c_utils:utils",
142    "eventhandler:libeventhandler",
143    "hilog_native:libhilog",
144    "hisysevent_native:libhisysevent",
145    "init:libbegetutil",
146    "ipc:ipc_core",
147    "safwk:system_ability_fwk",
148    "samgr:samgr_proxy",
149  ]
150
151  subsystem_name = "hiviewdfx"
152
153  part_name = "hidumper"
154}
155
156ohos_executable("hidumper") {
157  install_enable = true
158
159  sources = [ "${hidumper_client_path}/native/main.cpp" ]
160
161  configs = [
162    "${hidumper_utils_path}:utils_config",
163    "${hidumper_service_path}:interface_include",
164    "${hidumper_service_path}:zidl_config",
165    "${hidumper_service_path}:service_config",
166    ":hidumper_include",
167  ]
168
169  deps = [
170    ":hidumperclient",
171    "${hidumper_service_path}:hidumper_client",
172    "${hidumper_utils_path}:utils",
173  ]
174
175  external_deps = [
176    "c_utils:utils",
177    "hilog_native:libhilog",
178    "ipc:ipc_core",
179    "safwk:system_ability_fwk",
180    "samgr:samgr_proxy",
181  ]
182
183  subsystem_name = "hiviewdfx"
184
185  part_name = "hidumper"
186}
187