Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 954825b8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add process start time to ProcessMemoryState atom"

parents 77a2cefd 272a8161
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
}

/*
+3 −3
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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);
        }
    }