• 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_cc_proto_descriptor.gni")
16
17source_set("minimal") {
18  sources = [
19    "active_chrome_processes_tracker.cc",
20    "active_chrome_processes_tracker.h",
21    "args_parser.cc",
22    "args_parser.h",
23    "chrome_string_lookup.cc",
24    "chrome_string_lookup.h",
25    "chrome_system_probes_module.cc",
26    "chrome_system_probes_module.h",
27    "chrome_system_probes_parser.cc",
28    "chrome_system_probes_parser.h",
29    "default_modules.cc",
30    "default_modules.h",
31    "jit_tracker.cc",
32    "jit_tracker.h",
33    "memory_tracker_snapshot_module.cc",
34    "memory_tracker_snapshot_module.h",
35    "memory_tracker_snapshot_parser.cc",
36    "memory_tracker_snapshot_parser.h",
37    "metadata_minimal_module.cc",
38    "metadata_minimal_module.h",
39    "multi_machine_trace_manager.cc",
40    "multi_machine_trace_manager.h",
41    "network_trace_module.cc",
42    "network_trace_module.h",
43    "packet_analyzer.cc",
44    "packet_analyzer.h",
45    "packet_sequence_state_builder.h",
46    "packet_sequence_state_generation.cc",
47    "perf_sample_tracker.cc",
48    "perf_sample_tracker.h",
49    "profile_module.cc",
50    "profile_module.h",
51    "profile_packet_sequence_state.cc",
52    "profile_packet_sequence_state.h",
53    "profile_packet_utils.cc",
54    "profile_packet_utils.h",
55    "proto_trace_parser_impl.cc",
56    "proto_trace_parser_impl.h",
57    "proto_trace_reader.cc",
58    "proto_trace_reader.h",
59    "proto_trace_tokenizer.cc",
60    "proto_trace_tokenizer.h",
61    "stack_profile_sequence_state.cc",
62    "stack_profile_sequence_state.h",
63    "track_event_module.cc",
64    "track_event_module.h",
65    "track_event_parser.cc",
66    "track_event_parser.h",
67    "track_event_sequence_state.cc",
68    "track_event_tokenizer.cc",
69    "track_event_tokenizer.h",
70    "track_event_tracker.cc",
71    "track_event_tracker.h",
72  ]
73  public_deps = [ ":proto_importer_module" ]
74  deps = [
75    "../../../../gn:default_deps",
76    "../../../../include/perfetto/trace_processor:trace_processor",
77    "../../../../protos/perfetto/common:zero",
78    "../../../../protos/perfetto/config:zero",
79    "../../../../protos/perfetto/trace:zero",
80    "../../../../protos/perfetto/trace/android:zero",
81    "../../../../protos/perfetto/trace/chrome:zero",
82    "../../../../protos/perfetto/trace/etw:zero",
83    "../../../../protos/perfetto/trace/ftrace:zero",
84    "../../../../protos/perfetto/trace/interned_data:zero",
85    "../../../../protos/perfetto/trace/perfetto:zero",
86    "../../../../protos/perfetto/trace/power:zero",
87    "../../../../protos/perfetto/trace/profiling:zero",
88    "../../../../protos/perfetto/trace/ps:zero",
89    "../../../../protos/perfetto/trace/sys_stats:zero",
90    "../../../../protos/perfetto/trace/system_info:zero",
91    "../../../../protos/perfetto/trace/track_event:zero",
92    "../../../../protos/perfetto/trace/translation:zero",
93    "../../../base",
94    "../../../protozero",
95    "../../containers",
96    "../../sorter",
97    "../../storage",
98    "../../tables",
99    "../../types",
100    "../../util:build_id",
101    "../../util:gzip",
102    "../../util:profiler_util",
103    "../common",
104    "../common:parser_types",
105    "../etw:minimal",
106    "../ftrace:minimal",
107    "../json:minimal",
108    "../memory_tracker:graph_processor",
109  ]
110}
111
112source_set("full") {
113  sources = [
114    "additional_modules.cc",
115    "additional_modules.h",
116    "android_camera_event_module.cc",
117    "android_camera_event_module.h",
118    "android_probes_module.cc",
119    "android_probes_module.h",
120    "android_probes_parser.cc",
121    "android_probes_parser.h",
122    "android_probes_tracker.cc",
123    "android_probes_tracker.h",
124    "content_analyzer.cc",
125    "content_analyzer.h",
126    "frame_timeline_event_parser.cc",
127    "frame_timeline_event_parser.h",
128    "gpu_event_parser.cc",
129    "gpu_event_parser.h",
130    "graphics_event_module.cc",
131    "graphics_event_module.h",
132    "graphics_frame_event_parser.cc",
133    "graphics_frame_event_parser.h",
134    "heap_graph_module.cc",
135    "heap_graph_module.h",
136    "heap_graph_tracker.cc",
137    "heap_graph_tracker.h",
138    "metadata_module.cc",
139    "metadata_module.h",
140    "statsd_module.cc",
141    "statsd_module.h",
142    "string_encoding_utils.cc",
143    "string_encoding_utils.h",
144    "system_probes_module.cc",
145    "system_probes_module.h",
146    "system_probes_parser.cc",
147    "system_probes_parser.h",
148    "translation_table_module.cc",
149    "translation_table_module.h",
150    "v8_module.cc",
151    "v8_module.h",
152    "v8_sequence_state.cc",
153    "v8_sequence_state.h",
154    "v8_tracker.cc",
155    "v8_tracker.h",
156    "vulkan_memory_tracker.cc",
157    "vulkan_memory_tracker.h",
158  ]
159  deps = [
160    ":gen_cc_config_descriptor",
161    ":gen_cc_statsd_atoms_descriptor",
162    ":gen_cc_trace_descriptor",
163    ":minimal",
164    ":packet_sequence_state_generation_hdr",
165    "../../../../gn:default_deps",
166    "../../../../include/perfetto/ext/traced:sys_stats_counters",
167    "../../../../protos/perfetto/common:zero",
168    "../../../../protos/perfetto/config:zero",
169    "../../../../protos/perfetto/trace:zero",
170    "../../../../protos/perfetto/trace/android:zero",
171    "../../../../protos/perfetto/trace/chrome:zero",
172    "../../../../protos/perfetto/trace/gpu:zero",
173    "../../../../protos/perfetto/trace/interned_data:zero",
174    "../../../../protos/perfetto/trace/power:zero",
175    "../../../../protos/perfetto/trace/profiling:zero",
176    "../../../../protos/perfetto/trace/ps:zero",
177    "../../../../protos/perfetto/trace/statsd:zero",
178    "../../../../protos/perfetto/trace/sys_stats:zero",
179    "../../../../protos/perfetto/trace/system_info:zero",
180    "../../../../protos/perfetto/trace/translation:zero",
181    "../../../base",
182    "../../../protozero",
183    "../../sorter",
184    "../../storage",
185    "../../tables",
186    "../../types",
187    "../../util:descriptors",
188    "../../util:profiler_util",
189    "../../util:proto_profiler",
190    "../../util:proto_to_args_parser",
191    "../common",
192    "../common:parser_types",
193    "../etw:full",
194    "../ftrace:full",
195    "../syscalls:full",
196    "winscope:full",
197  ]
198}
199
200source_set("proto_importer_module") {
201  sources = [
202    "proto_importer_module.cc",
203    "proto_importer_module.h",
204  ]
205  public_deps = [ ":packet_sequence_state_generation_hdr" ]
206  deps = [
207    ":packet_sequence_state_generation_hdr",
208    "../../../../gn:default_deps",
209    "../../../../include/perfetto/trace_processor:trace_processor",
210    "../../../base",
211    "../../types",
212    "../common:trace_parser_hdr",
213  ]
214}
215
216source_set("packet_sequence_state_generation_hdr") {
217  sources = [
218    "packet_sequence_state_generation.h",
219    "track_event_sequence_state.h",
220  ]
221  deps = [
222    "../../../../gn:default_deps",
223    "../../../../include/perfetto/ext/base",
224    "../../../../protos/perfetto/trace:non_minimal_zero",
225    "../../../../protos/perfetto/trace/track_event:zero",
226    "../../types:types",
227    "../../util:interned_message_view",
228  ]
229}
230
231perfetto_cc_proto_descriptor("gen_cc_statsd_atoms_descriptor") {
232  descriptor_name = "atoms.descriptor"
233  descriptor_path = "atoms.descriptor"
234}
235
236perfetto_cc_proto_descriptor("gen_cc_trace_descriptor") {
237  descriptor_name = "trace.descriptor"
238  descriptor_target = "../../../../protos/perfetto/trace:descriptor"
239}
240
241perfetto_cc_proto_descriptor("gen_cc_track_event_descriptor") {
242  descriptor_name = "track_event.descriptor"
243  descriptor_target = "../../../../protos/perfetto/trace/track_event:descriptor"
244}
245
246perfetto_cc_proto_descriptor("gen_cc_chrome_track_event_descriptor") {
247  descriptor_name = "chrome_track_event.descriptor"
248  descriptor_target = "../../../../protos/third_party/chromium:descriptor"
249}
250
251perfetto_cc_proto_descriptor("gen_cc_config_descriptor") {
252  descriptor_name = "config.descriptor"
253  descriptor_target = "../../../../protos/perfetto/config:descriptor"
254}
255
256source_set("unittests") {
257  testonly = true
258  sources = [
259    "active_chrome_processes_tracker_unittest.cc",
260    "heap_graph_tracker_unittest.cc",
261    "jit_tracker_unittest.cc",
262    "network_trace_module_unittest.cc",
263    "perf_sample_tracker_unittest.cc",
264    "profile_packet_sequence_state_unittest.cc",
265    "proto_trace_parser_impl_unittest.cc",
266    "string_encoding_utils_unittests.cc",
267  ]
268  deps = [
269    ":full",
270    ":minimal",
271    ":packet_sequence_state_generation_hdr",
272    "../../../../gn:default_deps",
273    "../../../../gn:gtest_and_gmock",
274    "../../../../protos/perfetto/common:cpp",
275    "../../../../protos/perfetto/common:zero",
276    "../../../../protos/perfetto/config:zero",
277    "../../../../protos/perfetto/trace:non_minimal_cpp",
278    "../../../../protos/perfetto/trace:zero",
279    "../../../../protos/perfetto/trace/android:zero",
280    "../../../../protos/perfetto/trace/chrome:zero",
281    "../../../../protos/perfetto/trace/ftrace:zero",
282    "../../../../protos/perfetto/trace/interned_data:zero",
283    "../../../../protos/perfetto/trace/profiling:cpp",
284    "../../../../protos/perfetto/trace/profiling:zero",
285    "../../../../protos/perfetto/trace/ps:zero",
286    "../../../../protos/perfetto/trace/sys_stats:zero",
287    "../../../../protos/perfetto/trace/track_event:zero",
288    "../../../protozero",
289    "../../sorter",
290    "../../storage",
291    "../../tables",
292    "../../types",
293    "../../util:build_id",
294    "../../util:descriptors",
295    "../../util:profiler_util",
296    "../common",
297    "../ftrace:full",
298  ]
299}
300