Skip to content

Commit 147f08c

Browse files
Priyanka Advani (xWF)Android (Google) Code Review
authored andcommitted
Revert "Add public ADPF load hints with better rate limiter and ..."
Revert submission 29997970-load_hints Reason for revert: Droidmonitor created revert due to b/378700893. Will be verifying through ABTD before submission. Reverted changes: /q/submissionid:29997970-load_hints Change-Id: Ib42a3f0478b84bb36d0a49a311cc3844512f094a
1 parent 122a117 commit 147f08c

2 files changed

Lines changed: 1 addition & 75 deletions

File tree

include/android/performance_hint.h

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,9 @@
1919
*
2020
* APerformanceHint allows apps to create performance hint sessions for groups
2121
* of threads, and provide hints to the system about the workload of those threads,
22-
* to help the system more accurately allocate resources for them. It is the NDK
22+
* to help the system more accurately allocate power for them. It is the NDK
2323
* counterpart to the Java PerformanceHintManager SDK API.
2424
*
25-
* This API is intended for periodic workloads, such as frame production. Clients are
26-
* expected to create an instance of APerformanceHintManager, create a session with
27-
* that, and then set a target duration for the session. Then, they can report the actual
28-
* work duration at the end of each cycle to inform the framework about how long those
29-
* workloads are taking. The framework will then compare the actual durations to the target
30-
* duration and attempt to help the client reach a steady state under the target.
31-
*
32-
* Unlike reportActualWorkDuration, the "notify..." hints are intended to be sent in
33-
* advance of large changes in the workload, to prevent them from going over the target
34-
* when there is a sudden, unforseen change. Their effects are intended to last for only
35-
* one cycle, after which reportActualWorkDuration will have a chance to catch up.
36-
* These hints should be used judiciously, only in cases where the workload is changing
37-
* substantially. To enforce that, they are tracked using a per-app rate limiter to avoid
38-
* excessive hinting and encourage clients to be mindful about when to send them.
3925
* @{
4026
*/
4127

@@ -264,54 +250,6 @@ int APerformanceHint_reportActualWorkDuration2(
264250
APerformanceHintSession* _Nonnull session,
265251
AWorkDuration* _Nonnull workDuration) __INTRODUCED_IN(__ANDROID_API_V__);
266252

267-
/**
268-
* Informs the framework of an upcoming increase in the workload of a graphics pipeline
269-
* bound to this session. The user can specify whether the increase is expected to be
270-
* on the CPU, GPU, or both.
271-
*
272-
* Sending hints for both CPU and GPU counts as two separate hints for the purposes of the
273-
* rate limiter.
274-
*
275-
* @param cpu Indicates if the workload increase is expected to affect the CPU.
276-
* @param gpu Indicates if the workload increase is expected to affect the GPU.
277-
* @param debugName A required string used to identify this specific hint during
278-
* tracing. This debug string will only be held for the duration of the
279-
* method, and can be safely discarded after.
280-
*
281-
* @return 0 on success.
282-
* EINVAL if no hints were requested.
283-
* EBUSY if the hint was rate limited.
284-
* EPIPE if communication with the system service has failed.
285-
* ENOTSUP if the hint is not supported.
286-
*/
287-
int APerformanceHint_notifyWorkloadIncrease(
288-
APerformanceHintSession* _Nonnull session,
289-
bool cpu, bool gpu, const char* _Nonnull debugName) __INTRODUCED_IN(36);
290-
291-
/**
292-
* Informs the framework of an upcoming reset in the workload of a graphics pipeline
293-
* bound to this session, or the imminent start of a new workload. The user can specify
294-
* whether the reset is expected to affect the CPU, GPU, or both.
295-
*
296-
* Sending hints for both CPU and GPU counts as two separate hints for the purposes of the
297-
* this load tracking.
298-
*
299-
* @param cpu Indicates if the workload reset is expected to affect the CPU.
300-
* @param gpu Indicates if the workload reset is expected to affect the GPU.
301-
* @param debugName A required string used to identify this specific hint during
302-
* tracing. This debug string will only be held for the duration of the
303-
* method, and can be safely discarded after.
304-
*
305-
* @return 0 on success.
306-
* EINVAL if no hints were requested.
307-
* EBUSY if the hint was rate limited.
308-
* EPIPE if communication with the system service has failed.
309-
* ENOTSUP if the hint is not supported.
310-
*/
311-
int APerformanceHint_notifyWorkloadReset(
312-
APerformanceHintSession* _Nonnull session,
313-
bool cpu, bool gpu, const char* _Nonnull debugName) __INTRODUCED_IN(36);
314-
315253
/**
316254
* Creates a new AWorkDuration. When the client finishes using {@link AWorkDuration}, it should
317255
* call {@link AWorkDuration_release()} to destroy {@link AWorkDuration} and release all resources

include/private/performance_hint_private.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,6 @@ APerformanceHintSession* APerformanceHint_createSessionInternal(APerformanceHint
114114
*/
115115
void APerformanceHint_setUseFMQForTesting(bool enabled);
116116

117-
/**
118-
* Get the rate limiter properties for testing.
119-
*/
120-
void APerformanceHint_getRateLimiterPropertiesForTesting(
121-
int32_t* maxLoadHintsPerInterval, int64_t* loadHintInterval);
122-
123-
/*
124-
* Forces the "new load hint" flag to be disabled for testing.
125-
*/
126-
void APerformanceHint_setUseNewLoadHintBehaviorForTesting(bool newBehavior);
127-
128-
129117
__END_DECLS
130118

131119
#endif // ANDROID_PRIVATE_NATIVE_PERFORMANCE_HINT_PRIVATE_H

0 commit comments

Comments
 (0)