Loading apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java +0 −20 Original line number Diff line number Diff line Loading @@ -1502,21 +1502,6 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { } } private void pullPowerProfile( int tagId, long elapsedNanos, long wallClockNanos, List<StatsLogEventWrapper> pulledData) { PowerProfile powerProfile = new PowerProfile(mContext); Objects.requireNonNull(powerProfile); StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, elapsedNanos, wallClockNanos); ProtoOutputStream proto = new ProtoOutputStream(); powerProfile.dumpDebug(proto); proto.flush(); e.writeStorage(proto.getBytes()); pulledData.add(e); } private void pullBuildInformation(int tagId, long elapsedNanos, long wallClockNanos, List<StatsLogEventWrapper> pulledData) { StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, elapsedNanos, wallClockNanos); Loading Loading @@ -2261,11 +2246,6 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { break; } case StatsLog.POWER_PROFILE: { pullPowerProfile(tagId, elapsedNanos, wallClockNanos, ret); break; } case StatsLog.BUILD_INFORMATION: { pullBuildInformation(tagId, elapsedNanos, wallClockNanos, ret); break; Loading cmds/statsd/src/external/StatsPullerManager.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -224,10 +224,6 @@ std::map<PullerKey, PullAtomInfo> StatsPullerManager::kAllPullAtomInfo = { .coolDownNs = 3 * NS_PER_SEC, .puller = new StatsCompanionServicePuller(android::util::DISK_IO)}}, // PowerProfile constants for power model calculations. {{.atomTag = android::util::POWER_PROFILE}, {.puller = new StatsCompanionServicePuller(android::util::POWER_PROFILE)}}, // Process cpu stats. Min cool-down is 5 sec, inline with what AcitivityManagerService uses. {{.atomTag = android::util::PROCESS_CPU_TIME}, {.coolDownNs = 5 * NS_PER_SEC /* min cool-down in seconds*/, Loading services/core/java/com/android/server/stats/StatsPullAtomService.java +18 −3 Original line number Diff line number Diff line Loading @@ -911,11 +911,26 @@ public class StatsPullAtomService extends SystemService { } private void registerPowerProfile() { // No op. int tagId = StatsLog.POWER_PROFILE; mStatsManager.registerPullAtomCallback( tagId, /* PullAtomMetadata */ null, (atomTag, data) -> pullPowerProfile(atomTag, data), Executors.newSingleThreadExecutor() ); } private void pullPowerProfile() { // No op. private int pullPowerProfile(int atomTag, List<StatsEvent> pulledData) { PowerProfile powerProfile = new PowerProfile(mContext); ProtoOutputStream proto = new ProtoOutputStream(); powerProfile.dumpDebug(proto); proto.flush(); StatsEvent e = StatsEvent.newBuilder() .setAtomId(atomTag) .writeByteArray(proto.getBytes()) .build(); pulledData.add(e); return StatsManager.PULL_SUCCESS; } private void registerProcessCpuTime() { Loading Loading
apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java +0 −20 Original line number Diff line number Diff line Loading @@ -1502,21 +1502,6 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { } } private void pullPowerProfile( int tagId, long elapsedNanos, long wallClockNanos, List<StatsLogEventWrapper> pulledData) { PowerProfile powerProfile = new PowerProfile(mContext); Objects.requireNonNull(powerProfile); StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, elapsedNanos, wallClockNanos); ProtoOutputStream proto = new ProtoOutputStream(); powerProfile.dumpDebug(proto); proto.flush(); e.writeStorage(proto.getBytes()); pulledData.add(e); } private void pullBuildInformation(int tagId, long elapsedNanos, long wallClockNanos, List<StatsLogEventWrapper> pulledData) { StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, elapsedNanos, wallClockNanos); Loading Loading @@ -2261,11 +2246,6 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { break; } case StatsLog.POWER_PROFILE: { pullPowerProfile(tagId, elapsedNanos, wallClockNanos, ret); break; } case StatsLog.BUILD_INFORMATION: { pullBuildInformation(tagId, elapsedNanos, wallClockNanos, ret); break; Loading
cmds/statsd/src/external/StatsPullerManager.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -224,10 +224,6 @@ std::map<PullerKey, PullAtomInfo> StatsPullerManager::kAllPullAtomInfo = { .coolDownNs = 3 * NS_PER_SEC, .puller = new StatsCompanionServicePuller(android::util::DISK_IO)}}, // PowerProfile constants for power model calculations. {{.atomTag = android::util::POWER_PROFILE}, {.puller = new StatsCompanionServicePuller(android::util::POWER_PROFILE)}}, // Process cpu stats. Min cool-down is 5 sec, inline with what AcitivityManagerService uses. {{.atomTag = android::util::PROCESS_CPU_TIME}, {.coolDownNs = 5 * NS_PER_SEC /* min cool-down in seconds*/, Loading
services/core/java/com/android/server/stats/StatsPullAtomService.java +18 −3 Original line number Diff line number Diff line Loading @@ -911,11 +911,26 @@ public class StatsPullAtomService extends SystemService { } private void registerPowerProfile() { // No op. int tagId = StatsLog.POWER_PROFILE; mStatsManager.registerPullAtomCallback( tagId, /* PullAtomMetadata */ null, (atomTag, data) -> pullPowerProfile(atomTag, data), Executors.newSingleThreadExecutor() ); } private void pullPowerProfile() { // No op. private int pullPowerProfile(int atomTag, List<StatsEvent> pulledData) { PowerProfile powerProfile = new PowerProfile(mContext); ProtoOutputStream proto = new ProtoOutputStream(); powerProfile.dumpDebug(proto); proto.flush(); StatsEvent e = StatsEvent.newBuilder() .setAtomId(atomTag) .writeByteArray(proto.getBytes()) .build(); pulledData.add(e); return StatsManager.PULL_SUCCESS; } private void registerProcessCpuTime() { Loading