1*6777b538SAndroid Build Coastguard Worker-- Copyright 2023 The Chromium Authors 2*6777b538SAndroid Build Coastguard Worker-- Use of this source code is governed by a BSD-style license that can be 3*6777b538SAndroid Build Coastguard Worker-- found in the LICENSE file. 4*6777b538SAndroid Build Coastguard Worker 5*6777b538SAndroid Build Coastguard WorkerDROP VIEW IF EXISTS chrome_histograms; 6*6777b538SAndroid Build Coastguard Worker 7*6777b538SAndroid Build Coastguard Worker-- A helper view on top of the histogram events emitted by Chrome. 8*6777b538SAndroid Build Coastguard Worker-- Requires "disabled-by-default-histogram_samples" Chrome category. 9*6777b538SAndroid Build Coastguard WorkerCREATE PERFETTO TABLE chrome_histograms( 10*6777b538SAndroid Build Coastguard Worker -- The name of the histogram. 11*6777b538SAndroid Build Coastguard Worker name STRING, 12*6777b538SAndroid Build Coastguard Worker -- The value of the histogram sample. 13*6777b538SAndroid Build Coastguard Worker value INT, 14*6777b538SAndroid Build Coastguard Worker -- Alias of |slice.ts|. 15*6777b538SAndroid Build Coastguard Worker ts INT, 16*6777b538SAndroid Build Coastguard Worker -- Thread name. 17*6777b538SAndroid Build Coastguard Worker thread_name STRING, 18*6777b538SAndroid Build Coastguard Worker -- Utid of the thread. 19*6777b538SAndroid Build Coastguard Worker utid INT, 20*6777b538SAndroid Build Coastguard Worker -- Tid of the thread. 21*6777b538SAndroid Build Coastguard Worker tid INT, 22*6777b538SAndroid Build Coastguard Worker -- Process name. 23*6777b538SAndroid Build Coastguard Worker process_name STRING, 24*6777b538SAndroid Build Coastguard Worker -- Upid of the process. 25*6777b538SAndroid Build Coastguard Worker upid INT, 26*6777b538SAndroid Build Coastguard Worker -- Pid of the process. 27*6777b538SAndroid Build Coastguard Worker pid INT 28*6777b538SAndroid Build Coastguard Worker) AS 29*6777b538SAndroid Build Coastguard WorkerSELECT 30*6777b538SAndroid Build Coastguard Worker extract_arg(slice.arg_set_id, "chrome_histogram_sample.name") as name, 31*6777b538SAndroid Build Coastguard Worker extract_arg(slice.arg_set_id, "chrome_histogram_sample.sample") as value, 32*6777b538SAndroid Build Coastguard Worker ts, 33*6777b538SAndroid Build Coastguard Worker thread.name as thread_name, 34*6777b538SAndroid Build Coastguard Worker thread.utid as utid, 35*6777b538SAndroid Build Coastguard Worker thread.tid as tid, 36*6777b538SAndroid Build Coastguard Worker process.name as process_name, 37*6777b538SAndroid Build Coastguard Worker process.upid as upid, 38*6777b538SAndroid Build Coastguard Worker process.pid as pid 39*6777b538SAndroid Build Coastguard WorkerFROM slice 40*6777b538SAndroid Build Coastguard WorkerJOIN thread_track ON thread_track.id = slice.track_id 41*6777b538SAndroid Build Coastguard WorkerJOIN thread USING (utid) 42*6777b538SAndroid Build Coastguard WorkerJOIN process USING (upid) 43*6777b538SAndroid Build Coastguard WorkerWHERE 44*6777b538SAndroid Build Coastguard Worker slice.name = "HistogramSample" 45*6777b538SAndroid Build Coastguard Worker AND category = "disabled-by-default-histogram_samples";