summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Torne (Richard Coles) <torne@google.com> 2022-06-09 15:38:20 -0400
committer Torne (Richard Coles) <torne@google.com> 2022-06-15 12:26:59 -0400
commit836308968a24270ca9b4221e038cac7330db40fc (patch)
tree2f21ab2e672c4038e743f6b8f5a5c84a7ce128cd
parent735ebc1f79d930c3cf599dfa66eb7b734484a006 (diff)
webview: add trace event for relro timeout.
Record an instant trace event if we encounter a timeout while waiting for relro creation, using the same message we already log. We're seeing a number of occurrences of this timeout in cases where WebView is otherwise working in traces, so this should help to debug. Using the ACTIVITY_MANAGER trace tag as it's enabled for the trace collection pipeline already; WEBVIEW is not. Bug: 235546861 Test: n/a Change-Id: I2b60c5699efde026da934457e430adaebad1d2b3
-rw-r--r--services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
index dd0ec948aa3a..43d62aaa120a 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
@@ -21,6 +21,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
import android.os.AsyncTask;
+import android.os.Trace;
import android.os.UserHandle;
import android.util.Slog;
import android.webkit.UserPackage;
@@ -265,10 +266,12 @@ class WebViewUpdateServiceImpl {
// Either the current relro creation isn't done yet, or the new relro creatioin
// hasn't kicked off yet (the last relro creation used an out-of-date WebView).
webViewStatus = WebViewFactory.LIBLOAD_FAILED_WAITING_FOR_RELRO;
- Slog.e(TAG, "Timed out waiting for relro creation, relros started "
+ String timeoutError = "Timed out waiting for relro creation, relros started "
+ mNumRelroCreationsStarted
+ " relros finished " + mNumRelroCreationsFinished
- + " package dirty? " + mWebViewPackageDirty);
+ + " package dirty? " + mWebViewPackageDirty;
+ Slog.e(TAG, timeoutError);
+ Trace.instant(Trace.TRACE_TAG_ACTIVITY_MANAGER, timeoutError);
}
}
if (!webViewReady) Slog.w(TAG, "creating relro file timed out");