1/*
2 * Copyright (C) 2016 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";
18option java_multiple_files = true;
19
20import "frameworks/base/libs/incident/proto/android/privacy.proto";
21
22package android.os;
23
24//Memory usage of running processes
25message ProcrankProto {
26    option (android.msg_privacy).dest = DEST_AUTOMATIC;
27
28    // Currently running process
29    // Next Tag: 11
30    message Process {
31        option (android.msg_privacy).dest = DEST_AUTOMATIC;
32
33        // ID of the process
34        optional int32 pid = 1;
35
36        // virtual set size, unit KB
37        optional int64 vss = 2;
38
39        // resident set size, unit KB
40        optional int64 rss = 3;
41
42        // proportional set size, unit KB
43        optional int64 pss = 4;
44
45        // unique set size, unit KB
46        optional int64 uss = 5;
47
48        // swap size, unit KB
49        optional int64 swap = 6;
50
51        // proportional swap size, unit KB
52        optional int64 pswap = 7;
53
54        // unique swap size, unit KB
55        optional int64 uswap = 8;
56
57        // zswap size, unit KB
58        optional int64 zswap = 9;
59
60        // process command
61        optional string cmdline = 10;
62    }
63    repeated Process processes = 1;
64
65    // Summary
66    // Next Tag: 3
67    message Summary {
68        option (android.msg_privacy).dest = DEST_AUTOMATIC;
69
70        optional Process total = 1;
71
72        // TODO: sync on how to use these values
73        message Zram {
74            option (android.msg_privacy).dest = DEST_AUTOMATIC;
75
76            optional string raw_text = 1;
77        }
78        optional Zram zram = 2;
79
80        message Ram {
81            option (android.msg_privacy).dest = DEST_AUTOMATIC;
82
83            optional string raw_text = 1;
84        }
85        optional Ram ram = 3;
86    }
87    optional Summary summary = 2;
88}
89