• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2025 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 {StandardGroup} from '../dev.perfetto.StandardGroups';
16
17export interface SliceTrackGroupSchema {
18  name: string;
19  expanded?: true;
20}
21
22interface SliceTrackTypeSchema {
23  type: string;
24  group: string | SliceTrackGroupSchema | undefined;
25  topLevelGroup: 'PROCESS' | 'THREAD' | StandardGroup | undefined;
26}
27
28export const SLICE_TRACK_SCHEMAS: ReadonlyArray<SliceTrackTypeSchema> = [
29  {
30    type: 'battery_stats',
31    topLevelGroup: 'POWER',
32    group: 'Battery Stats',
33  },
34  {
35    type: 'bluetooth_trace_event',
36    topLevelGroup: 'SYSTEM',
37    group: 'Bluetooth',
38  },
39  {
40    type: 'legacy_async_process_slice',
41    topLevelGroup: 'PROCESS',
42    group: undefined,
43  },
44  {
45    type: 'legacy_async_global_slice',
46    topLevelGroup: undefined,
47    group: 'Global Legacy Events',
48  },
49  {
50    type: 'legacy_chrome_global_instants',
51    group: undefined,
52    topLevelGroup: undefined,
53  },
54  {
55    type: 'android_device_state',
56    topLevelGroup: 'SYSTEM',
57    group: undefined,
58  },
59  {
60    type: 'android_lmk',
61    topLevelGroup: 'PROCESS',
62    group: undefined,
63  },
64  {
65    type: 'chrome_process_instant',
66    topLevelGroup: 'PROCESS',
67    group: undefined,
68  },
69  {
70    type: 'drm_vblank',
71    topLevelGroup: 'HARDWARE',
72    group: 'DRM VBlank',
73  },
74  {
75    type: 'disp_dpu_underrun',
76    topLevelGroup: 'HARDWARE',
77    group: 'Display',
78  },
79  {
80    type: 'disp_vblank_irq_enable',
81    topLevelGroup: 'HARDWARE',
82    group: 'Display',
83  },
84  {
85    type: 'drm_sched_ring',
86    topLevelGroup: 'HARDWARE',
87    group: 'DRM Sched Ring',
88  },
89  {
90    type: 'drm_fence',
91    topLevelGroup: 'HARDWARE',
92    group: 'DRM Fence',
93  },
94  {
95    type: 'interconnect_events',
96    topLevelGroup: 'HARDWARE',
97    group: undefined,
98  },
99  {
100    type: 'cpu_irq',
101    topLevelGroup: 'CPU',
102    group: 'IRQs',
103  },
104  {
105    type: 'cpu_softirq',
106    topLevelGroup: 'CPU',
107    group: 'Softirqs',
108  },
109  {
110    type: 'net_socket_set_state',
111    topLevelGroup: 'NETWORK',
112    group: 'Socket Set State',
113  },
114  {
115    type: 'net_tcp_retransmit_skb',
116    topLevelGroup: 'NETWORK',
117    group: 'TCP Retransmit SKB',
118  },
119  {
120    type: 'cpu_napi_gro',
121    topLevelGroup: 'CPU',
122    group: 'NAPI GRO',
123  },
124  {
125    type: 'ufs_command_tag',
126    topLevelGroup: 'IO',
127    group: 'UFS Command Tag',
128  },
129  {
130    type: 'wakesource_wakelock',
131    topLevelGroup: 'POWER',
132    group: 'Kernel Wakelocks',
133  },
134  {
135    type: 'dumpstate_wakelocks',
136    topLevelGroup: 'POWER',
137    group: 'Kernel Wakelocks',
138  },
139  {
140    type: 'cpu_funcgraph',
141    topLevelGroup: 'CPU',
142    group: 'Funcgraph',
143  },
144  {
145    type: 'android_ion_allocations',
146    topLevelGroup: 'MEMORY',
147    group: 'ION',
148  },
149  {
150    type: 'android_fs',
151    topLevelGroup: 'IO',
152    group: undefined,
153  },
154  {
155    type: 'cpu_mali_irq',
156    topLevelGroup: 'CPU',
157    group: undefined,
158  },
159  {
160    type: 'mali_mcu_state',
161    topLevelGroup: 'GPU',
162    group: undefined,
163  },
164  {
165    type: 'pkvm_hypervisor',
166    topLevelGroup: 'SYSTEM',
167    group: undefined,
168  },
169  {
170    type: 'virtgpu_queue_event',
171    topLevelGroup: 'GPU',
172    group: 'Virtio GPU Events',
173  },
174  {
175    type: 'virtio_video_queue_event',
176    topLevelGroup: 'SYSTEM',
177    group: 'Virtio Video Queue Events',
178  },
179  {
180    type: 'virtio_video_command',
181    topLevelGroup: 'SYSTEM',
182    group: 'Virtio Video Command Events',
183  },
184  {
185    type: 'android_camera_event',
186    topLevelGroup: 'HARDWARE',
187    group: undefined,
188  },
189  {
190    type: 'gpu_render_stage',
191    topLevelGroup: 'GPU',
192    group: 'Render Stage',
193  },
194  {
195    type: 'vulkan_events',
196    topLevelGroup: 'GPU',
197    group: undefined,
198  },
199  {
200    type: 'gpu_log',
201    topLevelGroup: 'GPU',
202    group: undefined,
203  },
204  {
205    type: 'graphics_frame_event',
206    topLevelGroup: 'GPU',
207    group: undefined,
208  },
209  {
210    type: 'triggers',
211    topLevelGroup: 'SYSTEM',
212    group: undefined,
213  },
214  {
215    type: 'network_packets',
216    topLevelGroup: 'NETWORK',
217    group: undefined,
218  },
219  {
220    type: 'pixel_modem_event',
221    topLevelGroup: 'HARDWARE',
222    group: undefined,
223  },
224  {
225    type: 'statsd_atoms',
226    topLevelGroup: 'SYSTEM',
227    group: undefined,
228  },
229  {
230    type: 'atrace_async_slice',
231    topLevelGroup: 'PROCESS',
232    group: undefined,
233  },
234  {
235    type: 'atrace_async_slice_for_track',
236    topLevelGroup: 'PROCESS',
237    group: undefined,
238  },
239  {
240    type: 'thread_execution',
241    topLevelGroup: 'THREAD',
242    group: undefined,
243  },
244  {
245    type: 'thread_funcgraph',
246    topLevelGroup: 'THREAD',
247    group: undefined,
248  },
249];
250