Merge "Add process start time to ProcessMemoryState atom"
This commit is contained in:
committed by
Android (Google) Code Review
commit
954825b8df
@@ -2399,6 +2399,10 @@ message ProcessMemoryState {
|
||||
// Peak RSS usage of the process. Value is read from the VmHWM field in /proc/PID/status or
|
||||
// from memory.max_usage_in_bytes under /dev/memcg if the device uses per-app memory cgroups.
|
||||
optional int64 rss_high_watermark_in_bytes = 9;
|
||||
|
||||
// Elapsed real time when the process started.
|
||||
// Value is read from /proc/PID/stat, field 22. 0 if read from per-app memory cgroups.
|
||||
optional int64 start_time_nanos = 10;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -167,13 +167,13 @@ const std::map<int, PullAtomInfo> StatsPullerManager::kAllPullAtomInfo = {
|
||||
// process_memory_state
|
||||
{android::util::PROCESS_MEMORY_STATE,
|
||||
{{4, 5, 6, 7, 8, 9},
|
||||
{2, 3},
|
||||
{2, 3, 10},
|
||||
1 * NS_PER_SEC,
|
||||
new StatsCompanionServicePuller(android::util::PROCESS_MEMORY_STATE)}},
|
||||
// native_process_memory_state
|
||||
{android::util::NATIVE_PROCESS_MEMORY_STATE,
|
||||
{{3, 4, 5, 6, 7},
|
||||
{2},
|
||||
{{3, 4, 5, 6},
|
||||
{2, 7},
|
||||
1 * NS_PER_SEC,
|
||||
new StatsCompanionServicePuller(android::util::NATIVE_PROCESS_MEMORY_STATE)}},
|
||||
// temperature
|
||||
|
||||
@@ -1004,6 +1004,7 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
|
||||
e.writeLong(processMemoryState.cacheInBytes);
|
||||
e.writeLong(processMemoryState.swapInBytes);
|
||||
e.writeLong(processMemoryState.rssHighWatermarkInBytes);
|
||||
e.writeLong(processMemoryState.startTimeNanos);
|
||||
pulledData.add(e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user