Merge "Add atom for per-process system ion heap size" into qt-dev
am: 956197e8e0
Change-Id: Ica2629bf4a5cc744004d19393ce7733aff1689fd
This commit is contained in:
@@ -322,7 +322,7 @@ message Atom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pulled events will start at field 10000.
|
// Pulled events will start at field 10000.
|
||||||
// Next: 10059
|
// Next: 10062
|
||||||
oneof pulled {
|
oneof pulled {
|
||||||
WifiBytesTransfer wifi_bytes_transfer = 10000;
|
WifiBytesTransfer wifi_bytes_transfer = 10000;
|
||||||
WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001;
|
WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001;
|
||||||
@@ -385,6 +385,7 @@ message Atom {
|
|||||||
FaceSettings face_settings = 10058;
|
FaceSettings face_settings = 10058;
|
||||||
CoolingDevice cooling_device = 10059;
|
CoolingDevice cooling_device = 10059;
|
||||||
AppOps app_ops = 10060;
|
AppOps app_ops = 10060;
|
||||||
|
ProcessSystemIonHeapSize process_system_ion_heap_size = 10061;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DO NOT USE field numbers above 100,000 in AOSP.
|
// DO NOT USE field numbers above 100,000 in AOSP.
|
||||||
@@ -6369,6 +6370,28 @@ message SystemIonHeapSize {
|
|||||||
optional int64 size_in_bytes = 1;
|
optional int64 size_in_bytes = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Logs the per-process size of the system ion heap.
|
||||||
|
*
|
||||||
|
* Pulled from StatsCompanionService.
|
||||||
|
*/
|
||||||
|
message ProcessSystemIonHeapSize {
|
||||||
|
// The uid if available. -1 means not available.
|
||||||
|
optional int32 uid = 1 [(is_uid) = true];
|
||||||
|
|
||||||
|
// The process name (from /proc/PID/cmdline).
|
||||||
|
optional string process_name = 2;
|
||||||
|
|
||||||
|
// Sum of sizes of all allocations.
|
||||||
|
optional int32 total_size_in_kilobytes = 3;
|
||||||
|
|
||||||
|
// Number of allocations.
|
||||||
|
optional int32 allocation_count = 4;
|
||||||
|
|
||||||
|
// Size of the largest allocation.
|
||||||
|
optional int32 max_size_in_kilobytes = 5;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Push network stack events.
|
* Push network stack events.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -156,6 +156,9 @@ std::map<int, PullAtomInfo> StatsPullerManager::kAllPullAtomInfo = {
|
|||||||
// system_ion_heap_size
|
// system_ion_heap_size
|
||||||
{android::util::SYSTEM_ION_HEAP_SIZE,
|
{android::util::SYSTEM_ION_HEAP_SIZE,
|
||||||
{.puller = new StatsCompanionServicePuller(android::util::SYSTEM_ION_HEAP_SIZE)}},
|
{.puller = new StatsCompanionServicePuller(android::util::SYSTEM_ION_HEAP_SIZE)}},
|
||||||
|
// process_system_ion_heap_size
|
||||||
|
{android::util::PROCESS_SYSTEM_ION_HEAP_SIZE,
|
||||||
|
{.puller = new StatsCompanionServicePuller(android::util::PROCESS_SYSTEM_ION_HEAP_SIZE)}},
|
||||||
// temperature
|
// temperature
|
||||||
{android::util::TEMPERATURE,
|
{android::util::TEMPERATURE,
|
||||||
{.puller = new StatsCompanionServicePuller(android::util::TEMPERATURE)}},
|
{.puller = new StatsCompanionServicePuller(android::util::TEMPERATURE)}},
|
||||||
|
|||||||
@@ -1271,6 +1271,12 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
|
|||||||
pulledData.add(e);
|
pulledData.add(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void pullProcessSystemIonHeapSize(
|
||||||
|
int tagId, long elapsedNanos, long wallClockNanos,
|
||||||
|
List<StatsLogEventWrapper> pulledData) {
|
||||||
|
// TODO(b/130526489): Read from debugfs.
|
||||||
|
}
|
||||||
|
|
||||||
private void pullBinderCallsStats(
|
private void pullBinderCallsStats(
|
||||||
int tagId, long elapsedNanos, long wallClockNanos,
|
int tagId, long elapsedNanos, long wallClockNanos,
|
||||||
List<StatsLogEventWrapper> pulledData) {
|
List<StatsLogEventWrapper> pulledData) {
|
||||||
@@ -2333,6 +2339,10 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
|
|||||||
pullSystemIonHeapSize(tagId, elapsedNanos, wallClockNanos, ret);
|
pullSystemIonHeapSize(tagId, elapsedNanos, wallClockNanos, ret);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case StatsLog.PROCESS_SYSTEM_ION_HEAP_SIZE: {
|
||||||
|
pullProcessSystemIonHeapSize(tagId, elapsedNanos, wallClockNanos, ret);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case StatsLog.BINDER_CALLS: {
|
case StatsLog.BINDER_CALLS: {
|
||||||
pullBinderCallsStats(tagId, elapsedNanos, wallClockNanos, ret);
|
pullBinderCallsStats(tagId, elapsedNanos, wallClockNanos, ret);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user