• 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    "../../base:version",
39    "../../protozero",
40    "../../protozero:proto_ring_buffer",
41  ]
42}
43
44perfetto_unittest_source_set("unittests") {
45  testonly = true
46  sources = [ "query_result_serializer_unittest.cc" ]
47  deps = [
48    ":rpc",
49    "..:lib",
50    "../../../gn:default_deps",
51    "../../../gn:gtest_and_gmock",
52    "../../../protos/perfetto/trace_processor:zero",
53    "../../base",
54    "../../protozero",
55  ]
56}
57
58if (enable_perfetto_trace_processor_httpd) {
59  source_set("httpd") {
60    sources = [
61      "httpd.cc",
62      "httpd.h",
63    ]
64    deps = [
65      ":rpc",
66      "../../../gn:default_deps",
67      "../../../include/perfetto/trace_processor",
68      "../../../protos/perfetto/trace_processor:zero",
69      "../../base",
70      "../../base/http",
71      "../../protozero",
72    ]
73  }
74}
75
76if (enable_perfetto_ui && is_wasm) {
77  source_set("wasm_bridge") {
78    sources = [ "wasm_bridge.cc" ]
79    deps = [
80      ":rpc",
81      "../../../gn:default_deps",
82      "../../../include/perfetto/trace_processor",
83      "../../base",
84    ]
85  }
86}
87
88if (enable_perfetto_benchmarks) {
89  source_set("benchmarks") {
90    testonly = true
91    deps = [
92      ":rpc",
93      "..:lib",
94      "../../../gn:benchmark",
95      "../../../gn:default_deps",
96      "../../../gn:sqlite",
97      "../../base",
98    ]
99    sources = [ "query_result_serializer_benchmark.cc" ]
100  }
101}
102