1/*
2 * Copyright (C) 2019 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// Memory metrics on Android.
22message AndroidMemoryMetric {
23  message ProcessMetrics {
24    optional string process_name = 1;
25    optional ProcessMemoryCounters total_counters = 2;
26    repeated PriorityBreakdown priority_breakdown = 3;
27  }
28
29  message PriorityBreakdown {
30    optional string priority = 1;
31    optional ProcessMemoryCounters counters = 2;
32  }
33
34  message ProcessMemoryCounters {
35    optional Counter anon_rss = 1;
36    optional Counter file_rss = 2;
37    optional Counter swap = 3;
38    optional Counter anon_and_swap = 4;
39
40    // Available when ART trace events are available.
41    optional Counter java_heap = 5;
42  }
43
44  message Counter {
45    optional double min = 1;
46    optional double max = 2;
47    optional double avg = 3;
48  }
49
50  // Process metrics, grouped by process name
51  repeated ProcessMetrics process_metrics = 1;
52}
53