1-- 2-- Copyright 2024 The Android Open Source Project 3-- 4-- Licensed under the Apache License, Version 2.0 (the "License"); 5-- you may not use this file except in compliance with the License. 6-- You may obtain a copy of the License at 7-- 8-- https://www.apache.org/licenses/LICENSE-2.0 9-- 10-- Unless required by applicable law or agreed to in writing, software 11-- distributed under the License is distributed on an "AS IS" BASIS, 12-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13-- See the License for the specific language governing permissions and 14-- limitations under the License. 15 16-- Tracks for GPU work period events originating from the 17-- `power/gpu_work_period` Linux ftrace tracepoint. 18-- 19-- This tracepoint is usually only available on selected Android devices. 20CREATE PERFETTO TABLE android_gpu_work_period_track ( 21 -- Unique identifier for this track. Joinable with track.id. 22 id LONG, 23 -- Machine identifier, non-null for tracks on a remote machine. 24 machine_id LONG, 25 -- The UID of the package for which the GPU work period events were emitted. 26 uid LONG, 27 -- The GPU identifier for which the GPU work period events were emitted. 28 gpu_id LONG 29) AS 30SELECT 31 id, 32 machine_id, 33 extract_arg(dimension_arg_set_id, 'uid') AS uid, 34 extract_arg(dimension_arg_set_id, 'gpu') AS gpu_id 35FROM track 36WHERE 37 type = 'android_gpu_work_period'; 38