Standardize watchdog messages
Try to stick to a common layout for watchdog messages:
- Skip leading "In " prefix.
- Identify "<type>::<method>".
- Ensure that all watchpoints around KeyMint invocations mention either
"IKeyMintDevice" or "IKeyMintOperation" (to make it clearer when
Keystore is blocked on the underlying KeyMint implementation).
Bug: 265778655
Test: watch logcat, add deliberate sleeps
Change-Id: I803a0a7a60b445848afea00b5f48cf7fd1f17fe5
diff --git a/keystore2/src/database.rs b/keystore2/src/database.rs
index 754dd9c..9ce6506 100644
--- a/keystore2/src/database.rs
+++ b/keystore2/src/database.rs
@@ -1200,7 +1200,7 @@
// Find up to `max_blobs` more superseded key blobs, load their metadata and return it.
let result: Vec<(i64, Vec<u8>)> = {
- let _wp = wd::watch("handle_next_superseded_blob find_next");
+ let _wp = wd::watch("KeystoreDB::handle_next_superseded_blob find_next");
let mut stmt = tx
.prepare(
"SELECT id, blob FROM persistent.blobentry
@@ -1231,7 +1231,7 @@
.context("Trying to extract superseded blobs.")?
};
- let _wp = wd::watch("handle_next_superseded_blob load_metadata");
+ let _wp = wd::watch("KeystoreDB::handle_next_superseded_blob load_metadata");
let result = result
.into_iter()
.map(|(blob_id, blob)| {
@@ -1249,7 +1249,7 @@
// We did not find any superseded key blob, so let's remove other superseded blob in
// one transaction.
- let _wp = wd::watch("handle_next_superseded_blob delete");
+ let _wp = wd::watch("KeystoreDB::handle_next_superseded_blob delete");
tx.execute(
"DELETE FROM persistent.blobentry
WHERE NOT subcomponent_type = ?