blob: 77c797353240834adf7665356297617b42423082 [file] [log] [blame]
Yiwei Zhang0102ad22018-05-02 17:37:17 -07001/*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
Alec Mouri9a29e672020-09-14 12:39:14 -070019#include <cstdint>
Dominik Laskowskif6b4ba62021-11-09 12:46:10 -080020#include <deque>
21#include <mutex>
22#include <optional>
23#include <unordered_map>
24#include <variant>
Peiyong Lin65248e02020-04-18 21:15:07 -070025
Adithya Srinivasanf427f762021-06-15 19:46:26 +000026#include <android/hardware/graphics/composer/2.4/IComposerClient.h>
Alec Mouri7d436ec2021-01-27 20:40:50 -080027#include <gui/JankInfo.h>
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -070028#include <gui/LayerMetadata.h>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070029#include <timestatsproto/TimeStatsHelper.h>
30#include <timestatsproto/TimeStatsProtoHeader.h>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070031#include <ui/FenceTime.h>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070032#include <utils/String16.h>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070033#include <utils/Vector.h>
34
Dominik Laskowskif6b4ba62021-11-09 12:46:10 -080035#include <scheduler/Fps.h>
Yiwei Zhang0102ad22018-05-02 17:37:17 -070036
37using namespace android::surfaceflinger;
38
39namespace android {
Yiwei Zhang0102ad22018-05-02 17:37:17 -070040
41class TimeStats {
Alec Mourifb571ea2019-01-24 18:42:10 -080042public:
Ady Abraham8b9e6122021-01-26 19:11:45 -080043 using SetFrameRateVote = TimeStatsHelper::SetFrameRateVote;
44
Alec Mourifb571ea2019-01-24 18:42:10 -080045 virtual ~TimeStats() = default;
46
Tej Singhe2751772021-04-06 22:05:29 -070047 // Process a pull request from statsd.
Robert Carra00eb142022-03-09 13:49:30 -080048 virtual bool onPullAtom(const int atomId, std::string* pulledData);
Alec Mouri8e2f31b2020-01-16 22:04:35 +000049
Alec Mourifb571ea2019-01-24 18:42:10 -080050 virtual void parseArgs(bool asProto, const Vector<String16>& args, std::string& result) = 0;
51 virtual bool isEnabled() = 0;
Oliver Nguyenf3b7c9c2019-05-07 13:28:07 -070052 virtual std::string miniDump() = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -080053
54 virtual void incrementTotalFrames() = 0;
55 virtual void incrementMissedFrames() = 0;
Robert Carra00eb142022-03-09 13:49:30 -080056 virtual void incrementClientCompositionFrames() = 0;
57 virtual void incrementClientCompositionReusedFrames() = 0;
Alec Mouri8de697e2020-03-19 10:52:01 -070058 // Increments the number of times the display refresh rate changed.
59 virtual void incrementRefreshRateSwitches() = 0;
Robert Carra00eb142022-03-09 13:49:30 -080060 // Increments the number of changes in composition strategy
61 // The intention is to reflect the number of changes between hwc and gpu
62 // composition, where "gpu composition" may also include mixed composition.
63 virtual void incrementCompositionStrategyChanges() = 0;
Alec Mouri717bcb62020-02-10 17:07:19 -080064 // Records the most up-to-date count of display event connections.
65 // The stored count will be the maximum ever recoded.
66 virtual void recordDisplayEventConnectionCount(int32_t count) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -080067
Alec Mouri9519bf12019-11-15 16:54:44 -080068 // Records the start and end times for a frame.
69 // The start time is the same as the beginning of a SurfaceFlinger
70 // invalidate message.
71 // The end time corresponds to when SurfaceFlinger finishes submitting the
72 // request to HWC to present a frame.
73 virtual void recordFrameDuration(nsecs_t startTime, nsecs_t endTime) = 0;
Alec Mourie4034bb2019-11-19 12:45:54 -080074 // Records the start time and end times for when RenderEngine begins work.
75 // The start time corresponds to the beginning of RenderEngine::drawLayers.
76 // The end time corresponds to when RenderEngine finishes rendering.
77 virtual void recordRenderEngineDuration(nsecs_t startTime, nsecs_t endTime) = 0;
78 // Same as above, but passes in a fence representing the end time.
79 virtual void recordRenderEngineDuration(nsecs_t startTime,
80 const std::shared_ptr<FenceTime>& readyFence) = 0;
Alec Mouri9519bf12019-11-15 16:54:44 -080081
Yiwei Zhang1a88c402019-11-18 10:43:58 -080082 virtual void setPostTime(int32_t layerId, uint64_t frameNumber, const std::string& layerName,
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -070083 uid_t uid, nsecs_t postTime, GameMode) = 0;
Yiwei Zhang1a88c402019-11-18 10:43:58 -080084 virtual void setLatchTime(int32_t layerId, uint64_t frameNumber, nsecs_t latchTime) = 0;
Alec Mouri91f6df32020-01-30 08:48:58 -080085 // Reasons why latching a particular buffer may be skipped
86 enum class LatchSkipReason {
87 // If the acquire fence did not fire on some devices we skip latching
88 // the buffer until the fence fires.
89 LateAcquire,
90 };
91 // Increments the counter of skipped latch buffers.
92 virtual void incrementLatchSkipped(int32_t layerId, LatchSkipReason reason) = 0;
93 // Increments the counter of bad desired present times for this layer.
94 // Bad desired present times are "implausible" and cause SurfaceFlinger to
95 // latch a buffer immediately to avoid stalling.
96 virtual void incrementBadDesiredPresent(int32_t layerId) = 0;
Yiwei Zhang1a88c402019-11-18 10:43:58 -080097 virtual void setDesiredTime(int32_t layerId, uint64_t frameNumber, nsecs_t desiredTime) = 0;
98 virtual void setAcquireTime(int32_t layerId, uint64_t frameNumber, nsecs_t acquireTime) = 0;
99 virtual void setAcquireFence(int32_t layerId, uint64_t frameNumber,
Alec Mourifb571ea2019-01-24 18:42:10 -0800100 const std::shared_ptr<FenceTime>& acquireFence) = 0;
Alec Mourie4034bb2019-11-19 12:45:54 -0800101 // SetPresent{Time, Fence} are not expected to be called in the critical
102 // rendering path, as they flush prior fences if those fences have fired.
Alec Mouri7d436ec2021-01-27 20:40:50 -0800103 virtual void setPresentTime(int32_t layerId, uint64_t frameNumber, nsecs_t presentTime,
Ady Abraham8b9e6122021-01-26 19:11:45 -0800104 Fps displayRefreshRate, std::optional<Fps> renderRate,
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700105 SetFrameRateVote frameRateVote, GameMode) = 0;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800106 virtual void setPresentFence(int32_t layerId, uint64_t frameNumber,
Alec Mouri7d436ec2021-01-27 20:40:50 -0800107 const std::shared_ptr<FenceTime>& presentFence,
Ady Abraham8b9e6122021-01-26 19:11:45 -0800108 Fps displayRefreshRate, std::optional<Fps> renderRate,
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700109 SetFrameRateVote frameRateVote, GameMode) = 0;
Alec Mouri9a29e672020-09-14 12:39:14 -0700110
Alec Mouri7d436ec2021-01-27 20:40:50 -0800111 // Increments janky frames, blamed to the provided {refreshRate, renderRate, uid, layerName}
112 // key, with JankMetadata as supplementary reasons for the jank. Because FrameTimeline is the
113 // infrastructure responsible for computing jank in the system, this is expected to be called
114 // from FrameTimeline, rather than directly from SurfaceFlinger or individual layers. If there
115 // are no jank reasons, then total frames are incremented but jank is not, for accurate
Alec Mouri9a29e672020-09-14 12:39:14 -0700116 // accounting of janky frames.
Alec Mouri363faf02021-01-29 16:34:55 -0800117 // displayDeadlineDelta, displayPresentJitter, and appDeadlineDelta are also provided in order
118 // to provide contextual information about a janky frame. These values may only be uploaded if
119 // there was an associated valid jank reason, and they must be positive. When these frame counts
120 // are incremented, these are also aggregated into a global reporting packet to help with data
121 // validation and assessing of overall device health.
122 struct JankyFramesInfo {
123 Fps refreshRate;
124 std::optional<Fps> renderRate;
125 uid_t uid = 0;
126 std::string layerName;
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700127 GameMode gameMode = GameMode::Unsupported;
Alec Mouri363faf02021-01-29 16:34:55 -0800128 int32_t reasons = 0;
129 nsecs_t displayDeadlineDelta = 0;
130 nsecs_t displayPresentJitter = 0;
131 nsecs_t appDeadlineDelta = 0;
132
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700133 static bool isOptApproxEqual(std::optional<Fps> lhs, std::optional<Fps> rhs) {
134 return (!lhs && !rhs) || (lhs && rhs && isApproxEqual(*lhs, *rhs));
135 }
136
Alec Mouri363faf02021-01-29 16:34:55 -0800137 bool operator==(const JankyFramesInfo& o) const {
Dominik Laskowski6eab42d2021-09-13 14:34:13 -0700138 return isApproxEqual(refreshRate, o.refreshRate) &&
139 isOptApproxEqual(renderRate, o.renderRate) && uid == o.uid &&
140 layerName == o.layerName && gameMode == o.gameMode && reasons == o.reasons &&
141 displayDeadlineDelta == o.displayDeadlineDelta &&
Alec Mouri363faf02021-01-29 16:34:55 -0800142 displayPresentJitter == o.displayPresentJitter &&
143 appDeadlineDelta == o.appDeadlineDelta;
144 }
145
146 friend std::ostream& operator<<(std::ostream& os, const JankyFramesInfo& info) {
147 os << "JankyFramesInfo {";
148 os << "\n .refreshRate = " << info.refreshRate;
149 os << "\n .renderRate = "
150 << (info.renderRate ? to_string(*info.renderRate) : "nullopt");
151 os << "\n .uid = " << info.uid;
152 os << "\n .layerName = " << info.layerName;
153 os << "\n .reasons = " << info.reasons;
154 os << "\n .displayDeadlineDelta = " << info.displayDeadlineDelta;
155 os << "\n .displayPresentJitter = " << info.displayPresentJitter;
156 os << "\n .appDeadlineDelta = " << info.appDeadlineDelta;
157 return os << "\n}";
158 }
159 };
160
161 virtual void incrementJankyFrames(const JankyFramesInfo& info) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -0800162 // Clean up the layer record
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800163 virtual void onDestroy(int32_t layerId) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -0800164 // If SF skips or rejects a buffer, remove the corresponding TimeRecord.
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800165 virtual void removeTimeRecord(int32_t layerId, uint64_t frameNumber) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -0800166
Peiyong Lin65248e02020-04-18 21:15:07 -0700167 virtual void setPowerMode(
168 hardware::graphics::composer::V2_4::IComposerClient::PowerMode powerMode) = 0;
Alec Mourifb571ea2019-01-24 18:42:10 -0800169 // Source of truth is RefrehRateStats.
170 virtual void recordRefreshRate(uint32_t fps, nsecs_t duration) = 0;
171 virtual void setPresentFenceGlobal(const std::shared_ptr<FenceTime>& presentFence) = 0;
172};
173
174namespace impl {
175
176class TimeStats : public android::TimeStats {
Peiyong Lin65248e02020-04-18 21:15:07 -0700177 using PowerMode = android::hardware::graphics::composer::V2_4::IComposerClient::PowerMode;
178
Yiwei Zhangcf50ab92018-06-14 10:50:12 -0700179 struct FrameTime {
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700180 uint64_t frameNumber = 0;
181 nsecs_t postTime = 0;
182 nsecs_t latchTime = 0;
183 nsecs_t acquireTime = 0;
184 nsecs_t desiredTime = 0;
185 nsecs_t presentTime = 0;
Yiwei Zhangcf50ab92018-06-14 10:50:12 -0700186 };
187
188 struct TimeRecord {
189 bool ready = false;
190 FrameTime frameTime;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700191 std::shared_ptr<FenceTime> acquireFence;
192 std::shared_ptr<FenceTime> presentFence;
193 };
194
195 struct LayerRecord {
Alec Mouri9a29e672020-09-14 12:39:14 -0700196 uid_t uid;
Yiwei Zhang9689e2f2018-05-11 12:33:23 -0700197 std::string layerName;
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700198 GameMode gameMode = GameMode::Unsupported;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700199 // This is the index in timeRecords, at which the timestamps for that
200 // specific frame are still not fully received. This is not waiting for
201 // fences to signal, but rather waiting to receive those fences/timestamps.
202 int32_t waitData = -1;
Yiwei Zhangeaeea062018-06-28 14:46:51 -0700203 uint32_t droppedFrames = 0;
Alec Mouri91f6df32020-01-30 08:48:58 -0800204 uint32_t lateAcquireFrames = 0;
205 uint32_t badDesiredPresentFrames = 0;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700206 TimeRecord prevTimeRecord;
Yiwei Zhangc5f2c452018-05-08 16:31:56 -0700207 std::deque<TimeRecord> timeRecords;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700208 };
209
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700210 struct PowerTime {
Peiyong Lin65248e02020-04-18 21:15:07 -0700211 PowerMode powerMode = PowerMode::OFF;
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700212 nsecs_t prevTime = 0;
213 };
214
Alec Mourie4034bb2019-11-19 12:45:54 -0800215 struct RenderEngineDuration {
216 nsecs_t startTime;
217 std::variant<nsecs_t, std::shared_ptr<FenceTime>> endTime;
218 };
219
Yiwei Zhangce6ebc02018-10-20 12:42:38 -0700220 struct GlobalRecord {
221 nsecs_t prevPresentTime = 0;
222 std::deque<std::shared_ptr<FenceTime>> presentFences;
Alec Mourie4034bb2019-11-19 12:45:54 -0800223 std::deque<RenderEngineDuration> renderEngineDurations;
Yiwei Zhangce6ebc02018-10-20 12:42:38 -0700224 };
225
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700226public:
Alec Mourib3885ad2019-09-06 17:08:55 -0700227 TimeStats();
Alec Mouri8e2f31b2020-01-16 22:04:35 +0000228 // For testing only for injecting custom dependencies.
Tej Singhe2751772021-04-06 22:05:29 -0700229 TimeStats(std::optional<size_t> maxPulledLayers,
Alec Mouri37384342020-01-02 17:23:37 -0800230 std::optional<size_t> maxPulledHistogramBuckets);
Alec Mouri8e2f31b2020-01-16 22:04:35 +0000231
Tej Singhe2751772021-04-06 22:05:29 -0700232 bool onPullAtom(const int atomId, std::string* pulledData) override;
Alec Mourifb571ea2019-01-24 18:42:10 -0800233 void parseArgs(bool asProto, const Vector<String16>& args, std::string& result) override;
234 bool isEnabled() override;
Yiwei Zhang7eb58b72019-04-22 19:00:02 -0700235 std::string miniDump() override;
Yiwei Zhang7e666a52018-11-15 13:33:42 -0800236
Alec Mourifb571ea2019-01-24 18:42:10 -0800237 void incrementTotalFrames() override;
238 void incrementMissedFrames() override;
Robert Carra00eb142022-03-09 13:49:30 -0800239 void incrementClientCompositionFrames() override;
240 void incrementClientCompositionReusedFrames() override;
Alec Mouri8de697e2020-03-19 10:52:01 -0700241 void incrementRefreshRateSwitches() override;
Robert Carra00eb142022-03-09 13:49:30 -0800242 void incrementCompositionStrategyChanges() override;
Alec Mouri717bcb62020-02-10 17:07:19 -0800243 void recordDisplayEventConnectionCount(int32_t count) override;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700244
Alec Mouri9519bf12019-11-15 16:54:44 -0800245 void recordFrameDuration(nsecs_t startTime, nsecs_t endTime) override;
Alec Mourie4034bb2019-11-19 12:45:54 -0800246 void recordRenderEngineDuration(nsecs_t startTime, nsecs_t endTime) override;
247 void recordRenderEngineDuration(nsecs_t startTime,
248 const std::shared_ptr<FenceTime>& readyFence) override;
Alec Mouri9519bf12019-11-15 16:54:44 -0800249
Alec Mouri9a29e672020-09-14 12:39:14 -0700250 void setPostTime(int32_t layerId, uint64_t frameNumber, const std::string& layerName, uid_t uid,
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700251 nsecs_t postTime, GameMode) override;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800252 void setLatchTime(int32_t layerId, uint64_t frameNumber, nsecs_t latchTime) override;
Alec Mouri91f6df32020-01-30 08:48:58 -0800253 void incrementLatchSkipped(int32_t layerId, LatchSkipReason reason) override;
254 void incrementBadDesiredPresent(int32_t layerId) override;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800255 void setDesiredTime(int32_t layerId, uint64_t frameNumber, nsecs_t desiredTime) override;
256 void setAcquireTime(int32_t layerId, uint64_t frameNumber, nsecs_t acquireTime) override;
257 void setAcquireFence(int32_t layerId, uint64_t frameNumber,
Alec Mourifb571ea2019-01-24 18:42:10 -0800258 const std::shared_ptr<FenceTime>& acquireFence) override;
Alec Mouri7d436ec2021-01-27 20:40:50 -0800259 void setPresentTime(int32_t layerId, uint64_t frameNumber, nsecs_t presentTime,
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700260 Fps displayRefreshRate, std::optional<Fps> renderRate, SetFrameRateVote,
261 GameMode) override;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800262 void setPresentFence(int32_t layerId, uint64_t frameNumber,
Alec Mouri7d436ec2021-01-27 20:40:50 -0800263 const std::shared_ptr<FenceTime>& presentFence, Fps displayRefreshRate,
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700264 std::optional<Fps> renderRate, SetFrameRateVote, GameMode) override;
Alec Mouri363faf02021-01-29 16:34:55 -0800265
266 void incrementJankyFrames(const JankyFramesInfo& info) override;
Yiwei Zhangaf8ee942018-11-22 00:15:23 -0800267 // Clean up the layer record
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800268 void onDestroy(int32_t layerId) override;
Yiwei Zhangeaeea062018-06-28 14:46:51 -0700269 // If SF skips or rejects a buffer, remove the corresponding TimeRecord.
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800270 void removeTimeRecord(int32_t layerId, uint64_t frameNumber) override;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700271
Peiyong Lin65248e02020-04-18 21:15:07 -0700272 void setPowerMode(
273 hardware::graphics::composer::V2_4::IComposerClient::PowerMode powerMode) override;
Alec Mourifb571ea2019-01-24 18:42:10 -0800274 // Source of truth is RefrehRateStats.
275 void recordRefreshRate(uint32_t fps, nsecs_t duration) override;
276 void setPresentFenceGlobal(const std::shared_ptr<FenceTime>& presentFence) override;
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700277
Yiwei Zhangaf8ee942018-11-22 00:15:23 -0800278 static const size_t MAX_NUM_TIME_RECORDS = 64;
279
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700280private:
Tej Singhe2751772021-04-06 22:05:29 -0700281 bool populateGlobalAtom(std::string* pulledData);
282 bool populateLayerAtom(std::string* pulledData);
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800283 bool recordReadyLocked(int32_t layerId, TimeRecord* timeRecord);
Alec Mouri7d436ec2021-01-27 20:40:50 -0800284 void flushAvailableRecordsToStatsLocked(int32_t layerId, Fps displayRefreshRate,
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700285 std::optional<Fps> renderRate, SetFrameRateVote,
286 GameMode);
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700287 void flushPowerTimeLocked();
Yiwei Zhangce6ebc02018-10-20 12:42:38 -0700288 void flushAvailableGlobalRecordsToStatsLocked();
Dominik Laskowskif5d0ea52021-09-26 17:27:01 -0700289 bool canAddNewAggregatedStats(uid_t uid, const std::string& layerName, GameMode);
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700290
291 void enable();
292 void disable();
Alec Mouri8e2f31b2020-01-16 22:04:35 +0000293 void clearAll();
294 void clearGlobalLocked();
295 void clearLayersLocked();
Yiwei Zhang5434a782018-12-05 18:06:32 -0800296 void dump(bool asProto, std::optional<uint32_t> maxLayers, std::string& result);
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700297
298 std::atomic<bool> mEnabled = false;
299 std::mutex mMutex;
Yiwei Zhangdc224042018-10-18 15:34:00 -0700300 TimeStatsHelper::TimeStatsGlobal mTimeStats;
Yiwei Zhang1a88c402019-11-18 10:43:58 -0800301 // Hashmap for LayerRecord with layerId as the hash key
Yiwei Zhang9689e2f2018-05-11 12:33:23 -0700302 std::unordered_map<int32_t, LayerRecord> mTimeStatsTracker;
Yiwei Zhang3a226d22018-10-16 09:23:03 -0700303 PowerTime mPowerTime;
Yiwei Zhangce6ebc02018-10-20 12:42:38 -0700304 GlobalRecord mGlobalRecord;
Yiwei Zhang7eb58b72019-04-22 19:00:02 -0700305
306 static const size_t MAX_NUM_LAYER_RECORDS = 200;
Alec Mouri7d436ec2021-01-27 20:40:50 -0800307
308 static const size_t REFRESH_RATE_BUCKET_WIDTH = 30;
309 static const size_t RENDER_RATE_BUCKET_WIDTH = REFRESH_RATE_BUCKET_WIDTH;
Yiwei Zhange926ab52019-08-14 15:16:00 -0700310 static const size_t MAX_NUM_LAYER_STATS = 200;
Alec Mouri52bf7802021-01-20 08:20:50 -0800311 static const size_t MAX_NUM_PULLED_LAYERS = MAX_NUM_LAYER_STATS;
Alec Mouri52bf7802021-01-20 08:20:50 -0800312 size_t mMaxPulledLayers = MAX_NUM_PULLED_LAYERS;
Alec Mouri37384342020-01-02 17:23:37 -0800313 size_t mMaxPulledHistogramBuckets = 6;
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700314};
315
Alec Mourifb571ea2019-01-24 18:42:10 -0800316} // namespace impl
317
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700318} // namespace android