• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1--
2-- Copyright 2021 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
17SELECT RUN_METRIC('chrome/chrome_processes.sql');
18
19-- Grab all the thread tracks which are found in chrome threads.
20DROP VIEW IF EXISTS chrome_track;
21CREATE VIEW chrome_track AS
22  SELECT
23    *
24  FROM thread_track
25  WHERE utid IN (SELECT utid FROM chrome_thread);
26
27-- From all the chrome thread tracks select all the slice details for thread
28-- slices.
29DROP VIEW IF EXISTS chrome_thread_slice;
30CREATE VIEW chrome_thread_slice AS
31  SELECT
32    thread_slice.*
33  FROM
34    thread_slice JOIN
35    chrome_track ON
36        chrome_track.id = thread_slice.track_id
37  WHERE
38    track_id in (SELECT id FROM chrome_track);