# 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("../../build/ts.gni") ohos_source_set("parser") { subsystem_name = "developtools" part_name = "smartperf_host" sources = [ "bytrace_parser/bytrace_event_parser.cpp", "bytrace_parser/bytrace_event_parser.h", "bytrace_parser/bytrace_parser.cpp", "bytrace_parser/bytrace_parser.h", "common_types.h", "event_parser_base.cpp", "event_parser_base.h", "print_event_parser.cpp", "print_event_parser.h", "thread_state_flag.cpp", "thread_state_flag.h", ] deps = [ "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/cpu_data:cpu_data_encoder", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/diskio_data:diskio_data_encoder", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/hidump_data:hidump_data_encoder", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/hilog_data:hilog_data_encoder", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/hisysevent_data:hisysevent_data_encoder", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/js_memory:js_memory_data_encoder", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/memory_data:memory_data_encoder", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/native_hook:native_hook_data_encoder", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/network_data:network_data_encoder", "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/types/plugins/process_data:process_data_encoder", "ebpf_parser:ebpf_parser", ] deps += [ "htrace_pbreader_parser:htrace_pbreader_parser" ] include_dirs = [ "${THIRD_PARTY}/protobuf/src", "${THIRD_PARTY}/sqlite/include", "${SRC}/base", "${SRC}/cfg", "${SRC}/trace_streamer", "${SRC}/trace_data", "${SRC}/include", "${SRC}/filter", "${SRC}", ".", "${THIRD_PARTY}/json-master/single_include/nlohmann", ] include_dirs += [ "htrace_pbreader_parser" ] include_dirs += [ "../proto_reader/include" ] if (enable_ts_utest && !use_wasm) { cflags = [ "-fprofile-arcs", "-ftest-coverage", ] ldflags = [ "-fprofile-arcs", "-ftest-coverage", "--coverage", ] if (is_test) { cflags += [ "-D IS_UT" ] } } }