1-- 2-- Copyright 2020 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 18 p.upid, 19 pid, 20 p.name, 21 timestamp, 22 detail_level, 23 pf.value AS private_footprint_kb, 24 prs.value AS peak_resident_set_kb, 25 EXTRACT_ARG(p.arg_set_id, 'is_peak_rss_resettable') AS is_peak_rss_resettable 26FROM process p 27LEFT JOIN memory_snapshot 28LEFT JOIN ( 29 SELECT id, upid 30 FROM process_counter_track 31 WHERE name IS 'chrome.private_footprint_kb' 32 ) AS pct_pf 33 ON p.upid = pct_pf.upid 34LEFT JOIN counter pf ON timestamp = pf.ts AND pct_pf.id = pf.track_id 35LEFT JOIN ( 36 SELECT id, upid 37 FROM process_counter_track 38 WHERE name IS 'chrome.peak_resident_set_kb' 39 ) AS pct_prs 40 ON p.upid = pct_prs.upid 41LEFT JOIN counter prs ON timestamp = prs.ts AND pct_prs.id = prs.track_id 42ORDER BY timestamp 43