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
21import "protos/perfetto/metrics/android/process_metadata.proto";
22
23// Global process state at LMK time, used to identify potential culprits.
24// TODO: rename to AndroidLmkProcessState
25message AndroidLmkReasonMetric {
26  message Process {
27    optional AndroidProcessMetadata process = 1;
28
29    // OOM score adj of the process.
30    optional int32 oom_score_adj = 2;
31
32    // RSS + swap.
33    optional int64 size = 3;
34
35    optional int64 file_rss_bytes = 4;
36    optional int64 anon_rss_bytes = 5;
37    optional int64 shmem_rss_bytes = 6;
38    optional int64 swap_bytes = 7;
39  }
40  message Lmk {
41    // OOM score adj of the LMK'ed process.
42    optional int32 oom_score_adj = 1;
43
44    // Total size of the ION heap in bytes during this LMK.
45    optional int64 ion_heaps_bytes = 4;
46    // Deprecated. Prefer ion_heaps_bytes.
47    optional int64 system_ion_heap_size = 2;
48
49    // Processes present during this LMK.
50    repeated Process processes = 3;
51  }
52
53  // LMKs present in the trace, ordered on their timestamp.
54  repeated Lmk lmks = 1;
55}
56