Skip to content
Snippets Groups Projects
Commit a25ad051 authored by Matt Buckley's avatar Matt Buckley
Browse files

[DO NOT MERGE] Revert "Send cached target duration when creating sessions"

This reverts commit 73b143c6.

Reason for revert: Performance issues

Bug: 300360668
Bug: 302620048

Change-Id: I2a00c0498392a49f64d1f0e523d3ccbc9b345c57
parent 73b143c6
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,6 @@ void HintSessionWrapper::destroy() {
mSessionValid = true;
mHintSession = nullptr;
}
mResetsSinceLastReport = 0;
}
bool HintSessionWrapper::init() {
......@@ -112,10 +111,10 @@ bool HintSessionWrapper::init() {
// Use a placeholder target value to initialize,
// this will always be replaced elsewhere before it gets used
int64_t targetDurationNanos =
mLastTargetWorkDuration == 0 ? kDefaultTargetDuration : mLastTargetWorkDuration;
int64_t defaultTargetDurationNanos = 16666667;
mHintSessionFuture = CommonPool::async([=, this, tids = std::move(tids)] {
return mBinding->createSession(manager, tids.data(), tids.size(), targetDurationNanos);
return mBinding->createSession(manager, tids.data(), tids.size(),
defaultTargetDurationNanos);
});
return false;
}
......
......@@ -65,7 +65,6 @@ private:
static constexpr nsecs_t kResetHintTimeout = 100_ms;
static constexpr int64_t kSanityCheckLowerBound = 100_us;
static constexpr int64_t kSanityCheckUpperBound = 10_s;
static constexpr int64_t kDefaultTargetDuration = 16666667;
// Allows easier stub when testing
class HintSessionBinding {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment