Lines Matching refs:proto
44 static void mergeProfileDataIntoProto(service::GraphicsStatsProto* proto,
47 static void dumpAsTextToFd(service::GraphicsStatsProto* proto, int outFd);
84 void mergeProfileDataIntoProto(service::GraphicsStatsProto* proto, const std::string& package, in mergeProfileDataIntoProto() argument
86 if (proto->stats_start() == 0 || proto->stats_start() > startTime) { in mergeProfileDataIntoProto()
87 proto->set_stats_start(startTime); in mergeProfileDataIntoProto()
89 if (proto->stats_end() == 0 || proto->stats_end() < endTime) { in mergeProfileDataIntoProto()
90 proto->set_stats_end(endTime); in mergeProfileDataIntoProto()
92 proto->set_package_name(package); in mergeProfileDataIntoProto()
93 proto->set_version_code(versionCode); in mergeProfileDataIntoProto()
94 auto summary = proto->mutable_summary(); in mergeProfileDataIntoProto()
109 if (proto->histogram_size() == 0) { in mergeProfileDataIntoProto()
110 proto->mutable_histogram()->Reserve(sHistogramSize); in mergeProfileDataIntoProto()
112 } else if (proto->histogram_size() != sHistogramSize) { in mergeProfileDataIntoProto()
114 proto->histogram_size(), sHistogramSize); in mergeProfileDataIntoProto()
120 bucket = proto->add_histogram(); in mergeProfileDataIntoProto()
123 bucket = proto->mutable_histogram(i); in mergeProfileDataIntoProto()
133 bucket = proto->add_histogram(); in mergeProfileDataIntoProto()
137 bucket = proto->mutable_histogram(offset + i); in mergeProfileDataIntoProto()
145 static int32_t findPercentile(service::GraphicsStatsProto* proto, int percentile) { in findPercentile() argument
146 int32_t pos = percentile * proto->summary().total_frames() / 100; in findPercentile()
147 int32_t remaining = proto->summary().total_frames() - pos; in findPercentile()
148 for (auto it = proto->histogram().rbegin(); it != proto->histogram().rend(); ++it) { in findPercentile()
157 void dumpAsTextToFd(service::GraphicsStatsProto* proto, int fd) { in dumpAsTextToFd() argument
159 LOG_ALWAYS_FATAL_IF(proto->package_name().empty() in dumpAsTextToFd()
160 || !proto->has_summary(), "package_name() '%s' summary %d", in dumpAsTextToFd()
161 proto->package_name().c_str(), proto->has_summary()); in dumpAsTextToFd()
162 dprintf(fd, "\nPackage: %s", proto->package_name().c_str()); in dumpAsTextToFd()
163 dprintf(fd, "\nVersion: %d", proto->version_code()); in dumpAsTextToFd()
164 dprintf(fd, "\nStats since: %lldns", proto->stats_start()); in dumpAsTextToFd()
165 dprintf(fd, "\nStats end: %lldns", proto->stats_end()); in dumpAsTextToFd()
166 auto summary = proto->summary(); in dumpAsTextToFd()
170 dprintf(fd, "\n50th percentile: %dms", findPercentile(proto, 50)); in dumpAsTextToFd()
171 dprintf(fd, "\n90th percentile: %dms", findPercentile(proto, 90)); in dumpAsTextToFd()
172 dprintf(fd, "\n95th percentile: %dms", findPercentile(proto, 95)); in dumpAsTextToFd()
173 dprintf(fd, "\n99th percentile: %dms", findPercentile(proto, 99)); in dumpAsTextToFd()
180 for (const auto& it : proto->histogram()) { in dumpAsTextToFd()
233 service::GraphicsStatsServiceDumpProto& proto() { return mProto; } in proto() function in android::uirenderer::GraphicsStatsService::Dump
260 dump->proto().add_stats()->CopyFrom(statsProto); in addToDump()
272 dump->proto().add_stats()->CopyFrom(statsProto); in addToDump()
281 dump->proto().SerializeToZeroCopyStream(&stream); in finishDump()