hiviewdfx_hiview/framework/native/unified_collection/BUILD.gn
caoxiaogang fa6c61ebac all deps编译选项整改
Signed-off-by: caoxiaogang <cxg344685003@163.com>
2024-10-29 09:33:57 +08:00

139 lines
4.1 KiB
Plaintext

# Copyright (c) 2023-2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//base/hiviewdfx/hiview/hiview.gni")
import("//build/ohos.gni")
config("ucolletciton_source_config") {
visibility = [ "*:*" ]
include_dirs = [
"calculator/include",
"collector/inner_include",
"process/include",
"decorator/include",
"utils/include",
"$hiview_interfaces/inner_api/unified_collection",
"$hiview_interfaces/inner_api/unified_collection/utility",
"$hiview_interfaces/inner_api/unified_collection/resource",
]
defines = [ "PC_APP_STATE_COLLECT_ENABLE = $hiview_unified_collector_PC_app_state_collect_enable" ]
}
ohos_source_set("ucollection_source") {
configs = [
":ucolletciton_source_config",
"$hiview_base:logger_config",
"$hiview_base/event_report:hiview_event_report_config",
]
public_configs = [ ":ucolletciton_source_config" ]
sources = [
"calculator/cpu_calculator.cpp",
"calculator/io_calculator.cpp",
"collector/common_util.cpp",
"collector/cpu_collector_impl.cpp",
"collector/gpu_collector_impl.cpp",
"collector/hiebpf_collector_impl.cpp",
"collector/hilog_collector_impl.cpp",
"collector/io_collector_impl.cpp",
"collector/memory_collector_impl.cpp",
"collector/network_collector_impl.cpp",
"collector/perf_collector_impl.cpp",
"collector/process_collector_impl.cpp",
"collector/process_state_info_collector.cpp",
"collector/sys_cpu_usage_collector.cpp",
"collector/thermal_collector_impl.cpp",
"collector/thread_state_info_collector.cpp",
"collector/trace_collector_impl.cpp",
"collector/utils/app_event_task_storage.cpp",
"collector/utils/trace_flow_controller.cpp",
"collector/utils/trace_manager.cpp",
"collector/utils/trace_storage.cpp",
"collector/utils/trace_utils.cpp",
"collector/utils/trace_worker.cpp",
"collector/wm_collector_impl.cpp",
"decorator/cpu_decorator.cpp",
"decorator/decorator.cpp",
"decorator/gpu_decorator.cpp",
"decorator/hiebpf_decorator.cpp",
"decorator/hilog_decorator.cpp",
"decorator/io_decorator.cpp",
"decorator/memory_decorator.cpp",
"decorator/network_decorator.cpp",
"decorator/perf_decorator.cpp",
"decorator/process_decorator.cpp",
"decorator/thermal_decorator.cpp",
"decorator/trace_decorator.cpp",
"decorator/wm_decorator.cpp",
"process/process_status.cpp",
"utils/cpu_util.cpp",
]
if (has_hiprofiler) {
sources += [
"collector/mem_profiler_collector_impl.cpp",
"decorator/mem_profiler_decorator.cpp",
]
}
deps = [
"$hiview_base:hiviewbase",
"collector/device_client:collect_device_client",
]
external_deps = [
"ability_base:want",
"ffrt:libffrt",
"hilog:libhilog",
"hisysevent:libhisysevent",
"hitrace:hitrace_dump",
"init:libbegetutil",
"relational_store:native_rdb",
"samgr:samgr_proxy",
"zlib:libz",
]
cflags = []
if (has_hiprofiler) {
cflags += [ "-DHAS_HIPROFILER" ]
external_deps += [ "hiprofiler:libnative_daemon_client" ]
}
if (has_hiperf) {
cflags += [ "-DHAS_HIPERF" ]
external_deps += [ "hiperf:hiperf_client" ]
}
if (thermal_manager_enable) {
cflags += [ "-DTHERMAL_MANAGER_ENABLE" ]
external_deps += [ "thermal_manager:thermalsrv_client" ]
}
defines = []
if (is_wifi_enable) {
external_deps += [ "wifi:wifi_sdk" ]
defines += [ "COMMUNICATION_WIFI_ENABLE" ]
}
part_name = "hiview"
subsystem_name = "hiviewdfx"
}
group("unittest") {
testonly = true
deps = [
"collector/utils/test:TraceStorageUnitTest",
"decorator/test:DecoratorUnitTest",
]
}