• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 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/perfetto_tp_tables.gni")
17
18assert(enable_perfetto_trace_processor_sqlite)
19
20source_set("table_functions") {
21  sources = [
22    "ancestor.cc",
23    "ancestor.h",
24    "connected_flow.cc",
25    "connected_flow.h",
26    "descendant.cc",
27    "descendant.h",
28    "experimental_annotated_stack.cc",
29    "experimental_annotated_stack.h",
30    "experimental_counter_dur.cc",
31    "experimental_counter_dur.h",
32    "experimental_flamegraph.cc",
33    "experimental_flamegraph.h",
34    "experimental_flat_slice.cc",
35    "experimental_flat_slice.h",
36    "experimental_sched_upid.cc",
37    "experimental_sched_upid.h",
38    "experimental_slice_layout.cc",
39    "experimental_slice_layout.h",
40    "flamegraph_construction_algorithms.cc",
41    "flamegraph_construction_algorithms.h",
42    "view.cc",
43    "view.h",
44  ]
45  deps = [
46    ":tables",
47    "../../../../gn:default_deps",
48    "../../../../gn:sqlite",
49    "../../../base",
50    "../../containers",
51    "../../db",
52    "../../importers/proto:full",
53    "../../importers/proto:minimal",
54    "../../sqlite",
55    "../../storage",
56    "../../tables",
57    "../../types",
58    "../../util",
59  ]
60  public_deps = [ ":interface" ]
61}
62
63source_set("interface") {
64  sources = [
65    "table_function.cc",
66    "table_function.h",
67  ]
68  deps = [
69    "../../../../gn:default_deps",
70    "../../../base",
71    "../../db",
72    "../../sqlite:query_constraints",
73  ]
74}
75
76perfetto_tp_tables("tables") {
77  sources = [ "tables.py" ]
78  deps = [ "../../tables:tables_python" ]
79}
80
81source_set("unittests") {
82  testonly = true
83  sources = [
84    "ancestor_unittest.cc",
85    "connected_flow_unittest.cc",
86    "descendant_unittest.cc",
87    "experimental_counter_dur_unittest.cc",
88    "experimental_flat_slice_unittest.cc",
89    "experimental_slice_layout_unittest.cc",
90  ]
91  deps = [
92    ":table_functions",
93    ":tables",
94    "../../../../gn:default_deps",
95    "../../../../gn:gtest_and_gmock",
96    "../../containers",
97    "../../importers/common",
98    "../../types",
99  ]
100}
101