diff options
Diffstat (limited to 'src/trace_processor/metrics/sql/android/android_blocking_calls_cuj_metric.sql')
-rw-r--r-- | src/trace_processor/metrics/sql/android/android_blocking_calls_cuj_metric.sql | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/trace_processor/metrics/sql/android/android_blocking_calls_cuj_metric.sql b/src/trace_processor/metrics/sql/android/android_blocking_calls_cuj_metric.sql index 7c56db214..3538f7d86 100644 --- a/src/trace_processor/metrics/sql/android/android_blocking_calls_cuj_metric.sql +++ b/src/trace_processor/metrics/sql/android/android_blocking_calls_cuj_metric.sql @@ -20,6 +20,7 @@ SELECT RUN_METRIC('android/android_jank_cuj.sql'); SELECT IMPORT('android.slices'); +SELECT IMPORT('android.binder'); -- Jank "J<*>" and latency "L<*>" cujs are put together in android_cujs table. -- They are computed separately as latency ones are slightly different, don't @@ -75,6 +76,24 @@ SELECT ROW_NUMBER() OVER (ORDER BY ts) AS cuj_id, * FROM all_cujs; +DROP TABLE IF EXISTS relevant_binder_calls_with_names; +CREATE TABLE relevant_binder_calls_with_names AS +SELECT DISTINCT + tx.aidl_name AS name, + tx.client_ts AS ts, + s.track_id, + tx.client_dur AS dur, + s.id, + tx.client_process as process_name, + tx.client_utid as utid, + tx.client_upid as upid +FROM android_sync_binder_metrics_by_txn AS tx + JOIN slice AS s ON s.id = tx.binder_txn_id + -- Keeps only slices in cuj processes. + JOIN android_cujs ON tx.client_upid = android_cujs.upid +WHERE is_main_thread AND aidl_name IS NOT NULL; + + DROP TABLE IF EXISTS android_blocking_calls_cuj_calls; CREATE TABLE android_blocking_calls_cuj_calls AS WITH all_main_thread_relevant_slices AS ( @@ -108,6 +127,17 @@ WITH all_main_thread_relevant_slices AS ( OR s.name GLOB 'relayoutWindow*' OR s.name GLOB 'ImageDecoder#decode*' ) + UNION ALL + SELECT + name, + ts, + track_id, + dur, + id, + process_name, + utid, + upid + FROM relevant_binder_calls_with_names ), -- Now we have: -- (1) a list of slices from the main thread of each process |