• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("../../../build/ts.gni")
17ohos_source_set("ebpf_tables") {
18  subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
19  part_name = "${OHOS_PROFILER_PART_NAME}"
20  sources = [
21    "bio_latency_sample_table.cpp",
22    "ebpf_callstack_table.cpp",
23    "file_system_sample_table.cpp",
24  ]
25  include_dirs = [
26    "include",
27    "../base/include",
28    "${THIRD_PARTY}/sqlite/include",
29    "${SRC}/base",
30    "../../parser",
31    "${SRC}/trace_data",
32    "${SRC}/include",
33    "${SRC}",
34    "${THIRD_PARTY}/protobuf/src",
35    "${THIRD_PARTY}/bounds_checking_function/include",
36    "${THIRD_PARTY}/json/single_include/nlohmann",
37  ]
38  include_dirs += [
39    "${SRC}/trace_data/trace_stdtype",
40    "${SRC}/trace_data/trace_stdtype/ftrace",
41    "${SRC}/trace_data/trace_stdtype/ftrace/template",
42    "${SRC}/trace_data/trace_stdtype/hilog",
43    "${SRC}/trace_data/trace_stdtype/hiperf",
44    "${SRC}/trace_data/trace_stdtype/hisysevent",
45    "${SRC}/trace_data/trace_stdtype/htrace",
46    "${SRC}/trace_data/trace_stdtype/measure",
47  ]
48  if (!is_independent_compile) {
49    configs = [ "${TS_DIR}/gn:ts_config" ]
50  }
51  if (enable_ts_utest && !use_wasm) {
52    cflags = [
53      "-fprofile-arcs",
54      "-ftest-coverage",
55    ]
56    ldflags = [
57      "-fprofile-arcs",
58      "-ftest-coverage",
59      "--coverage",
60    ]
61    if (is_test) {
62      cflags += [ "-D IS_UT" ]
63    }
64  }
65}
66