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 */
16syntax = "proto2";
17
18package perfetto.protos;
19
20import "protos/perfetto/metrics/android/process_metadata.proto";
21
22message JavaHeapStats {
23  message HeapRoots {
24    optional string root_type = 1;
25    optional string type_name = 2;
26    optional int64 obj_count = 3;
27  }
28
29  // Next id: 7
30  message Sample {
31    optional int64 ts = 1;
32    // Size of the Java heap in bytes
33    optional int64 heap_size = 2;
34    optional int64 obj_count = 4;
35    // Size of the reachable objects in bytes.
36    optional int64 reachable_heap_size = 3;
37    optional int64 reachable_obj_count = 5;
38    // Sum of anonymous RSS + swap pages in bytes.
39    optional int64 anon_rss_and_swap_size = 6;
40
41    // ART root objects
42    repeated HeapRoots roots = 7;
43  }
44
45  // Heap stats per process. One sample per dump (can be > 1 if continuous
46  // dump is enabled).
47  message InstanceStats {
48    optional uint32 upid = 1;
49    optional AndroidProcessMetadata process = 2;
50    repeated Sample samples = 3;
51  }
52
53  repeated InstanceStats instance_stats = 1;
54}
55