File: BUILD.gn

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (352 lines) | stat: -rw-r--r-- 12,939 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//testing/libfuzzer/fuzzer_test.gni")
import("//third_party/blink/renderer/platform/platform.gni")
import("//third_party/protobuf/proto_library.gni")

if (is_android) {
  import("//build/config/android/rules.gni")
}

blink_platform_sources("scheduler") {
  sources = [
    "common/auto_advancing_virtual_time_domain.cc",
    "common/auto_advancing_virtual_time_domain.h",
    "common/back_forward_cache_disabling_feature_tracker.cc",
    "common/back_forward_cache_disabling_feature_tracker.h",
    "common/blink_scheduler_single_thread_task_runner.cc",
    "common/blink_scheduler_single_thread_task_runner.h",
    "common/cancelable_closure_holder.cc",
    "common/cancelable_closure_holder.h",
    "common/dummy_schedulers.cc",
    "common/event_loop.cc",
    "common/features.cc",
    "common/features.h",
    "common/frame_or_worker_scheduler.cc",
    "common/idle_helper.cc",
    "common/idle_helper.h",
    "common/pollable_thread_safe_flag.cc",
    "common/pollable_thread_safe_flag.h",
    "common/post_cancellable_task.cc",
    "common/process_state.cc",
    "common/process_state.h",
    "common/process_time_override_coordinator.cc",
    "common/process_time_override_coordinator.h",
    "common/scheduler_helper.cc",
    "common/scheduler_helper.h",
    "common/scheduling_lifecycle_state.cc",
    "common/simple_main_thread_scheduler.cc",
    "common/simple_main_thread_scheduler.h",
    "common/single_thread_idle_task_runner.cc",
    "common/single_thread_idle_task_runner.h",
    "common/task_priority.cc",
    "common/task_priority.h",
    "common/thread.cc",
    "common/thread_cpu_throttler.cc",
    "common/thread_load_tracker.cc",
    "common/thread_load_tracker.h",
    "common/thread_scheduler.cc",
    "common/thread_scheduler_base.cc",
    "common/thread_scheduler_base.h",
    "common/thread_type.cc",
    "common/throttling/budget_pool.cc",
    "common/throttling/budget_pool.h",
    "common/throttling/cpu_time_budget_pool.cc",
    "common/throttling/cpu_time_budget_pool.h",
    "common/throttling/task_queue_throttler.cc",
    "common/throttling/task_queue_throttler.h",
    "common/throttling/type.cc",
    "common/throttling/type.h",
    "common/throttling/wake_up_budget_pool.cc",
    "common/throttling/wake_up_budget_pool.h",
    "common/tracing_helper.cc",
    "common/tracing_helper.h",
    "common/web_thread_scheduler.cc",
    "common/worker_pool.cc",
    "main_thread/agent_group_scheduler_impl.cc",
    "main_thread/agent_group_scheduler_impl.h",
    "main_thread/attribution_group.h",
    "main_thread/deadline_task_runner.cc",
    "main_thread/deadline_task_runner.h",
    "main_thread/find_in_page_budget_pool_controller.cc",
    "main_thread/find_in_page_budget_pool_controller.h",
    "main_thread/frame_origin_type.cc",
    "main_thread/frame_origin_type.h",
    "main_thread/frame_scheduler_impl.cc",
    "main_thread/frame_scheduler_impl.h",
    "main_thread/frame_status.cc",
    "main_thread/frame_task_queue_controller.cc",
    "main_thread/frame_task_queue_controller.h",
    "main_thread/idle_time_estimator.cc",
    "main_thread/idle_time_estimator.h",
    "main_thread/main_thread_impl.cc",
    "main_thread/main_thread_impl.h",
    "main_thread/main_thread_metrics_helper.cc",
    "main_thread/main_thread_metrics_helper.h",
    "main_thread/main_thread_scheduler_helper.cc",
    "main_thread/main_thread_scheduler_helper.h",
    "main_thread/main_thread_scheduler_impl.cc",
    "main_thread/main_thread_scheduler_impl.h",
    "main_thread/main_thread_task_queue.cc",
    "main_thread/main_thread_task_queue.h",
    "main_thread/main_thread_web_scheduling_task_queue_impl.cc",
    "main_thread/main_thread_web_scheduling_task_queue_impl.h",
    "main_thread/memory_purge_manager.cc",
    "main_thread/memory_purge_manager.h",
    "main_thread/page_scheduler_impl.cc",
    "main_thread/page_scheduler_impl.h",
    "main_thread/page_visibility_state.cc",
    "main_thread/page_visibility_state.h",
    "main_thread/pending_user_input.cc",
    "main_thread/pending_user_input.h",
    "main_thread/policy_updater.cc",
    "main_thread/policy_updater.h",
    "main_thread/render_widget_signals.cc",
    "main_thread/render_widget_signals.h",
    "main_thread/task_type_names.cc",
    "main_thread/task_type_names.h",
    "main_thread/use_case.cc",
    "main_thread/use_case.h",
    "main_thread/user_model.cc",
    "main_thread/user_model.h",
    "main_thread/web_agent_group_scheduler.cc",
    "main_thread/web_scoped_virtual_time_pauser.cc",
    "main_thread/widget_scheduler_impl.cc",
    "main_thread/widget_scheduler_impl.h",
    "public/agent_group_scheduler.h",
    "public/aggregated_metric_reporter.h",
    "public/compositor_thread_scheduler.h",
    "public/dummy_schedulers.h",
    "public/event_loop.h",
    "public/feature_and_js_location_blocking_bfcache.cc",
    "public/feature_and_js_location_blocking_bfcache.h",
    "public/frame_or_worker_scheduler.h",
    "public/frame_scheduler.h",
    "public/frame_status.h",
    "public/main_thread.h",
    "public/main_thread_scheduler.h",
    "public/non_main_thread.h",
    "public/page_scheduler.h",
    "public/post_cancellable_task.h",
    "public/post_cross_thread_task.h",
    "public/rail_mode_observer.h",
    "public/scheduling_lifecycle_state.h",
    "public/scheduling_policy.h",
    "public/task_attribution_info.h",
    "public/task_attribution_tracker.h",
    "public/thread.h",
    "public/thread_cpu_throttler.h",
    "public/thread_scheduler.h",
    "public/thread_type.h",
    "public/virtual_time_controller.h",
    "public/web_scheduling_priority.h",
    "public/web_scheduling_queue_type.h",
    "public/web_scheduling_task_queue.h",
    "public/widget_scheduler.h",
    "public/worker_pool.h",
    "public/worker_scheduler.h",
    "worker/compositor_thread.cc",
    "worker/compositor_thread.h",
    "worker/compositor_thread_scheduler_impl.cc",
    "worker/compositor_thread_scheduler_impl.h",
    "worker/non_main_thread_impl.cc",
    "worker/non_main_thread_impl.h",
    "worker/non_main_thread_scheduler_base.cc",
    "worker/non_main_thread_scheduler_base.h",
    "worker/non_main_thread_scheduler_helper.cc",
    "worker/non_main_thread_scheduler_helper.h",
    "worker/non_main_thread_task_queue.cc",
    "worker/non_main_thread_task_queue.h",
    "worker/non_main_thread_web_scheduling_task_queue_impl.cc",
    "worker/non_main_thread_web_scheduling_task_queue_impl.h",
    "worker/worker_scheduler_impl.cc",
    "worker/worker_scheduler_impl.h",
    "worker/worker_scheduler_proxy.cc",
    "worker/worker_scheduler_proxy.h",
    "worker/worker_thread_scheduler.cc",
    "worker/worker_thread_scheduler.h",
  ]

  deps = [
    "//base",
    "//cc",
    "//components/miracle_parameter/common",
    "//components/performance_manager/scenario_api",
    "//device/base/synchronization",
    "//services/metrics/public/mojom",
    "//third_party/blink/renderer/platform:allow_discouraged_type",
    "//third_party/blink/renderer/platform:make_platform_generated",
    "//third_party/blink/renderer/platform/heap:heap",
    "//third_party/blink/renderer/platform/instrumentation",
    "//third_party/blink/renderer/platform/wtf",
    "//v8",
  ]

  allow_circular_includes_from = [
    "//third_party/blink/renderer/platform/heap:heap",
    "//third_party/blink/renderer/platform/instrumentation",
  ]
}

