• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: 11
30  message Sample {
31    optional int64 ts = 1;
32    // Size of the Java heap in bytes
33    optional int64 heap_size = 2;
34    // Native size of all the objects (not included in heap_size)
35    optional int64 heap_native_size = 8;
36    optional int64 obj_count = 4;
37    // Size of the reachable objects in bytes.
38    optional int64 reachable_heap_size = 3;
39    // Native size of all the reachable objects (not included in
40    // reachable_heap_size)
41    optional int64 reachable_heap_native_size = 9;
42    optional int64 reachable_obj_count = 5;
43    // Sum of anonymous RSS + swap pages in bytes.
44    optional int64 anon_rss_and_swap_size = 6;
45
46    // ART root objects
47    repeated HeapRoots roots = 7;
48    // OOM adjustment score
49    optional int64 oom_score_adj = 10;
50  }
51
52  // Heap stats per process. One sample per dump (can be > 1 if continuous
53  // dump is enabled).
54  message InstanceStats {
55    optional uint32 upid = 1;
56    optional AndroidProcessMetadata process = 2;
57    repeated Sample samples = 3;
58  }
59
60  repeated InstanceStats instance_stats = 1;
61}
62