• 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("//src/ts.gni")
16
17ohos_source_set("parser") {
18  sources = [
19    "bytrace_parser/bytrace_event_parser.cpp",
20    "bytrace_parser/bytrace_event_parser.h",
21    "bytrace_parser/bytrace_parser.cpp",
22    "bytrace_parser/bytrace_parser.h",
23    "common_types.h",
24    "event_parser_base.cpp",
25    "event_parser_base.h",
26    "print_event_parser.cpp",
27    "print_event_parser.h",
28    "thread_state.cpp",
29    "thread_state.h",
30  ]
31  deps = [
32    "ebpf_parser:ebpf_parser",
33    "htrace_parser:htrace_parser",
34  ]
35  include_dirs = [
36    "//third_party/protobuf/src",
37    "${OHOS_PROTO_GEN}/types/plugins/memory_data",
38    "${OHOS_PROTO_GEN}/types/plugins/ftrace_data/${kernel_version}",
39    "${OHOS_PROTO_GEN}/types/plugins/hilog_data",
40    "${OHOS_PROTO_GEN}/types/plugins/native_hook",
41    "${OHOS_PROTO_GEN}/types/plugins/hidump_data",
42    "${OHOS_PROTO_GEN}/types/plugins/network_data",
43    "${OHOS_PROTO_GEN}/types/plugins/cpu_data",
44    "${OHOS_PROTO_GEN}/types/plugins/diskio_data",
45    "${OHOS_PROTO_GEN}/types/plugins/hisysevent_data",
46    "${OHOS_PROTO_GEN}/types/plugins/process_data",
47    "${OHOS_PROTO_GEN}/types/plugins/",
48    "${OHOS_PROTO_GEN}",
49    "//third_party/sqlite/include",
50    "//src/base",
51    "//src/cfg",
52    "//src/trace_streamer",
53    "//src/trace_data",
54    "//src/include",
55    "//src/filter",
56    "//src",
57    ".",
58    "//third_party/json-master/include",
59    "//third_party/json-master/include/nlohmann",
60  ]
61
62  if (enable_ts_utest && !use_wasm) {
63    cflags = [
64      "-fprofile-arcs",
65      "-ftest-coverage",
66    ]
67    ldflags = [
68      "-fprofile-arcs",
69      "-ftest-coverage",
70      "--coverage",
71    ]
72    if (is_macx && is_test) {
73      cflags += [ "-D UT_MAC" ]
74    }
75  }
76}
77