Merge "Enable binder txn tracing more broadly"
This commit is contained in:
committed by
Android (Google) Code Review
commit
0ce0e08451
@@ -1262,8 +1262,15 @@ public class Binder implements IBinder {
|
||||
// Log any exceptions as warnings, don't silently suppress them.
|
||||
// If the call was {@link IBinder#FLAG_ONEWAY} then these exceptions
|
||||
// disappear into the ether.
|
||||
final boolean tracingEnabled = Trace.isTagEnabled(Trace.TRACE_TAG_AIDL) &&
|
||||
(Binder.isStackTrackingEnabled() || Binder.isTracingEnabled(callingUid));
|
||||
final boolean tagEnabled = Trace.isTagEnabled(Trace.TRACE_TAG_AIDL);
|
||||
final String transactionTraceName;
|
||||
if (tagEnabled) {
|
||||
transactionTraceName = getTransactionTraceName(code);
|
||||
} else {
|
||||
transactionTraceName = null;
|
||||
}
|
||||
|
||||
final boolean tracingEnabled = tagEnabled && transactionTraceName != null;
|
||||
try {
|
||||
final BinderCallHeavyHitterWatcher heavyHitterWatcher = sHeavyHitterWatcher;
|
||||
if (heavyHitterWatcher != null) {
|
||||
@@ -1271,7 +1278,7 @@ public class Binder implements IBinder {
|
||||
heavyHitterWatcher.onTransaction(callingUid, getClass(), code);
|
||||
}
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user