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") 15 16import("//src/ts.gni") 17ohos_source_set("table") { 18 sources = [ 19 "appname_table.cpp", 20 "appname_table.h", 21 "args_table.cpp", 22 "args_table.h", 23 "bio_latency_sample_table.cpp", 24 "bio_latency_sample_table.h", 25 "callstack_table.cpp", 26 "callstack_table.h", 27 "clk_event_filter_table.cpp", 28 "clk_event_filter_table.h", 29 "clock_event_filter_table.cpp", 30 "clock_event_filter_table.h", 31 "clock_snapshot_table.cpp", 32 "cpu_measure_filter_table.cpp", 33 "cpu_measure_filter_table.h", 34 "cpu_usage_info_table.cpp", 35 "cpu_usage_info_table.h", 36 "data_dict_table.cpp", 37 "data_dict_table.h", 38 "data_type_table.cpp", 39 "data_type_table.h", 40 "datasource_clockid_table.cpp", 41 "device_state_table.cpp", 42 "device_state_table.h", 43 "disk_io_table.cpp", 44 "disk_io_table.h", 45 "ebpf_callstack_table.cpp", 46 "ebpf_callstack_table.h", 47 "file_system_sample_table.cpp", 48 "file_system_sample_table.h", 49 "filter_constraints.cpp", 50 "filter_table.cpp", 51 "filter_table.h", 52 "hidump_table.cpp", 53 "hidump_table.h", 54 "index_map.cpp", 55 "index_map.h", 56 "instants_table.cpp", 57 "instants_table.h", 58 "irq_table.cpp", 59 "live_process_table.cpp", 60 "live_process_table.h", 61 "log_table.cpp", 62 "log_table.h", 63 "measure_filter_table.cpp", 64 "measure_filter_table.h", 65 "measure_table.cpp", 66 "measure_table.h", 67 "meta_table.cpp", 68 "meta_table.h", 69 "native_hook_frame_table.cpp", 70 "native_hook_frame_table.h", 71 "native_hook_table.cpp", 72 "native_hook_table.h", 73 "network_table.cpp", 74 "network_table.h", 75 "paged_memory_sample_table.cpp", 76 "paged_memory_sample_table.h", 77 "process_filter_table.cpp", 78 "process_filter_table.h", 79 "process_measure_filter_table.cpp", 80 "process_measure_filter_table.h", 81 "process_table.cpp", 82 "process_table.h", 83 "range_table.cpp", 84 "raw_table.cpp", 85 "raw_table.h", 86 "sched_slice_table.cpp", 87 "sched_slice_table.h", 88 "smaps_table.cpp", 89 "smaps_table.h", 90 "span_join.cpp", 91 "span_join.h", 92 "stat_table.cpp", 93 "stat_table.h", 94 "symbols_table.cpp", 95 "symbols_table.h", 96 "sysevent_measure_table.cpp", 97 "sysevent_measure_table.h", 98 "system_call_table.cpp", 99 "system_call_table.h", 100 "system_event_filter_table.cpp", 101 "table_base.cpp", 102 "thread_filter_table.cpp", 103 "thread_state_table.cpp", 104 "thread_table.cpp", 105 ] 106 107 include_dirs = [ 108 "//third_party/sqlite/include", 109 "//src/base", 110 "//src/trace_data", 111 "//src/include", 112 "//src", 113 "${OHOS_PROTO_GEN}/types/plugins/memory_data", 114 "//third_party/protobuf/src", 115 ] 116 117 if (enable_ts_utest && !use_wasm) { 118 cflags = [ 119 "-fprofile-arcs", 120 "-ftest-coverage", 121 ] 122 ldflags = [ 123 "-fprofile-arcs", 124 "-ftest-coverage", 125 "--coverage", 126 ] 127 if (is_macx && is_test) { 128 cflags += [ "-D UT_MAC" ] 129 } 130 } 131 if (with_perf) { 132 sources += [ 133 "perf_call_chain_table.cpp", 134 "perf_call_chain_table.h", 135 "perf_files_table.cpp", 136 "perf_files_table.h", 137 "perf_report_table.cpp", 138 "perf_report_table.h", 139 "perf_sample_table.cpp", 140 "perf_sample_table.h", 141 "perf_thread_table.cpp", 142 "perf_thread_table.h", 143 ] 144 } 145} 146