Unify binder txn trace name

To match cpp aidl trace name for easier perfetto parsing

Test: Manual
Bug: 161393989
Change-Id: I21d788c8de27327bd3f64da2e8cf14e6fcf9d073
This commit is contained in:
Zim
2022-11-02 10:33:45 +00:00
parent ce1c086217
commit 762a8b305a

View File

@@ -911,11 +911,15 @@ public class Binder implements IBinder {
final String transactionName = getTransactionName(transactionCode);
final StringBuffer buf = new StringBuffer();
// Keep trace name consistent with cpp trace name in:
// system/tools/aidl/generate_cpp.cpp
buf.append("AIDL::java::");
if (transactionName != null) {
buf.append(mSimpleDescriptor).append(":").append(transactionName);
buf.append(mSimpleDescriptor).append("::").append(transactionName);
} else {
buf.append(mSimpleDescriptor).append("#").append(transactionCode);
buf.append(mSimpleDescriptor).append("::#").append(transactionCode);
}
buf.append("::server");
transactionTraceName = buf.toString();
mTransactionTraceNames.setRelease(index, transactionTraceName);