SF: Clean up dumpsys for Scheduler
Split dump into three flags corresponding to Scheduler, EventThread, and
VsyncReactor. Expand utils::Dumper to automate more types.
Bug: 241285191
Test: dumpsys SurfaceFlinger --scheduler
Test: dumpsys SurfaceFlinger --events
Test: dumpsys SurfaceFlinger --vsync
Change-Id: I17b3b772cd164305e2fe0239638b1a08236c12a2
diff --git a/services/surfaceflinger/Scheduler/Scheduler.h b/services/surfaceflinger/Scheduler/Scheduler.h
index 797ec96..04f3b69 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.h
+++ b/services/surfaceflinger/Scheduler/Scheduler.h
@@ -45,6 +45,7 @@
#include "MessageQueue.h"
#include "OneShotTimer.h"
#include "RefreshRateSelector.h"
+#include "Utils/Dumper.h"
#include "VsyncSchedule.h"
namespace android::scheduler {
@@ -197,7 +198,7 @@
// for a given uid
bool isVsyncValid(TimePoint expectedVsyncTimestamp, uid_t uid) const;
- void dump(std::string&) const;
+ void dump(utils::Dumper&) const;
void dump(ConnectionHandle, std::string&) const;
void dumpVsync(std::string&) const;
@@ -335,9 +336,9 @@
LayerHistory mLayerHistory;
// Timer used to monitor touch events.
- std::optional<OneShotTimer> mTouchTimer;
+ ftl::Optional<OneShotTimer> mTouchTimer;
// Timer used to monitor display power mode.
- std::optional<OneShotTimer> mDisplayPowerTimer;
+ ftl::Optional<OneShotTimer> mDisplayPowerTimer;
ISchedulerCallback& mSchedulerCallback;