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("//build/ohos.gni") 15import("../../build/ts.gni") 16 17ohos_source_set("trace_data") { 18 subsystem_name = "developtools" 19 part_name = "smartperf_host" 20 sources = [ 21 "trace_data_cache.cpp", 22 "trace_data_cache.h", 23 "trace_data_cache_base.cpp", 24 "trace_data_cache_base.h", 25 "trace_data_cache_reader.cpp", 26 "trace_data_cache_reader.h", 27 "trace_data_cache_writer.cpp", 28 "trace_data_cache_writer.h", 29 "trace_data_db.cpp", 30 "trace_data_db.h", 31 "trace_stdtype.cpp", 32 "trace_stdtype.h", 33 ] 34 35 if (enable_ts_utest && !use_wasm) { 36 cflags = [ 37 "-fprofile-arcs", 38 "-ftest-coverage", 39 ] 40 ldflags = [ 41 "-fprofile-arcs", 42 "-ftest-coverage", 43 "--coverage", 44 ] 45 if (is_test) { 46 cflags += [ "-D IS_UT" ] 47 } 48 } 49 include_dirs = [ 50 "${THIRD_PARTY}/sqlite/include", 51 "${SRC}", 52 "${SRC}/base", 53 "${SRC}/include", 54 "${SRC}/table", 55 "${SRC}/table/base", 56 "${SRC}/table/ebpf", 57 "${SRC}/table/ftrace", 58 "${SRC}/table/hiperf", 59 "${SRC}/table/hi_sysevent", 60 "${SRC}/table/js_memory", 61 "${SRC}/table/monitor", 62 "${SRC}/table/native_hook", 63 ".", 64 "${THIRD_PARTY}/protobuf/src", 65 ] 66} 67