Loading services/surfaceflinger/SurfaceFlinger.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -2168,7 +2168,7 @@ bool SurfaceFlinger::commit(nsecs_t frameTime, int64_t vsyncId, nsecs_t expected if (mLayerTracingEnabled && !mLayerTracing.flagIsSet(LayerTracing::TRACE_COMPOSITION)) { // This will block and tracing should only be enabled for debugging. mLayerTracing.notify(mVisibleRegionsDirty, frameTime); mLayerTracing.notify(mVisibleRegionsDirty, frameTime, vsyncId); } persistDisplayBrightness(mustComposite); Loading Loading @@ -2295,7 +2295,7 @@ void SurfaceFlinger::composite(nsecs_t frameTime, int64_t vsyncId) mLayersWithQueuedFrames.clear(); if (mLayerTracingEnabled && mLayerTracing.flagIsSet(LayerTracing::TRACE_COMPOSITION)) { // This will block and should only be used for debugging. mLayerTracing.notify(mVisibleRegionsDirty, frameTime); mLayerTracing.notify(mVisibleRegionsDirty, frameTime, vsyncId); } mVisibleRegionsWereDirtyThisFrame = mVisibleRegionsDirty; // Cache value for use in post-comp Loading Loading @@ -5850,7 +5850,8 @@ status_t SurfaceFlinger::onTransact(uint32_t code, const Parcel& data, Parcel* r (fixedStartingTime) ? fixedStartingTime : systemTime(); mScheduler ->schedule([&]() FTL_FAKE_GUARD(mStateLock) { mLayerTracing.notify("start", startingTime); mLayerTracing.notify(true /* visibleRegionDirty */, startingTime, -1 /* vsyncId */); }) .wait(); } Loading services/surfaceflinger/Tracing/LayerTracing.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ void LayerTracing::dump(std::string& result) const { mBuffer->dump(result); } void LayerTracing::notify(bool visibleRegionDirty, int64_t time) { void LayerTracing::notify(bool visibleRegionDirty, int64_t time, int64_t vsyncId) { std::scoped_lock lock(mTraceLock); if (!mEnabled) { return; Loading Loading @@ -130,6 +130,7 @@ void LayerTracing::notify(bool visibleRegionDirty, int64_t time) { } mFlinger.dumpDisplayProto(entry); mBuffer->emplace(std::move(entry)); entry.set_vsync_id(vsyncId); } } // namespace android services/surfaceflinger/Tracing/LayerTracing.h +1 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public: bool isEnabled() const; status_t writeToFile(); LayersTraceFileProto createTraceFileProto() const; void notify(bool visibleRegionDirty, int64_t time); void notify(bool visibleRegionDirty, int64_t time, int64_t vsyncId); enum : uint32_t { TRACE_INPUT = 1 << 1, Loading services/surfaceflinger/layerproto/layerstrace.proto +3 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ message LayersTraceFileProto { repeated LayersTraceProto entry = 2; } /* one window manager trace entry. */ /* one layers trace entry. */ message LayersTraceProto { /* required: elapsed realtime in nanos since boot of when this entry was logged */ optional sfixed64 elapsed_realtime_nanos = 1; Loading @@ -60,4 +60,6 @@ message LayersTraceProto { optional uint32 missed_entries = 6; repeated DisplayProto displays = 7; optional int64 vsync_id = 8; } Loading
services/surfaceflinger/SurfaceFlinger.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -2168,7 +2168,7 @@ bool SurfaceFlinger::commit(nsecs_t frameTime, int64_t vsyncId, nsecs_t expected if (mLayerTracingEnabled && !mLayerTracing.flagIsSet(LayerTracing::TRACE_COMPOSITION)) { // This will block and tracing should only be enabled for debugging. mLayerTracing.notify(mVisibleRegionsDirty, frameTime); mLayerTracing.notify(mVisibleRegionsDirty, frameTime, vsyncId); } persistDisplayBrightness(mustComposite); Loading Loading @@ -2295,7 +2295,7 @@ void SurfaceFlinger::composite(nsecs_t frameTime, int64_t vsyncId) mLayersWithQueuedFrames.clear(); if (mLayerTracingEnabled && mLayerTracing.flagIsSet(LayerTracing::TRACE_COMPOSITION)) { // This will block and should only be used for debugging. mLayerTracing.notify(mVisibleRegionsDirty, frameTime); mLayerTracing.notify(mVisibleRegionsDirty, frameTime, vsyncId); } mVisibleRegionsWereDirtyThisFrame = mVisibleRegionsDirty; // Cache value for use in post-comp Loading Loading @@ -5850,7 +5850,8 @@ status_t SurfaceFlinger::onTransact(uint32_t code, const Parcel& data, Parcel* r (fixedStartingTime) ? fixedStartingTime : systemTime(); mScheduler ->schedule([&]() FTL_FAKE_GUARD(mStateLock) { mLayerTracing.notify("start", startingTime); mLayerTracing.notify(true /* visibleRegionDirty */, startingTime, -1 /* vsyncId */); }) .wait(); } Loading
services/surfaceflinger/Tracing/LayerTracing.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ void LayerTracing::dump(std::string& result) const { mBuffer->dump(result); } void LayerTracing::notify(bool visibleRegionDirty, int64_t time) { void LayerTracing::notify(bool visibleRegionDirty, int64_t time, int64_t vsyncId) { std::scoped_lock lock(mTraceLock); if (!mEnabled) { return; Loading Loading @@ -130,6 +130,7 @@ void LayerTracing::notify(bool visibleRegionDirty, int64_t time) { } mFlinger.dumpDisplayProto(entry); mBuffer->emplace(std::move(entry)); entry.set_vsync_id(vsyncId); } } // namespace android
services/surfaceflinger/Tracing/LayerTracing.h +1 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public: bool isEnabled() const; status_t writeToFile(); LayersTraceFileProto createTraceFileProto() const; void notify(bool visibleRegionDirty, int64_t time); void notify(bool visibleRegionDirty, int64_t time, int64_t vsyncId); enum : uint32_t { TRACE_INPUT = 1 << 1, Loading
services/surfaceflinger/layerproto/layerstrace.proto +3 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ message LayersTraceFileProto { repeated LayersTraceProto entry = 2; } /* one window manager trace entry. */ /* one layers trace entry. */ message LayersTraceProto { /* required: elapsed realtime in nanos since boot of when this entry was logged */ optional sfixed64 elapsed_realtime_nanos = 1; Loading @@ -60,4 +60,6 @@ message LayersTraceProto { optional uint32 missed_entries = 6; repeated DisplayProto displays = 7; optional int64 vsync_id = 8; }