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