xref: /aosp_15_r20/external/perfetto/protos/perfetto/metrics/android/dma_heap_metric.proto (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1/*
2 * Copyright (C) 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 *      http://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
17syntax = "proto2";
18
19package perfetto.protos;
20
21// dma-buf heap memory stats on Android.
22message AndroidDmaHeapMetric {
23  message ProcessStats {
24    // process that either directly or indirectly allocated the buffers
25    optional string process_name = 1;
26    // Bytes allocated but not freed during this trace
27    optional int32 delta_bytes = 2;
28  }
29
30    optional double avg_size_bytes = 1;
31    optional double min_size_bytes = 2;
32    optional double max_size_bytes = 3;
33
34    // Total allocation size.
35    // Essentially the sum of positive allocs.
36    optional double total_alloc_size_bytes = 4;
37
38    // Total delta size (bytes allocated but not freed during the trace)
39    optional int32 total_delta_bytes = 5;
40    repeated ProcessStats process_stats = 6;
41}
42