• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2019 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("../../../gn/perfetto.gni")
16import("../../../gn/test.gni")
17import("../../../gn/wasm.gni")
18
19# Prevent that this file is accidentally included in embedder builds.
20assert(enable_perfetto_trace_processor)
21
22# This source_set is used both by WASM (for the function-call-based query
23# interface) and by the :httpd module for the HTTP interface.
24source_set("rpc") {
25  sources = [
26    "query_result_serializer.cc",
27    "query_result_serializer.h",
28    "rpc.cc",
29    "rpc.h",
30  ]
31  deps = [
32    "..:lib",
33    "..:metatrace",
34    "../../../gn:default_deps",
35    "../../../include/perfetto/trace_processor",
36    "../../../protos/perfetto/trace_processor:zero",
37    "../../base",
38    "../../protozero",
39    "../../protozero:proto_ring_buffer",
40  ]
41}
42
43perfetto_unittest_source_set("unittests") {
44  testonly = true
45  sources = [ "query_result_serializer_unittest.cc" ]
46  deps = [
47    ":rpc",
48    "..:lib",
49    "../../../gn:default_deps",
50    "../../../gn:gtest_and_gmock",
51    "../../../protos/perfetto/trace_processor:zero",
52    "../../base",
53    "../../protozero",
54  ]
55}
56
57if (enable_perfetto_trace_processor_httpd) {
58  source_set("httpd") {
59    sources = [
60      "httpd.cc",
61      "httpd.h",
62    ]
63    deps = [
64      ":rpc",
65      "../../../gn:default_deps",
66      "../../../include/perfetto/trace_processor",
67      "../../../protos/perfetto/trace_processor:zero",
68      "../../base",
69      "../../base/http",
70      "../../protozero",
71    ]
72  }
73}
74
75if (enable_perfetto_ui && is_wasm) {
76  source_set("wasm_bridge") {
77    sources = [ "wasm_bridge.cc" ]
78    deps = [
79      ":rpc",
80      "../../../gn:default_deps",
81      "../../../include/perfetto/trace_processor",
82      "../../base",
83    ]
84  }
85}
86
87if (enable_perfetto_benchmarks) {
88  source_set("benchmarks") {
89    testonly = true
90    deps = [
91      ":rpc",
92      "..:lib",
93      "../../../gn:benchmark",
94      "../../../gn:default_deps",
95      "../../../gn:sqlite",
96      "../../base",
97    ]
98    sources = [ "query_result_serializer_benchmark.cc" ]
99  }
100}
101