Merge "[metrics]: Explicitly match only the server end of AIDL names"
diff --git a/src/trace_processor/stdlib/android/binder.sql b/src/trace_processor/stdlib/android/binder.sql
index c49060e..10712e9 100644
--- a/src/trace_processor/stdlib/android/binder.sql
+++ b/src/trace_processor/stdlib/android/binder.sql
@@ -123,8 +123,10 @@
       ON binder_reply.track_id = reply_thread_track.id
     JOIN thread reply_thread ON reply_thread.utid = reply_thread_track.utid
     JOIN process reply_process ON reply_process.upid = reply_thread.upid
-    LEFT JOIN slice aidl
-      ON aidl.parent_id = binder_reply.id AND (aidl.name GLOB 'AIDL::*' OR aidl.name GLOB 'HIDL::*')
+    LEFT JOIN slice aidl ON aidl.parent_id = binder_reply.id
+        AND (aidl.name GLOB 'AIDL::cpp*Server'
+             OR aidl.name GLOB 'AIDL::java*server'
+             OR aidl.name GLOB 'HIDL::*server')
   )
 SELECT
   MIN(aidl_name) AS aidl_name,
diff --git a/test/trace_processor/diff_tests/android/android_binder_metric.out b/test/trace_processor/diff_tests/android/android_binder_metric.out
index 09dc248..ab888d9 100644
--- a/test/trace_processor/diff_tests/android/android_binder_metric.out
+++ b/test/trace_processor/diff_tests/android/android_binder_metric.out
@@ -22571,7 +22571,6 @@
     }
   }
   unaggregated_txn_breakdown {
-    aidl_name: "AIDL::cpp::ITunnelModeEnabledListener::onTunnelModeEnabledChanged::cppClient"
     client_process: "system_server"
     client_thread: "android.display"
     is_main_thread: false
@@ -40324,7 +40323,6 @@
     }
   }
   unaggregated_txn_breakdown {
-    aidl_name: "AIDL::cpp::IServiceManager::getService::cppClient"
     client_process: "system_server"
     client_thread: "system_server"
     is_main_thread: true