Loading cmds/statsd/Android.bp +12 −4 Original line number Diff line number Diff line Loading @@ -204,6 +204,10 @@ cc_test { ], srcs: [ // atom_field_options.proto needs field_options.proto, but that is // not included in libprotobuf-cpp-lite, so compile it here. ":libprotobuf-internal-protos", "src/atom_field_options.proto", "src/atoms.proto", "src/stats_log.proto", Loading Loading @@ -262,11 +266,11 @@ cc_test { ], proto: { type: "full", type: "lite", include_dirs: ["external/protobuf/src"], }, shared_libs: ["libprotobuf-cpp-full"], shared_libs: ["libprotobuf-cpp-lite"], } Loading @@ -279,6 +283,10 @@ cc_benchmark { defaults: ["statsd_defaults"], srcs: [ // atom_field_options.proto needs field_options.proto, but that is // not included in libprotobuf-cpp-lite, so compile it here. ":libprotobuf-internal-protos", "src/atom_field_options.proto", "src/atoms.proto", "src/stats_log.proto", Loading @@ -293,7 +301,7 @@ cc_benchmark { ], proto: { type: "full", type: "lite", include_dirs: ["external/protobuf/src"], }, Loading @@ -315,7 +323,7 @@ cc_benchmark { shared_libs: [ "libgtest_prod", "libstatslog", "libprotobuf-cpp-full", "libprotobuf-cpp-lite", ], } Loading cmds/statsd/src/anomaly/AnomalyTracker.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "subscriber/IncidentdReporter.h" #include "subscriber/SubscriberReporter.h" #include <inttypes.h> #include <statslog.h> #include <time.h> Loading Loading @@ -224,7 +225,7 @@ void AnomalyTracker::declareAnomaly(const int64_t& timestampNs, int64_t metricId } if (!mSubscriptions.empty()) { ALOGI("An anomaly (%lld) %s has occurred! Informing subscribers.", ALOGI("An anomaly (%" PRId64 ") %s has occurred! Informing subscribers.", mAlert.id(), key.toString().c_str()); informSubscribers(key, metricId, metricValue); } else { Loading cmds/statsd/src/metrics/metrics_manager_util.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ #include "stats_util.h" #include "statslog.h" #include <inttypes.h> using std::set; using std::string; using std::unordered_map; Loading Loading @@ -593,7 +595,7 @@ bool initMetrics(const ConfigKey& key, const StatsdConfig& config, const int64_t for (int i = 0; i < config.no_report_metric_size(); ++i) { const auto no_report_metric = config.no_report_metric(i); if (metricMap.find(no_report_metric) == metricMap.end()) { ALOGW("no_report_metric %lld not exist", no_report_metric); ALOGW("no_report_metric %" PRId64 " not exist", no_report_metric); return false; } noReportMetricIds.insert(no_report_metric); Loading libs/hwui/service/GraphicsStatsService.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -282,9 +282,9 @@ void dumpAsTextToFd(protos::GraphicsStatsProto* proto, int fd) { return; } dprintf(fd, "\nPackage: %s", proto->package_name().c_str()); dprintf(fd, "\nVersion: %lld", proto->version_code()); dprintf(fd, "\nStats since: %lldns", proto->stats_start()); dprintf(fd, "\nStats end: %lldns", proto->stats_end()); dprintf(fd, "\nVersion: %" PRId64, proto->version_code()); dprintf(fd, "\nStats since: %" PRId64 "ns", proto->stats_start()); dprintf(fd, "\nStats end: %" PRId64 "ns", proto->stats_end()); auto summary = proto->summary(); dprintf(fd, "\nTotal frames rendered: %d", summary.total_frames()); dprintf(fd, "\nJanky frames: %d (%.2f%%)", summary.janky_frames(), Loading libs/protoutil/include/android/util/ProtoOutputStream.h +1 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ public: bool write(uint64_t fieldId, double val); bool write(uint64_t fieldId, float val); bool write(uint64_t fieldId, int val); bool write(uint64_t fieldId, long val); bool write(uint64_t fieldId, long long val); bool write(uint64_t fieldId, bool val); bool write(uint64_t fieldId, std::string val); Loading Loading
cmds/statsd/Android.bp +12 −4 Original line number Diff line number Diff line Loading @@ -204,6 +204,10 @@ cc_test { ], srcs: [ // atom_field_options.proto needs field_options.proto, but that is // not included in libprotobuf-cpp-lite, so compile it here. ":libprotobuf-internal-protos", "src/atom_field_options.proto", "src/atoms.proto", "src/stats_log.proto", Loading Loading @@ -262,11 +266,11 @@ cc_test { ], proto: { type: "full", type: "lite", include_dirs: ["external/protobuf/src"], }, shared_libs: ["libprotobuf-cpp-full"], shared_libs: ["libprotobuf-cpp-lite"], } Loading @@ -279,6 +283,10 @@ cc_benchmark { defaults: ["statsd_defaults"], srcs: [ // atom_field_options.proto needs field_options.proto, but that is // not included in libprotobuf-cpp-lite, so compile it here. ":libprotobuf-internal-protos", "src/atom_field_options.proto", "src/atoms.proto", "src/stats_log.proto", Loading @@ -293,7 +301,7 @@ cc_benchmark { ], proto: { type: "full", type: "lite", include_dirs: ["external/protobuf/src"], }, Loading @@ -315,7 +323,7 @@ cc_benchmark { shared_libs: [ "libgtest_prod", "libstatslog", "libprotobuf-cpp-full", "libprotobuf-cpp-lite", ], } Loading
cmds/statsd/src/anomaly/AnomalyTracker.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "subscriber/IncidentdReporter.h" #include "subscriber/SubscriberReporter.h" #include <inttypes.h> #include <statslog.h> #include <time.h> Loading Loading @@ -224,7 +225,7 @@ void AnomalyTracker::declareAnomaly(const int64_t& timestampNs, int64_t metricId } if (!mSubscriptions.empty()) { ALOGI("An anomaly (%lld) %s has occurred! Informing subscribers.", ALOGI("An anomaly (%" PRId64 ") %s has occurred! Informing subscribers.", mAlert.id(), key.toString().c_str()); informSubscribers(key, metricId, metricValue); } else { Loading
cmds/statsd/src/metrics/metrics_manager_util.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ #include "stats_util.h" #include "statslog.h" #include <inttypes.h> using std::set; using std::string; using std::unordered_map; Loading Loading @@ -593,7 +595,7 @@ bool initMetrics(const ConfigKey& key, const StatsdConfig& config, const int64_t for (int i = 0; i < config.no_report_metric_size(); ++i) { const auto no_report_metric = config.no_report_metric(i); if (metricMap.find(no_report_metric) == metricMap.end()) { ALOGW("no_report_metric %lld not exist", no_report_metric); ALOGW("no_report_metric %" PRId64 " not exist", no_report_metric); return false; } noReportMetricIds.insert(no_report_metric); Loading
libs/hwui/service/GraphicsStatsService.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -282,9 +282,9 @@ void dumpAsTextToFd(protos::GraphicsStatsProto* proto, int fd) { return; } dprintf(fd, "\nPackage: %s", proto->package_name().c_str()); dprintf(fd, "\nVersion: %lld", proto->version_code()); dprintf(fd, "\nStats since: %lldns", proto->stats_start()); dprintf(fd, "\nStats end: %lldns", proto->stats_end()); dprintf(fd, "\nVersion: %" PRId64, proto->version_code()); dprintf(fd, "\nStats since: %" PRId64 "ns", proto->stats_start()); dprintf(fd, "\nStats end: %" PRId64 "ns", proto->stats_end()); auto summary = proto->summary(); dprintf(fd, "\nTotal frames rendered: %d", summary.total_frames()); dprintf(fd, "\nJanky frames: %d (%.2f%%)", summary.janky_frames(), Loading
libs/protoutil/include/android/util/ProtoOutputStream.h +1 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ public: bool write(uint64_t fieldId, double val); bool write(uint64_t fieldId, float val); bool write(uint64_t fieldId, int val); bool write(uint64_t fieldId, long val); bool write(uint64_t fieldId, long long val); bool write(uint64_t fieldId, bool val); bool write(uint64_t fieldId, std::string val); Loading