• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17INCLUDE PERFETTO MODULE android.garbage_collection;
18INCLUDE PERFETTO MODULE android.suspend;
19
20DROP VIEW IF EXISTS android_garbage_collection_unagg_output;
21CREATE PERFETTO VIEW android_garbage_collection_unagg_output AS
22SELECT AndroidGarbageCollectionUnaggMetric(
23  'gc_events', (
24    SELECT RepeatedField(
25      AndroidGarbageCollectionUnaggMetric_GarbageCollectionEvent(
26        'thread_name', thread_name,
27        'process_name', process_name,
28        'gc_type', gc_type,
29        'is_mark_compact', is_mark_compact,
30        'reclaimed_mb', reclaimed_mb,
31        'min_heap_mb', min_heap_mb,
32        'max_heap_mb', max_heap_mb,
33        'mb_per_ms_of_running_gc', reclaimed_mb/(gc_running_dur/1e6),
34        'mb_per_ms_of_wall_gc', reclaimed_mb/(gc_dur/1e6),
35        'gc_dur', gc_dur,
36        'gc_running_dur', gc_running_dur,
37        'gc_runnable_dur', gc_runnable_dur,
38        'gc_unint_io_dur', gc_unint_io_dur,
39        'gc_unint_non_io_dur', gc_unint_non_io_dur,
40        'gc_int_dur', gc_int_dur,
41        'gc_ts', gc_ts,
42        'tid', tid,
43        'pid', pid,
44        'gc_monotonic_dur', _extract_duration_without_suspend(gc_ts, gc_dur)
45      )) FROM android_garbage_collection_events
46  )
47);
48