xref: /aosp_15_r20/external/perfetto/protos/perfetto/metrics/android/java_heap_class_stats.proto (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1/*
2 * Copyright (C) 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 *      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 JavaHeapClassStats {
22  // Next id: 13
23  message TypeCount {
24    reserved 11;
25    optional string type_name = 1;
26    optional bool is_libcore_or_array = 12;
27
28    optional int64 obj_count = 2;
29    optional int64 size_bytes = 3;
30    optional int64 native_size_bytes = 4;
31    optional int64 reachable_obj_count = 5;
32    optional int64 reachable_size_bytes = 6;
33    optional int64 reachable_native_size_bytes = 7;
34    optional int64 dominated_obj_count = 8;
35    optional int64 dominated_size_bytes = 9;
36    optional int64 dominated_native_size_bytes = 10;
37  }
38
39  message Sample {
40    optional int64 ts = 1;
41    repeated TypeCount type_count = 2;
42  }
43
44  // Stats per process. One sample per dump (with continuous dump you can
45  // have more samples differentiated by ts).
46  message InstanceStats {
47    optional uint32 upid = 1;
48    optional perfetto.protos.AndroidProcessMetadata process = 2;
49    repeated Sample samples = 3;
50  }
51
52  repeated InstanceStats instance_stats = 1;
53}
54