Enable binder txn tracing more broadly am: 1b71f6b3d0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2254717 Change-Id: Iea5ac895155dd4296c3776e0a57bcf6e8cbb36d0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1262,8 +1262,15 @@ public class Binder implements IBinder {
|
|||||||
// Log any exceptions as warnings, don't silently suppress them.
|
// Log any exceptions as warnings, don't silently suppress them.
|
||||||
// If the call was {@link IBinder#FLAG_ONEWAY} then these exceptions
|
// If the call was {@link IBinder#FLAG_ONEWAY} then these exceptions
|
||||||
// disappear into the ether.
|
// disappear into the ether.
|
||||||
final boolean tracingEnabled = Trace.isTagEnabled(Trace.TRACE_TAG_AIDL) &&
|
final boolean tagEnabled = Trace.isTagEnabled(Trace.TRACE_TAG_AIDL);
|
||||||
(Binder.isStackTrackingEnabled() || Binder.isTracingEnabled(callingUid));
|
final String transactionTraceName;
|
||||||
|
if (tagEnabled) {
|
||||||
|
transactionTraceName = getTransactionTraceName(code);
|
||||||
|
} else {
|
||||||
|
transactionTraceName = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
final boolean tracingEnabled = tagEnabled && transactionTraceName != null;
|
||||||
try {
|
try {
|
||||||
final BinderCallHeavyHitterWatcher heavyHitterWatcher = sHeavyHitterWatcher;
|
final BinderCallHeavyHitterWatcher heavyHitterWatcher = sHeavyHitterWatcher;
|
||||||
if (heavyHitterWatcher != null) {
|
if (heavyHitterWatcher != null) {
|
||||||
@@ -1271,7 +1278,7 @@ public class Binder implements IBinder {
|
|||||||
heavyHitterWatcher.onTransaction(callingUid, getClass(), code);
|
heavyHitterWatcher.onTransaction(callingUid, getClass(), code);
|
||||||
}
|
}
|
||||||
if (tracingEnabled) {
|
if (tracingEnabled) {
|
||||||
Trace.traceBegin(Trace.TRACE_TAG_AIDL, getTransactionTraceName(code));
|
Trace.traceBegin(Trace.TRACE_TAG_AIDL, transactionTraceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & FLAG_COLLECT_NOTED_APP_OPS) != 0) {
|
if ((flags & FLAG_COLLECT_NOTED_APP_OPS) != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user