• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 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")
16
17sql_files = [
18  "trace_metadata.sql",
19  "trace_stats.sql",
20  "android/android_batt.sql",
21  "android/android_camera.sql",
22  "android/android_camera_unagg.sql",
23  "android/android_cpu.sql",
24  "android/android_surfaceflinger.sql",
25  "android/android_cpu_agg.sql",
26  "android/android_cpu_raw_metrics_per_core.sql",
27  "android/android_dma_heap.sql",
28  "android/android_dvfs.sql",
29  "android/android_fastrpc.sql",
30  "android/android_gpu.sql",
31  "android/android_hwui_threads.sql",
32  "android/android_mem.sql",
33  "android/android_mem_unagg.sql",
34  "android/android_netperf.sql",
35  "android/android_ion.sql",
36  "android/composer_execution.sql",
37  "android/composition_layers.sql",
38  "android/frame_missed.sql",
39  "android/android_jank.sql",
40  "android/android_lmk_reason.sql",
41  "android/android_lmk.sql",
42  "android/android_other_traces.sql",
43  "android/android_powrails.sql",
44  "android/android_proxy_power.sql",
45  "android/android_simpleperf.sql",
46  "android/android_startup.sql",
47  "android/android_package_list.sql",
48  "android/android_task_names.sql",
49  "android/android_thread_time_in_state.sql",
50  "android/android_trace_quality.sql",
51  "android/cpu_info.sql",
52  "android/display_metrics.sql",
53  "android/g2d.sql",
54  "android/g2d_duration.sql",
55  "android/android_hwcomposer.sql",
56  "android/android_hwui_metric.sql",
57  "android/java_heap_histogram.sql",
58  "android/java_heap_stats.sql",
59  "android/power_drain_in_watts.sql",
60  "android/power_profile_data.sql",
61  "android/process_unagg_mem_view.sql",
62  "android/process_mem.sql",
63  "android/process_metadata.sql",
64  "android/process_oom_score.sql",
65  "android/profiler_smaps.sql",
66  "android/android_rt_runtime.sql",
67  "android/android_irq_runtime.sql",
68  "android/mem_stats_priority_breakdown.sql",
69  "android/android_multiuser.sql",
70  "android/android_multiuser_populator.sql",
71  "android/span_view_stats.sql",
72  "android/android_sysui_cuj.sql",
73  "android/android_sysui_cuj_surfaceflinger.sql",
74  "android/android_sysui_cuj_jank_query.sql",
75  "android/process_counter_span_view.sql",
76  "android/global_counter_span_view.sql",
77  "android/gpu_counter_span_view.sql",
78  "android/thread_counter_span_view.sql",
79  "android/android_trusty_workqueues.sql",
80  "android/unsymbolized_frames.sql",
81  "android/startup/launches_maxsdk28.sql",
82  "android/startup/launches_minsdk29.sql",
83  "android/startup/launches_minsdk33.sql",
84  "android/startup/launches.sql",
85  "android/startup/hsc.sql",
86  "chrome/actual_power_by_category.sql",
87  "chrome/actual_power_by_rail_mode.sql",
88  "chrome/chrome_event_metadata.sql",
89  "chrome/chrome_histogram_hashes.sql",
90  "chrome/chrome_performance_mark_hashes.sql",
91  "chrome/chrome_processes.sql",
92  "chrome/chrome_slice_names.sql",
93  "chrome/chrome_thread_slice.sql",
94  "chrome/chrome_user_event_hashes.sql",
95  "chrome/cpu_time_by_category.sql",
96  "chrome/cpu_time_by_rail_mode.sql",
97  "chrome/estimated_power_by_category.sql",
98  "chrome/estimated_power_by_rail_mode.sql",
99  "chrome/sufficient_chrome_processes.sql",
100  "chrome/gesture_jank.sql",
101  "chrome/jank_utilities.sql",
102  "chrome/gesture_flow_event.sql",
103  "chrome/gesture_flow_event_queuing_delay.sql",
104  "chrome/rail_modes.sql",
105  "chrome/scroll_jank.sql",
106  "chrome/scroll_jank_cause.sql",
107  "chrome/scroll_jank_cause_blocking_task.sql",
108  "chrome/scroll_jank_cause_blocking_touch_move.sql",
109  "chrome/scroll_jank_cause_get_bitmap.sql",
110  "chrome/scroll_jank_cause_queuing_delay.sql",
111  "chrome/scroll_flow_event.sql",
112  "chrome/scroll_flow_event_queuing_delay.sql",
113  "chrome/test_chrome_metric.sql",
114  "chrome/touch_flow_event.sql",
115  "chrome/touch_flow_event_queuing_delay.sql",
116  "chrome/touch_jank.sql",
117  "experimental/blink_gc_metric.sql",
118  "experimental/chrome_dropped_frames.sql",
119  "experimental/chrome_long_latency.sql",
120  "experimental/frame_times.sql",
121  "experimental/media_metric.sql",
122  "experimental/reported_by_page.sql",
123  "webview/webview_power_usage.sql",
124]
125
126config("gen_config") {
127  include_dirs = [ "${root_gen_dir}/${perfetto_root_path}" ]
128}
129
130action("gen_amalgamated_sql_metrics") {
131  script = "../../../../tools/gen_amalgamated_sql_metrics.py"
132  generated_header = "${target_gen_dir}/amalgamated_sql_metrics.h"
133  args = rebase_path(sql_files, root_build_dir) + [
134           "--cpp_out",
135           rebase_path(generated_header, root_build_dir),
136         ]
137  inputs = sql_files
138  outputs = [ generated_header ]
139  public_configs = [ ":gen_config" ]
140}
141