Home
last modified time | relevance | path

Searched refs:Uid (Results 1 – 25 of 105) sorted by relevance

12345

/frameworks/native/libs/gui/include/gui/
DPidUid.h42 struct Uid : ftl::Constructible<Uid, uid_t>, ftl::Equatable<Uid>, ftl::Orderable<Uid> { struct
45 const static Uid INVALID; argument
54 const inline Uid Uid::INVALID{static_cast<uid_t>(-1)}; argument
/frameworks/base/services/core/java/com/android/server/power/stats/
DSensorPowerCalculator.java67 private double calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
77 private long calculateDuration(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in calculateDuration()
79 final SparseArray<? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats(); in calculateDuration()
83 if (sensorHandle == BatteryStats.Uid.Sensor.GPS) { in calculateDuration()
87 final BatteryStats.Uid.Sensor sensor = sensorStats.valueAt(ise); in calculateDuration()
94 private double calculatePowerMah(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in calculatePowerMah()
96 final SparseArray<? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats(); in calculatePowerMah()
101 if (sensorHandle == BatteryStats.Uid.Sensor.GPS) { in calculatePowerMah()
105 final BatteryStats.Uid.Sensor sensor = sensorStats.valueAt(ise); in calculatePowerMah()
DGnssPowerCalculator.java86 private double calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
105 private long computeDuration(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in computeDuration()
106 final SparseArray<? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats(); in computeDuration()
107 final BatteryStats.Uid.Sensor sensor = sensorStats.get(BatteryStats.Uid.Sensor.GPS); in computeDuration()
DCpuPowerCalculator.java142 private void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
166 BatteryStats.Uid u, BatteryConsumer.Key[] keys) { in calculateEnergyConsumptionPerProcessState()
185 BatteryStats.Uid u, BatteryConsumer.Key[] keys, Result result) { in calculateModeledPowerPerProcessState()
192 for (int uidProcState = 0; uidProcState < BatteryStats.Uid.NUM_PROCESS_STATE; in calculateModeledPowerPerProcessState()
224 private void calculatePowerAndDuration(BatteryStats.Uid u, in calculatePowerAndDuration()
249 final ArrayMap<String, ? extends BatteryStats.Uid.Proc> processStats = u.getProcessStats(); in calculatePowerAndDuration()
252 final BatteryStats.Uid.Proc ps = processStats.valueAt(i); in calculatePowerAndDuration()
289 public double calculateUidModeledPowerMah(BatteryStats.Uid u, int statsType) { in calculateUidModeledPowerMah()
294 private double calculateUidModeledPowerMah(BatteryStats.Uid u, long cpuActiveTime, in calculateUidModeledPowerMah()
DBatteryUsageStatsProvider.java208 SparseArray<? extends BatteryStats.Uid> uidStats = stats.getUidStats(); in getCurrentBatteryUsageStats()
210 final BatteryStats.Uid uid = uidStats.valueAt(i); in getCurrentBatteryUsageStats()
304 private long getProcessForegroundTimeMs(BatteryStats.Uid uid, long realtimeUs) { in getProcessForegroundTimeMs()
305 final long topStateDurationUs = uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_TOP, in getProcessForegroundTimeMs()
319 BatteryStats.Uid.PROCESS_STATE_FOREGROUND, realtimeUs, in getProcessForegroundTimeMs()
325 private long getProcessBackgroundTimeMs(BatteryStats.Uid uid, long realtimeUs) { in getProcessBackgroundTimeMs()
326 return uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_BACKGROUND, in getProcessBackgroundTimeMs()
331 private long getProcessForegroundServiceTimeMs(BatteryStats.Uid uid, long realtimeUs) { in getProcessForegroundServiceTimeMs()
332 return uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE, in getProcessForegroundServiceTimeMs()
DScreenPowerCalculator.java148 BatteryStats.Uid u, long rawRealtimeUs) { in calculateAppUsingEnergyConsumption()
199 final BatteryStats.Uid uid = app.getBatteryStatsUid(); in smearScreenBatteryDrain()
222 public long getProcessForegroundTimeMs(BatteryStats.Uid uid, long rawRealTimeUs) { in getProcessForegroundTimeMs()
223 final int[] foregroundTypes = {BatteryStats.Uid.PROCESS_STATE_TOP}; in getProcessForegroundTimeMs()
239 public long getForegroundActivityTotalTimeUs(BatteryStats.Uid uid, long rawRealtimeUs) { in getForegroundActivityTotalTimeUs()
DSystemServicePowerCalculator.java68 final BatteryStats.Uid systemUid = batteryStats.getUidStats().get(Process.SYSTEM_UID); in calculate()
103 final BatteryStats.Uid uid = app.getBatteryStatsUid(); in calculate()
121 BatteryStats.Uid systemUid, long consumptionUC) { in calculatePowerUsingEnergyConsumption()
DWakelockPowerCalculator.java109 private void calculateApp(PowerAndDuration result, BatteryStats.Uid u, long rawRealtimeUs, in calculateApp()
112 final ArrayMap<String, ? extends BatteryStats.Uid.Wakelock> wakelockStats = in calculateApp()
116 final BatteryStats.Uid.Wakelock wakelock = wakelockStats.valueAt(i); in calculateApp()
DBatteryStatsImpl.java21 import static android.os.BatteryStats.Uid.NUM_PROCESS_STATE;
22 import static android.os.BatteryStats.Uid.NUM_WIFI_BATCHED_SCAN_BINS;
705 final Uid u = getUidStatsLocked(uid); in updateProcStateCpuTimesLocked()
773 final Uid u = getAvailableUidStatsLocked(parentUid); in updateCpuTimesForAllUids()
779 if (procState == Uid.PROCESS_STATE_NONEXISTENT) { in updateCpuTimesForAllUids()
796 Uid.ChildUid childUid = u.getChildUid(uid); in updateCpuTimesForAllUids()
891 private final SparseArray<BatteryStatsImpl.Uid> mUidStats = new SparseArray<>();
1694 final Uid uid = mUidStats.valueAt(i); in getWakeLockStats()
1697 final ArrayMap<String, ? extends BatteryStats.Uid.Wakelock> wakelockStats = in getWakeLockStats()
1701 final Uid.Wakelock wakelock = (Uid.Wakelock) wakelockStats.valueAt(j); in getWakeLockStats()
[all …]
/frameworks/base/tools/powermodel/src/com/android/powermodel/
DSpecialApp.java46 REMAINDER(Uid.UID_SYNTHETIC),
52 GLOBAL(Uid.UID_SYNTHETIC),
56 GOOGLE_SERVICES(Uid.UID_VARIES);
61 public static class Uid { class in SpecialApp
/frameworks/base/services/core/java/com/android/server/am/
DHealthStatsBatteryStatsWriter.java50 public void writeUid(HealthStatsWriter uidWriter, BatteryStats bs, BatteryStats.Uid uid) { in writeUid()
53 SparseArray<? extends BatteryStats.Uid.Sensor> sensors; in writeUid()
54 SparseArray<? extends BatteryStats.Uid.Pid> pids; in writeUid()
85 for (final Map.Entry<String,? extends BatteryStats.Uid.Wakelock> entry: in writeUid()
88 final BatteryStats.Uid.Wakelock wakelock = entry.getValue(); in writeUid()
126 if (sensorId == BatteryStats.Uid.Sensor.GPS) { in writeUid()
145 for (final Map.Entry<String,? extends BatteryStats.Uid.Proc> entry: in writeUid()
153 for (final Map.Entry<String,? extends BatteryStats.Uid.Pkg> entry: in writeUid()
255 uid.getProcessStateTimer(BatteryStats.Uid.PROCESS_STATE_TOP)); in writeUid()
259 uid.getProcessStateTimer(BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE)); in writeUid()
[all …]
/frameworks/native/services/inputflinger/
DInputDeviceMetricsCollector.h47 const std::set<gui::Uid>& uids) = 0;
76 std::vector<std::pair<gui::Uid, std::chrono::nanoseconds /*duration*/>>;
120 const std::set<gui::Uid>& uids) override;
140 using Uid = gui::Uid; variable
145 using Interaction = std::tuple<DeviceId, std::chrono::nanoseconds, std::set<Uid>>;
169 std::map<Uid, UsageSession> mActiveSessionsByUid{};
DInputDeviceMetricsCollector.cpp210 const std::set<Uid>& uids) { in notifyDeviceInteraction()
357 for (Uid uid : std::get<std::set<Uid>>(interaction)) { in recordInteraction()
380 std::vector<Uid> completedUidSessionsForDevice; in checkIfCompletedAt()
386 for (Uid uid : completedUidSessionsForDevice) { in checkIfCompletedAt()
/frameworks/native/services/inputflinger/dispatcher/
DInjectionState.h27 const std::optional<gui::Uid> targetUid;
32 explicit InjectionState(const std::optional<gui::Uid>& targetUid, bool isAsync);
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DBatteryStatsCpuTimesTest.java262 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateClusterSpeedTimes()
305 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked()
339 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked()
379 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked_isolatedUid()
414 BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked_isolatedUid()
470 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked_invalidUid()
519 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked_withPartialTimers()
537 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(partialTimerUids[i]); in testReadKernelUidCpuTimesLocked_withPartialTimers()
553 final BatteryStats.Uid.Proc proc = u.getProcessStats().get("*wakelock*"); in testReadKernelUidCpuTimesLocked_withPartialTimers()
596 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuFreqTimesLocked()
[all …]
DBatteryStatsImplTest.java19 import static android.os.BatteryStats.Uid.NUM_PROCESS_STATE;
20 import static android.os.BatteryStats.Uid.PROCESS_STATE_BACKGROUND;
21 import static android.os.BatteryStats.Uid.PROCESS_STATE_CACHED;
22 import static android.os.BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE;
23 import static android.os.BatteryStats.Uid.PROCESS_STATE_TOP;
190 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStatsLocked(testUids[i]); in testUpdateProcStateCpuTimes()
215 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateProcStateCpuTimes()
249 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateProcStateCpuTimes()
290 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateProcStateCpuTimes()
339 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateProcStateCpuTimes()
[all …]
DGnssPowerCalculatorTest.java57 BatteryStatsImpl.Uid uidStats = mStatsRule.getUidStats(APP_UID); in testTimerBasedModel()
89 BatteryStatsImpl.Uid uidStats = mStatsRule.getUidStats(APP_UID); in testMeasuredEnergyBasedModel()
93 BatteryStatsImpl.Uid uidStats2 = mStatsRule.getUidStats(APP_UID2); in testMeasuredEnergyBasedModel()
DBluetoothPowerCalculatorTest.java103 BatteryStatsImpl.Uid uid = batteryStats.getUidStatsLocked(APP_UID); in testTimerBasedModel_byProcessState()
105 BatteryStats.Uid.PROCESS_STATE_FOREGROUND, 1000); in testTimerBasedModel_byProcessState()
119 BatteryStats.Uid.PROCESS_STATE_BACKGROUND, 3000); in testTimerBasedModel_byProcessState()
224 BatteryStatsImpl.Uid uid = batteryStats.getUidStatsLocked(APP_UID); in testMeasuredEnergyBasedModel_byProcessState()
226 BatteryStats.Uid.PROCESS_STATE_FOREGROUND, 1000); in testMeasuredEnergyBasedModel_byProcessState()
241 BatteryStats.Uid.PROCESS_STATE_BACKGROUND, 3000); in testMeasuredEnergyBasedModel_byProcessState()
DCpuPowerCalculatorTest.java309 BatteryStats.Uid.PROCESS_STATE_FOREGROUND, 1000); in testTimerBasedModel_byProcessState()
311 BatteryStats.Uid.PROCESS_STATE_BACKGROUND, 1000); in testTimerBasedModel_byProcessState()
347 BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE, 2000); in testTimerBasedModel_byProcessState()
349 BatteryStats.Uid.PROCESS_STATE_TOP, 2000); in testTimerBasedModel_byProcessState()
422 BatteryStats.Uid.PROCESS_STATE_FOREGROUND, 1000); in testMeasuredEnergyBasedModel_perProcessState()
424 BatteryStats.Uid.PROCESS_STATE_BACKGROUND, 1000); in testMeasuredEnergyBasedModel_perProcessState()
448 BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE, 2000); in testMeasuredEnergyBasedModel_perProcessState()
450 BatteryStats.Uid.PROCESS_STATE_TOP, 2000); in testMeasuredEnergyBasedModel_perProcessState()
DBstatsCpuTimesValidationTest.java20 import static android.os.BatteryStats.Uid.NUM_PROCESS_STATE;
21 import static android.os.BatteryStats.Uid.PROCESS_STATE_BACKGROUND;
22 import static android.os.BatteryStats.Uid.PROCESS_STATE_CACHED;
23 import static android.os.BatteryStats.Uid.PROCESS_STATE_FOREGROUND;
24 import static android.os.BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE;
25 import static android.os.BatteryStats.Uid.PROCESS_STATE_TOP;
26 import static android.os.BatteryStats.Uid.PROCESS_STATE_TOP_SLEEPING;
27 import static android.os.BatteryStats.Uid.UID_PROCESS_TYPES;
619 : "expected=" + getStateName(BatteryStats.Uid.class, expectedState) in assertProcState()
620 + ", actual=" + getStateName(BatteryStats.Uid.class, actualState) in assertProcState()
DUserPowerCalculatorTest.java120 BatteryStatsImpl.Uid uidStats = mStatsRule.getUidStats(UserHandle.getUid(userId, uid)); in prepareUidBatteryConsumer()
143 protected void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
159 protected void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
/frameworks/native/services/inputflinger/dispatcher/trace/
DInputTracingBackendInterface.h99 std::set<gui::Uid> targets;
111 gui::Uid targetUid;
DInputTracingPerfettoBackend.cpp37 bool isPermanentlyAllowed(gui::Uid uid) { in isPermanentlyAllowed()
64 gui::Uid getPackageUid(const sp<content::pm::IPackageManagerNative>& pm, in getPackageUid()
71 return gui::Uid::INVALID; in getPackageUid()
73 return gui::Uid{static_cast<uid_t>(outUid)}; in getPackageUid()
/frameworks/base/core/java/android/os/
DBatteryStats.java661 return Uid.PROCESS_STATE_NONEXISTENT; in mapToInternalProcessState()
663 return Uid.PROCESS_STATE_TOP; in mapToInternalProcessState()
665 return Uid.PROCESS_STATE_BACKGROUND; in mapToInternalProcessState()
667 return Uid.PROCESS_STATE_FOREGROUND_SERVICE; in mapToInternalProcessState()
669 return Uid.PROCESS_STATE_FOREGROUND_SERVICE; in mapToInternalProcessState()
672 return Uid.PROCESS_STATE_FOREGROUND; in mapToInternalProcessState()
674 return Uid.PROCESS_STATE_BACKGROUND; in mapToInternalProcessState()
676 return Uid.PROCESS_STATE_TOP_SLEEPING; in mapToInternalProcessState()
678 return Uid.PROCESS_STATE_HEAVY_WEIGHT; in mapToInternalProcessState()
680 return Uid.PROCESS_STATE_CACHED; in mapToInternalProcessState()
[all …]
DUidBatteryConsumer.java230 private final BatteryStats.Uid mBatteryStatsUid;
236 public Builder(BatteryConsumerData data, @NonNull BatteryStats.Uid batteryStatsUid, in Builder()
245 private Builder(BatteryConsumerData data, @Nullable BatteryStats.Uid batteryStatsUid, in Builder()
255 public BatteryStats.Uid getBatteryStatsUid() { in getBatteryStatsUid()

12345