11 Commits

Author SHA1 Message Date
Jorim Jaggi
10f328c580 Change hwui jank detection to use deadline & gpu completion (1/2)
- Use GPU finish time as well as actual deadline to determine jank
rate.
- Use dynamic interval to adjust for 60/90hz switching
- Move frame metrics reporting into JankTracker to adjust the
deadline communicated to the app when in stuffing scenario.
- Adjust double-stuffing detection to be a bit more readable.

Test: GraphicsStatsValidationTest.java
Test: adb shell dumpsys gfxinfo
Test: FrameMetricsListenerTest
Test: Log output of FrameMetricsObserver
Bug: 169858044
Change-Id: I3a6b8ed163e2cf9cf2b67667110340ebe35f98a1
2021-04-13 15:18:27 +00:00
Stan Iliev
637ba5e8da Expose HWUI metrics via statsd
Add atom definition for HWUI stats. Implement a C++
statsd puller inside GraphicsStatsService service.
GraphicsStatsService has new private API, which
returns a serialized proto with HWUI stats grouped
by application package and version.

Test: Ran "adb shell cmd stats pull-source 10068"
Test: Ran "statsd_testdrive 10068" and it looks OK
Bug: 142665516
Change-Id: I400c0dbf9e25181d36f9018688b03d86839ac3de
2020-01-10 10:50:25 -05:00
Stan Iliev
7203e1f55a Add GPU draw stats to gfxinfo and GraphicsStatsService
Test: ran dumpsys with gfxinfo and graphicsstats
Change-Id: Id9950de87dc4343c6878baa6a6dd42fbc8aeddef
2019-08-01 18:53:21 +00:00
Jerome Gaillard
e218c69285 Replace CLOCK_MONOTONIC with SYSTEM_TIME_MONOTONIC
Using SYSTEM_TIME_MONOTONIC works for Android (where it translates to
CLOCK_MONOTONIC) and host targets, while CLOCK_MONOTONIC is not defined
on macOS.

Bug: 117921091
Test: existing tests should pass
Change-Id: I1fad472881830fb0701a320cf37319e083932ad4
2019-06-14 12:07:36 +00:00
John Reck
e170fb6686 A better HW Bitmap uploader
Move all HW bitmap upload operations off of RenderThread.
Ensure EGL context outlives all upload requests

Bug: 79250950
Test: builds, boots, systrace is good, CTS bitmap tests pass

Change-Id: I5ace6c516d33b1afdf1a407cd8b183f6b60c22c1
2018-05-09 11:39:37 -07:00
Vadim Tryshev
a90b243e46 Improving jank tests diagnostics
When there were 0 total frames, ProfileData generates something like:
Janky frames: 0 (nan%)

Then the test fails to parse it, and ends up with a mysterious
"Failed to parse NUM_JANKY" diag (see the bug).

Making the case 0/0 a 0%.

Bug: 77528721
Test: atest google/perf/jank/SystemUI/UbSystemUIJankTests:android.platform.systemui.tests.jank.LauncherJankTests#testOpenAllAppsContainer
Change-Id: Ib65b80dc689f7b6ee06b108114ffd7de9d739721
2018-04-06 12:25:40 -07:00
John Reck
0e4864725a Revert "Revert "Break down jank between frame drops vs. triple buffered""
This reverts commit a6d8fbf4ea634f5f605b2b7db3ca98975f8625b5.

Fixes an out-of-bounds read in COMPARISONS by switching up
how comparisons works. Instead of requiring all jank types
to have an associated COMPARISON's entry, which kHighInputLatency
and kMissedDeadline don't, instead have each
COMPARISON indicate which JankType it applies to so it can
be independently sized from JankTypes.

Bug: 70220906
Bug: 75566601
Test: launching & using maps works
Change-Id: I7fd90daeb320b4627e42c3418c89726d860998c1
2018-03-19 16:36:32 -07:00
Aaron Whyte
a6d8fbf4ea Revert "Break down jank between frame drops vs. triple buffered"
This reverts commit 09979fbee7201b46158c2c033194529e4284ea13.

Reason for revert: Based on stacktraces and change history, I think this is causing a cluster of P crashes.
https://b.corp.google.com/issues?q=(%22android%22%20%22:uirenderer::JankTracker::finishFrame%22)
Bug: 75566601
Bug: 75811585
Bug: 75407175
Bug: 75736222
Bug: 75391447
Bug: 75659839

Change-Id: I59a8c2d8906d347210c77fb3628f5801bc299bfb
2018-03-19 17:53:48 +00:00
John Reck
09979fbee7 Break down jank between frame drops vs. triple buffered
Bug: 70220906
Test: JankyScene vs. systrace vs. jankstats
Change-Id: Ia012685020cc5bcabbd3f92f0bdeb84eaf50733d
2018-03-14 15:00:05 -07:00
John Reck
1bcacfdcab Format the world (or just HWUI)
Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-11-03 10:57:44 -07:00
John Reck
7075c79209 Split out jank data from policy
Move ProfileData out to its own file with helper
accessors. This keeps policy (what is/isn't jank)
outside of the data storage.

Also use lambdas to iterate over the histogram
to make it nicer for dumping & proto-ifying.

Test: hwui_unit_tests pass & jank data still dumps

Change-Id: I88488369ec77590a2867f51128e65bb786aa34e6
2017-07-05 14:04:51 -07:00