• 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")
15import("../../build/ts.gni")
16
17ohos_source_set("trace_data") {
18  subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
19  part_name = "${OHOS_PROFILER_PART_NAME}"
20  sources = [
21    "sqllite_prepar_cache_data.cpp",
22    "sqllite_prepar_cache_data.h",
23    "trace_data_cache.cpp",
24    "trace_data_cache.h",
25    "trace_data_cache_base.cpp",
26    "trace_data_cache_base.h",
27    "trace_data_cache_reader.cpp",
28    "trace_data_cache_reader.h",
29    "trace_data_cache_writer.cpp",
30    "trace_data_cache_writer.h",
31    "trace_data_db.cpp",
32    "trace_data_db.h",
33    "trace_stdtype/base_stdtype.cpp",
34    "trace_stdtype/common_stdtype.cpp",
35    "trace_stdtype/ftrace/callstack_stdtype.cpp",
36    "trace_stdtype/ftrace/render_service_stdtype.cpp",
37    "trace_stdtype/ftrace/sched_stdtype.cpp",
38    "trace_stdtype/ftrace/syscall_stdtype.cpp",
39    "trace_stdtype/ftrace/template/animation_stdtype.cpp",
40    "trace_stdtype/ftrace/template/app_startup_stdtype.cpp",
41    "trace_stdtype/ftrace/template/task_pool_stdtype.cpp",
42    "trace_stdtype/hilog/hilog_stdtype.cpp",
43    "trace_stdtype/hiperf/hiperf_stdtype.cpp",
44    "trace_stdtype/hisysevent/hisysevent_stdtype.cpp",
45    "trace_stdtype/htrace/activity_monitor_stdtype.cpp",
46    "trace_stdtype/htrace/arkts_stdtype.cpp",
47    "trace_stdtype/htrace/ebpf_stdtype.cpp",
48    "trace_stdtype/htrace/native_memory_stdtype.cpp",
49    "trace_stdtype/measure/measure_stdtype.cpp",
50  ]
51
52  if (!is_independent_compile) {
53    configs = [ "${TS_DIR}/gn:ts_config" ]
54  }
55  if (enable_ts_utest && !use_wasm) {
56    cflags = [
57      "-fprofile-arcs",
58      "-ftest-coverage",
59    ]
60    ldflags = [
61      "-fprofile-arcs",
62      "-ftest-coverage",
63      "--coverage",
64    ]
65    if (is_test) {
66      cflags += [ "-D IS_UT" ]
67    }
68  }
69  include_dirs = [
70    "${THIRD_PARTY}/sqlite/include",
71    "${SRC}",
72    "${SRC}/base",
73    "${SRC}/include",
74    "${SRC}/table",
75    "${SRC}/table/base/include",
76    "${SRC}/table/ebpf/include",
77    "${SRC}/table/ftrace/include",
78    "${SRC}/table/hiperf/include",
79    "${SRC}/table/hi_sysevent/include",
80    "${SRC}/table/js_memory/include",
81    "${SRC}/table/monitor/include",
82    "${SRC}/table/native_hook/include",
83    ".",
84    "${THIRD_PARTY}/protobuf/src",
85    "${THIRD_PARTY}/bounds_checking_function/include",
86    "${THIRD_PARTY}/json/single_include/nlohmann",
87    "${THIRD_PARTY}/perf_include/hiviewdfx/faultloggerd/interfaces/nonlinux",
88    "${SRC}/trace_data/trace_stdtype",
89    "${SRC}/trace_data/trace_stdtype/ftrace",
90    "${SRC}/trace_data/trace_stdtype/ftrace/template",
91    "${SRC}/trace_data/trace_stdtype/hilog",
92    "${SRC}/trace_data/trace_stdtype/hiperf",
93    "${SRC}/trace_data/trace_stdtype/hisysevent",
94    "${SRC}/trace_data/trace_stdtype/htrace",
95    "${SRC}/trace_data/trace_stdtype/measure",
96  ]
97
98  deps = [
99    "${OHOS_TRACE_STREAMER_PROTOS_DIR}/protos/smartperf_host:ts_all_sph_cpp",
100  ]
101}
102