# Copyright (C) 2021 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("//build/ohos.gni") import("../../ts.gni") ohos_source_set("ebpf_parser_src") { sources = [ "bio_latency_data_parser.cpp", "bio_latency_data_parser.h", "ebpf_base.cpp", "ebpf_base.h", "ebpf_data_parser.cpp", "ebpf_data_parser.h", "ebpf_data_reader.cpp", "ebpf_data_reader.h", "ebpf_stdtype.h", "file_system_data_parser.cpp", "file_system_data_parser.h", "paged_memory_data_parser.cpp", "paged_memory_data_parser.h", ] include_dirs = [ ".", "../", "../htrace_parser", "../..", "../../trace_data", "../../base", "../../include", "../../filter", "../../cfg", "../../trace_streamer", "${OHOS_PROTO_GEN}", "${OHOS_PROTO_GEN}/types/plugins/memory_data", "${OHOS_PROTO_GEN}/types/plugins/ftrace_data/${kernel_version}", "${OHOS_PROTO_GEN}/types/plugins/hilog_data", "${OHOS_PROTO_GEN}/types/plugins/native_hook", "${OHOS_PROTO_GEN}/types/plugins/hidump_data", "${OHOS_PROTO_GEN}/types/plugins/network_data", "${OHOS_PROTO_GEN}/types/plugins/cpu_data", "${OHOS_PROTO_GEN}/types/plugins/diskio_data", "${OHOS_PROTO_GEN}/types/plugins/process_data", "${OHOS_PROTO_GEN}/types/plugins/hisysevent_data", "//third_party/protobuf/src", "//third_party/sqlite/include", ] if (is_win || is_macx) { include_dirs += [ "//third_party/perf_include/linux" ] } if (enable_ts_utest && !use_wasm) { cflags = [ "-fprofile-arcs", "-ftest-coverage", ] ldflags = [ "-fprofile-arcs", "-ftest-coverage", "--coverage", ] if (is_macx && is_test) { cflags += [ "-D UT_MAC" ] } } } group("ebpf_parser") { deps = [ ":ebpf_parser_src", "//third_party/protobuf:protobuf", "//third_party/protobuf:protobuf_lite", ] }