diff options
| author | 2018-10-03 23:28:10 +0000 | |
|---|---|---|
| committer | 2018-10-03 23:28:10 +0000 | |
| commit | e388e27e193cb19bad7eb253da90021132f48193 (patch) | |
| tree | 7d9a688b21a7f26610416e5efb7ccbc847eb61dc /cmds | |
| parent | a23c0f09b5f7a4c20ffac06d19f423ab6e8e5e5d (diff) | |
| parent | ab530203457b1fd76e3f42850461ca32c02b56ca (diff) | |
Merge "pull PowerProfile into statsd"
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/statsd/src/atoms.proto | 12 | ||||
| -rw-r--r-- | cmds/statsd/src/external/StatsCompanionServicePuller.cpp | 2 | ||||
| -rw-r--r-- | cmds/statsd/src/external/StatsPullerManager.cpp | 3 |
3 files changed, 15 insertions, 2 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 988ffc4d95b7..8ab67e32cd59 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -31,6 +31,7 @@ import "frameworks/base/core/proto/android/telephony/enums.proto"; import "frameworks/base/core/proto/android/view/enums.proto"; import "frameworks/base/proto/src/stats_enums.proto"; import "frameworks/base/core/proto/android/service/procstats.proto"; +import "frameworks/base/core/proto/android/internal/powerprofile.proto"; /** * The master atom class. This message defines all of the available @@ -175,10 +176,11 @@ message Atom { DirectoryUsage directory_usage = 10026; AppSize app_size = 10027; CategorySize category_size = 10028; + ProcStats proc_stats = 10029; BatteryVoltage battery_voltage = 10030; NumFingerprints num_fingerprints = 10031; - ProcStats proc_stats = 10029; DiskIo disk_io = 10032; + PowerProfile power_profile = 10033; } // DO NOT USE field numbers above 100,000 in AOSP. @@ -2665,3 +2667,11 @@ message NumFingerprints { message ProcStats { optional android.service.procstats.ProcessStatsSectionProto proc_stats_section = 1; } + +/** + * power_profile.xml and other constants for power model calculations. + * Pulled from PowerProfile.java + */ +message PowerProfile { + optional com.android.internal.os.PowerProfileProto power_profile_proto = 1; +}
\ No newline at end of file diff --git a/cmds/statsd/src/external/StatsCompanionServicePuller.cpp b/cmds/statsd/src/external/StatsCompanionServicePuller.cpp index 6d7bba028974..3eb05a90e3b4 100644 --- a/cmds/statsd/src/external/StatsCompanionServicePuller.cpp +++ b/cmds/statsd/src/external/StatsCompanionServicePuller.cpp @@ -54,7 +54,7 @@ bool StatsCompanionServicePuller::PullInternal(vector<shared_ptr<LogEvent> >* da vector<StatsLogEventWrapper> returned_value; Status status = statsCompanionServiceCopy->pullData(mTagId, &returned_value); if (!status.isOk()) { - ALOGW("StatsCompanionServicePuller::pull failed to pull for %d", mTagId); + ALOGW("StatsCompanionServicePuller::pull failed for %d", mTagId); return false; } data->clear(); diff --git a/cmds/statsd/src/external/StatsPullerManager.cpp b/cmds/statsd/src/external/StatsPullerManager.cpp index fd8671406051..cd215b4bd705 100644 --- a/cmds/statsd/src/external/StatsPullerManager.cpp +++ b/cmds/statsd/src/external/StatsPullerManager.cpp @@ -217,6 +217,9 @@ const std::map<int, PullAtomInfo> StatsPullerManager::kAllPullAtomInfo = { {}, 3 * NS_PER_SEC, new StatsCompanionServicePuller(android::util::DISK_IO)}}, + // PowerProfile constants for power model calculations. + {android::util::POWER_PROFILE, + {{}, {}, 1 * NS_PER_SEC, new StatsCompanionServicePuller(android::util::POWER_PROFILE)}}, }; StatsPullerManager::StatsPullerManager() : mNextPullTimeNs(NO_ALARM_UPDATE) { |