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

Commit 6b495029 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5686022 from 0ca1dbcb to qt-c2f2-release

Change-Id: Iad30e0363911238de14ed51d63077c2770f7f26c
parents 142848fe 0ca1dbcb
Loading
Loading
Loading
Loading
+32 −3
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ message Atom {
    }

    // Pulled events will start at field 10000.
    // Next: 10059
    // Next: 10062
    oneof pulled {
        WifiBytesTransfer wifi_bytes_transfer = 10000;
        WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001;
@@ -385,6 +385,7 @@ message Atom {
        FaceSettings face_settings = 10058;
        CoolingDevice cooling_device = 10059;
        AppOps app_ops = 10060;
        ProcessSystemIonHeapSize process_system_ion_heap_size = 10061;
    }

    // DO NOT USE field numbers above 100,000 in AOSP.
@@ -3960,7 +3961,7 @@ message ProcessMemoryState {
    optional int64 page_major_fault = 5;

    // RSS
    // Value is read from /proc/PID/stat, field 24. Or from memory.stat, field
    // Value is read from /proc/PID/status. Or from memory.stat, field
    // total_rss if per-app memory cgroups are enabled.
    optional int64 rss_in_bytes = 6;

@@ -3980,6 +3981,9 @@ message ProcessMemoryState {
    // 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;

    // Anonymous page size plus swap size. Values are read from /proc/PID/status.
    optional int32 anon_rss_and_swap_in_kilobytes = 11;
}

/*
@@ -4002,7 +4006,7 @@ message NativeProcessMemoryState {
    optional int64 page_major_fault = 4;

    // RSS
    // Value read from /proc/PID/stat, field 24.
    // Value read from /proc/PID/status.
    optional int64 rss_in_bytes = 5;

    // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
@@ -4015,6 +4019,9 @@ message NativeProcessMemoryState {
    // SWAP
    // Value read from /proc/PID/status, field VmSwap.
    optional int64 swap_in_bytes = 8;

    // Anonymous page size plus swap size. Values are read from /proc/PID/status.
    optional int32 anon_rss_and_swap_in_kilobytes = 9;
}

/*
@@ -6365,6 +6372,28 @@ message SystemIonHeapSize {
    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.
 *
+3 −0
Original line number Diff line number Diff line
@@ -156,6 +156,9 @@ std::map<int, PullAtomInfo> StatsPullerManager::kAllPullAtomInfo = {
        // system_ion_heap_size
        {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
        {android::util::TEMPERATURE,
         {.puller = new StatsCompanionServicePuller(android::util::TEMPERATURE)}},
+1 −8
Original line number Diff line number Diff line
@@ -168,19 +168,12 @@ public abstract class ActivityManagerInternal {
    public abstract boolean isUidActive(int uid);

    /**
     * Returns a list that contains the memory stats for currently running processes.
     * Returns a list of running processes along with corresponding uids, pids and their oom score.
     *
     * Only processes managed by ActivityManagerService are included.
     */
    public abstract List<ProcessMemoryState> getMemoryStateForProcesses();

    /**
     * Returns a list that contains the memory high-water mark for currently running processes.
     *
     * Only processes managed by ActivityManagerService are included.
     */
    public abstract List<ProcessMemoryHighWaterMark> getMemoryHighWaterMarkForProcesses();

    /**
     * Checks to see if the calling pid is allowed to handle the user. Returns adjusted user id as
     * needed.
+0 −67
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.app;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * The memory high-water mark value for a process.
 * {@hide}
 */
public final class ProcessMemoryHighWaterMark implements Parcelable {
    public final int uid;
    public final String processName;
    public final long rssHighWaterMarkInBytes;

    public ProcessMemoryHighWaterMark(int uid, String processName, long rssHighWaterMarkInBytes) {
        this.uid = uid;
        this.processName = processName;
        this.rssHighWaterMarkInBytes = rssHighWaterMarkInBytes;
    }

    private ProcessMemoryHighWaterMark(Parcel in) {
        uid = in.readInt();
        processName = in.readString();
        rssHighWaterMarkInBytes = in.readLong();
    }

    public static final @android.annotation.NonNull Creator<ProcessMemoryHighWaterMark> CREATOR =
            new Creator<ProcessMemoryHighWaterMark>() {
                @Override
                public ProcessMemoryHighWaterMark createFromParcel(Parcel in) {
                    return new ProcessMemoryHighWaterMark(in);
                }

                @Override
                public ProcessMemoryHighWaterMark[] newArray(int size) {
                    return new ProcessMemoryHighWaterMark[size];
                }
            };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeInt(uid);
        parcel.writeString(processName);
        parcel.writeLong(rssHighWaterMarkInBytes);
    }
}
+6 −28
Original line number Diff line number Diff line
@@ -20,44 +20,27 @@ import android.os.Parcel;
import android.os.Parcelable;

/**
 * The memory stats for a process.
 * State (oom score) for processes known to activity manager.
 * {@hide}
 */
public final class ProcessMemoryState implements Parcelable {
    public final int uid;
    public final int pid;
    public final String processName;
    public final int oomScore;
    public final long pgfault;
    public final long pgmajfault;
    public final long rssInBytes;
    public final long cacheInBytes;
    public final long swapInBytes;
    public final long startTimeNanos;

    public ProcessMemoryState(int uid, String processName, int oomScore, long pgfault,
                              long pgmajfault, long rssInBytes, long cacheInBytes,
                              long swapInBytes, long startTimeNanos) {
    public ProcessMemoryState(int uid, int pid, String processName, int oomScore) {
        this.uid = uid;
        this.pid = pid;
        this.processName = processName;
        this.oomScore = oomScore;
        this.pgfault = pgfault;
        this.pgmajfault = pgmajfault;
        this.rssInBytes = rssInBytes;
        this.cacheInBytes = cacheInBytes;
        this.swapInBytes = swapInBytes;
        this.startTimeNanos = startTimeNanos;
    }

    private ProcessMemoryState(Parcel in) {
        uid = in.readInt();
        pid = in.readInt();
        processName = in.readString();
        oomScore = in.readInt();
        pgfault = in.readLong();
        pgmajfault = in.readLong();
        rssInBytes = in.readLong();
        cacheInBytes = in.readLong();
        swapInBytes = in.readLong();
        startTimeNanos = in.readLong();
    }

    public static final @android.annotation.NonNull Creator<ProcessMemoryState> CREATOR = new Creator<ProcessMemoryState>() {
@@ -80,13 +63,8 @@ public final class ProcessMemoryState implements Parcelable {
    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(uid);
        parcel.writeInt(pid);
        parcel.writeString(processName);
        parcel.writeInt(oomScore);
        parcel.writeLong(pgfault);
        parcel.writeLong(pgmajfault);
        parcel.writeLong(rssInBytes);
        parcel.writeLong(cacheInBytes);
        parcel.writeLong(swapInBytes);
        parcel.writeLong(startTimeNanos);
    }
}
Loading