add page fragmentation info into procstats
Bug: 123021121
Test: atest
CtsStatsdHostTestCases:android.cts.statsd.validation.ProcStatsValidationTests#testProcStatsPkgProcStats
Change-Id: Icd60aa6fb3e2787fd0f628edeeab0d5872d2c497
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 7e2df27..0a8746a 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -3331,7 +3331,8 @@
optional int32 process_uid = 1;
// Process name.
optional string process_name = 2;
-
+ // Package name.
+ optional string package_name = 7;
// Total count of the times this association appeared.
optional int32 total_count = 3;
@@ -3410,6 +3411,9 @@
}
repeated Status status = 7;
+ // Number of pages available of various types and sizes, representation fragmentation.
+ repeated ProcessStatsAvailablePagesProto available_pages = 10;
+
// Stats for each process.
repeated ProcessStatsProto process_stats = 8;
@@ -3417,6 +3421,21 @@
repeated ProcessStatsPackageProto package_stats = 9;
}
+message ProcessStatsAvailablePagesProto {
+ // Node these pages are in (as per /proc/pagetypeinfo)
+ optional int32 node = 1;
+
+ // Zone these pages are in (as per /proc/pagetypeinfo)
+ optional string zone = 2;
+
+ // Label for the type of these pages (as per /proc/pagetypeinfo)
+ optional string label = 3;
+
+ // Distribution of number of pages available by order size. First entry in array is
+ // order 0, second is order 1, etc. Each order increase is a doubling of page size.
+ repeated int32 pages_per_order = 4;
+}
+
/**
* Pulled from ProcessStatsService.java
*/