source_set("test_support") {
  testonly = true

  sources = [
    "test/fake_agent_group_scheduler_scheduler.h",
    "test/fake_frame_scheduler.h",
    "test/fake_page_scheduler.h",
    "test/fake_task_runner.cc",
    "test/fake_task_runner.h",
    "test/fake_widget_scheduler.cc",
    "test/fake_widget_scheduler.h",
    "test/recording_task_time_observer.cc",
    "test/recording_task_time_observer.h",
    "test/renderer_scheduler_test_support.cc",
    "test/web_fake_thread_scheduler.cc",
    "test/web_scheduling_test_helper.cc",
    "test/web_scheduling_test_helper.h",
  ]

  deps = [
    "//base",
    "//base/test:test_support",
    "//mojo/public/cpp/bindings",
    "//skia",
    "//testing/gmock",
    "//third_party/blink/public:test_headers",
    "//third_party/blink/public/mojom:mojom_platform_blink_headers",
    "//third_party/blink/renderer/platform:platform",
  ]

  configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "common/auto_advancing_virtual_time_domain_unittest.cc",
    "common/back_forward_cache_disabling_feature_tracker_unittest.cc",
    "common/blink_scheduler_single_thread_task_runner_unittest.cc",
    "common/idle_helper_unittest.cc",
    "common/post_cancellable_task_unittest.cc",
    "common/process_time_override_coordinator_unittest.cc",
    "common/scheduler_helper_unittest.cc",
    "common/thread_load_tracker_unittest.cc",
    "common/thread_unittest.cc",
    "common/throttling/budget_pool_unittest.cc",
    "common/throttling/task_queue_throttler_unittest.cc",
    "common/tracing_helper_unittest.cc",
    "common/worker_pool_unittest.cc",
    "main_thread/deadline_task_runner_unittest.cc",
    "main_thread/frame_scheduler_impl_unittest.cc",
    "main_thread/frame_task_queue_controller_unittest.cc",
    "main_thread/idle_time_estimator_unittest.cc",
    "main_thread/main_thread_metrics_helper_unittest.cc",
    "main_thread/main_thread_perftest.cc",
    "main_thread/main_thread_scheduler_impl_unittest.cc",
    "main_thread/main_thread_unittest.cc",
    "main_thread/memory_purge_manager_unittest.cc",
    "main_thread/page_scheduler_impl_unittest.cc",
    "main_thread/pending_user_input_unittest.cc",
    "main_thread/render_widget_signals_unittest.cc",
    "main_thread/user_model_unittest.cc",
    "worker/non_main_thread_impl_unittest.cc",
    "worker/worker_scheduler_impl_unittest.cc",
    "worker/worker_scheduler_proxy_unittest.cc",
    "worker/worker_thread_scheduler_unittest.cc",
  ]

  deps = [
    "//base",
    "//base/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/public:test_support",
    "//third_party/googletest:gmock",
  ]

  configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ]
}

