summaryrefslogtreecommitdiff
path: root/services/incremental/IncrementalService.cpp
diff options
context:
space:
mode:
author Alex Buynytskyy <alexbuy@google.com> 2023-02-08 16:40:22 -0800
committer Alex Buynytskyy <alexbuy@google.com> 2023-02-09 03:18:24 +0000
commit0b5e87dd4f259280a9480d2226f2164cd8bb02b1 (patch)
treec583a7db90c92133b414b91deba15d978e5a8185 /services/incremental/IncrementalService.cpp
parentd491ea05454fd4612938c340308b69c2bc22ddbd (diff)
Better status message.
Bug: 263449831 Test: adb shell dumpsys incremental Change-Id: Ie6960d22c1d0e018b50de1c9e431c403fe442458
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-rw-r--r--services/incremental/IncrementalService.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index 9c9b363b948e..5e6200c7e975 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -419,6 +419,17 @@ int64_t IncrementalService::elapsedUsSinceMonoTs(uint64_t monoTsUs) {
return nowUs - monoTsUs;
}
+static const char* loadingStateToString(incfs::LoadingState state) {
+ switch (state) {
+ case (incfs::LoadingState::Full):
+ return "Full";
+ case (incfs::LoadingState::MissingBlocks):
+ return "MissingBlocks";
+ default:
+ return "error obtaining loading state";
+ }
+}
+
void IncrementalService::onDump(int fd) {
dprintf(fd, "Incremental is %s\n", incfs::enabled() ? "ENABLED" : "DISABLED");
dprintf(fd, "IncFs features: 0x%x\n", int(mIncFs->features()));
@@ -453,9 +464,13 @@ void IncrementalService::onDump(int fd) {
}
dprintf(fd, " storages (%d): {\n", int(mnt.storages.size()));
for (auto&& [storageId, storage] : mnt.storages) {
- dprintf(fd, " [%d] -> [%s] (%d %% loaded) \n", storageId, storage.name.c_str(),
+ auto&& ifs = getIfsLocked(storageId);
+ dprintf(fd, " [%d] -> [%s] (%d %% loaded)(%s) \n", storageId,
+ storage.name.c_str(),
(int)(getLoadingProgressFromPath(mnt, storage.name.c_str()).getProgress() *
- 100));
+ 100),
+ ifs ? loadingStateToString(mIncFs->isEverythingFullyLoaded(ifs->control))
+ : "error obtaining ifs");
}
dprintf(fd, " }\n");