• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2024 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/test.gni")
16
17# The main entry point for external processes. This is separate from
18# "trace_redaction" because tests also depend on "trace_redaction".
19executable("trace_redactor") {
20  sources = [ "main.cc" ]
21  deps = [
22    ":trace_redaction",
23    "../../gn:default_deps",
24    "../../include/perfetto/base",
25    "../../include/perfetto/ext/base",
26  ]
27}
28
29source_set("trace_redaction") {
30  sources = [
31    "broadphase_packet_filter.cc",
32    "broadphase_packet_filter.h",
33    "collect_frame_cookies.cc",
34    "collect_frame_cookies.h",
35    "collect_system_info.cc",
36    "collect_system_info.h",
37    "collect_timeline_events.cc",
38    "collect_timeline_events.h",
39    "filtering.cc",
40    "filtering.h",
41    "find_package_uid.cc",
42    "find_package_uid.h",
43    "frame_cookie.h",
44    "merge_threads.cc",
45    "merge_threads.h",
46    "modify.cc",
47    "modify.h",
48    "populate_allow_lists.cc",
49    "populate_allow_lists.h",
50    "process_thread_timeline.cc",
51    "process_thread_timeline.h",
52    "proto_util.cc",
53    "proto_util.h",
54    "prune_package_list.cc",
55    "prune_package_list.h",
56    "redact_ftrace_events.cc",
57    "redact_ftrace_events.h",
58    "redact_process_events.cc",
59    "redact_process_events.h",
60    "redact_process_trees.cc",
61    "redact_process_trees.h",
62    "redact_sched_events.cc",
63    "redact_sched_events.h",
64    "scrub_process_stats.cc",
65    "scrub_process_stats.h",
66    "trace_redaction_framework.cc",
67    "trace_redaction_framework.h",
68    "trace_redactor.cc",
69    "trace_redactor.h",
70    "verify_integrity.cc",
71    "verify_integrity.h",
72  ]
73  deps = [
74    "../../gn:default_deps",
75    "../../include/perfetto/base",
76    "../../include/perfetto/ext/base",
77    "../../include/perfetto/protozero:protozero",
78    "../../include/perfetto/trace_processor:storage",
79    "../../protos/perfetto/common:zero",
80    "../../protos/perfetto/trace:non_minimal_zero",
81    "../../protos/perfetto/trace/android:zero",
82    "../../protos/perfetto/trace/ftrace:zero",
83    "../../protos/perfetto/trace/ps:zero",
84    "../trace_processor:storage_minimal",
85    "../trace_processor/util:util",
86  ]
87}
88
89source_set("integrationtests") {
90  testonly = true
91  sources = [
92    "boardphase_packet_filter_integrationtest.cc",
93    "collect_frame_cookies_integrationtest.cc",
94    "filter_sched_waking_events_integrationtest.cc",
95    "filter_task_rename_integrationtest.cc",
96    "process_thread_timeline_integrationtest.cc",
97    "prune_package_list_integrationtest.cc",
98    "redact_process_trees_integrationtest.cc",
99    "redact_sched_events_integrationtest.cc",
100    "scrub_process_stats_integrationtest.cc",
101    "trace_processor_integrationtest.cc",
102    "trace_redaction_integration_fixture.cc",
103    "trace_redaction_integration_fixture.h",
104  ]
105  deps = [
106    ":trace_redaction",
107    "../../gn:default_deps",
108    "../../gn:gtest_and_gmock",
109    "../../include/perfetto/ext/base",
110    "../../include/perfetto/trace_processor:trace_processor",
111    "../../protos/perfetto/trace:non_minimal_cpp",
112    "../../protos/perfetto/trace:non_minimal_zero",
113    "../../protos/perfetto/trace/android:cpp",
114    "../../protos/perfetto/trace/android:zero",
115    "../../protos/perfetto/trace/ftrace:zero",
116    "../../protos/perfetto/trace/ps:zero",
117    "../base:test_support",
118  ]
119}
120
121perfetto_unittest_source_set("unittests") {
122  testonly = true
123  sources = [
124    "broadphase_packet_filter_unittest.cc",
125    "collect_frame_cookies_unittest.cc",
126    "collect_system_info_unittest.cc",
127    "collect_timeline_events_unittest.cc",
128    "filter_sched_waking_events_unittest.cc",
129    "find_package_uid_unittest.cc",
130    "process_thread_timeline_unittest.cc",
131    "proto_util_unittest.cc",
132    "prune_package_list_unittest.cc",
133    "redact_process_events_unittest.cc",
134    "redact_sched_events_unittest.cc",
135    "verify_integrity_unittest.cc",
136  ]
137  deps = [
138    ":trace_redaction",
139    "../../gn:default_deps",
140    "../../gn:gtest_and_gmock",
141    "../../include/perfetto/ext/base:base",
142    "../../include/perfetto/protozero:protozero",
143    "../../protos/perfetto/common:cpp",
144    "../../protos/perfetto/config:cpp",
145    "../../protos/perfetto/config:zero",
146    "../../protos/perfetto/trace:non_minimal_cpp",
147    "../../protos/perfetto/trace:zero",
148    "../../protos/perfetto/trace/android:cpp",
149    "../../protos/perfetto/trace/android:zero",
150    "../../protos/perfetto/trace/ftrace:cpp",
151    "../../protos/perfetto/trace/ftrace:zero",
152    "../../protos/perfetto/trace/ps:cpp",
153    "../../protos/perfetto/trace/ps:zero",
154    "../base:test_support",
155    "../trace_processor/util:util",
156  ]
157}
158