| Age | Commit message (Collapse) | Author |
|
Buffer stuffing recovery was initially implemented using
UIDs and sending events to subscribed clients. A different,
simpler approach using callbacks when blocked on dequeueBuffer
has since been favored (change-id I24e34591e809aebd7626657c6340faed323227ad)
and leaves the initial UID event subscription logic obsolete.
Leaving this code causes issues since the logic attempts to
update an event that is part of union, causing issues in other
events that do not hold onto the current object.
This is a partial revert of change-id I38f0eb3d6ef1331e07d6022fa3a0e16c556ba06f
Bug: b/294922229
Test: presubmit
Flag: EXEMPT, code cleanup
Change-Id: I53f653550c58376c8d82a491ecf0aebdeeafbc0d
|
|
FrameTimeline does not need to be a separate module and it makes
linking against it difficult for no obvious benefit
Bug: 360908317
Test: atest libsurfaceflinger_unittest
Flag: EXEMPT refactor
Change-Id: I0d20a2bf9e93dedfb03b44eeb0356f7024e36559
|
|
|
|
Test: make
BUG: 390776340
Flag: EXEMPT bug fix
Change-Id: I6b282d205cccb3861ea77d57a0dc0d911b7504e0
|
|
Test: Manual jank analysis on the trace
BUG: 342265411
Flag: com.android.graphics.surfaceflinger.flags.increase_missed_frame_jank_threshold
Change-Id: I6c8dfb522d3006d3c810f4b23f359f31b144c5cb
|
|
|
|
Buffer stuffing occurs when SurfaceFlinger misses a frame, but the
client continues to produce buffers at the same rate, causing a
greater risk for jank to occur. Recovery is achieved for canned
animations by adjusting the animation timeline on the client side so
that SurfaceFlinger is no longer behind.
Use SF backdoor command 1045 to inject jank.
Usage: adb shell service call SurfaceFlinger 1045 f 1
Bug: b/294922229
Test: atest EventThreadTest
Test: presubmit, manually check perfetto traces
Flag: android.view.flags.buffer_stuffing_recovery
Change-Id: I38f0eb3d6ef1331e07d6022fa3a0e16c556ba06f
|
|
Bug: 241394120
Test: builds, atest CtsUiAutomationTestCases:android.app.uiautomation.cts.UiAutomationTest#testWindowContentFrameStats$
Flag: com.android.graphics.surfaceflinger.flags.deprecate_frame_tracker
Change-Id: I3f12d504e821a6ba15a26604eb56f317c9d59a18
|
|
Filter FrameTimeline events for frames started before the trace started.
Bug: 364194637
Test: manual
Flag: com.android.graphics.surfaceflinger.flags.filter_frames_before_trace_starts
Change-Id: I9185f384f306eddab1afc2ea9d7901dd70d2f1a2
|
|
is none.
Bug: 316171339
Change-Id: I19b986c91de092c8b36f279f4714e1201c95c717
Test: perfetto checks
Flag: EXEMPT bugfix
|
|
Adds the expected and actual frame duration, that is the frame durations
as shown in the frame timeline in Perfetto, to the jank data exposed by
SurfaceFlinger.
This reverts commit e79389068c08c3eba422e8f3975b222849f0b326.
Bug: b/354763298
Test: libsurfaceflinger_unittest manual
Flag: com.android.internal.jank.use_sf_frame_duration
Change-Id: Ifa060c02a5619a1e99e44f71a15fc4666a338011
|
|
Revert submission 28899062-frame_duration
Reason for revert: Droid monitor created revert due to this b/362835127.
Reverted changes: /q/submissionid:28899062-frame_duration
Change-Id: Ie613f2fbb4efcd73d8ccba0f1fd2bac6bd409f3c
|
|
Adds the expected and actual frame duration, that is the frame durations
as shown in the frame timeline in Perfetto, to the jank data exposed by
SurfaceFlinger.
Bug: b/354763298
Test: libsurfaceflinger_unittest manual
Flag: com.android.internal.jank.use_sf_frame_duration
Change-Id: I43035a15592985c91891c033c667314ec6e15430
|
|
|
|
When we try to latch a buffer with an unsignaled fence, we were passing
Fence::SIGNAL_TIME_PENDING (MAX_INT) as the acquire fence time,
marking all the app frametimeline as missed. This is a short term solution
to provide a reasonable value instead.
Flag: EXEMPT bugfix
Fixes: 344175037
Test: cb test + perfetto
Change-Id: Ia226589c177457f28540b040086903e518796436
|
|
Create a SF specific macro to call into atrace. This will make the
switch to perfetto for capturing atrace tags easier.
Flag: EXEMPT refactor
Bug: 349905670
Test: perfetto
Change-Id: I4d046d837f52ef78b08e3c97556f2eddb06232dd
|
|
Removes the old work-arounds for missing jank callbacks.
Removes the jank data from the transaction completed callback.
Adds new function to ISurfaceComposer to register jank listeners.
With the new API, jank data is only sent over binder periodically
(every ~50 frames) and on a background thread. It is also only tracked
for layers where there is a listener registered.
Test: manual, libsurfaceflinger_unittest
Bug: http://b/336461947
Flag: EXEMPT refactor
Change-Id: I3238ce604571832523525cf098832c7352879826
|
|
|
|
Bug: n/a
Test: FrameTimelineTest
Change-Id: I21d51d76229701f1fe66982488b5eefedeb02c0c
|
|
Due to a potential HWASAN bug (b/341741835) changing the out
parameter semantics from reference to pointer.
Bug: 340633280
Change-Id: I230d2073af69e3ec9312d8208d245cb5b743ec35
Test: presubmit
|
|
otherwise these surface frames waits in the current display frame
for the next composite and they are marked as janky, even though
they had no affect on the displayed frame.
Bug: 340633280
Test: android.platform.test.scenario.sysui.people.PeopleSpaceActivityMicrobenchmark#startPeopleSpaceActivity
Change-Id: I2774e88627e39bce18c04af4b20e2f6973121a42
|
|
Test: n/a
Change-Id: I6c2426303194df4b94f6181f4b5c71970bc5f7fd
|
|
Bug: 273701290
Test: https://screenshot.googleplex.com/3uyqAWi6bXgNbw2
Change-Id: I7dea4f9378e804d60af3ff849793fdc09b97166d
|
|
Bug: 311760225
Test: capture Perfetto trace locally
Change-Id: I591f3730f74dd05f64538caacfe56b8c60404bb6
|
|
Bug: 273701290
Test: FrameTimelineTest#traceDisplayFrameSkipped, play with perfetto
Change-Id: Ib5f884a14dc6526e2a2b5a1371be7715a20cd0a9
|
|
Bug: 273701290
Test: FrameTimelineTest#traceDisplayFrameSkipped; https://screenshot.googleplex.com/4As43np7DoF6Dxm
Change-Id: I0604ab3d15ef94351f9a592920c56ab00ef51b23
|
|
Bug: b/261839034
Test: atest libsurfaceflinger_unittest
Change-Id: I65c85be8825e36671612a47000261c04f0289551
|
|
d3971f9392
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/21995114
Change-Id: I32ee6179770de07e823fd577e70f48c9453ded4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
presentTime in the past would result in Perfetto showing
unterminated slices. Fixing this issue by checking for this
case specifically, marking it janky, and fixing the presentTime to
be the endTime instead.
Test: SF unit tests
Bug: 271105399
Change-Id: I7e5d641dfe58717322b7a82b0609fc728e9a69fc
|
|
This allows the dropped frames to be accounted within frame timeline
missed frames metrics, without this, the metric tells there are no
missed frames when there are dropped frames.
Bug: 271031574
Test: Verified in traces
Change-Id: I838e0c10d4a92a4d5f753f020b57ea4e59fd0f8d
|
|
Fixes: 239101875
Test: manual
Change-Id: I024f6facff5d74a500fb5d917bd97ab5d1c3eba3
|
|
f4e70632b9 am: d7a7f9952e am: ffab144ef7
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2392152
Change-Id: I0395269db75c586c5bec4e5b6610654841d478c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
android::frametimeline::FrameTimeline forgot to declare a pair of
methods as pure virtual, which results in the following link failure
when building at -O0 because the compiler expects to be able to only
emit the class's vtable in the translation unit that defines the first
non-pure method, which doesn't exist:
ld.lld: error: undefined symbol: vtable for android::frametimeline::FrameTimeline
>>> referenced by FrameTimeline.h:279 (frameworks/native/services/surfaceflinger/FrameTimeline/FrameTimeline.h:279)
>>> lto.tmp:(android::frametimeline::FrameTimeline::FrameTimeline())
>>> referenced by FrameTimeline.h:279 (frameworks/native/services/surfaceflinger/FrameTimeline/FrameTimeline.h:279)
>>> lto.tmp:(android::frametimeline::FrameTimeline::FrameTimeline())
Test: `mmma frameworks/native/surfaceflinger` after adding -O0 to surfaceflinger_defaults
Change-Id: I2c93986ac5add2c603f385154c07c6238d03c663
|
|
An implementation such as HWC2OnFbAdapter always returns -1 for the
present fence. FrameTimeline should not ignore invalid fences in
mPendingPresentFences, since in this case every fence is invalid,
resulting in resource leaks. Similarly, PresentLatencyTracker should not
be used if HWC doesn't support present fences.
Test: no logspam running on starnix (fuchsia), which uses framebuffer
Test: booted emulator, no behavior change
Test: booted panther, no behavior change
Change-Id: I4a11edc443a1cd3a395fc8f97b93a5474d11fe31
|
|
- Emit a valid timestamp to Perfetto when fence signal time is invalid
- Mark pending fences as invalid if a newer fence has signaled
Test: SF unit tests
Bug: 243939707
Change-Id: Ieac7eb53fe3e36178d860cc0683bfd8fad7560cd
|
|
There are cases where there is composition in both cpu and gpu, so it is
better to track jank for when deadline miss occurred in HWC or GPU
composition instead.
Bug: 204463368
Test: atest FrameTimelineTest
Test: Perfetto trace
Change-Id: Ibfd87d5688e2ef6ff88a3b9f9276954de18beed2
|
|
Test: atest libsurfaceflinger_unittest
BUG: 237113799
Change-Id: I83f270faf2f3872095723854d9bce7b50581cdee
|
|
Fix a bug with setting the timestamp on a packet due to operator
precedence where unary plus takes precedence on the ternary operation
Fixes: 185346474
Test: Collect perfetto traces and observe timeline slices
Change-Id: If1a8f13e7a77dabf0c510181e5aa27aaf7cf0f56
|
|
Using CLOCK_BOOTTIME avoids the need to resync CLOCK_MONOTONIC in
perfetto after suspend.
Bug: 185346474
Test: Collect perfetto traces and observe timeline slices
Change-Id: Ifda1fb43c6ac205ec60cb331c139e950a24a60cb
|
|
We are keeping enough vsyncIds for a reasonable app to
send back their vsyncId. If we can't find the vsync id of that
app, we can be pretty confident that the app had a huge schedule
delay.
Bug: 211763914
Test: SF unit tests
Change-Id: I046a87e566844bb140df75df3d06f809b7d99155
|
|
Bug: 198192003
Test: atest ASurfaceControlTest
perfetto trace
Change-Id: I04310bd9190cfc227ff5ba892c7187d3b8a20463
|
|
Upgrade to scoped enums where applicable. Pull GameMode from TimeStats
into libgui to plumb it as an enum rather than int32_t.
Bug: 185536303
Test: libsurfaceflinger_unittest
Change-Id: I81fdd24805757ef953484055ee867684eb94fecf
|
|
Start pulling Scheduler sources into a libscheduler target akin to
librenderengine and libcompositionengine.
Bug: 185535769
Test: Build
Change-Id: I8ee871cce96209c8c53601152501129b09c5e46f
|
|
We give 2ms threshold for the deadline and this seems to cause some
misclassifications where an app's fault was classified as SF scheduling.
We designed the threshold with the idea of tweaking, so try 0 threshold
and see if it works better.
Bug: 191238086
Test: libsurfaceflinger_unittest
Change-Id: I0ac3d9ce3f9ec90f6b3188009d9d09a69afd37b2
|
|
For SurfaceFrames, showing isBuffer in a trace can be helpful in
debugging issues within Shared Timeline.
Bug: 182214639
Test: libsurfaceflinger_unittest
Change-Id: I7509efe8775b27e5e2943a99ad252483ce615e89
|
|
Update TimeStats to take in the game mode from layer for all the frames.
Bug: 186025682
Test: statsd_testdrive 10063
Test: atest libsurfaceflinger_unittest
Change-Id: If95a8c91940228a8925ae9e4e21656d1b492a2ba
|
|
After the recent addition of this jank type, toString() was missed in
teh change resulting in a crash.
Bug: 189356168
Test: android.view.cts.AttachedSurfaceControlSyncTest#testSync
Change-Id: I82496a8bf95cdd1304c0c17a1c9c5d38416a4a88
|
|
We have an arbitrary time of 120ms for the predictions before they
expire. Our assumption was that 120ms is plenty enough for apps & sf
that if they finish beyond this, it's basically a jank. However, with
some traces, we have noticed SF not running in the main thread at all
during setPowerMode() for more than 120ms. This is causing a data loss
in jank classification.
This change addresses this by limiting the number of predictions stored
in TokenManager.
Bug: 187091879
Bug: 186874532
Test: libsurfaceflinger_unittest
Change-Id: I555bfd974585b7e0632eade776d201f1189c81e0
|
|
When SF presents a frame because it started late (because the previous
frame ran too long), this case is similar to App Buffer Stuffing. The
frame rate will be smooth but all frames have an increased latency.
Currently, we mark this as SFScheduling jank. This change classifies
these frames as a separate jank called SFStuffing. This is useful in
weeding out issues related to frame rate vs latency.
Bug: 181593046
Test: libsurfaceflinger_unittest
Change-Id: I59a2931c5e636e9a38fd07e0a328d37873969c44
|
|
We have a gap in our logic where dropped frames that have their
predictions expired will send out incorrect timestamps. This has caused
some instrumentation failures at the perfetto side.
Bug: 185978397
Test: libsurfaceflinger_unittest
Change-Id: I301816893f425301a5ee1065685b9f7007d8cf1d
|