diff options
author | John Reck <jreck@google.com> | 2017-12-15 16:00:48 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2017-12-15 17:00:58 -0800 |
commit | 0e89ca2088b7e5424b35d9a564b83847dc0df84a (patch) | |
tree | 9b3d795e390f43c2e60561d8dccdde97add2178a /libs/hwui/JankTracker.cpp | |
parent | 14b1f3ede6e40606733156c431792b390cac5d17 (diff) |
Log daveys
Bug: 70339576
Test: Checked that it logged with a lower threshold
Change-Id: I271f8af2a3ee63769edc71291b70f19512974d78
Diffstat (limited to 'libs/hwui/JankTracker.cpp')
-rw-r--r-- | libs/hwui/JankTracker.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp index afdd339ba0a2..f41956cdebeb 100644 --- a/libs/hwui/JankTracker.cpp +++ b/libs/hwui/JankTracker.cpp @@ -27,9 +27,11 @@ #include <cutils/ashmem.h> #include <log/log.h> +#include <sstream> #include "Properties.h" #include "utils/TimeUtils.h" +#include "utils/Trace.h" namespace android { namespace uirenderer { @@ -150,6 +152,19 @@ void JankTracker::finishFrame(const FrameInfo& frame) { (*mGlobalData)->reportJankType((JankType)i); } } + + // Log daveys since they are weird and we don't know what they are (b/70339576) + if (totalDuration >= 700_ms) { + static int sDaveyCount = 0; + std::stringstream ss; + ss << "Davey! duration=" << ns2ms(totalDuration) << "ms; "; + for (size_t i = 0; i < static_cast<size_t>(FrameInfoIndex::NumIndexes); i++) { + ss << FrameInfoNames[i] << "=" << frame[i] << ", "; + } + ALOGI("%s", ss.str().c_str()); + // Just so we have something that counts up, the value is largely irrelevant + ATRACE_INT(ss.str().c_str(), ++sDaveyCount); + } } void JankTracker::dumpData(int fd, const ProfileDataDescription* description, |