source_set("scheduler_fuzzer_tests") {
  testonly = true

  sources = []
  deps = [
    "//base",
    "//base/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/renderer/platform/scheduler:test_support",
  ]

  if (is_linux || is_chromeos || is_fuchsia) {
    sources += [
      "test/fuzzer/sequence_manager_fuzzer_processor.cc",
      "test/fuzzer/sequence_manager_fuzzer_processor.h",
      "test/fuzzer/sequence_manager_fuzzer_processor_unittest.cc",
      "test/fuzzer/simple_thread_impl.cc",
      "test/fuzzer/simple_thread_impl.h",
      "test/fuzzer/task_queue_with_voters.h",
      "test/fuzzer/thread_manager.cc",
      "test/fuzzer/thread_manager.h",
      "test/fuzzer/thread_pool_manager.cc",
      "test/fuzzer/thread_pool_manager.h",
    ]

    deps += [
      ":sequence_manager_test_description_proto",
      "//third_party/blink/renderer/platform:platform",
      "//third_party/libprotobuf-mutator",
    ]
  }

  configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ]
}

fuzzer_test("sequence_manager_fuzzer") {
  sources = [
    "test/fuzzer/sequence_manager_fuzzer.cc",
    "test/fuzzer/sequence_manager_fuzzer_processor.cc",
    "test/fuzzer/sequence_manager_fuzzer_processor.h",
    "test/fuzzer/simple_thread_impl.cc",
    "test/fuzzer/simple_thread_impl.h",
    "test/fuzzer/task_queue_with_voters.h",
    "test/fuzzer/thread_manager.cc",
    "test/fuzzer/thread_manager.h",
    "test/fuzzer/thread_pool_manager.cc",
    "test/fuzzer/thread_pool_manager.h",
  ]

  deps = [
    ":sequence_manager_test_description_proto",
    "//base/test:test_support",
    "//third_party/blink/renderer/platform:blink_fuzzer_test_support",
    "//third_party/blink/renderer/platform:platform",
    "//third_party/blink/renderer/platform:test_support",
    "//third_party/libprotobuf-mutator",
  ]
}

proto_library("sequence_manager_test_description_proto") {
  sources = [ "test/fuzzer/proto/sequence_manager_test_description.proto" ]
}

if (is_android) {
  java_cpp_features("java_features_srcjar") {
    # External code should depend on ":blink_scheduler_java" instead.
    visibility = [ ":*" ]
    sources =
        [ "//third_party/blink/renderer/platform/scheduler/common/features.cc" ]
    template = "//third_party/blink/renderer/platform/scheduler/common/android/java_templates/BlinkSchedulerFeatures.java.tmpl"
  }

  android_library("blink_scheduler_java") {
    # Right now, this only includes the Java features. But if we need more Java
    # files, they should be added here as necessary.
    srcjar_deps = [ ":java_features_srcjar" ]
  }
}