summaryrefslogtreecommitdiff
path: root/services/robotests
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2020-06-19 00:49:51 +0200
committerJorim Jaggi <jjaggi@google.com>2020-06-26 15:35:23 +0200
commitd42ab1b93834292f234b314317794194d338c896 (patch)
treec0e31600a59b71c0a4716219f1e5d2124dc35bb9 /services/robotests
parentcae0a5b56a49c9d76f201acfd92a1c275575224a (diff)
Pass in callsite of SurfaceControl constructor explicitly (1/3)
Creating a new Throwable (and filling in the stack trace) can take up to 150us. Since we do this on the critical path when sending over SurfaceControl via binder multiple times, this is too much. Instead, add an option to pass in callsite manually. Bug: 159056748 Change-Id: I46c339c15a07192d61c4c546e46f260684a47120 Merged-In: I46c339c15a07192d61c4c546e46f260684a47120 Exempt-From-Owner-Approval: Large scale refactor
Diffstat (limited to 'services/robotests')
-rw-r--r--services/robotests/src/com/android/server/testing/shadows/ShadowCloseGuard.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/robotests/src/com/android/server/testing/shadows/ShadowCloseGuard.java b/services/robotests/src/com/android/server/testing/shadows/ShadowCloseGuard.java
index c9984bf07059..4055dfc08f90 100644
--- a/services/robotests/src/com/android/server/testing/shadows/ShadowCloseGuard.java
+++ b/services/robotests/src/com/android/server/testing/shadows/ShadowCloseGuard.java
@@ -44,5 +44,10 @@ public class ShadowCloseGuard {
public void report(String message, Throwable allocationSite) {
mReports += 1;
}
+
+ @Override
+ public void report(String message) {
+ mReports += 1;
+ }
}
}