xref: /aosp_15_r20/external/perfetto/protos/perfetto/metrics/android/java_heap_histogram.proto (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1/*
2 * Copyright (C) 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 *      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";
17package perfetto.protos;
18
19import "protos/perfetto/metrics/android/process_metadata.proto";
20
21message JavaHeapHistogram {
22  // Next id: 9
23  message TypeCount {
24    optional string type_name = 1;
25    optional string category = 4;
26
27    optional uint32 obj_count = 2;
28    optional uint32 reachable_obj_count = 3;
29
30    optional uint32 size_kb = 5;
31    optional uint32 reachable_size_kb = 6;
32    optional uint32 native_size_kb = 7;
33    optional uint32 reachable_native_size_kb = 8;
34  }
35
36  message Sample {
37    optional int64 ts = 1;
38    repeated TypeCount type_count = 2;
39  }
40
41  // Heap stats per process. One sample per dump (with continuous dump you can
42  // have more samples differentiated by ts).
43  message InstanceStats {
44    optional uint32 upid = 1;
45    optional AndroidProcessMetadata process = 2;
46    repeated Sample samples = 3;
47  }
48
49  repeated InstanceStats instance_stats = 1;
50}
51