Merge remote-tracking branch 'origin/ui-canary' into ui-stable

Commands:
$ git fetch origin
$ git checkout -B ui-stable -t origin/ui-stable
$ git merge --strategy=ours origin/ui-canary
$ git diff --binary origin/ui-canary | git apply --reverse --index
$ git commit --amend

End state:
$ git diff ui-stable origin/ui-canary
[no output]
$ git rev-list --count ui-stable..origin/ui-canary
0

Change-Id: Iec814fa451c0c46f2e3a40866da1d611de691da3
diff --git a/.clang-tidy b/.clang-tidy
index 07073df..8a822c2 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,4 +1,4 @@
-Checks: android-cloexec-*,bugprone-*,google-explicit-constructor,android-comparison-in-temp-failure-retry,modernize-use-nullptr,performance-for-range-copy,performance-noexcept-move-constructor,readability-container-size-empty,readability-else-after-return
+Checks: android-cloexec-*,bugprone-*,-bugprone-easily-swappable-parameters,google-explicit-constructor,android-comparison-in-temp-failure-retry,modernize-use-nullptr,performance-for-range-copy,performance-noexcept-move-constructor,readability-container-size-empty,readability-else-after-return
 CheckOptions:
   - key:             bugprone-assert-side-effect.AssertMacros
     value:           'PERFETTO_DCHECK'
diff --git a/.style.yapf b/.style.yapf
index de0c6a7..fdd0723 100644
--- a/.style.yapf
+++ b/.style.yapf
@@ -1,2 +1,2 @@
 [style]
-based_on_style = chromium
+based_on_style = yapf
diff --git a/Android.bp b/Android.bp
index 975d9fe..e3a94e7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1733,6 +1733,11 @@
     name: "perfetto_include_perfetto_ext_base_version",
 }
 
+// GN: //include/perfetto/ext/cloud_trace_processor:cloud_trace_processor
+filegroup {
+    name: "perfetto_include_perfetto_ext_cloud_trace_processor_cloud_trace_processor",
+}
+
 // GN: //include/perfetto/ext/ipc:ipc
 filegroup {
     name: "perfetto_include_perfetto_ext_ipc_ipc",
@@ -2243,8 +2248,11 @@
         "perfetto_src_trace_processor_importers_proto_gen_cc_trace_descriptor",
         "perfetto_src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
         "perfetto_src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
+        "perfetto_src_trace_processor_metrics_gen_cc_all_webview_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
+        "perfetto_src_trace_processor_prelude_table_functions_tables",
+        "perfetto_src_trace_processor_prelude_tables_views_tables_views",
         "perfetto_src_trace_processor_stdlib_gen_amalgamated_stdlib",
         "perfetto_src_trace_processor_tables_tables_python",
     ],
@@ -2265,6 +2273,48 @@
     test_config: "PerfettoIntegrationTests.xml",
 }
 
+// GN: //protos/perfetto/cloud_trace_processor:lite
+genrule {
+    name: "perfetto_protos_perfetto_cloud_trace_processor_lite_gen",
+    srcs: [
+        "protos/perfetto/cloud_trace_processor/common.proto",
+        "protos/perfetto/cloud_trace_processor/orchestrator.proto",
+        "protos/perfetto/cloud_trace_processor/worker.proto",
+    ],
+    tools: [
+        "aprotoc",
+    ],
+    cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(in)",
+    out: [
+        "external/perfetto/protos/perfetto/cloud_trace_processor/common.pb.cc",
+        "external/perfetto/protos/perfetto/cloud_trace_processor/orchestrator.pb.cc",
+        "external/perfetto/protos/perfetto/cloud_trace_processor/worker.pb.cc",
+    ],
+}
+
+// GN: //protos/perfetto/cloud_trace_processor:lite
+genrule {
+    name: "perfetto_protos_perfetto_cloud_trace_processor_lite_gen_headers",
+    srcs: [
+        "protos/perfetto/cloud_trace_processor/common.proto",
+        "protos/perfetto/cloud_trace_processor/orchestrator.proto",
+        "protos/perfetto/cloud_trace_processor/worker.proto",
+    ],
+    tools: [
+        "aprotoc",
+    ],
+    cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(in)",
+    out: [
+        "external/perfetto/protos/perfetto/cloud_trace_processor/common.pb.h",
+        "external/perfetto/protos/perfetto/cloud_trace_processor/orchestrator.pb.h",
+        "external/perfetto/protos/perfetto/cloud_trace_processor/worker.pb.h",
+    ],
+    export_include_dirs: [
+        ".",
+        "protos",
+    ],
+}
+
 // GN: //protos/perfetto/common:cpp
 genrule {
     name: "perfetto_protos_perfetto_common_cpp_gen",
@@ -4413,6 +4463,64 @@
     ],
 }
 
+// GN: //protos/perfetto/metrics/webview:descriptor
+genrule {
+    name: "perfetto_protos_perfetto_metrics_webview_descriptor",
+    srcs: [
+        "protos/perfetto/metrics/android/android_blocking_calls_cuj_metric.proto",
+        "protos/perfetto/metrics/android/android_frame_timeline_metric.proto",
+        "protos/perfetto/metrics/android/android_trusty_workqueues.proto",
+        "protos/perfetto/metrics/android/batt_metric.proto",
+        "protos/perfetto/metrics/android/binder_metric.proto",
+        "protos/perfetto/metrics/android/camera_metric.proto",
+        "protos/perfetto/metrics/android/camera_unagg_metric.proto",
+        "protos/perfetto/metrics/android/cpu_metric.proto",
+        "protos/perfetto/metrics/android/display_metrics.proto",
+        "protos/perfetto/metrics/android/dma_heap_metric.proto",
+        "protos/perfetto/metrics/android/dvfs_metric.proto",
+        "protos/perfetto/metrics/android/fastrpc_metric.proto",
+        "protos/perfetto/metrics/android/g2d_metric.proto",
+        "protos/perfetto/metrics/android/gpu_metric.proto",
+        "protos/perfetto/metrics/android/hwcomposer.proto",
+        "protos/perfetto/metrics/android/hwui_metric.proto",
+        "protos/perfetto/metrics/android/ion_metric.proto",
+        "protos/perfetto/metrics/android/irq_runtime_metric.proto",
+        "protos/perfetto/metrics/android/jank_cuj_metric.proto",
+        "protos/perfetto/metrics/android/java_heap_histogram.proto",
+        "protos/perfetto/metrics/android/java_heap_stats.proto",
+        "protos/perfetto/metrics/android/lmk_metric.proto",
+        "protos/perfetto/metrics/android/lmk_reason_metric.proto",
+        "protos/perfetto/metrics/android/mem_metric.proto",
+        "protos/perfetto/metrics/android/mem_unagg_metric.proto",
+        "protos/perfetto/metrics/android/monitor_contention_metric.proto",
+        "protos/perfetto/metrics/android/multiuser_metric.proto",
+        "protos/perfetto/metrics/android/network_metric.proto",
+        "protos/perfetto/metrics/android/other_traces.proto",
+        "protos/perfetto/metrics/android/package_list.proto",
+        "protos/perfetto/metrics/android/powrails_metric.proto",
+        "protos/perfetto/metrics/android/process_metadata.proto",
+        "protos/perfetto/metrics/android/profiler_smaps.proto",
+        "protos/perfetto/metrics/android/rt_runtime_metric.proto",
+        "protos/perfetto/metrics/android/simpleperf.proto",
+        "protos/perfetto/metrics/android/startup_metric.proto",
+        "protos/perfetto/metrics/android/surfaceflinger.proto",
+        "protos/perfetto/metrics/android/task_names.proto",
+        "protos/perfetto/metrics/android/thread_time_in_state_metric.proto",
+        "protos/perfetto/metrics/android/trace_quality.proto",
+        "protos/perfetto/metrics/android/unsymbolized_frames.proto",
+        "protos/perfetto/metrics/metrics.proto",
+        "protos/perfetto/metrics/webview/all_webview_metrics.proto",
+        "protos/perfetto/metrics/webview/webview_jank_approximation.proto",
+    ],
+    tools: [
+        "aprotoc",
+    ],
+    cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --descriptor_set_out=$(out) $(in)",
+    out: [
+        "perfetto_protos_perfetto_metrics_webview_descriptor.bin",
+    ],
+}
+
 // GN: //protos/perfetto/trace/android:cpp
 genrule {
     name: "perfetto_protos_perfetto_trace_android_cpp_gen",
@@ -6787,6 +6895,48 @@
     ],
 }
 
+// GN: //protos/perfetto/trace_processor:lite
+genrule {
+    name: "perfetto_protos_perfetto_trace_processor_lite_gen",
+    srcs: [
+        "protos/perfetto/trace_processor/metatrace_categories.proto",
+        "protos/perfetto/trace_processor/stack.proto",
+        "protos/perfetto/trace_processor/trace_processor.proto",
+    ],
+    tools: [
+        "aprotoc",
+    ],
+    cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(in)",
+    out: [
+        "external/perfetto/protos/perfetto/trace_processor/metatrace_categories.pb.cc",
+        "external/perfetto/protos/perfetto/trace_processor/stack.pb.cc",
+        "external/perfetto/protos/perfetto/trace_processor/trace_processor.pb.cc",
+    ],
+}
+
+// GN: //protos/perfetto/trace_processor:lite
+genrule {
+    name: "perfetto_protos_perfetto_trace_processor_lite_gen_headers",
+    srcs: [
+        "protos/perfetto/trace_processor/metatrace_categories.proto",
+        "protos/perfetto/trace_processor/stack.proto",
+        "protos/perfetto/trace_processor/trace_processor.proto",
+    ],
+    tools: [
+        "aprotoc",
+    ],
+    cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(in)",
+    out: [
+        "external/perfetto/protos/perfetto/trace_processor/metatrace_categories.pb.h",
+        "external/perfetto/protos/perfetto/trace_processor/stack.pb.h",
+        "external/perfetto/protos/perfetto/trace_processor/trace_processor.pb.h",
+    ],
+    export_include_dirs: [
+        ".",
+        "protos",
+    ],
+}
+
 // GN: //protos/perfetto/trace_processor:metrics_impl_zero
 genrule {
     name: "perfetto_protos_perfetto_trace_processor_metrics_impl_zero_gen",
@@ -6827,7 +6977,6 @@
 genrule {
     name: "perfetto_protos_perfetto_trace_processor_zero_gen",
     srcs: [
-        "protos/perfetto/trace_processor/cloud_trace_processor.proto",
         "protos/perfetto/trace_processor/metatrace_categories.proto",
         "protos/perfetto/trace_processor/stack.proto",
         "protos/perfetto/trace_processor/trace_processor.proto",
@@ -6838,7 +6987,6 @@
     ],
     cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location protozero_plugin) --plugin_out=wrapper_namespace=pbzero:$(genDir)/external/perfetto/ $(in)",
     out: [
-        "external/perfetto/protos/perfetto/trace_processor/cloud_trace_processor.pbzero.cc",
         "external/perfetto/protos/perfetto/trace_processor/metatrace_categories.pbzero.cc",
         "external/perfetto/protos/perfetto/trace_processor/stack.pbzero.cc",
         "external/perfetto/protos/perfetto/trace_processor/trace_processor.pbzero.cc",
@@ -6849,7 +6997,6 @@
 genrule {
     name: "perfetto_protos_perfetto_trace_processor_zero_gen_headers",
     srcs: [
-        "protos/perfetto/trace_processor/cloud_trace_processor.proto",
         "protos/perfetto/trace_processor/metatrace_categories.proto",
         "protos/perfetto/trace_processor/stack.proto",
         "protos/perfetto/trace_processor/trace_processor.proto",
@@ -6860,7 +7007,6 @@
     ],
     cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location protozero_plugin) --plugin_out=wrapper_namespace=pbzero:$(genDir)/external/perfetto/ $(in)",
     out: [
-        "external/perfetto/protos/perfetto/trace_processor/cloud_trace_processor.pbzero.h",
         "external/perfetto/protos/perfetto/trace_processor/metatrace_categories.pbzero.h",
         "external/perfetto/protos/perfetto/trace_processor/stack.pbzero.h",
         "external/perfetto/protos/perfetto/trace_processor/trace_processor.pbzero.h",
@@ -8313,6 +8459,24 @@
     ],
 }
 
+// GN: //src/cloud_trace_processor:sources
+filegroup {
+    name: "perfetto_src_cloud_trace_processor_sources",
+    srcs: [
+        "src/cloud_trace_processor/orchestrator_impl.cc",
+        "src/cloud_trace_processor/trace_processor_wrapper.cc",
+        "src/cloud_trace_processor/worker_impl.cc",
+    ],
+}
+
+// GN: //src/cloud_trace_processor:unittests
+filegroup {
+    name: "perfetto_src_cloud_trace_processor_unittests",
+    srcs: [
+        "src/cloud_trace_processor/trace_processor_wrapper_unittest.cc",
+    ],
+}
+
 // GN: //src/ipc:client
 filegroup {
     name: "perfetto_src_ipc_client",
@@ -9220,6 +9384,8 @@
     srcs: [
         "src/trace_processor/db/column.cc",
         "src/trace_processor/db/column_storage.cc",
+        "src/trace_processor/db/numeric_storage.cc",
+        "src/trace_processor/db/storage.cc",
         "src/trace_processor/db/table.cc",
         "src/trace_processor/db/view.cc",
     ],
@@ -9231,11 +9397,39 @@
     srcs: [
         "src/trace_processor/db/column_storage_overlay_unittest.cc",
         "src/trace_processor/db/compare_unittest.cc",
-        "src/trace_processor/db/table_unittest.cc",
+        "src/trace_processor/db/storage_unittest.cc",
         "src/trace_processor/db/view_unittest.cc",
     ],
 }
 
+// GN: //src/trace_processor/db:view_unittest
+genrule {
+    name: "perfetto_src_trace_processor_db_view_unittest",
+    srcs: [
+        "src/trace_processor/db/view_unittest.py",
+    ],
+    tools: [
+        "perfetto_src_trace_processor_db_view_unittest_binary",
+    ],
+    cmd: "$(location perfetto_src_trace_processor_db_view_unittest_binary) --gen-dir=$(genDir) --relative-input-dir=external/perfetto --inputs $(in)",
+    out: [
+        "src/trace_processor/db/view_unittest_py.h",
+    ],
+}
+
+// GN: //src/trace_processor/db:view_unittest
+python_binary_host {
+    name: "perfetto_src_trace_processor_db_view_unittest_binary",
+    srcs: [
+        "python/generators/trace_processor_table/public.py",
+        "python/generators/trace_processor_table/serialize.py",
+        "python/generators/trace_processor_table/util.py",
+        "src/trace_processor/db/view_unittest.py",
+        "tools/gen_tp_table_headers.py",
+    ],
+    main: "tools/gen_tp_table_headers.py",
+}
+
 // GN: //src/trace_processor:demangle
 cc_library_static {
     name: "perfetto_src_trace_processor_demangle",
@@ -9300,6 +9494,7 @@
         "src/trace_processor/importers/common/args_tracker.cc",
         "src/trace_processor/importers/common/args_translation_table.cc",
         "src/trace_processor/importers/common/async_track_set_tracker.cc",
+        "src/trace_processor/importers/common/clock_converter.cc",
         "src/trace_processor/importers/common/clock_tracker.cc",
         "src/trace_processor/importers/common/deobfuscation_mapping_table.cc",
         "src/trace_processor/importers/common/event_tracker.cc",
@@ -9331,6 +9526,7 @@
     srcs: [
         "src/trace_processor/importers/common/args_translation_table_unittest.cc",
         "src/trace_processor/importers/common/async_track_set_tracker_unittest.cc",
+        "src/trace_processor/importers/common/clock_converter_unittest.cc",
         "src/trace_processor/importers/common/clock_tracker_unittest.cc",
         "src/trace_processor/importers/common/deobfuscation_mapping_table_unittest.cc",
         "src/trace_processor/importers/common/event_tracker_unittest.cc",
@@ -9722,6 +9918,21 @@
     ],
 }
 
+// GN: //src/trace_processor/metrics:gen_cc_all_webview_metrics_descriptor
+genrule {
+    name: "perfetto_src_trace_processor_metrics_gen_cc_all_webview_metrics_descriptor",
+    srcs: [
+        ":perfetto_protos_perfetto_metrics_webview_descriptor",
+    ],
+    cmd: "$(location tools/gen_cc_proto_descriptor.py) --gen_dir=$(genDir) --cpp_out=$(out) $(in)",
+    out: [
+        "src/trace_processor/metrics/all_webview_metrics.descriptor.h",
+    ],
+    tool_files: [
+        "tools/gen_cc_proto_descriptor.py",
+    ],
+}
+
 // GN: //src/trace_processor/metrics:gen_cc_metrics_descriptor
 genrule {
     name: "perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
@@ -9911,6 +10122,7 @@
         "src/trace_processor/metrics/sql/experimental/reported_by_page.sql",
         "src/trace_processor/metrics/sql/trace_metadata.sql",
         "src/trace_processor/metrics/sql/trace_stats.sql",
+        "src/trace_processor/metrics/sql/webview/webview_jank_approximation.sql",
         "src/trace_processor/metrics/sql/webview/webview_power_usage.sql",
     ],
     cmd: "$(location tools/gen_amalgamated_sql.py) --namespace=sql_metrics --cpp-out=$(out) $(in)",
@@ -9943,6 +10155,7 @@
         "src/trace_processor/prelude/functions/register_function.cc",
         "src/trace_processor/prelude/functions/sqlite3_str_split.cc",
         "src/trace_processor/prelude/functions/stack_functions.cc",
+        "src/trace_processor/prelude/functions/to_ftrace.cc",
     ],
 }
 
@@ -9990,6 +10203,43 @@
     ],
 }
 
+// GN: //src/trace_processor/prelude/table_functions:tables
+genrule {
+    name: "perfetto_src_trace_processor_prelude_table_functions_tables",
+    srcs: [
+        "src/trace_processor/prelude/table_functions/tables.py",
+    ],
+    tools: [
+        "perfetto_src_trace_processor_prelude_table_functions_tables_binary",
+    ],
+    cmd: "$(location perfetto_src_trace_processor_prelude_table_functions_tables_binary) --gen-dir=$(genDir) --relative-input-dir=external/perfetto --inputs $(in)",
+    out: [
+        "src/trace_processor/prelude/table_functions/tables_py.h",
+    ],
+}
+
+// GN: //src/trace_processor/prelude/table_functions:tables
+python_binary_host {
+    name: "perfetto_src_trace_processor_prelude_table_functions_tables_binary",
+    srcs: [
+        "python/generators/trace_processor_table/public.py",
+        "python/generators/trace_processor_table/serialize.py",
+        "python/generators/trace_processor_table/util.py",
+        "src/trace_processor/prelude/table_functions/tables.py",
+        "src/trace_processor/tables/android_tables.py",
+        "src/trace_processor/tables/counter_tables.py",
+        "src/trace_processor/tables/flow_tables.py",
+        "src/trace_processor/tables/memory_tables.py",
+        "src/trace_processor/tables/metadata_tables.py",
+        "src/trace_processor/tables/profiler_tables.py",
+        "src/trace_processor/tables/slice_tables.py",
+        "src/trace_processor/tables/trace_proto_tables.py",
+        "src/trace_processor/tables/track_tables.py",
+        "tools/gen_tp_table_headers.py",
+    ],
+    main: "tools/gen_tp_table_headers.py",
+}
+
 // GN: //src/trace_processor/prelude/table_functions:unittests
 filegroup {
     name: "perfetto_src_trace_processor_prelude_table_functions_unittests",
@@ -10003,6 +10253,22 @@
     ],
 }
 
+// GN: //src/trace_processor/prelude/tables_views:tables_views
+genrule {
+    name: "perfetto_src_trace_processor_prelude_tables_views_tables_views",
+    srcs: [
+        "src/trace_processor/prelude/tables_views/tables.sql",
+        "src/trace_processor/prelude/tables_views/views.sql",
+    ],
+    cmd: "$(location tools/gen_amalgamated_sql.py) --namespace=prelude::tables_views --cpp-out=$(out) $(in)",
+    out: [
+        "src/trace_processor/prelude/tables_views/tables_views.h",
+    ],
+    tool_files: [
+        "tools/gen_amalgamated_sql.py",
+    ],
+}
+
 // GN: //src/trace_processor/rpc:httpd
 filegroup {
     name: "perfetto_src_trace_processor_rpc_httpd",
@@ -10052,7 +10318,7 @@
     srcs: [
         "src/trace_processor/sqlite/db_sqlite_table.cc",
         "src/trace_processor/sqlite/sql_stats_table.cc",
-        "src/trace_processor/sqlite/sqlite_raw_table.cc",
+        "src/trace_processor/sqlite/sqlite_engine.cc",
         "src/trace_processor/sqlite/sqlite_utils.cc",
         "src/trace_processor/sqlite/stats_table.cc",
     ],
@@ -10092,6 +10358,7 @@
         "src/trace_processor/stdlib/android/startup/startups.sql",
         "src/trace_processor/stdlib/chrome/cpu_powerups.sql",
         "src/trace_processor/stdlib/common/counters.sql",
+        "src/trace_processor/stdlib/common/cpus.sql",
         "src/trace_processor/stdlib/common/metadata.sql",
         "src/trace_processor/stdlib/common/percentiles.sql",
         "src/trace_processor/stdlib/common/slices.sql",
@@ -10139,7 +10406,7 @@
     tools: [
         "perfetto_src_trace_processor_tables_py_tables_unittest_binary",
     ],
-    cmd: "$(location perfetto_src_trace_processor_tables_py_tables_unittest_binary) --gen-dir=$(genDir) --inputs $(in) --outputs $(out)",
+    cmd: "$(location perfetto_src_trace_processor_tables_py_tables_unittest_binary) --gen-dir=$(genDir) --relative-input-dir=external/perfetto --inputs $(in)",
     out: [
         "src/trace_processor/tables/py_tables_unittest_py.h",
     ],
@@ -10183,7 +10450,7 @@
     tools: [
         "perfetto_src_trace_processor_tables_tables_python_binary",
     ],
-    cmd: "$(location perfetto_src_trace_processor_tables_tables_python_binary) --gen-dir=$(genDir) --inputs $(in) --outputs $(out)",
+    cmd: "$(location perfetto_src_trace_processor_tables_tables_python_binary) --gen-dir=$(genDir) --relative-input-dir=external/perfetto --inputs $(in)",
     out: [
         "src/trace_processor/tables/android_tables_py.h",
         "src/trace_processor/tables/counter_tables_py.h",
@@ -10222,7 +10489,6 @@
 filegroup {
     name: "perfetto_src_trace_processor_tables_unittests",
     srcs: [
-        "src/trace_processor/tables/macros_unittest.cc",
         "src/trace_processor/tables/py_tables_unittest.cc",
     ],
 }
@@ -10243,7 +10509,6 @@
         "src/trace_processor/types/destructible.cc",
         "src/trace_processor/types/gfp_flags.cc",
         "src/trace_processor/types/task_state.cc",
-        "src/trace_processor/types/variadic.cc",
     ],
 }
 
@@ -10383,6 +10648,34 @@
     ],
 }
 
+// GN: //src/trace_processor/views:macros_unittest
+genrule {
+    name: "perfetto_src_trace_processor_views_macros_unittest",
+    srcs: [
+        "src/trace_processor/views/macros_unittest.py",
+    ],
+    tools: [
+        "perfetto_src_trace_processor_views_macros_unittest_binary",
+    ],
+    cmd: "$(location perfetto_src_trace_processor_views_macros_unittest_binary) --gen-dir=$(genDir) --relative-input-dir=external/perfetto --inputs $(in)",
+    out: [
+        "src/trace_processor/views/macros_unittest_py.h",
+    ],
+}
+
+// GN: //src/trace_processor/views:macros_unittest
+python_binary_host {
+    name: "perfetto_src_trace_processor_views_macros_unittest_binary",
+    srcs: [
+        "python/generators/trace_processor_table/public.py",
+        "python/generators/trace_processor_table/serialize.py",
+        "python/generators/trace_processor_table/util.py",
+        "src/trace_processor/views/macros_unittest.py",
+        "tools/gen_tp_table_headers.py",
+    ],
+    main: "tools/gen_tp_table_headers.py",
+}
+
 // GN: //src/trace_processor/views:unittests
 filegroup {
     name: "perfetto_src_trace_processor_views_unittests",
@@ -10444,6 +10737,14 @@
     ],
 }
 
+// GN: //src/traceconv:unittests
+filegroup {
+    name: "perfetto_src_traceconv_unittests",
+    srcs: [
+        "src/traceconv/trace_to_text_unittest.cc",
+    ],
+}
+
 // GN: //src/traceconv:utils
 filegroup {
     name: "perfetto_src_traceconv_utils",
@@ -10987,6 +11288,7 @@
 filegroup {
     name: "perfetto_src_tracing_core_unittests",
     srcs: [
+        "src/tracing/core/histogram_unittest.cc",
         "src/tracing/core/id_allocator_unittest.cc",
         "src/tracing/core/null_trace_writer_unittest.cc",
         "src/tracing/core/packet_stream_validator_unittest.cc",
@@ -11492,6 +11794,7 @@
         ":perfetto_include_perfetto_ext_base_http_http",
         ":perfetto_include_perfetto_ext_base_threading_threading",
         ":perfetto_include_perfetto_ext_base_version",
+        ":perfetto_include_perfetto_ext_cloud_trace_processor_cloud_trace_processor",
         ":perfetto_include_perfetto_ext_ipc_ipc",
         ":perfetto_include_perfetto_ext_trace_processor_demangle",
         ":perfetto_include_perfetto_ext_trace_processor_export_json",
@@ -11500,6 +11803,7 @@
         ":perfetto_include_perfetto_ext_traced_traced",
         ":perfetto_include_perfetto_ext_tracing_core_core",
         ":perfetto_include_perfetto_ext_tracing_ipc_ipc",
+        ":perfetto_include_perfetto_profiling_pprof_builder",
         ":perfetto_include_perfetto_protozero_protozero",
         ":perfetto_include_perfetto_public_abi_base",
         ":perfetto_include_perfetto_public_base",
@@ -11511,6 +11815,7 @@
         ":perfetto_include_perfetto_tracing_core_core",
         ":perfetto_include_perfetto_tracing_core_forward_decls",
         ":perfetto_include_perfetto_tracing_tracing",
+        ":perfetto_protos_perfetto_cloud_trace_processor_lite_gen",
         ":perfetto_protos_perfetto_common_cpp_gen",
         ":perfetto_protos_perfetto_common_lite_gen",
         ":perfetto_protos_perfetto_common_zero_gen",
@@ -11586,6 +11891,7 @@
         ":perfetto_protos_perfetto_trace_power_cpp_gen",
         ":perfetto_protos_perfetto_trace_power_lite_gen",
         ":perfetto_protos_perfetto_trace_power_zero_gen",
+        ":perfetto_protos_perfetto_trace_processor_lite_gen",
         ":perfetto_protos_perfetto_trace_processor_metrics_impl_zero_gen",
         ":perfetto_protos_perfetto_trace_processor_zero_gen",
         ":perfetto_protos_perfetto_trace_profiling_cpp_gen",
@@ -11624,6 +11930,8 @@
         ":perfetto_src_base_unittests",
         ":perfetto_src_base_unix_socket",
         ":perfetto_src_base_version",
+        ":perfetto_src_cloud_trace_processor_sources",
+        ":perfetto_src_cloud_trace_processor_unittests",
         ":perfetto_src_ipc_client",
         ":perfetto_src_ipc_common",
         ":perfetto_src_ipc_host",
@@ -11661,6 +11969,7 @@
         ":perfetto_src_profiling_perf_producer_unittests",
         ":perfetto_src_profiling_perf_regs_parsing",
         ":perfetto_src_profiling_perf_unwinding",
+        ":perfetto_src_profiling_symbolizer_symbolize_database",
         ":perfetto_src_profiling_symbolizer_symbolizer",
         ":perfetto_src_profiling_symbolizer_unittests",
         ":perfetto_src_profiling_unittests",
@@ -11755,6 +12064,10 @@
         ":perfetto_src_trace_processor_util_zip_reader",
         ":perfetto_src_trace_processor_views_unittests",
         ":perfetto_src_trace_processor_views_views",
+        ":perfetto_src_traceconv_lib",
+        ":perfetto_src_traceconv_pprofbuilder",
+        ":perfetto_src_traceconv_unittests",
+        ":perfetto_src_traceconv_utils",
         ":perfetto_src_traced_probes_android_game_intervention_list_android_game_intervention_list",
         ":perfetto_src_traced_probes_android_game_intervention_list_unittests",
         ":perfetto_src_traced_probes_android_log_android_log",
@@ -11835,6 +12148,7 @@
         "perfetto_gtest_logcat_printer",
     ],
     generated_headers: [
+        "perfetto_protos_perfetto_cloud_trace_processor_lite_gen_headers",
         "perfetto_protos_perfetto_common_cpp_gen_headers",
         "perfetto_protos_perfetto_common_lite_gen_headers",
         "perfetto_protos_perfetto_common_zero_gen_headers",
@@ -11910,6 +12224,7 @@
         "perfetto_protos_perfetto_trace_power_cpp_gen_headers",
         "perfetto_protos_perfetto_trace_power_lite_gen_headers",
         "perfetto_protos_perfetto_trace_power_zero_gen_headers",
+        "perfetto_protos_perfetto_trace_processor_lite_gen_headers",
         "perfetto_protos_perfetto_trace_processor_metrics_impl_zero_gen_headers",
         "perfetto_protos_perfetto_trace_processor_zero_gen_headers",
         "perfetto_protos_perfetto_trace_profiling_cpp_gen_headers",
@@ -11943,6 +12258,7 @@
         "perfetto_src_protozero_testing_messages_cpp_gen_headers",
         "perfetto_src_protozero_testing_messages_lite_gen_headers",
         "perfetto_src_protozero_testing_messages_zero_gen_headers",
+        "perfetto_src_trace_processor_db_view_unittest",
         "perfetto_src_trace_processor_gen_cc_test_messages_descriptor",
         "perfetto_src_trace_processor_importers_proto_gen_cc_chrome_track_event_descriptor",
         "perfetto_src_trace_processor_importers_proto_gen_cc_config_descriptor",
@@ -11950,11 +12266,16 @@
         "perfetto_src_trace_processor_importers_proto_gen_cc_trace_descriptor",
         "perfetto_src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
         "perfetto_src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
+        "perfetto_src_trace_processor_metrics_gen_cc_all_webview_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
+        "perfetto_src_trace_processor_prelude_table_functions_tables",
+        "perfetto_src_trace_processor_prelude_tables_views_tables_views",
         "perfetto_src_trace_processor_stdlib_gen_amalgamated_stdlib",
         "perfetto_src_trace_processor_tables_py_tables_unittest",
         "perfetto_src_trace_processor_tables_tables_python",
+        "perfetto_src_trace_processor_views_macros_unittest",
+        "perfetto_src_traceconv_gen_cc_trace_descriptor",
         "perfetto_src_traced_probes_ftrace_test_messages_cpp_gen_headers",
         "perfetto_src_traced_probes_ftrace_test_messages_lite_gen_headers",
         "perfetto_src_traced_probes_ftrace_test_messages_zero_gen_headers",
@@ -12465,8 +12786,11 @@
         "perfetto_src_trace_processor_importers_proto_gen_cc_trace_descriptor",
         "perfetto_src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
         "perfetto_src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
+        "perfetto_src_trace_processor_metrics_gen_cc_all_webview_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
+        "perfetto_src_trace_processor_prelude_table_functions_tables",
+        "perfetto_src_trace_processor_prelude_tables_views_tables_views",
         "perfetto_src_trace_processor_stdlib_gen_amalgamated_stdlib",
         "perfetto_src_trace_processor_tables_tables_python",
     ],
@@ -12687,8 +13011,11 @@
         "perfetto_src_trace_processor_importers_proto_gen_cc_trace_descriptor",
         "perfetto_src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
         "perfetto_src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
+        "perfetto_src_trace_processor_metrics_gen_cc_all_webview_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
+        "perfetto_src_trace_processor_prelude_table_functions_tables",
+        "perfetto_src_trace_processor_prelude_tables_views_tables_views",
         "perfetto_src_trace_processor_stdlib_gen_amalgamated_stdlib",
         "perfetto_src_trace_processor_tables_tables_python",
         "perfetto_src_traceconv_gen_cc_trace_descriptor",
diff --git a/BUILD b/BUILD
index c238db2..a8826c5 100644
--- a/BUILD
+++ b/BUILD
@@ -1082,10 +1082,19 @@
         "src/trace_processor/db/base_id.h",
         "src/trace_processor/db/column.cc",
         "src/trace_processor/db/column.h",
+        "src/trace_processor/db/column_overlay.h",
         "src/trace_processor/db/column_storage.cc",
         "src/trace_processor/db/column_storage.h",
         "src/trace_processor/db/column_storage_overlay.h",
         "src/trace_processor/db/compare.h",
+        "src/trace_processor/db/null_overlay.h",
+        "src/trace_processor/db/numeric_storage.cc",
+        "src/trace_processor/db/numeric_storage.h",
+        "src/trace_processor/db/sorting_overlay.h",
+        "src/trace_processor/db/storage.cc",
+        "src/trace_processor/db/storage.h",
+        "src/trace_processor/db/storage_overlay.h",
+        "src/trace_processor/db/storage_variants.h",
         "src/trace_processor/db/table.cc",
         "src/trace_processor/db/table.h",
         "src/trace_processor/db/typed_column.h",
@@ -1117,6 +1126,8 @@
         "src/trace_processor/importers/common/async_track_set_tracker.cc",
         "src/trace_processor/importers/common/async_track_set_tracker.h",
         "src/trace_processor/importers/common/chunked_trace_reader.h",
+        "src/trace_processor/importers/common/clock_converter.cc",
+        "src/trace_processor/importers/common/clock_converter.h",
         "src/trace_processor/importers/common/clock_tracker.cc",
         "src/trace_processor/importers/common/clock_tracker.h",
         "src/trace_processor/importers/common/deobfuscation_mapping_table.cc",
@@ -1702,6 +1713,7 @@
 perfetto_filegroup(
     name = "src_trace_processor_metrics_sql_webview_webview",
     srcs = [
+        "src/trace_processor/metrics/sql/webview/webview_jank_approximation.sql",
         "src/trace_processor/metrics/sql/webview/webview_power_usage.sql",
     ],
 )
@@ -1743,6 +1755,17 @@
     ],
 )
 
+# GN target: //src/trace_processor/metrics:gen_cc_all_webview_metrics_descriptor
+perfetto_cc_proto_descriptor(
+    name = "src_trace_processor_metrics_gen_cc_all_webview_metrics_descriptor",
+    deps = [
+        ":protos_perfetto_metrics_webview_descriptor",
+    ],
+    outs = [
+        "src/trace_processor/metrics/all_webview_metrics.descriptor.h",
+    ],
+)
+
 # GN target: //src/trace_processor/metrics:gen_cc_metrics_descriptor
 perfetto_cc_proto_descriptor(
     name = "src_trace_processor_metrics_gen_cc_metrics_descriptor",
@@ -1767,6 +1790,7 @@
 perfetto_filegroup(
     name = "src_trace_processor_prelude_functions_functions",
     srcs = [
+        "src/trace_processor/prelude/functions/clock_functions.h",
         "src/trace_processor/prelude/functions/create_function.cc",
         "src/trace_processor/prelude/functions/create_function.h",
         "src/trace_processor/prelude/functions/create_function_internal.cc",
@@ -1785,6 +1809,8 @@
         "src/trace_processor/prelude/functions/sqlite3_str_split.h",
         "src/trace_processor/prelude/functions/stack_functions.cc",
         "src/trace_processor/prelude/functions/stack_functions.h",
+        "src/trace_processor/prelude/functions/to_ftrace.cc",
+        "src/trace_processor/prelude/functions/to_ftrace.h",
         "src/trace_processor/prelude/functions/utils.h",
         "src/trace_processor/prelude/functions/window_functions.h",
     ],
@@ -1832,6 +1858,41 @@
     ],
 )
 
+# GN target: //src/trace_processor/prelude/table_functions:tables
+perfetto_cc_tp_tables(
+    name = "src_trace_processor_prelude_table_functions_tables",
+    srcs = [
+        "src/trace_processor/prelude/table_functions/tables.py",
+    ],
+    deps = [
+        ":src_trace_processor_tables_tables_python",
+    ],
+    outs = [
+        "src/trace_processor/prelude/table_functions/tables_py.h",
+    ],
+)
+
+# GN target: //src/trace_processor/prelude/tables_views:sources
+perfetto_filegroup(
+    name = "src_trace_processor_prelude_tables_views_sources",
+    srcs = [
+        "src/trace_processor/prelude/tables_views/tables.sql",
+        "src/trace_processor/prelude/tables_views/views.sql",
+    ],
+)
+
+# GN target: //src/trace_processor/prelude/tables_views:tables_views
+perfetto_cc_amalgamated_sql(
+    name = "src_trace_processor_prelude_tables_views_tables_views",
+    deps = [
+        ":src_trace_processor_prelude_tables_views_sources",
+    ],
+    outs = [
+        "src/trace_processor/prelude/tables_views/tables_views.h",
+    ],
+    namespace = "prelude::tables_views",
+)
+
 # GN target: //src/trace_processor/rpc:httpd
 perfetto_filegroup(
     name = "src_trace_processor_rpc_httpd",
@@ -1872,8 +1933,8 @@
         "src/trace_processor/sqlite/query_cache.h",
         "src/trace_processor/sqlite/sql_stats_table.cc",
         "src/trace_processor/sqlite/sql_stats_table.h",
-        "src/trace_processor/sqlite/sqlite_raw_table.cc",
-        "src/trace_processor/sqlite/sqlite_raw_table.h",
+        "src/trace_processor/sqlite/sqlite_engine.cc",
+        "src/trace_processor/sqlite/sqlite_engine.h",
         "src/trace_processor/sqlite/sqlite_utils.cc",
         "src/trace_processor/sqlite/sqlite_utils.h",
         "src/trace_processor/sqlite/stats_table.cc",
@@ -1930,6 +1991,7 @@
     name = "src_trace_processor_stdlib_common_common",
     srcs = [
         "src/trace_processor/stdlib/common/counters.sql",
+        "src/trace_processor/stdlib/common/cpus.sql",
         "src/trace_processor/stdlib/common/metadata.sql",
         "src/trace_processor/stdlib/common/percentiles.sql",
         "src/trace_processor/stdlib/common/slices.sql",
@@ -1986,12 +2048,7 @@
 perfetto_filegroup(
     name = "src_trace_processor_tables_tables",
     srcs = [
-        "src/trace_processor/tables/counter_tables.h",
-        "src/trace_processor/tables/flow_tables.h",
-        "src/trace_processor/tables/macros.h",
         "src/trace_processor/tables/macros_internal.h",
-        "src/trace_processor/tables/profiler_tables.h",
-        "src/trace_processor/tables/slice_tables.h",
         "src/trace_processor/tables/table_destructors.cc",
     ],
 )
@@ -2036,7 +2093,6 @@
         "src/trace_processor/types/task_state.h",
         "src/trace_processor/types/tcp_state.h",
         "src/trace_processor/types/trace_processor_context.h",
-        "src/trace_processor/types/variadic.cc",
         "src/trace_processor/types/variadic.h",
         "src/trace_processor/types/version_number.h",
     ],
@@ -2545,6 +2601,7 @@
 perfetto_filegroup(
     name = "src_tracing_core_core",
     srcs = [
+        "src/tracing/core/histogram.h",
         "src/tracing/core/id_allocator.cc",
         "src/tracing/core/id_allocator.h",
         "src/tracing/core/null_trace_writer.cc",
@@ -2697,7 +2754,9 @@
 # GN target: [//protos/perfetto/config:source_set]
 perfetto_proto_library(
     name = "config_proto",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":protos_perfetto_common_protos",
         ":protos_perfetto_config_android_protos",
@@ -2719,7 +2778,9 @@
 # GN target: [//protos/perfetto/config:source_set]
 perfetto_cc_proto_library(
     name = "config_cc_proto",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":config_proto",
     ],
@@ -2728,7 +2789,9 @@
 # GN target: [//protos/perfetto/config:source_set]
 perfetto_java_proto_library(
     name = "config_java_proto",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":config_proto",
     ],
@@ -2737,7 +2800,9 @@
 # GN target: [//protos/perfetto/config:source_set]
 perfetto_java_lite_proto_library(
     name = "config_java_proto_lite",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":config_proto",
     ],
@@ -2746,7 +2811,9 @@
 # GN target: [//protos/perfetto/config:source_set]
 perfetto_py_proto_library(
     name = "config_py_pb2",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":config_proto",
     ],
@@ -2830,7 +2897,9 @@
 # GN target: [//protos/perfetto/metrics:source_set]
 perfetto_proto_library(
     name = "metrics_proto",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":protos_perfetto_metrics_android_protos",
         ":protos_perfetto_metrics_protos",
@@ -2840,7 +2909,9 @@
 # GN target: [//protos/perfetto/metrics:source_set]
 perfetto_cc_proto_library(
     name = "metrics_cc_proto",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":metrics_proto",
     ],
@@ -2849,7 +2920,9 @@
 # GN target: [//protos/perfetto/metrics:source_set]
 perfetto_java_proto_library(
     name = "metrics_java_proto",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":metrics_proto",
     ],
@@ -2858,7 +2931,9 @@
 # GN target: [//protos/perfetto/metrics:source_set]
 perfetto_java_lite_proto_library(
     name = "metrics_java_proto_lite",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":metrics_proto",
     ],
@@ -2867,7 +2942,9 @@
 # GN target: [//protos/perfetto/metrics:source_set]
 perfetto_py_proto_library(
     name = "metrics_py_pb2",
-    visibility = PERFETTO_CONFIG.public_visibility,
+    visibility = [
+        "//visibility:public",
+    ],
     deps = [
         ":metrics_proto",
     ],
@@ -3676,6 +3753,33 @@
     ],
 )
 
+# GN target: //protos/perfetto/metrics/webview:descriptor
+perfetto_proto_descriptor(
+    name = "protos_perfetto_metrics_webview_descriptor",
+    deps = [
+        ":protos_perfetto_metrics_webview_protos",
+    ],
+    outs = [
+        "protos_perfetto_metrics_webview_descriptor.bin",
+    ],
+)
+
+# GN target: //protos/perfetto/metrics/webview:source_set
+perfetto_proto_library(
+    name = "protos_perfetto_metrics_webview_protos",
+    srcs = [
+        "protos/perfetto/metrics/webview/all_webview_metrics.proto",
+        "protos/perfetto/metrics/webview/webview_jank_approximation.proto",
+    ],
+    visibility = [
+        PERFETTO_CONFIG.proto_library_visibility,
+    ],
+    deps = [
+        ":protos_perfetto_metrics_android_protos",
+        ":protos_perfetto_metrics_protos",
+    ],
+)
+
 # GN target: //protos/perfetto/trace/android:source_set
 perfetto_proto_library(
     name = "protos_perfetto_trace_android_protos",
@@ -4112,7 +4216,6 @@
 perfetto_proto_library(
     name = "protos_perfetto_trace_processor_protos",
     srcs = [
-        "protos/perfetto/trace_processor/cloud_trace_processor.proto",
         "protos/perfetto/trace_processor/metatrace_categories.proto",
         "protos/perfetto/trace_processor/stack.proto",
         "protos/perfetto/trace_processor/trace_processor.proto",
@@ -4652,6 +4755,7 @@
         ":src_trace_processor_prelude_functions_functions",
         ":src_trace_processor_prelude_operators_operators",
         ":src_trace_processor_prelude_table_functions_table_functions",
+        ":src_trace_processor_prelude_table_functions_tables",
         ":src_trace_processor_sorter_sorter",
         ":src_trace_processor_sqlite_sqlite",
         ":src_trace_processor_sqlite_sqlite_minimal",
@@ -4738,8 +4842,10 @@
                ":src_trace_processor_importers_proto_gen_cc_trace_descriptor",
                ":src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
                ":src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
+               ":src_trace_processor_metrics_gen_cc_all_webview_metrics_descriptor",
                ":src_trace_processor_metrics_gen_cc_metrics_descriptor",
                ":src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
+               ":src_trace_processor_prelude_tables_views_tables_views",
                ":src_trace_processor_stdlib_gen_amalgamated_stdlib",
            ] + PERFETTO_CONFIG.deps.jsoncpp +
            PERFETTO_CONFIG.deps.sqlite +
@@ -4803,6 +4909,7 @@
         ":src_trace_processor_prelude_functions_functions",
         ":src_trace_processor_prelude_operators_operators",
         ":src_trace_processor_prelude_table_functions_table_functions",
+        ":src_trace_processor_prelude_table_functions_tables",
         ":src_trace_processor_rpc_httpd",
         ":src_trace_processor_rpc_rpc",
         ":src_trace_processor_sorter_sorter",
@@ -4881,8 +4988,10 @@
                ":src_trace_processor_importers_proto_gen_cc_trace_descriptor",
                ":src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
                ":src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
+               ":src_trace_processor_metrics_gen_cc_all_webview_metrics_descriptor",
                ":src_trace_processor_metrics_gen_cc_metrics_descriptor",
                ":src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
+               ":src_trace_processor_prelude_tables_views_tables_views",
                ":src_trace_processor_stdlib_gen_amalgamated_stdlib",
            ] + PERFETTO_CONFIG.deps.jsoncpp +
            PERFETTO_CONFIG.deps.linenoise +
@@ -5013,6 +5122,7 @@
         ":src_trace_processor_prelude_functions_functions",
         ":src_trace_processor_prelude_operators_operators",
         ":src_trace_processor_prelude_table_functions_table_functions",
+        ":src_trace_processor_prelude_table_functions_tables",
         ":src_trace_processor_sorter_sorter",
         ":src_trace_processor_sqlite_sqlite",
         ":src_trace_processor_sqlite_sqlite_minimal",
@@ -5089,8 +5199,10 @@
                ":src_trace_processor_importers_proto_gen_cc_trace_descriptor",
                ":src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
                ":src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
+               ":src_trace_processor_metrics_gen_cc_all_webview_metrics_descriptor",
                ":src_trace_processor_metrics_gen_cc_metrics_descriptor",
                ":src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
+               ":src_trace_processor_prelude_tables_views_tables_views",
                ":src_trace_processor_stdlib_gen_amalgamated_stdlib",
                ":src_traceconv_gen_cc_trace_descriptor",
            ] + PERFETTO_CONFIG.deps.jsoncpp +
diff --git a/BUILD.gn b/BUILD.gn
index 77bafbc..c48159e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -42,6 +42,7 @@
 }
 
 if (enable_perfetto_trace_processor && enable_perfetto_trace_processor_sqlite) {
+  all_targets += [ "src/cloud_trace_processor" ]
   all_targets += [ "src/trace_processor:trace_processor_shell" ]
 }
 
diff --git a/CHANGELOG b/CHANGELOG
index 7662692..6e371a4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,11 +1,21 @@
 Unreleased:
   Tracing service and probes:
+    *
+  UI:
+    *
+  SDK:
+    *
+
+v34.0 - 2023-05-02:
+  Tracing service and probes:
     * --continuous-dump in tools/java_heap_dump now keeps recording until it
       receives CTRL+C.
   Trace Processor:
     *
   UI:
-    *
+    * Add support for parsing large integers from Trace Processor into
+      bigint. This is the default behaviour for unknown fields and can
+      be enabled specifically via the LONG and LONG_NULL column types.
   SDK:
     * Changed the type of the static constexpr metadata on protozero
       generated bindings from a function returning the metadata to
@@ -16,6 +26,11 @@
       `static constexpr FieldMetadata_Foo kFoo;`
       This is a breaking change for users who directly access field
       metadata.
+    * The new DataSourceBase::OnFlush() method allows users to properly handle
+      Flush requests.
+
+v33.1 - 2023-03-03:
+  Identical to v33.0. Version was bumped to work around prebuilt infra failures.
 
 v33.0 - 2023-03-02:
   All:
diff --git a/bazel/deps.bzl b/bazel/deps.bzl
index f830520..a105a63 100644
--- a/bazel/deps.bzl
+++ b/bazel/deps.bzl
@@ -56,7 +56,6 @@
         remote = "https://fuchsia.googlesource.com/third_party/linenoise.git",
         commit = "c894b9e59f02203dbe4e2be657572cf88c4230c3",
         build_file = "//bazel:linenoise.BUILD",
-        shallow_since = "1469784335 +0200",
     )
 
     _add_repo_if_not_existing(
@@ -65,16 +64,14 @@
         remote = "https://github.com/open-source-parsers/jsoncpp",
         commit = "6aba23f4a8628d599a9ef7fa4811c4ff6e4070e2",  # v1.9.3
         build_file = "//bazel:jsoncpp.BUILD",
-        shallow_since = "1590760226 +0800",
     )
 
     _add_repo_if_not_existing(
-        new_git_repository,
+        http_archive,
         name = "perfetto_dep_zlib",
-        remote = "https://android.googlesource.com/platform/external/zlib.git",
-        commit = "6d3f6aa0f87c9791ca7724c279ef61384f331dfd",
+        url = "https://storage.googleapis.com/perfetto/zlib-6d3f6aa0f87c9791ca7724c279ef61384f331dfd.tar.gz",
+        sha256 = "e9a1d6e8c936de68628ffb83a13d28a40cd6b2def2ad9378e8b951d4b8f4df18",
         build_file = "//bazel:zlib.BUILD",
-        shallow_since = "1678405807 -0800",
     )
 
     _add_repo_if_not_existing(
diff --git a/bazel/rules.bzl b/bazel/rules.bzl
index 4021c58..79174bd 100644
--- a/bazel/rules.bzl
+++ b/bazel/rules.bzl
@@ -308,7 +308,7 @@
         **kwargs,
     )
 
-def perfetto_cc_tp_tables(name, srcs, outs, **kwargs):
+def perfetto_cc_tp_tables(name, srcs, outs, deps = [], **kwargs):
     if PERFETTO_CONFIG.root[:2] != "//":
         fail("Expected PERFETTO_CONFIG.root to start with //")
 
@@ -317,12 +317,21 @@
     else:
         python_path = PERFETTO_CONFIG.root + "/python"
 
-    perfetto_py_binary(
-        name = name + "_tool",
+    perfetto_py_library(
+        name = name + "_lib",
         deps = [
             python_path + ":trace_processor_table_generator",
         ],
-        srcs = srcs + [
+        srcs = srcs,
+    )
+
+    perfetto_py_binary(
+        name = name + "_tool",
+        deps = [
+            ":" + name + "_lib",
+            python_path + ":trace_processor_table_generator",
+        ] + [d + "_lib" for d in deps],
+        srcs = [
             "tools/gen_tp_table_headers.py",
         ],
         main = "tools/gen_tp_table_headers.py",
@@ -332,9 +341,9 @@
     cmd = ["$(location " + name + "_tool)"]
     cmd += ["--gen-dir", "$(RULEDIR)"]
     cmd += ["--inputs", "$(SRCS)"]
-    cmd += ["--outputs", "$(OUTS)"]
     if PERFETTO_CONFIG.root != "//":
-        cmd += ["--header-prefix", PERFETTO_CONFIG.root[2:]]
+        cmd += ["--import-prefix", PERFETTO_CONFIG.root[2:]]
+        cmd += ["--relative-input-dir", PERFETTO_CONFIG.root[2:]]
 
     perfetto_genrule(
         name = name + "_gen",
diff --git a/buildtools/BUILD.gn b/buildtools/BUILD.gn
index 2ac2948..8eb19f7 100644
--- a/buildtools/BUILD.gn
+++ b/buildtools/BUILD.gn
@@ -129,6 +129,13 @@
 
   defines = [ "HAVE_PTHREAD=1" ]
   cflags = []
+
+  # Fixed upstream in:
+  # https://github.com/protocolbuffers/protobuf/pull/10112
+  # But we don't have that yet.
+  if (is_mac) {
+    cflags += [ "-Wno-deprecated-declarations" ]
+  }
   if (!is_clang && !is_win) {  # implies gcc
     cflags += [ "-Wno-stringop-overread" ]
   }
diff --git a/docs/analysis/trace-processor.md b/docs/analysis/trace-processor.md
index 4105134..f1ef185 100644
--- a/docs/analysis/trace-processor.md
+++ b/docs/analysis/trace-processor.md
@@ -256,10 +256,10 @@
 up in the `args` table.
 
 For example, to retrieve the `prev_comm` field for `sched_switch` events in
-the `raw` table.
+the `ftrace_event` table.
 ```sql
 SELECT EXTRACT_ARG(arg_set_id, 'prev_comm')
-FROM raw
+FROM ftrace_event
 WHERE name = 'sched_switch'
 ```
 
@@ -271,7 +271,7 @@
     FROM args
     WHERE key = 'prev_comm' AND args.arg_set_id = raw.arg_set_id
   )
-FROM raw
+FROM ftrace_event
 WHERE name = 'sched_switch'
 ```
 
@@ -311,7 +311,8 @@
   cpu,
   value as freq
 FROM counter
-JOIN cpu_counter_track ON counter.track_id = cpu_counter_track.id;
+JOIN cpu_counter_track ON counter.track_id = cpu_counter_track.id
+WHERE cpu_counter_track.name = 'cpufreq';
 
 -- Create the span joined table which combines cpu frequency with
 -- scheduling slices.
diff --git a/docs/data-sources/cpu-scheduling.md b/docs/data-sources/cpu-scheduling.md
index 062d9b9..b8447ff 100644
--- a/docs/data-sources/cpu-scheduling.md
+++ b/docs/data-sources/cpu-scheduling.md
@@ -16,12 +16,7 @@
 
 ## UI
 
-When zoomed out, the UI shows a quantized view of CPU usage, which collapses the
-scheduling information:
-
-![](/docs/images/cpu-bar-graphs.png "Quantized view of CPU run queues")
-
-However, by zooming in, the individual scheduling events become visible:
+The UI represents individual scheduling events as slices:
 
 ![](/docs/images/cpu-zoomed.png "Detailed view of CPU run queues")
 
diff --git a/docs/images/flows.png b/docs/images/flows.png
new file mode 100644
index 0000000..7948713
--- /dev/null
+++ b/docs/images/flows.png
Binary files differ
diff --git a/docs/instrumentation/tracing-sdk.md b/docs/instrumentation/tracing-sdk.md
index d4c72b0..809833b 100644
--- a/docs/instrumentation/tracing-sdk.md
+++ b/docs/instrumentation/tracing-sdk.md
@@ -30,7 +30,7 @@
 To start using the Client API, first check out the latest SDK release:
 
 ```bash
-git clone https://android.googlesource.com/platform/external/perfetto -b v32.1
+git clone https://android.googlesource.com/platform/external/perfetto -b v34.0
 ```
 
 The SDK consists of two files, `sdk/perfetto.h` and `sdk/perfetto.cc`. These are
diff --git a/docs/instrumentation/track-events.md b/docs/instrumentation/track-events.md
index 37f7796..9758bc7 100644
--- a/docs/instrumentation/track-events.md
+++ b/docs/instrumentation/track-events.md
@@ -554,6 +554,33 @@
 perfetto::TrackEvent::EraseTrackDescriptor(track);
 ```
 
+### Flows
+
+Flows can be used to link two (or more) events (slices or instants), to mark
+them as related.
+
+The link is displayed as an arrow in the UI, when one of the events is selected:
+
+![A flow between two slices in the Perfetto UI](
+  /docs/images/flows.png "A flow between two slices in the Perfetto UI")
+
+```C++
+// The same identifier is used in both the related slices.
+uint64_t request_id = GetRequestId();
+
+{
+  TRACE_EVENT("rendering", "HandleRequestPhase1",
+              perfetto::Flow::ProcessScoped(request_id));
+  //...
+}
+
+std::thread t1([&] {
+  TRACE_EVENT("rendering", "HandleRequestPhase2",
+              perfetto::TerminatingFlow::ProcessScoped(request_id));
+  //...
+});
+```
+
 ### Counters
 
 Time-varying numeric data can be recorded with the `TRACE_COUNTER` macro:
diff --git a/docs/reference/perfetto-cli.md b/docs/reference/perfetto-cli.md
index 3d57ced..0af4fc6 100644
--- a/docs/reference/perfetto-cli.md
+++ b/docs/reference/perfetto-cli.md
@@ -99,8 +99,9 @@
 `ATRACE_CAT`
 :    Specifies the atrace categories you want to record a trace for.
      For example, the following command traces Window Manager using atrace:
-     `adb shell perfetto --out FILE wm`. To record other categories, see this
-     [list of atrace categories](https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-q-preview-5/cmds/atrace/atrace.cpp#100).
+     `adb shell perfetto --out FILE wm`. To record other categories, see the
+     [list of atrace categories](https://cs.android.com/android/platform/superproject/+/master:frameworks/native/cmds/atrace/atrace.cpp).
+     Note: Available categories are Android version dependent.
 
 `FTRACE_GROUP/FTRACE_NAME`
 :    Specifies the ftrace events you want to record a trace for.
diff --git a/examples/sdk/README.md b/examples/sdk/README.md
index 238d50d..476ebbe 100644
--- a/examples/sdk/README.md
+++ b/examples/sdk/README.md
@@ -15,7 +15,7 @@
 First, check out the latest Perfetto release:
 
 ```bash
-git clone https://android.googlesource.com/platform/external/perfetto -b v32.1
+git clone https://android.googlesource.com/platform/external/perfetto -b v34.0
 ```
 
 Then, build using CMake:
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 192ede8..749c2ee 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -275,7 +275,7 @@
     "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
   ]
   cflags = []
-  if (!is_clang || !is_win) {
+  if (!is_clang && !is_win) {
     cflags += [ "-Wno-deprecated-declarations" ]
   }
   if (is_clang && is_win) {
@@ -289,6 +289,10 @@
       "-Wno-unused-parameter",
       "-Wno-shadow-field-in-constructor",
       "-Wno-zero-as-null-pointer-constant",
+
+      # Fixed in upstream protobuf v3.22.0
+      # d37cbfd4485f("Update inlined_string_field.h"), but we don't have that.
+      "-Wno-undef",
     ]
   }
 
diff --git a/gn/perfetto_tp_tables.gni b/gn/perfetto_tp_tables.gni
index da8cfae..19a98c0 100644
--- a/gn/perfetto_tp_tables.gni
+++ b/gn/perfetto_tp_tables.gni
@@ -17,6 +17,10 @@
 template("perfetto_tp_tables") {
   config_name = target_name + "_config"
   action_name = target_name
+  relative_args = [
+    "--relative-input-dir",
+    rebase_path(perfetto_root_path, root_build_dir),
+  ]
 
   config(config_name) {
     include_dirs = [ root_gen_dir ]
@@ -32,15 +36,17 @@
     }
 
     deps = [ "$perfetto_root_path/python:trace_processor_table_generator" ]
+    if (defined(invoker.deps)) {
+      deps += invoker.deps
+    }
     public_configs = [ ":$config_name" ]
 
     gen_args = [
       "--gen-dir",
-      rebase_path("$root_gen_dir", root_build_dir),
+      rebase_path("$root_gen_dir/$perfetto_root_path", root_build_dir),
     ]
     input_args = [ "--inputs" ] + rebase_path(invoker.sources, root_build_dir)
-    output_args = [ "--outputs" ] + rebase_path(outputs, root_build_dir)
-    args = gen_args + input_args + output_args
+    args = gen_args + input_args + relative_args
 
     metadata = {
       perfetto_action_type_for_generator = [ "tp_tables" ]
@@ -56,7 +62,7 @@
       deps = [ "$perfetto_root_path/python:trace_processor_table_generator" ]
       outputs = [ "$target_gen_dir/$docs_name.json" ]
       args = [ "--out" ] + rebase_path(outputs, root_build_dir) +
-             rebase_path(invoker.sources, root_build_dir)
+             rebase_path(invoker.sources, root_build_dir) + relative_args
     }
   }
 }
diff --git a/gn/perfetto_unittests.gni b/gn/perfetto_unittests.gni
index 76594fe..b7b1e01 100644
--- a/gn/perfetto_unittests.gni
+++ b/gn/perfetto_unittests.gni
@@ -72,12 +72,10 @@
 
 if (enable_perfetto_trace_processor) {
   perfetto_unittests_targets += [ "src/trace_processor:unittests" ]
-
-  # TODO(mohitms): reenable this once we no longer link lite and full protobuf
-  # simultaneously.
-  # perfetto_unittests_targets += [ "src/traceconv:unittests" ]
+  perfetto_unittests_targets += [ "src/traceconv:unittests" ]
 
   if (enable_perfetto_trace_processor_sqlite) {
     perfetto_unittests_targets += [ "src/trace_processor/metrics:unittests" ]
+    perfetto_unittests_targets += [ "src/cloud_trace_processor:unittests" ]
   }
 }
diff --git a/gn/standalone/BUILD.gn b/gn/standalone/BUILD.gn
index 5c7de64..0af6551 100644
--- a/gn/standalone/BUILD.gn
+++ b/gn/standalone/BUILD.gn
@@ -82,6 +82,7 @@
       "-Wno-poison-system-directories",
       "-Wno-reserved-id-macro",
       "-Wno-reserved-identifier",
+      "-Wno-shadow-uncaptured-local",
       "-Wno-unknown-sanitizers",
       "-Wno-unknown-warning-option",
       "-Wno-unsafe-buffer-usage",
@@ -99,6 +100,18 @@
     # TODO(lalitm): remove this when we upgrade to a GCC version which is good
     # enough to handle this.
     cflags_cc += [ "-Wno-maybe-uninitialized" ]
+
+    # GCC's handling of detecting infinite recursion is flaky at best and
+    # causes some false positives.
+    # TODO(lalitm): remove this when we upgrade to a GCC version which is good
+    # enough to handle this.
+    cflags_cc += [ "-Wno-infinite-recursion" ]
+
+    # GCC's handling of detecting non null arguments is flaky at best and
+    # causes some false positives.
+    # TODO(lalitm): remove this when we upgrade to a GCC version which is good
+    # enough to handle this.
+    cflags_cc += [ "-Wno-nonnull" ]
   }
 }
 
diff --git a/gn/standalone/toolchain/win_find_msvc.py b/gn/standalone/toolchain/win_find_msvc.py
index 1628c07..6f7eb86 100644
--- a/gn/standalone/toolchain/win_find_msvc.py
+++ b/gn/standalone/toolchain/win_find_msvc.py
@@ -27,6 +27,7 @@
 """
 
 import os
+import itertools
 import subprocess
 import sys
 
@@ -62,19 +63,19 @@
     filt = lambda x: os.path.exists(os.path.join(x, 'ucrt', 'x64', 'ucrt.lib'))
     out[1] = find_max_subdir(lib_base, filt)
 
-  for year in ['2022', '2021', '2020', '2019']:
-    for version in [
-        'BuildTools', 'Community', 'Professional', 'Enterprise', 'Preview'
-    ]:
-      msvc_base = ('C:\\Program Files (x86)\\Microsoft Visual Studio\\'
-                   f'{year}\\{version}\\VC\\Tools\\MSVC')
-      if os.path.exists(msvc_base):
-        filt = lambda x: os.path.exists(
-            os.path.join(x, 'lib', 'x64', 'libcmt.lib'))
-        max_msvc = find_max_subdir(msvc_base, filt)
-        if max_msvc is not None:
-          out[2] = os.path.join(msvc_base, max_msvc)
-        break
+  for try_dir in itertools.product(
+      ['2022', '2021', '2020', '2019'],
+      ['BuildTools', 'Community', 'Professional', 'Enterprise', 'Preview'],
+      ['Program Files', 'Program Files (x86)']):
+    msvc_base = (f'C:\\{try_dir[2]}\\Microsoft Visual Studio\\'
+                f'{try_dir[0]}\\{try_dir[1]}\\VC\\Tools\\MSVC')
+    if os.path.exists(msvc_base):
+      filt = lambda x: os.path.exists(
+          os.path.join(x, 'lib', 'x64', 'libcmt.lib'))
+      max_msvc = find_max_subdir(msvc_base, filt)
+      if max_msvc is not None:
+        out[2] = os.path.join(msvc_base, max_msvc)
+      break
 
   # Don't error in case of failure, GN scripts are supposed to deal with
   # failures and allow the user to override the dirs.
diff --git a/include/perfetto/base/compiler.h b/include/perfetto/base/compiler.h
index 451e6d5..22324ad 100644
--- a/include/perfetto/base/compiler.h
+++ b/include/perfetto/base/compiler.h
@@ -23,16 +23,6 @@
 #include "perfetto/base/build_config.h"
 #include "perfetto/public/compiler.h"
 
-#if __cplusplus >= 201703
-#define PERFETTO_IS_AT_LEAST_CPP17() 1
-#elif defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
-// Without additional flags, MSVC is not standard compliant and keeps
-// __cplusplus stuck at an old value, even with C++17
-#define PERFETTO_IS_AT_LEAST_CPP17() 1
-#else
-#define PERFETTO_IS_AT_LEAST_CPP17() 0
-#endif
-
 // __has_attribute is supported only by clang and recent versions of GCC.
 // Add a layer to wrap the __has_attribute macro.
 #if defined(__has_attribute)
diff --git a/include/perfetto/ext/base/flat_hash_map.h b/include/perfetto/ext/base/flat_hash_map.h
index b392286..0be192d 100644
--- a/include/perfetto/ext/base/flat_hash_map.h
+++ b/include/perfetto/ext/base/flat_hash_map.h
@@ -214,7 +214,7 @@
       }  // for (idx)
 
       // If we got to this point the key does not exist (otherwise we would have
-      // hit the the return above) and we are going to insert a new entry.
+      // hit the return above) and we are going to insert a new entry.
       // Before doing so, ensure we stay under the target load limit.
       if (PERFETTO_UNLIKELY(size_ >= load_limit_)) {
         MaybeGrowAndRehash(/*grow=*/true);
diff --git a/include/perfetto/ext/base/status_or.h b/include/perfetto/ext/base/status_or.h
index 46387d7..a6eda7e 100644
--- a/include/perfetto/ext/base/status_or.h
+++ b/include/perfetto/ext/base/status_or.h
@@ -73,6 +73,10 @@
   std::optional<T> value_;
 };
 
+// Deduction guide to make returning StatusOr less verbose.
+template <typename T>
+StatusOr(T) -> StatusOr<T>;
+
 }  // namespace base
 }  // namespace perfetto
 
diff --git a/include/perfetto/ext/base/threading/util.h b/include/perfetto/ext/base/threading/util.h
index 7b2465e..a08a4b0 100644
--- a/include/perfetto/ext/base/threading/util.h
+++ b/include/perfetto/ext/base/threading/util.h
@@ -136,9 +136,12 @@
 
    private:
     void RunFn() {
-      pool_->PostTask([channel = channel_, fn = fn_]() {
+      pool_->PostTask([channel = channel_, fn = fn_]() mutable {
         auto opt_value = (*fn)();
         if (!opt_value) {
+          // Clear out the function to ensure that any captured state is freed
+          // before we inform the caller.
+          fn.reset();
           channel->Close();
           return;
         }
diff --git a/include/perfetto/ext/cloud_trace_processor/BUILD.gn b/include/perfetto/ext/cloud_trace_processor/BUILD.gn
new file mode 100644
index 0000000..be266cb
--- /dev/null
+++ b/include/perfetto/ext/cloud_trace_processor/BUILD.gn
@@ -0,0 +1,26 @@
+# Copyright (C) 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+source_set("cloud_trace_processor") {
+  sources = [
+    "environment.h",
+    "orchestrator.h",
+    "worker.h",
+  ]
+  deps = [
+    "../../../../gn:default_deps",
+    "../base",
+    "../base/threading",
+  ]
+}
diff --git a/include/perfetto/ext/cloud_trace_processor/environment.h b/include/perfetto/ext/cloud_trace_processor/environment.h
new file mode 100644
index 0000000..8b1fc01
--- /dev/null
+++ b/include/perfetto/ext/cloud_trace_processor/environment.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ENVIRONMENT_H_
+#define INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ENVIRONMENT_H_
+
+#include <functional>
+#include <memory>
+#include <vector>
+
+#include "perfetto/base/status.h"
+#include "perfetto/base/task_runner.h"
+#include "perfetto/ext/base/status_or.h"
+#include "perfetto/ext/base/threading/stream.h"
+
+namespace perfetto {
+namespace cloud_trace_processor {
+
+// Shim interface allowing embedders to change how operations which interact
+// with the OS operate (e.g. IO, networking etc).
+class CtpEnvironment {
+ public:
+  virtual ~CtpEnvironment();
+
+  // Opens the file at |path| and reads the contents in chunks, returning the
+  // the chunks as a Stream. The size of the chunks is implementation defined
+  // but should be sized to balance memory use and syscall count.
+  virtual base::StatusOrStream<std::vector<uint8_t>> ReadFile(
+      const std::string& path) = 0;
+};
+
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
+
+#endif  // INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ENVIRONMENT_H_
diff --git a/include/perfetto/ext/cloud_trace_processor/orchestrator.h b/include/perfetto/ext/cloud_trace_processor/orchestrator.h
new file mode 100644
index 0000000..7983161
--- /dev/null
+++ b/include/perfetto/ext/cloud_trace_processor/orchestrator.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_H_
+#define INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_H_
+
+#include <memory>
+#include <vector>
+
+#include "perfetto/base/status.h"
+#include "perfetto/ext/base/status_or.h"
+#include "perfetto/ext/base/threading/future.h"
+#include "perfetto/ext/base/threading/stream.h"
+
+namespace perfetto {
+namespace protos {
+class TracePoolCreateArgs;
+class TracePoolCreateResponse;
+
+class TracePoolSetTracesArgs;
+class TracePoolSetTracesResponse;
+
+class TracePoolQueryArgs;
+class TracePoolQueryResponse;
+
+class TracePoolDestroyArgs;
+class TracePoolDestroyResponse;
+}  // namespace protos
+}  // namespace perfetto
+
+namespace perfetto {
+namespace cloud_trace_processor {
+
+class Worker;
+
+// Interface for a CloudTraceProcessor "Orchestrator".
+//
+// See CloudTraceProcessorOrchestrator RPC service for high-level documentation.
+class Orchestrator {
+ public:
+  virtual ~Orchestrator();
+
+  // Returns an in-process implementation of the Orchestrator, given a group of
+  // workers which can be delegated to.
+  //
+  // Note that the passed workers instances can be "remote" (i.e. in another
+  // process or even on another machine); the returned manager will gracefully
+  // handle this.
+  static std::unique_ptr<Orchestrator> CreateInProcess(
+      std::vector<std::unique_ptr<Worker>> workers);
+
+  // Creates a TracePool with the specified arguments.
+  virtual base::StatusOrFuture<protos::TracePoolCreateResponse> TracePoolCreate(
+      const protos::TracePoolCreateArgs&) = 0;
+
+  // Associates the provided list of traces to this TracePoolShard.
+  virtual base::StatusOrFuture<protos::TracePoolSetTracesResponse>
+  TracePoolSetTraces(const protos::TracePoolSetTracesArgs&) = 0;
+
+  // Executes a SQL query on the specified TracePool.
+  virtual base::StatusOrStream<protos::TracePoolQueryResponse> TracePoolQuery(
+      const protos::TracePoolQueryArgs&) = 0;
+
+  // Destroys the TracePool with the specified id.
+  virtual base::StatusOrFuture<protos::TracePoolDestroyResponse>
+  TracePoolDestroy(const protos::TracePoolDestroyArgs&) = 0;
+};
+
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
+
+#endif  // INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_H_
diff --git a/include/perfetto/ext/cloud_trace_processor/worker.h b/include/perfetto/ext/cloud_trace_processor/worker.h
new file mode 100644
index 0000000..60dbe77
--- /dev/null
+++ b/include/perfetto/ext/cloud_trace_processor/worker.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_WORKER_H_
+#define INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_WORKER_H_
+
+#include <memory>
+#include <vector>
+
+#include "perfetto/ext/base/threading/future.h"
+#include "perfetto/ext/base/threading/stream.h"
+
+namespace perfetto {
+
+namespace base {
+class ThreadPool;
+}
+
+namespace protos {
+class TracePoolShardCreateArgs;
+class TracePoolShardCreateResponse;
+
+class TracePoolShardSetTracesArgs;
+class TracePoolShardSetTracesResponse;
+
+class TracePoolShardQueryArgs;
+class TracePoolShardQueryResponse;
+
+class TracePoolShardDestroyArgs;
+class TracePoolShardDestroyResponse;
+}  // namespace protos
+
+namespace cloud_trace_processor {
+
+class CtpEnvironment;
+
+// Interface for a CloudTraceProcessor "Worker".
+//
+// See CloudTraceProcessorWorker RPC service for high-level documentation.
+class Worker {
+ public:
+  virtual ~Worker();
+
+  // Returns an in-process implementation of the Worker given an instance of
+  // |CtpEnvironment| and a |ThreadPool|. The |CtpEnvironment| will be used to
+  // perform any interaction with the OS (e.g. opening and reading files) and
+  // the |ThreadPool| will be used to dispatch requests to TraceProcessor.
+  static std::unique_ptr<Worker> CreateInProcesss(CtpEnvironment*,
+                                                  base::ThreadPool*);
+
+  // Creates a TracePoolShard which will be owned by this worker.
+  virtual base::StatusOrFuture<protos::TracePoolShardCreateResponse>
+  TracePoolShardCreate(const protos::TracePoolShardCreateArgs&) = 0;
+
+  // Associates the provided list of traces to this TracePoolShard.
+  virtual base::StatusOrStream<protos::TracePoolShardSetTracesResponse>
+  TracePoolShardSetTraces(const protos::TracePoolShardSetTracesArgs&) = 0;
+
+  // Executes a SQL query on the specified TracePoolShard.
+  virtual base::StatusOrStream<protos::TracePoolShardQueryResponse>
+  TracePoolShardQuery(const protos::TracePoolShardQueryArgs&) = 0;
+
+  // Destroys the TracePoolShard with the specified id.
+  virtual base::StatusOrFuture<protos::TracePoolShardDestroyResponse>
+  TracePoolShardDestroy(const protos::TracePoolShardDestroyArgs&) = 0;
+};
+
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
+
+#endif  // INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_WORKER_H_
diff --git a/include/perfetto/ext/tracing/core/basic_types.h b/include/perfetto/ext/tracing/core/basic_types.h
index 0950fe8..4bec409 100644
--- a/include/perfetto/ext/tracing/core/basic_types.h
+++ b/include/perfetto/ext/tracing/core/basic_types.h
@@ -39,6 +39,25 @@
 // Unique within the scope of the tracing service.
 using FlushRequestID = uint64_t;
 
+// Combines Producer and Writer ID in one word which can be used as key for
+// hashtables and other data structures.
+using ProducerAndWriterID = uint32_t;
+
+inline ProducerAndWriterID MkProducerAndWriterID(ProducerID p, WriterID w) {
+  static_assert(
+      sizeof(ProducerID) + sizeof(WriterID) == sizeof(ProducerAndWriterID),
+      "MkProducerAndWriterID() and GetProducerAndWriterID() need updating");
+  return (static_cast<ProducerAndWriterID>(p) << (sizeof(WriterID) * 8)) | w;
+}
+
+inline void GetProducerAndWriterID(ProducerAndWriterID x,
+                                   ProducerID* p,
+                                   WriterID* w) {
+  static constexpr auto mask = (1ull << (sizeof(WriterID) * 8)) - 1;
+  *w = static_cast<WriterID>(x & mask);
+  *p = static_cast<ProducerID>(x >> (sizeof(WriterID) * 8));
+}
+
 // We need one FD per producer and we are not going to be able to keep > 64k FDs
 // open in the service.
 static constexpr ProducerID kMaxProducerID = static_cast<ProducerID>(-1);
diff --git a/include/perfetto/protozero/scattered_stream_writer.h b/include/perfetto/protozero/scattered_stream_writer.h
index 915de27..40a1c66 100644
--- a/include/perfetto/protozero/scattered_stream_writer.h
+++ b/include/perfetto/protozero/scattered_stream_writer.h
@@ -59,7 +59,7 @@
     // pointer is nullptr, the caller should not write anything.
     //
     // The implementation considers the patch ready to apply when the caller
-    // writes the the first byte a value that's different than 0 (the
+    // writes the first byte a value that's different than 0 (the
     // implementation periodically checks for this).
     virtual uint8_t* AnnotatePatch(uint8_t* patch_addr);
   };
diff --git a/include/perfetto/tracing/data_source.h b/include/perfetto/tracing/data_source.h
index 894dee7..95036d1 100644
--- a/include/perfetto/tracing/data_source.h
+++ b/include/perfetto/tracing/data_source.h
@@ -140,6 +140,24 @@
     uint32_t internal_instance_index = 0;
   };
   virtual void WillClearIncrementalState(const ClearIncrementalStateArgs&);
+
+  class FlushArgs {
+   public:
+    virtual ~FlushArgs();
+
+    // HandleFlushAsynchronously() can be called to postpone acknowledging the
+    // flush request. This function returns a closure that must be invoked after
+    // the flush request has been processed. The returned closure can be called
+    // from any thread.
+    virtual std::function<void()> HandleFlushAsynchronously() const = 0;
+
+    // The index of this data source instance (0..kMaxDataSourceInstances - 1).
+    uint32_t internal_instance_index = 0;
+  };
+  // Called when the tracing service requests a Flush. Users can override this
+  // to tell other threads to flush their TraceContext for this data source
+  // (the library cannot execute code on all the threads on its own).
+  virtual void OnFlush(const FlushArgs&);
 };
 
 struct DefaultDataSourceTraits {
diff --git a/include/perfetto/tracing/internal/track_event_legacy.h b/include/perfetto/tracing/internal/track_event_legacy.h
index 2ad4813..96c665a 100644
--- a/include/perfetto/tracing/internal/track_event_legacy.h
+++ b/include/perfetto/tracing/internal/track_event_legacy.h
@@ -435,6 +435,23 @@
 };
 #endif  // PERFETTO_ENABLE_LEGACY_TRACE_EVENTS
 
+// Legacy macros allow argument values to be nullptr and convert them to the
+// "NULL" string. The following function helps mimic this behavior: it forwards
+// all types of arguments apart from a nullptr string as is, and in case of a
+// nullptr returns "NULL".
+template <typename T>
+inline T PossiblyNull(T&& value) {
+  return std::forward<T>(value);
+}
+
+inline const char* PossiblyNull(const char* name) {
+  return name ? name : "NULL";
+}
+
+inline const char* PossiblyNull(char* name) {
+  return name ? name : "NULL";
+}
+
 }  // namespace internal
 }  // namespace perfetto
 
diff --git a/include/perfetto/tracing/internal/track_event_macros.h b/include/perfetto/tracing/internal/track_event_macros.h
index 6d2777e..f10ef39 100644
--- a/include/perfetto/tracing/internal/track_event_macros.h
+++ b/include/perfetto/tracing/internal/track_event_macros.h
@@ -156,7 +156,7 @@
 // C++17 doesn't like a move constructor being defined for the EventFinalizer
 // class but C++11 and MSVC doesn't compile without it being defined so support
 // both.
-#if PERFETTO_IS_AT_LEAST_CPP17() && !PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC)
+#if !PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC)
 #define PERFETTO_INTERNAL_EVENT_FINALIZER_KEYWORD delete
 #else
 #define PERFETTO_INTERNAL_EVENT_FINALIZER_KEYWORD default
diff --git a/include/perfetto/tracing/track_event_legacy.h b/include/perfetto/tracing/track_event_legacy.h
index 7111733..7aff8bd 100644
--- a/include/perfetto/tracing/track_event_legacy.h
+++ b/include/perfetto/tracing/track_event_legacy.h
@@ -229,20 +229,26 @@
   INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \
                                             flow_flags)
 #define TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \
-  INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val)
-#define TRACE_EVENT_WITH_FLOW1(category_group, name, bind_id, flow_flags,  \
-                               arg1_name, arg1_val)                        \
-  INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \
-                                            flow_flags, arg1_name, arg1_val)
-#define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name,   \
-                     arg2_val)                                               \
-  INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val, \
-                                  arg2_name, arg2_val)
-#define TRACE_EVENT_WITH_FLOW2(category_group, name, bind_id, flow_flags,    \
-                               arg1_name, arg1_val, arg2_name, arg2_val)     \
-  INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id,   \
-                                            flow_flags, arg1_name, arg1_val, \
-                                            arg2_name, arg2_val)
+  INTERNAL_TRACE_EVENT_ADD_SCOPED(                              \
+      category_group, name, arg1_name,                          \
+      ::perfetto::internal::PossiblyNull(arg1_val))
+#define TRACE_EVENT_WITH_FLOW1(category_group, name, bind_id, flow_flags, \
+                               arg1_name, arg1_val)                       \
+  INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(                              \
+      category_group, name, bind_id, flow_flags, arg1_name,               \
+      ::perfetto::internal::PossiblyNull(arg1_val))
+#define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \
+                     arg2_val)                                             \
+  INTERNAL_TRACE_EVENT_ADD_SCOPED(                                         \
+      category_group, name, arg1_name,                                     \
+      ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,             \
+      ::perfetto::internal::PossiblyNull(arg2_val))
+#define TRACE_EVENT_WITH_FLOW2(category_group, name, bind_id, flow_flags, \
+                               arg1_name, arg1_val, arg2_name, arg2_val)  \
+  INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(                              \
+      category_group, name, bind_id, flow_flags, arg1_name,               \
+      ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,            \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 
 // Instant events.
 #define TRACE_EVENT_INSTANT0(category_group, name, scope)                   \
@@ -250,12 +256,15 @@
                            TRACE_EVENT_FLAG_NONE | scope)
 #define TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, arg1_val) \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name,    \
-                           TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val)
+                           TRACE_EVENT_FLAG_NONE | scope, arg1_name,           \
+                           ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, arg1_val, \
                              arg2_name, arg2_val)                              \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name,    \
-                           TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val, \
-                           arg2_name, arg2_val)
+                           TRACE_EVENT_FLAG_NONE | scope, arg1_name,           \
+                           ::perfetto::internal::PossiblyNull(arg1_val),       \
+                           arg2_name,                                          \
+                           ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_COPY_INSTANT0(category_group, name, scope)        \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, \
                            ::perfetto::DynamicString{name}, scope)
@@ -263,20 +272,24 @@
                                   arg1_val)                               \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group,     \
                            ::perfetto::DynamicString{name}, scope,        \
-                           ::perfetto::DynamicString{arg1_name}, arg1_val)
-#define TRACE_EVENT_COPY_INSTANT2(category_group, name, scope, arg1_name,  \
-                                  arg1_val, arg2_name, arg2_val)           \
-  INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group,      \
-                           ::perfetto::DynamicString{name}, scope,         \
-                           ::perfetto::DynamicString{arg1_name}, arg1_val, \
-                           ::perfetto::DynamicString{arg2_name}, arg2_val)
+                           ::perfetto::DynamicString{arg1_name},          \
+                           ::perfetto::internal::PossiblyNull(arg1_val))
+#define TRACE_EVENT_COPY_INSTANT2(category_group, name, scope, arg1_name, \
+                                  arg1_val, arg2_name, arg2_val)          \
+  INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group,     \
+                           ::perfetto::DynamicString{name}, scope,        \
+                           ::perfetto::DynamicString{arg1_name},          \
+                           ::perfetto::internal::PossiblyNull(arg1_val),  \
+                           ::perfetto::DynamicString{arg2_name},          \
+                           ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_INSTANT_WITH_FLAGS0(category_group, name, scope_and_flags) \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name,    \
                            scope_and_flags)
 #define TRACE_EVENT_INSTANT_WITH_FLAGS1(category_group, name, scope_and_flags, \
                                         arg1_name, arg1_val)                   \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name,    \
-                           scope_and_flags, arg1_name, arg1_val)
+                           scope_and_flags, arg1_name,                         \
+                           ::perfetto::internal::PossiblyNull(arg1_val))
 
 // Instant events with explicit timestamps.
 #define TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(category_group, name, scope,   \
@@ -289,7 +302,8 @@
                                             timestamp, arg_name, arg_val) \
   INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP(                                \
       TRACE_EVENT_PHASE_INSTANT, category_group, name, timestamp,         \
-      TRACE_EVENT_FLAG_NONE | scope, arg_name, arg_val)
+      TRACE_EVENT_FLAG_NONE | scope, arg_name,                            \
+      ::perfetto::internal::PossiblyNull(arg_val))
 
 // Begin events.
 #define TRACE_EVENT_BEGIN0(category_group, name)                          \
@@ -297,25 +311,30 @@
                            TRACE_EVENT_FLAG_NONE)
 #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val)     \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
-                           TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
-#define TRACE_EVENT_BEGIN2(category_group, name, arg1_name, arg1_val,     \
-                           arg2_name, arg2_val)                           \
-  INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
-                           TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val,    \
-                           arg2_name, arg2_val)
+                           TRACE_EVENT_FLAG_NONE, arg1_name,              \
+                           ::perfetto::internal::PossiblyNull(arg1_val))
+#define TRACE_EVENT_BEGIN2(category_group, name, arg1_name, arg1_val,       \
+                           arg2_name, arg2_val)                             \
+  INTERNAL_TRACE_EVENT_ADD(                                                 \
+      TRACE_EVENT_PHASE_BEGIN, category_group, name, TRACE_EVENT_FLAG_NONE, \
+      arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,   \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_BEGIN_WITH_FLAGS0(category_group, name, flags) \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, flags)
 #define TRACE_EVENT_BEGIN_WITH_FLAGS1(category_group, name, flags, arg1_name, \
                                       arg1_val)                               \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name,     \
-                           flags, arg1_name, arg1_val)
+                           flags, arg1_name,                                  \
+                           ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_COPY_BEGIN2(category_group, name, arg1_name, arg1_val, \
                                 arg2_name, arg2_val)                       \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group,        \
                            ::perfetto::DynamicString{name},                \
                            TRACE_EVENT_FLAG_NONE,                          \
-                           ::perfetto::DynamicString{arg1_name}, arg1_val, \
-                           ::perfetto::DynamicString{arg2_name}, arg2_val)
+                           ::perfetto::DynamicString{arg1_name},           \
+                           ::perfetto::internal::PossiblyNull(arg1_val),   \
+                           ::perfetto::DynamicString{arg2_name},           \
+                           ::perfetto::internal::PossiblyNull(arg2_val))
 
 // Begin events with explicit timestamps.
 #define TRACE_EVENT_BEGIN_WITH_ID_TID_AND_TIMESTAMP0(category_group, name, id, \
@@ -334,15 +353,18 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                    \
       TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group,                     \
       ::perfetto::DynamicString{name}, id, thread_id, timestamp,         \
-      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, arg1_val)
-#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP2(                   \
-    category_group, name, id, thread_id, timestamp, arg1_name, arg1_val,     \
-    arg2_name, arg2_val)                                                     \
-  INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                        \
-      TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group,                         \
-      ::perfetto::DynamicString{name}, id, thread_id, timestamp,             \
-      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, arg1_val, \
-      ::perfetto::DynamicString{arg2_name}, arg2_val)
+      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name},       \
+      ::perfetto::internal::PossiblyNull(arg1_val))
+#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP2(               \
+    category_group, name, id, thread_id, timestamp, arg1_name, arg1_val, \
+    arg2_name, arg2_val)                                                 \
+  INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                    \
+      TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group,                     \
+      ::perfetto::DynamicString{name}, id, thread_id, timestamp,         \
+      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name},       \
+      ::perfetto::internal::PossiblyNull(arg1_val),                      \
+      ::perfetto::DynamicString{arg2_name},                              \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 
 // End events.
 #define TRACE_EVENT_END0(category_group, name)                          \
@@ -350,24 +372,29 @@
                            TRACE_EVENT_FLAG_NONE)
 #define TRACE_EVENT_END1(category_group, name, arg1_name, arg1_val)     \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \
-                           TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
+                           TRACE_EVENT_FLAG_NONE, arg1_name,            \
+                           ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_END2(category_group, name, arg1_name, arg1_val, arg2_name, \
                          arg2_val)                                             \
-  INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name,        \
-                           TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val,         \
-                           arg2_name, arg2_val)
+  INTERNAL_TRACE_EVENT_ADD(                                                    \
+      TRACE_EVENT_PHASE_END, category_group, name, TRACE_EVENT_FLAG_NONE,      \
+      arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,      \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_END_WITH_FLAGS0(category_group, name, flags) \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, flags)
 #define TRACE_EVENT_END_WITH_FLAGS1(category_group, name, flags, arg1_name,    \
                                     arg1_val)                                  \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, flags, \
-                           arg1_name, arg1_val)
+                           arg1_name,                                          \
+                           ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_COPY_END2(category_group, name, arg1_name, arg1_val,      \
                               arg2_name, arg2_val)                            \
   INTERNAL_TRACE_EVENT_ADD(                                                   \
       TRACE_EVENT_PHASE_END, category_group, ::perfetto::DynamicString{name}, \
-      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, arg1_val,  \
-      ::perfetto::DynamicString{arg2_name}, arg2_val)
+      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name},            \
+      ::perfetto::internal::PossiblyNull(arg1_val),                           \
+      ::perfetto::DynamicString{arg2_name},                                   \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 
 // Mark events.
 #define TRACE_EVENT_MARK_WITH_TIMESTAMP0(category_group, name, timestamp)  \
@@ -379,13 +406,16 @@
                                          arg1_name, arg1_val)             \
   INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP(                                \
       TRACE_EVENT_PHASE_MARK, category_group, name, timestamp,            \
-      TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                   \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 
 #define TRACE_EVENT_MARK_WITH_TIMESTAMP2(                                      \
     category_group, name, timestamp, arg1_name, arg1_val, arg2_name, arg2_val) \
   INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP(                                     \
       TRACE_EVENT_PHASE_MARK, category_group, name, timestamp,                 \
-      TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                        \
+      ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,                 \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 
 #define TRACE_EVENT_COPY_MARK(category_group, name)                \
   INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, \
@@ -395,7 +425,8 @@
 #define TRACE_EVENT_COPY_MARK1(category_group, name, arg1_name, arg1_val)      \
   INTERNAL_TRACE_EVENT_ADD(                                                    \
       TRACE_EVENT_PHASE_MARK, category_group, ::perfetto::DynamicString{name}, \
-      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, arg1_val)
+      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name},             \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 
 #define TRACE_EVENT_COPY_MARK_WITH_TIMESTAMP(category_group, name, timestamp)  \
   INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP(                                     \
@@ -419,15 +450,18 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                    \
       TRACE_EVENT_PHASE_ASYNC_END, category_group,                       \
       ::perfetto::DynamicString{name}, id, thread_id, timestamp,         \
-      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, arg1_val)
-#define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP2(                     \
-    category_group, name, id, thread_id, timestamp, arg1_name, arg1_val,     \
-    arg2_name, arg2_val)                                                     \
-  INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                        \
-      TRACE_EVENT_PHASE_ASYNC_END, category_group,                           \
-      ::perfetto::DynamicString{name}, id, thread_id, timestamp,             \
-      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, arg1_val, \
-      ::perfetto::DynamicString{arg2_name}, arg2_val)
+      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name},       \
+      ::perfetto::internal::PossiblyNull(arg1_val))
+#define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP2(                 \
+    category_group, name, id, thread_id, timestamp, arg1_name, arg1_val, \
+    arg2_name, arg2_val)                                                 \
+  INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                    \
+      TRACE_EVENT_PHASE_ASYNC_END, category_group,                       \
+      ::perfetto::DynamicString{name}, id, thread_id, timestamp,         \
+      TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name},       \
+      ::perfetto::internal::PossiblyNull(arg1_val),                      \
+      ::perfetto::DynamicString{arg2_name},                              \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 
 // Counters.
 #define TRACE_COUNTER1(category_group, name, value)                         \
@@ -506,14 +540,17 @@
                                    TRACE_EVENT_FLAG_NONE)
 #define TRACE_EVENT_ASYNC_BEGIN1(category_group, name, id, arg1_name, \
                                  arg1_val)                            \
-  INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN,     \
-                                   category_group, name, id,          \
-                                   TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
+  INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                   \
+      TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id,        \
+      TRACE_EVENT_FLAG_NONE, arg1_name,                               \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_ASYNC_BEGIN2(category_group, name, id, arg1_name, \
                                  arg1_val, arg2_name, arg2_val)       \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                   \
       TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id,        \
-      TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
+      TRACE_EVENT_FLAG_NONE, arg1_name,                               \
+      ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,        \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_COPY_ASYNC_BEGIN0(category_group, name, id) \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                             \
       TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group,            \
@@ -523,14 +560,17 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                        \
       TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group,                       \
       ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE,          \
-      ::perfetto::DynamicString{arg1_name}, arg1_val)
+      ::perfetto::DynamicString{arg1_name},                                \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_COPY_ASYNC_BEGIN2(category_group, name, id, arg1_name, \
                                       arg1_val, arg2_name, arg2_val)       \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                        \
       TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group,                       \
       ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE,          \
-      ::perfetto::DynamicString{arg1_name}, arg1_val,                      \
-      ::perfetto::DynamicString{arg2_name}, arg2_val)
+      ::perfetto::DynamicString{arg1_name},                                \
+      ::perfetto::internal::PossiblyNull(arg1_val),                        \
+      ::perfetto::DynamicString{arg2_name},                                \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_ASYNC_BEGIN_WITH_FLAGS0(category_group, name, id, flags) \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN,            \
                                    category_group, name, id, flags)
@@ -546,7 +586,7 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                      \
       TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id,             \
       TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
-      arg1_name, arg1_val)
+      arg1_name, ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP_AND_FLAGS0(     \
     category_group, name, id, timestamp, flags)                         \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                   \
@@ -563,7 +603,8 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                          \
       TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id,                 \
       TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE,     \
-      arg1_name, arg1_val, arg2_name, arg2_val)
+      arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,      \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_COPY_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, id, \
                                                      timestamp)                \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                          \
@@ -585,7 +626,8 @@
                                      arg1_name, arg1_val)            \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                  \
       TRACE_EVENT_PHASE_ASYNC_STEP_INTO, category_group, name, id,   \
-      TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val)
+      TRACE_EVENT_FLAG_NONE, "step", step, arg1_name,                \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 
 // Legacy async step into events with timestamps.
 #define TRACE_EVENT_ASYNC_STEP_INTO_WITH_TIMESTAMP0(category_group, name, id, \
@@ -604,7 +646,8 @@
                                      arg1_name, arg1_val)            \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                  \
       TRACE_EVENT_PHASE_ASYNC_STEP_PAST, category_group, name, id,   \
-      TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val)
+      TRACE_EVENT_FLAG_NONE, "step", step, arg1_name,                \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 
 // Legacy async end events.
 #define TRACE_EVENT_ASYNC_END0(category_group, name, id)        \
@@ -612,14 +655,17 @@
                                    category_group, name, id,    \
                                    TRACE_EVENT_FLAG_NONE)
 #define TRACE_EVENT_ASYNC_END1(category_group, name, id, arg1_name, arg1_val) \
-  INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END,               \
-                                   category_group, name, id,                  \
-                                   TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
+  INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                           \
+      TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id,                  \
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                       \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_ASYNC_END2(category_group, name, id, arg1_name, arg1_val, \
                                arg2_name, arg2_val)                           \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                           \
       TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id,                  \
-      TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                       \
+      ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,                \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_COPY_ASYNC_END0(category_group, name, id) \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                           \
       TRACE_EVENT_PHASE_ASYNC_END, category_group,            \
@@ -629,14 +675,17 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                      \
       TRACE_EVENT_PHASE_ASYNC_END, category_group,                       \
       ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE,        \
-      ::perfetto::DynamicString{arg1_name}, arg1_val)
+      ::perfetto::DynamicString{arg1_name},                              \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_COPY_ASYNC_END2(category_group, name, id, arg1_name, \
                                     arg1_val, arg2_name, arg2_val)       \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                      \
       TRACE_EVENT_PHASE_ASYNC_END, category_group,                       \
       ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE,        \
-      ::perfetto::DynamicString{arg1_name}, arg1_val,                    \
-      ::perfetto::DynamicString{arg2_name}, arg2_val)
+      ::perfetto::DynamicString{arg1_name},                              \
+      ::perfetto::internal::PossiblyNull(arg1_val),                      \
+      ::perfetto::DynamicString{arg2_name},                              \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_ASYNC_END_WITH_FLAGS0(category_group, name, id, flags) \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END,            \
                                    category_group, name, id, flags)
@@ -652,14 +701,15 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                         \
       TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id,                  \
       TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE,    \
-      arg1_name, arg1_val)
+      arg1_name, ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP2(category_group, name, id,       \
                                               timestamp, arg1_name, arg1_val, \
                                               arg2_name, arg2_val)            \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                         \
       TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id,                  \
       TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE,    \
-      arg1_name, arg1_val, arg2_name, arg2_val)
+      arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,     \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_COPY_ASYNC_END_WITH_TIMESTAMP0(category_group, name, id,  \
                                                    timestamp)                 \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                         \
@@ -679,14 +729,17 @@
                                    TRACE_EVENT_FLAG_NONE)
 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN1(category_group, name, id, arg1_name, \
                                           arg1_val)                            \
-  INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN,     \
-                                   category_group, name, id,                   \
-                                   TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
+  INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                            \
+      TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id,        \
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                        \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(category_group, name, id, arg1_name, \
                                           arg1_val, arg2_name, arg2_val)       \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                            \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id,        \
-      TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                        \
+      ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,                 \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_FLAGS0(category_group, name, id, \
                                                      flags)                    \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN,     \
@@ -696,7 +749,7 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                      \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id,    \
       TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
-      arg1_name, arg1_val)
+      arg1_name, ::perfetto::internal::PossiblyNull(arg1_val))
 
 // Async end events.
 #define TRACE_EVENT_NESTABLE_ASYNC_END0(category_group, name, id)        \
@@ -705,14 +758,17 @@
                                    TRACE_EVENT_FLAG_NONE)
 #define TRACE_EVENT_NESTABLE_ASYNC_END1(category_group, name, id, arg1_name, \
                                         arg1_val)                            \
-  INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END,     \
-                                   category_group, name, id,                 \
-                                   TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
+  INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                          \
+      TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id,        \
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                      \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \
                                         arg1_val, arg2_name, arg2_val)       \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                          \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id,        \
-      TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                      \
+      ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,               \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_FLAGS0(category_group, name, id, \
                                                    flags)                    \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END,     \
@@ -723,30 +779,37 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \
                                    category_group, name, id,                 \
                                    TRACE_EVENT_FLAG_NONE)
-#define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id,        \
-                                            arg1_name, arg1_val)             \
-  INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \
-                                   category_group, name, id,                 \
-                                   TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
+#define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id,     \
+                                            arg1_name, arg1_val)          \
+  INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                       \
+      TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                   \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(                              \
     category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val)   \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                       \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \
-      TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
+      TRACE_EVENT_FLAG_NONE, arg1_name,                                   \
+      ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,            \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2(                \
     category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                     \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group,           \
       ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_ASYNC_TTS,  \
-      ::perfetto::DynamicString{arg1_name}, arg1_val,                   \
-      ::perfetto::DynamicString{arg2_name}, arg2_val)
+      ::perfetto::DynamicString{arg1_name},                             \
+      ::perfetto::internal::PossiblyNull(arg1_val),                     \
+      ::perfetto::DynamicString{arg2_name},                             \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2(                  \
     category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                     \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group,             \
       ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_ASYNC_TTS,  \
-      ::perfetto::DynamicString{arg1_name}, arg1_val,                   \
-      ::perfetto::DynamicString{arg2_name}, arg2_val)
+      ::perfetto::DynamicString{arg1_name},                             \
+      ::perfetto::internal::PossiblyNull(arg1_val),                     \
+      ::perfetto::DynamicString{arg2_name},                             \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 
 // Async events with explicit timestamps.
 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, \
@@ -764,14 +827,15 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                      \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id,      \
       TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
-      arg1_name, arg1_val)
+      arg1_name, ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP2(                    \
     category_group, name, id, timestamp, arg1_name, arg1_val, arg2_name,   \
     arg2_val)                                                              \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                      \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id,      \
       TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
-      arg1_name, arg1_val, arg2_name, arg2_val)
+      arg1_name, ::perfetto::internal::PossiblyNull(arg1_val), arg2_name,  \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP_AND_FLAGS0(     \
     category_group, name, id, timestamp, flags)                       \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                 \
@@ -791,14 +855,17 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                      \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group,            \
       ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE,        \
-      ::perfetto::DynamicString{arg1_name}, arg1_val)
+      ::perfetto::DynamicString{arg1_name},                              \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN2(                         \
     category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                     \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group,           \
       ::perfetto::DynamicString{name}, id, TRACE_EVENT_FLAG_NONE,       \
-      ::perfetto::DynamicString{arg1_name}, arg1_val,                   \
-      ::perfetto::DynamicString{arg2_name}, arg2_val)
+      ::perfetto::DynamicString{arg1_name},                             \
+      ::perfetto::internal::PossiblyNull(arg1_val),                     \
+      ::perfetto::DynamicString{arg2_name},                             \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END0(category_group, name, id) \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID(                                    \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group,            \
@@ -815,7 +882,7 @@
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group,                 \
       ::perfetto::DynamicString{name}, id, TRACE_EVENT_API_CURRENT_THREAD_ID, \
       timestamp, TRACE_EVENT_FLAG_NONE, ::perfetto::DynamicString{arg1_name}, \
-      arg1_val)
+      ::perfetto::internal::PossiblyNull(arg1_val))
 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP0(                  \
     category_group, name, id, timestamp)                                      \
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                         \
@@ -828,12 +895,16 @@
   INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP(                      \
       TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id,      \
       TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
-      ::perfetto::DynamicString{arg1_name}, arg1_val,                      \
-      ::perfetto::DynamicString{arg2_name}, arg2_val)
+      ::perfetto::DynamicString{arg1_name},                                \
+      ::perfetto::internal::PossiblyNull(arg1_val),                        \
+      ::perfetto::DynamicString{arg2_name},                                \
+      ::perfetto::internal::PossiblyNull(arg2_val))
 
 // Metadata events.
 #define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \
-  INTERNAL_TRACE_EVENT_METADATA_ADD(category_group, name, arg1_name, arg1_val)
+  INTERNAL_TRACE_EVENT_METADATA_ADD(                                     \
+      category_group, name, arg1_name,                                   \
+      ::perfetto::internal::PossiblyNull(arg1_val))
 
 // Clock sync events.
 #define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id)                           \
@@ -903,7 +974,8 @@
 // involvement from the embedder. APIs such as TRACE_EVENT_API_ADD_TRACE_EVENT
 // are still up to the embedder to define.
 
-#define TRACE_STR_COPY(str) (::perfetto::DynamicString{str})
+#define TRACE_STR_COPY(str) \
+  ::perfetto::DynamicString { ::perfetto::internal::PossiblyNull(str) }
 
 #define TRACE_ID_WITH_SCOPE(scope, ...) \
   ::perfetto::internal::LegacyTraceId::WithScope(scope, ##__VA_ARGS__)
diff --git a/perfetto.rc b/perfetto.rc
index 58f03f7..8fbafa9 100644
--- a/perfetto.rc
+++ b/perfetto.rc
@@ -118,6 +118,14 @@
 
 service perfetto_trace_on_boot /system/bin/perfetto -c /data/misc/perfetto-configs/boottrace.pbtxt --txt -o /data/misc/perfetto-traces/boottrace.perfetto-trace
     disabled
+    gentle_kill
     oneshot
     user shell
     group nobody
+
+# This is meant to stop the boot tracing.
+# To use this, add a trigger with mode STOP_TRACING in the configuration used in perfetto_trace_on_boot.
+# Then create a new config which contains `activate_triggers: <trigger name>` where <trigger name> is
+# the name specified in configuration used in perfetto_trace_on_boot.
+on property:sys.boot_completed=1
+    exec -- /system/bin/perfetto -c /data/misc/perfetto-configs/stopboottracetrigger.pbtxt --txt
diff --git a/protos/perfetto/cloud_trace_processor/BUILD.gn b/protos/perfetto/cloud_trace_processor/BUILD.gn
new file mode 100644
index 0000000..8346434
--- /dev/null
+++ b/protos/perfetto/cloud_trace_processor/BUILD.gn
@@ -0,0 +1,38 @@
+# Copyright (C) 2018 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("../../../gn/proto_library.gni")
+
+SOURCES = [
+  "common.proto",
+  "orchestrator.proto",
+  "worker.proto",
+]
+
+perfetto_proto_library("@TYPE@") {
+  proto_generators = [
+    "lite",
+    "zero",
+    "source_set",
+  ]
+  deps = [ "../trace_processor:@TYPE@" ]  # needed for descriptor.proto.
+  sources = SOURCES
+}
+
+if (enable_perfetto_grpc) {
+  perfetto_grpc_library("cloud_trace_processor_grpc") {
+    deps = [ ":lite" ]
+    sources = SOURCES
+  }
+}
diff --git a/protos/perfetto/cloud_trace_processor/common.proto b/protos/perfetto/cloud_trace_processor/common.proto
new file mode 100644
index 0000000..f2fd5cb
--- /dev/null
+++ b/protos/perfetto/cloud_trace_processor/common.proto
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+
+package perfetto.protos;
+
+enum TracePoolType {
+  TYPE_UNKNOWN = 0;
+
+  // Indicates that the trace pool can be accessed by more than one user. This
+  // implies the pool is "stateless" (i.e. TraceProcessor instances do not
+  // retain state between RPCs).
+  SHARED = 1;
+
+  // Indicates that the trace pool is only accessible by a single user at a
+  // time. This implies the pool is "stateful" (i.e. TraceProcessor instances
+  // retain state across RPCs).
+  DEDICATED = 2;
+}
diff --git a/protos/perfetto/cloud_trace_processor/orchestrator.proto b/protos/perfetto/cloud_trace_processor/orchestrator.proto
new file mode 100644
index 0000000..2f16e23
--- /dev/null
+++ b/protos/perfetto/cloud_trace_processor/orchestrator.proto
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+
+package perfetto.protos;
+
+import "protos/perfetto/trace_processor/trace_processor.proto";
+import "protos/perfetto/cloud_trace_processor/common.proto";
+
+// RPC interface for a CloudTraceProcessor Orchestrator.
+//
+// Each CloudTraceProcessor instance has a single Orchestrator which is
+// responsible for receiving requests for loading and querying traces from
+// clients and shards these requests among a set of "Workers".
+service CloudTraceProcessorOrchestrator {
+  // Creates a TracePool with the specified arguments.
+  //
+  // A TracePool is a logical group of traces which can be addressed with a
+  // single id.
+  //
+  // Pools can be "shared" or "dedicated":
+  //  a) a shared pool has the trace processor instances backing the pool shared
+  //  among a group of users. This implicitly means that the pools are
+  //  "stateless" (i.e. do not preserve trace processor state between RPCs) as
+  //  the state of one user should not interfere with the state of another.
+  //  b) a dedicated pool belongs to a single user and can only be accessed
+  //  by that user. These pools are "stateful" i.e. preserve trace processor
+  //  state between RPCs.
+  rpc TracePoolCreate(TracePoolCreateArgs) returns (TracePoolCreateResponse);
+
+  // Changes the set of traces associated with the specified TracePool.
+  //
+  // If this operation completes successfully, any future requests to this pool
+  // shard will refer to this set of traces.
+  rpc TracePoolSetTraces(TracePoolSetTracesArgs)
+      returns (TracePoolSetTracesResponse);
+
+  // Executes a SQL query on the specified TracePool and returns a stream
+  // with each element being the response for executing the query on the
+  // associated trace.
+  //
+  // Note that each trace can return >1 result due to chunking of protos at the
+  // TraceProcessor::QueryResult level.
+  rpc TracePoolQuery(TracePoolQueryArgs)
+      returns (stream TracePoolQueryResponse);
+
+  // Destroys the TracePool with the specified id.
+  //
+  // Any future requests to this pool will return an error. However, the
+  // same pool id (if a named pool) can be used to create a new pool.
+  rpc TracePoolDestroy(TracePoolDestroyArgs) returns (TracePoolDestroyResponse);
+}
+
+// Request/Response for Orchestrator::TracePoolCreate.
+message TracePoolCreateArgs {
+  optional TracePoolType pool_type = 1;
+
+  // If |pool_type| == SHARED, the name which should be refer to the pool. This
+  // name will form part of |pool_id|.
+  optional string shared_pool_name = 2;
+}
+message TracePoolCreateResponse {
+  // The id of the pool which should be used to reference the pool in all future
+  // RPCs. For shared pools, this id is expected to be a stable transformation
+  // of |shared_pool_name|.
+  optional string pool_id = 1;
+}
+
+// Request/Response for Orchestrator::TracePoolSetTraces.
+message TracePoolSetTracesArgs {
+  optional string pool_id = 1;
+
+  // The list of traces which should be associated with this pool. The existing
+  // loaded trace list will be diffed against this list. Traces not present in
+  // this list and loaded will be unloaded while traces present in this list
+  // and unloaded will be loaded.
+  repeated string traces = 2;
+}
+message TracePoolSetTracesResponse {}
+
+// Request/Response for Orchestrator::TracePoolQuery.
+message TracePoolQueryArgs {
+  optional string pool_id = 1;
+  optional string sql_query = 2;
+}
+message TracePoolQueryResponse {
+  optional string trace = 1;
+  optional QueryResult result = 2;
+}
+
+// Request/Response for Orchestrator::TracePoolDestroy.
+message TracePoolDestroyArgs {
+  optional string pool_id = 1;
+}
+message TracePoolDestroyResponse {}
diff --git a/protos/perfetto/cloud_trace_processor/worker.proto b/protos/perfetto/cloud_trace_processor/worker.proto
new file mode 100644
index 0000000..407ef90
--- /dev/null
+++ b/protos/perfetto/cloud_trace_processor/worker.proto
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+
+package perfetto.protos;
+
+import "protos/perfetto/trace_processor/trace_processor.proto";
+import "protos/perfetto/cloud_trace_processor/common.proto";
+
+// Interface for a CloudTraceProcessor "Worker".
+//
+// Workers are are owned by a |Orchestrator| who assigns groups of traces to
+// them (known as a PoolShards) and forwards any requests from end users.
+// Workers are reponsible for loading assigned traces with TraceProcessor and
+// executing the requests.
+service CloudTraceProcessorWorker {
+  // Creates a TracePoolShard which will be owned by this worker and returns
+  // whether it was successfully created.
+  //
+  // Orchestrators are responsible for handling groups of traces which the user
+  // has requested to be loaded: these are known as TracePools. The orchestrator
+  // then breaks these pools into pieces and shards them out to workers, each of
+  // which is known as a TracePoolShard.
+  //
+  // Thus, a TracePoolShard is unique identified by the tuple (worker, pool id).
+  rpc TracePoolShardCreate(TracePoolShardCreateArgs)
+      returns (TracePoolShardCreateResponse);
+
+  // Associates the provided list of traces to this TracePoolShard and returns
+  // a stream with each element indicating the successful load of one trace
+  // (which allows monitoring the progress of loads) or a terminal error if the
+  // assignment of any trace failed.
+  //
+  // If this operation completes successfully, any future requests to this pool
+  // shard will refer to this set of traces.
+  rpc TracePoolShardSetTraces(TracePoolShardSetTracesArgs)
+      returns (stream TracePoolShardSetTracesResponse);
+
+  // Executes a SQL query on the specified TracePoolShard and returns a stream
+  // with each element being the response for executing the query on the
+  // associated trace.
+  //
+  // Note that each trace can return >1 result due to chunking of protos at the
+  // TraceProcessor::QueryResult level.
+  rpc TracePoolShardQuery(TracePoolShardQueryArgs)
+      returns (stream TracePoolShardQueryResponse);
+
+  // Destroys the TracePoolShard with the specified id.
+  //
+  // Any future requests to this shard id will return an error. However, the
+  // same pool id can be used to create a new shard.
+  rpc TracePoolShardDestroy(TracePoolShardDestroyArgs)
+      returns (TracePoolShardDestroyResponse);
+}
+
+// Request/Response for Worker::TracePoolShardCreate.
+message TracePoolShardCreateArgs {
+  optional string pool_id = 1;
+  optional TracePoolType pool_type = 2;
+}
+message TracePoolShardCreateResponse {}
+
+// Request/Response for Worker::TracePoolShardSetTraces.
+message TracePoolShardSetTracesArgs {
+  optional string pool_id = 1;
+
+  // The list of traces which should be associated with this shard. The existing
+  // loaded trace list will be diffed against this list. Traces not present in
+  // this list and loaded will be unloaded while traces present in this list
+  // and unloaded will be loaded.
+  repeated string traces = 2;
+}
+message TracePoolShardSetTracesResponse {
+  optional string trace = 1;
+}
+
+// Request/Response for Worker::TracePoolShardQuery.
+message TracePoolShardQueryArgs {
+  optional string pool_id = 1;
+  optional string sql_query = 2;
+}
+message TracePoolShardQueryResponse {
+  optional string trace = 1;
+  optional QueryResult result = 2;
+}
+
+// Request/Response for Worker::TracePoolShardDestroy.
+message TracePoolShardDestroyArgs {
+  optional string pool_id = 1;
+}
+message TracePoolShardDestroyResponse {}
diff --git a/protos/perfetto/common/descriptor.proto b/protos/perfetto/common/descriptor.proto
index 7ee05e3..012401f 100644
--- a/protos/perfetto/common/descriptor.proto
+++ b/protos/perfetto/common/descriptor.proto
@@ -82,6 +82,15 @@
   repeated string reserved_name = 10;
 }
 
+message FieldOptions {
+  // The packed option can be enabled for repeated primitive fields to enable
+  // a more efficient representation on the wire. Rather than repeatedly
+  // writing the tag and type for each element, the entire array is encoded as
+  // a single length-delimited blob. In proto3, only explicit setting it to
+  // false will avoid using packed encoding.
+  optional bool packed = 2;
+}
+
 // Describes a field within a message.
 message FieldDescriptorProto {
   enum Type {
@@ -153,13 +162,13 @@
   // TODO(kenton):  Base-64 encode?
   optional string default_value = 7;
 
+  optional FieldOptions options = 8;
+
   // If set, gives the index of a oneof in the containing type's oneof_decl
   // list.  This field is a member of that oneof.
   optional int32 oneof_index = 9;
 
   reserved 10;
-
-  reserved 8;
 }
 
 // Describes a oneof.
diff --git a/protos/perfetto/common/trace_stats.proto b/protos/perfetto/common/trace_stats.proto
index 6a6bb7c..4e6d455 100644
--- a/protos/perfetto/common/trace_stats.proto
+++ b/protos/perfetto/common/trace_stats.proto
@@ -20,7 +20,7 @@
 
 // Statistics for the internals of the tracing service.
 //
-// Next id: 16.
+// Next id: 17.
 message TraceStats {
   // From TraceBuffer::Stats.
   //
@@ -123,6 +123,32 @@
   // Stats for the TraceBuffer(s) of the current trace session.
   repeated BufferStats buffer_stats = 1;
 
+  // Per TraceWriter stat. Each {producer, trace writer} tuple is publicly
+  // visible as a unique sequence ID in the trace.
+  message WriterStats {
+    // This matches the TracePacket.trusted_packet_sequence_id and is used to
+    // correlate the stats with the actual packet types.
+    optional uint64 sequence_id = 1;
+
+    // These two arrays have the same cardinality and match the cardinality of
+    // chunk_payload_histogram_def + 1 (for the overflow bucket, see below).
+    // `sum` contains the SUM(entries) and `counts` contains the COUNT(entries)
+    // for each bucket.
+    repeated uint64 chunk_payload_histogram_counts = 2 [packed = true];
+    repeated int64 chunk_payload_histogram_sum = 3 [packed = true];
+  }
+
+  // The thresholds of each the `writer_stats` histogram buckets. This is
+  // emitted only once as all WriterStats share the same bucket layout.
+  // This field has the same cardinality of the
+  // `writer_stats.chunk_payload_histogram_{counts,sum}` - 1.
+  // (The -1 is because the last overflow bucket is not reported in the _def).
+  // An array of values [10, 100, 1000] in the _def array means that there are
+  // four buckets (3 + the implicit overflow bucket):
+  // [0]: x <= 10; [1]: 100 < x <= 1000; [2]: 1000 < x <= 1000; [3]: x > 1000.
+  repeated int64 chunk_payload_histogram_def = 17;
+  repeated WriterStats writer_stats = 18;
+
   // Num. producers connected (whether they are involved in the current tracing
   // session or not).
   optional uint32 producers_connected = 2;
diff --git a/protos/perfetto/config/perfetto_config.proto b/protos/perfetto/config/perfetto_config.proto
index 904cb5a..7b1171f 100644
--- a/protos/perfetto/config/perfetto_config.proto
+++ b/protos/perfetto/config/perfetto_config.proto
@@ -2792,6 +2792,9 @@
     // TODO(lalitm): deprecate this in T and make this the default if nothing
     // crashes in S.
     optional bool prefer_suspend_clock_for_snapshot = 7;
+
+    // Disables the reporting of per-trace-writer histograms in TraceStats.
+    optional bool disable_chunk_usage_histograms = 8;
   }
   optional BuiltinDataSource builtin_data_sources = 20;
 
diff --git a/protos/perfetto/config/trace_config.proto b/protos/perfetto/config/trace_config.proto
index a933002..04e637c 100644
--- a/protos/perfetto/config/trace_config.proto
+++ b/protos/perfetto/config/trace_config.proto
@@ -118,6 +118,9 @@
     // TODO(lalitm): deprecate this in T and make this the default if nothing
     // crashes in S.
     optional bool prefer_suspend_clock_for_snapshot = 7;
+
+    // Disables the reporting of per-trace-writer histograms in TraceStats.
+    optional bool disable_chunk_usage_histograms = 8;
   }
   optional BuiltinDataSource builtin_data_sources = 20;
 
diff --git a/protos/perfetto/metrics/android/jank_cuj_metric.proto b/protos/perfetto/metrics/android/jank_cuj_metric.proto
index fa3a7b1..007554f 100644
--- a/protos/perfetto/metrics/android/jank_cuj_metric.proto
+++ b/protos/perfetto/metrics/android/jank_cuj_metric.proto
@@ -61,7 +61,7 @@
     optional string layer_name = 11;
   }
 
-  // Next id: 8
+  // Next id: 10
   message Frame {
     // Index of the frame within the single user journey.
     optional int64 frame_number = 1;
@@ -79,9 +79,17 @@
 
     // Whether SF missed the frame deadline.
     optional bool sf_missed = 6;
+
+    // Whether the SF callback missed before emitting jank metrics.
+    // SF callback is used to get the jank classification.
+    optional bool sf_callback_missed = 8;
+
+    // Whether the HWUI callback missed before emitting jank metrics.
+    // HWUI callback is used to get the frame duration.
+    optional bool hwui_callback_missed = 9;
   }
 
-  // Next id: 16
+  // Next id: 18
   message Metrics {
     // Overall number of frames within the CUJ.
     optional int64 total_frames = 1;
@@ -137,5 +145,11 @@
     // P99 frame duration in milliseconds.
     // Not available in counter_metrics.
     optional double frame_dur_ms_p99 = 15;
+
+    // Number of frames with missed SF callback.
+    optional int64 sf_callback_missed_frames = 16;
+
+    // Number of frames with missed HWUI callback.
+    optional int64 hwui_callback_missed_frames = 17;
   }
 }
diff --git a/protos/perfetto/metrics/android/startup_metric.proto b/protos/perfetto/metrics/android/startup_metric.proto
index d8aa954..95a2ff0 100644
--- a/protos/perfetto/metrics/android/startup_metric.proto
+++ b/protos/perfetto/metrics/android/startup_metric.proto
@@ -47,7 +47,7 @@
 
   // Timing information spanning the intent received by the
   // activity manager to the first frame drawn.
-  // Next id: 33.
+  // Next id: 34.
   message ToFirstFrame {
     // The duration between the intent received and first frame.
     optional int64 dur_ns = 1;
@@ -117,6 +117,10 @@
     // |time_lock_contention_thread_main|.
     optional Slice time_monitor_contention_thread_main = 32;
 
+    // Time spent in opening dex files on the main thread of the process
+    // being started up.
+    optional Slice time_dex_open_thread_main = 33;
+
     // Removed: was other_process_to_activity_cpu_ratio.
     reserved 12;
 
@@ -169,6 +173,13 @@
     optional string location = 4;
   }
 
+  // Contains the name and duration of class verification occurred during
+  // the startup.
+  message VerifyClass {
+    optional string name = 1;
+    optional int64 dur_ns = 2;
+  }
+
   // Contains timestamps of important events which occurred during the
   // startup.
   message EventTimestamps {
@@ -209,7 +220,7 @@
     optional int64 dex2oat_dur_ns = 7;
   }
 
-  // Next id: 19
+  // Next id: 20
   message Startup {
     // Random id uniquely identifying an app startup in this trace.
     optional uint32 startup_id = 1;
@@ -262,6 +273,9 @@
     // Contains information about the status of odex files.
     repeated OptimizationStatus optimization_status = 12;
 
+    // Contains information about the class verification.
+    repeated VerifyClass verify_class = 19;
+
     // Package name of startups running concurrent to the launch.
     repeated string startup_concurrent_to_launch = 18;
 
diff --git a/protos/perfetto/metrics/android/surfaceflinger.proto b/protos/perfetto/metrics/android/surfaceflinger.proto
index 3cc2c9e..1f81827 100644
--- a/protos/perfetto/metrics/android/surfaceflinger.proto
+++ b/protos/perfetto/metrics/android/surfaceflinger.proto
@@ -54,4 +54,32 @@
   // This also equals to the total duration of
   // "waiting for GPU completion <fence_num>" in SurfaceFlinger.
   optional double total_non_empty_gpu_waiting_dur_ms = 9;
+
+  message MetricsPerDisplay {
+    // Display ID in SF
+    optional string display_id = 1;
+
+    // Counts the number of missed frames in the trace.
+    optional uint32 missed_frames = 2;
+
+    // Counts the number of missed HWC frames in the trace.
+    optional uint32 missed_hwc_frames = 3;
+
+    // Counts the number of missed GPU frames in the trace.
+    optional uint32 missed_gpu_frames = 4;
+
+    // Calculate the number of missed frames divided by
+    // total frames
+    optional double missed_frame_rate = 5;
+
+    // Calculate the number of missed HWC frames divided by
+    // total HWC frames
+    optional double missed_hwc_frame_rate = 6;
+
+    // Calculate the number of missed GPU frames divided by
+    // total GPU frames
+    optional double missed_gpu_frame_rate = 7;
+  }
+
+  repeated MetricsPerDisplay metrics_per_display = 10;
 }
diff --git a/protos/perfetto/metrics/metrics.proto b/protos/perfetto/metrics/metrics.proto
index 80122e5..8b5e5e4 100644
--- a/protos/perfetto/metrics/metrics.proto
+++ b/protos/perfetto/metrics/metrics.proto
@@ -247,4 +247,7 @@
 
   // Chrome metrics.
   extensions 1001 to 2000;
+
+  // WebView metrics.
+  extensions 2001 to 2500;
 }
diff --git a/protos/perfetto/metrics/perfetto_merged_metrics.proto b/protos/perfetto/metrics/perfetto_merged_metrics.proto
index d99a851..60ffcd4 100644
--- a/protos/perfetto/metrics/perfetto_merged_metrics.proto
+++ b/protos/perfetto/metrics/perfetto_merged_metrics.proto
@@ -880,7 +880,7 @@
     optional string layer_name = 11;
   }
 
-  // Next id: 8
+  // Next id: 10
   message Frame {
     // Index of the frame within the single user journey.
     optional int64 frame_number = 1;
@@ -898,9 +898,17 @@
 
     // Whether SF missed the frame deadline.
     optional bool sf_missed = 6;
+
+    // Whether the SF callback missed before emitting jank metrics.
+    // SF callback is used to get the jank classification.
+    optional bool sf_callback_missed = 8;
+
+    // Whether the HWUI callback missed before emitting jank metrics.
+    // HWUI callback is used to get the frame duration.
+    optional bool hwui_callback_missed = 9;
   }
 
-  // Next id: 16
+  // Next id: 18
   message Metrics {
     // Overall number of frames within the CUJ.
     optional int64 total_frames = 1;
@@ -956,6 +964,12 @@
     // P99 frame duration in milliseconds.
     // Not available in counter_metrics.
     optional double frame_dur_ms_p99 = 15;
+
+    // Number of frames with missed SF callback.
+    optional int64 sf_callback_missed_frames = 16;
+
+    // Number of frames with missed HWUI callback.
+    optional int64 hwui_callback_missed_frames = 17;
   }
 }
 
@@ -1577,7 +1591,7 @@
 
   // Timing information spanning the intent received by the
   // activity manager to the first frame drawn.
-  // Next id: 33.
+  // Next id: 34.
   message ToFirstFrame {
     // The duration between the intent received and first frame.
     optional int64 dur_ns = 1;
@@ -1647,6 +1661,10 @@
     // |time_lock_contention_thread_main|.
     optional Slice time_monitor_contention_thread_main = 32;
 
+    // Time spent in opening dex files on the main thread of the process
+    // being started up.
+    optional Slice time_dex_open_thread_main = 33;
+
     // Removed: was other_process_to_activity_cpu_ratio.
     reserved 12;
 
@@ -1699,6 +1717,13 @@
     optional string location = 4;
   }
 
+  // Contains the name and duration of class verification occurred during
+  // the startup.
+  message VerifyClass {
+    optional string name = 1;
+    optional int64 dur_ns = 2;
+  }
+
   // Contains timestamps of important events which occurred during the
   // startup.
   message EventTimestamps {
@@ -1739,7 +1764,7 @@
     optional int64 dex2oat_dur_ns = 7;
   }
 
-  // Next id: 19
+  // Next id: 20
   message Startup {
     // Random id uniquely identifying an app startup in this trace.
     optional uint32 startup_id = 1;
@@ -1792,6 +1817,9 @@
     // Contains information about the status of odex files.
     repeated OptimizationStatus optimization_status = 12;
 
+    // Contains information about the class verification.
+    repeated VerifyClass verify_class = 19;
+
     // Package name of startups running concurrent to the launch.
     repeated string startup_concurrent_to_launch = 18;
 
@@ -1850,6 +1878,34 @@
   // This also equals to the total duration of
   // "waiting for GPU completion <fence_num>" in SurfaceFlinger.
   optional double total_non_empty_gpu_waiting_dur_ms = 9;
+
+  message MetricsPerDisplay {
+    // Display ID in SF
+    optional string display_id = 1;
+
+    // Counts the number of missed frames in the trace.
+    optional uint32 missed_frames = 2;
+
+    // Counts the number of missed HWC frames in the trace.
+    optional uint32 missed_hwc_frames = 3;
+
+    // Counts the number of missed GPU frames in the trace.
+    optional uint32 missed_gpu_frames = 4;
+
+    // Calculate the number of missed frames divided by
+    // total frames
+    optional double missed_frame_rate = 5;
+
+    // Calculate the number of missed HWC frames divided by
+    // total HWC frames
+    optional double missed_hwc_frame_rate = 6;
+
+    // Calculate the number of missed GPU frames divided by
+    // total GPU frames
+    optional double missed_gpu_frame_rate = 7;
+  }
+
+  repeated MetricsPerDisplay metrics_per_display = 10;
 }
 
 // End of protos/perfetto/metrics/android/surfaceflinger.proto
@@ -2106,6 +2162,9 @@
 
   // Chrome metrics.
   extensions 1001 to 2000;
+
+  // WebView metrics.
+  extensions 2001 to 2500;
 }
 
 // End of protos/perfetto/metrics/metrics.proto
diff --git a/protos/perfetto/metrics/webview/BUILD.gn b/protos/perfetto/metrics/webview/BUILD.gn
new file mode 100644
index 0000000..744794c
--- /dev/null
+++ b/protos/perfetto/metrics/webview/BUILD.gn
@@ -0,0 +1,32 @@
+# Copyright (C) 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("../../../../gn/proto_library.gni")
+
+perfetto_proto_library("@TYPE@") {
+  proto_generators = [ "source_set" ]
+  deps = [ "..:@TYPE@" ]
+  sources = [
+    "all_webview_metrics.proto",
+    "webview_jank_approximation.proto",
+  ]
+}
+
+perfetto_proto_library("descriptor") {
+  proto_generators = [ "descriptor" ]
+  import_dirs = [ "${perfetto_protobuf_src_dir}" ]
+  generate_descriptor = "all_webview_metrics.descriptor"
+  deps = [ ":source_set" ]
+  sources = [ "all_webview_metrics.proto" ]
+}
diff --git a/protos/perfetto/trace_processor/cloud_trace_processor.proto b/protos/perfetto/metrics/webview/all_webview_metrics.proto
similarity index 74%
rename from protos/perfetto/trace_processor/cloud_trace_processor.proto
rename to protos/perfetto/metrics/webview/all_webview_metrics.proto
index b009fe3..d929d6b 100644
--- a/protos/perfetto/trace_processor/cloud_trace_processor.proto
+++ b/protos/perfetto/metrics/webview/all_webview_metrics.proto
@@ -18,4 +18,9 @@
 
 package perfetto.protos;
 
-service CloudTraceProcessorWorkerService {}
\ No newline at end of file
+import "protos/perfetto/metrics/metrics.proto";
+import "protos/perfetto/metrics/webview/webview_jank_approximation.proto";
+
+extend TraceMetrics {
+  optional WebViewJankApproximation webview_jank_approximation = 2001;
+}
\ No newline at end of file
diff --git a/protos/perfetto/trace_processor/cloud_trace_processor.proto b/protos/perfetto/metrics/webview/webview_jank_approximation.proto
similarity index 72%
copy from protos/perfetto/trace_processor/cloud_trace_processor.proto
copy to protos/perfetto/metrics/webview/webview_jank_approximation.proto
index b009fe3..cdf7299 100644
--- a/protos/perfetto/trace_processor/cloud_trace_processor.proto
+++ b/protos/perfetto/metrics/webview/webview_jank_approximation.proto
@@ -18,4 +18,10 @@
 
 package perfetto.protos;
 
-service CloudTraceProcessorWorkerService {}
\ No newline at end of file
+message WebViewJankApproximation {
+  optional int32 webview_janks = 1;
+  optional int32 webview_janks_without_startup = 2;
+  optional int32 webview_app_janks = 3;
+  optional int32 webview_total_janks = 4;
+  optional int32 total_janks = 5;
+}
diff --git a/protos/perfetto/trace/ftrace/ftrace_event.proto b/protos/perfetto/trace/ftrace/ftrace_event.proto
index e29981f..88d3641 100644
--- a/protos/perfetto/trace/ftrace/ftrace_event.proto
+++ b/protos/perfetto/trace/ftrace/ftrace_event.proto
@@ -594,5 +594,8 @@
     HostHcallFtraceEvent host_hcall = 478;
     HostSmcFtraceEvent host_smc = 479;
     HostMemAbortFtraceEvent host_mem_abort = 480;
+    SuspendResumeMinimalFtraceEvent suspend_resume_minimal = 481;
+    MaliMaliCSFINTERRUPTSTARTFtraceEvent mali_mali_CSF_INTERRUPT_START = 482;
+    MaliMaliCSFINTERRUPTENDFtraceEvent mali_mali_CSF_INTERRUPT_END = 483;
   }
 }
diff --git a/protos/perfetto/trace/ftrace/mali.proto b/protos/perfetto/trace/ftrace/mali.proto
index 0c59cd4..9d67166 100644
--- a/protos/perfetto/trace/ftrace/mali.proto
+++ b/protos/perfetto/trace/ftrace/mali.proto
@@ -53,3 +53,13 @@
   optional uint32 kctx_id = 4;
   optional uint32 id = 5;
 }
+message MaliMaliCSFINTERRUPTSTARTFtraceEvent {
+  optional int32 kctx_tgid = 1;
+  optional uint32 kctx_id = 2;
+  optional uint64 info_val = 3;
+}
+message MaliMaliCSFINTERRUPTENDFtraceEvent {
+  optional int32 kctx_tgid = 1;
+  optional uint32 kctx_id = 2;
+  optional uint64 info_val = 3;
+}
diff --git a/protos/perfetto/trace/ftrace/synthetic.proto b/protos/perfetto/trace/ftrace/synthetic.proto
index 53ccba1..7039fa2 100644
--- a/protos/perfetto/trace/ftrace/synthetic.proto
+++ b/protos/perfetto/trace/ftrace/synthetic.proto
@@ -11,3 +11,6 @@
   optional uint32 mm_id = 3;
   optional int64 size = 4;
 }
+message SuspendResumeMinimalFtraceEvent {
+  optional uint32 start = 1;
+}
diff --git a/protos/perfetto/trace/perfetto_trace.proto b/protos/perfetto/trace/perfetto_trace.proto
index 9406c7d..d208b94 100644
--- a/protos/perfetto/trace/perfetto_trace.proto
+++ b/protos/perfetto/trace/perfetto_trace.proto
@@ -2792,6 +2792,9 @@
     // TODO(lalitm): deprecate this in T and make this the default if nothing
     // crashes in S.
     optional bool prefer_suspend_clock_for_snapshot = 7;
+
+    // Disables the reporting of per-trace-writer histograms in TraceStats.
+    optional bool disable_chunk_usage_histograms = 8;
   }
   optional BuiltinDataSource builtin_data_sources = 20;
 
@@ -3202,7 +3205,7 @@
 
 // Statistics for the internals of the tracing service.
 //
-// Next id: 16.
+// Next id: 17.
 message TraceStats {
   // From TraceBuffer::Stats.
   //
@@ -3305,6 +3308,32 @@
   // Stats for the TraceBuffer(s) of the current trace session.
   repeated BufferStats buffer_stats = 1;
 
+  // Per TraceWriter stat. Each {producer, trace writer} tuple is publicly
+  // visible as a unique sequence ID in the trace.
+  message WriterStats {
+    // This matches the TracePacket.trusted_packet_sequence_id and is used to
+    // correlate the stats with the actual packet types.
+    optional uint64 sequence_id = 1;
+
+    // These two arrays have the same cardinality and match the cardinality of
+    // chunk_payload_histogram_def + 1 (for the overflow bucket, see below).
+    // `sum` contains the SUM(entries) and `counts` contains the COUNT(entries)
+    // for each bucket.
+    repeated uint64 chunk_payload_histogram_counts = 2 [packed = true];
+    repeated int64 chunk_payload_histogram_sum = 3 [packed = true];
+  }
+
+  // The thresholds of each the `writer_stats` histogram buckets. This is
+  // emitted only once as all WriterStats share the same bucket layout.
+  // This field has the same cardinality of the
+  // `writer_stats.chunk_payload_histogram_{counts,sum}` - 1.
+  // (The -1 is because the last overflow bucket is not reported in the _def).
+  // An array of values [10, 100, 1000] in the _def array means that there are
+  // four buckets (3 + the implicit overflow bucket):
+  // [0]: x <= 10; [1]: 100 < x <= 1000; [2]: 1000 < x <= 1000; [3]: x > 1000.
+  repeated int64 chunk_payload_histogram_def = 17;
+  repeated WriterStats writer_stats = 18;
+
   // Num. producers connected (whether they are involved in the current tracing
   // session or not).
   optional uint32 producers_connected = 2;
@@ -4298,6 +4327,15 @@
   repeated string reserved_name = 10;
 }
 
+message FieldOptions {
+  // The packed option can be enabled for repeated primitive fields to enable
+  // a more efficient representation on the wire. Rather than repeatedly
+  // writing the tag and type for each element, the entire array is encoded as
+  // a single length-delimited blob. In proto3, only explicit setting it to
+  // false will avoid using packed encoding.
+  optional bool packed = 2;
+}
+
 // Describes a field within a message.
 message FieldDescriptorProto {
   enum Type {
@@ -4369,13 +4407,13 @@
   // TODO(kenton):  Base-64 encode?
   optional string default_value = 7;
 
+  optional FieldOptions options = 8;
+
   // If set, gives the index of a oneof in the containing type's oneof_decl
   // list.  This field is a member of that oneof.
   optional int32 oneof_index = 9;
 
   reserved 10;
-
-  reserved 8;
 }
 
 // Describes a oneof.
@@ -6738,6 +6776,16 @@
   optional uint32 kctx_id = 4;
   optional uint32 id = 5;
 }
+message MaliMaliCSFINTERRUPTSTARTFtraceEvent {
+  optional int32 kctx_tgid = 1;
+  optional uint32 kctx_id = 2;
+  optional uint64 info_val = 3;
+}
+message MaliMaliCSFINTERRUPTENDFtraceEvent {
+  optional int32 kctx_tgid = 1;
+  optional uint32 kctx_id = 2;
+  optional uint64 info_val = 3;
+}
 
 // End of protos/perfetto/trace/ftrace/mali.proto
 
@@ -7311,6 +7359,9 @@
   optional uint32 mm_id = 3;
   optional int64 size = 4;
 }
+message SuspendResumeMinimalFtraceEvent {
+  optional uint32 start = 1;
+}
 
 // End of protos/perfetto/trace/ftrace/synthetic.proto
 
@@ -8237,6 +8288,9 @@
     HostHcallFtraceEvent host_hcall = 478;
     HostSmcFtraceEvent host_smc = 479;
     HostMemAbortFtraceEvent host_mem_abort = 480;
+    SuspendResumeMinimalFtraceEvent suspend_resume_minimal = 481;
+    MaliMaliCSFINTERRUPTSTARTFtraceEvent mali_mali_CSF_INTERRUPT_START = 482;
+    MaliMaliCSFINTERRUPTENDFtraceEvent mali_mali_CSF_INTERRUPT_END = 483;
   }
 }
 
diff --git a/protos/perfetto/trace_processor/BUILD.gn b/protos/perfetto/trace_processor/BUILD.gn
index 5e2f376..2f6cb71 100644
--- a/protos/perfetto/trace_processor/BUILD.gn
+++ b/protos/perfetto/trace_processor/BUILD.gn
@@ -41,10 +41,3 @@
   ]
   sources = [ "metrics_impl.proto" ]
 }
-
-if (enable_perfetto_grpc) {
-  perfetto_grpc_library("cloud_trace_processor_grpc") {
-    deps = [ ":lite" ]
-    sources = [ "cloud_trace_processor.proto" ]
-  }
-}
diff --git a/protos/perfetto/trace_processor/proto_files.gni b/protos/perfetto/trace_processor/proto_files.gni
index 5f202b2..f211050 100644
--- a/protos/perfetto/trace_processor/proto_files.gni
+++ b/protos/perfetto/trace_processor/proto_files.gni
@@ -15,8 +15,7 @@
 # This variable is used both by ./BUILD.gn (for the C++ proto codegen) and by
 # //ui/BUIlD.gn (for the TypeScript/JS proto codegen).
 trace_processor_protos = [
-  "cloud_trace_processor",
-  "trace_processor",
   "metatrace_categories",
   "stack",
+  "trace_processor",
 ]
diff --git a/protos/third_party/CHROMIUM_OWNERS b/protos/third_party/CHROMIUM_OWNERS
index 7cc656e..826302d 100644
--- a/protos/third_party/CHROMIUM_OWNERS
+++ b/protos/third_party/CHROMIUM_OWNERS
@@ -14,3 +14,7 @@
 nuskos@google.com
 oksamyt@google.com
 kartarsingh@google.com
+jkoshy@google.com
+amanvr@google.com
+rasikan@google.com
+violettfaid@google.com
diff --git a/protos/third_party/chromium/chrome_track_event.proto b/protos/third_party/chromium/chrome_track_event.proto
index f19c1cf..1f5a211 100644
--- a/protos/third_party/chromium/chrome_track_event.proto
+++ b/protos/third_party/chromium/chrome_track_event.proto
@@ -512,6 +512,9 @@
   // The ID of the BrowsingInstance that the BrowsingContextState belongs to.
   optional int32 browsing_instance_id = 1;
 
+  // The ID of the CoopRelatedGroup that the BrowsingContextState belongs to.
+  optional int32 coop_related_group_id = 2;
+
   // Additional untyped debug information associated with this
   // FrameTreeNode, populated via TracedProto::AddDebugAnnotations API.
   repeated DebugAnnotation debug_annotations = 99;
@@ -734,6 +737,7 @@
     TASK_TYPE_INTERNAL_NAVIGATION_CANCELLATION = 80;
     TASK_TYPE_LOW_PRIORITY_SCRIPT_EXECUTION = 81;
     TASK_TYPE_STORAGE = 82;
+    TASK_TYPE_NETWORKING_UNFREEZABLE_IMAGE_LOADING = 83;
   }
 
   enum FrameType {
@@ -863,6 +867,7 @@
     HIGH_PRIORITY_CONTINUATION = 8;
     NORMAL_PRIORITY_CONTINUATION = 9;
     LOW_PRIORITY_CONTINUATION = 10;
+    EXTREMELY_HIGH_PRIORITY = 11;
   }
 
   enum QueueName {
@@ -1031,11 +1036,25 @@
     SERVICE_WORKER = 5;
   }
 
+  // Definition of world type.
+  enum WorldType {
+    WORLD_UNKNOWN = 0;
+    WORLD_MAIN = 1;
+    WORLD_ISOLATED = 2;
+    WORLD_INSPECTOR_ISOLATED = 3;
+    WORLD_REG_EXP = 4;
+    WORLD_FOR_V8_CONTEXT_SNAPSHOT_NON_MAIN = 5;
+    WORLD_WORKER = 6;
+    WORLD_SHADOW_REALM = 7;
+  }
+
   optional ContextType type = 1;
   // Contains url of frame or worker.
   optional string url = 2;
   // The origin of the execution context.
   optional string origin = 3;
+  // The world type of the execution context.
+  optional WorldType world_type = 4;
 }
 
 // Serializes the blink::SourceLocation object.
@@ -1079,10 +1098,28 @@
     // similar to "Navigator.languages.get".
     optional string identifier = 1;
     repeated JSFunctionArgument func_arguments = 2;
+
+    // Deprecated in favour of outer source_location.
     optional BlinkSourceLocation source_location = 3;
   }
   optional BlinkExecutionContext execution_context = 1;
   optional CalledJsApi called_api = 2;
+  optional BlinkSourceLocation source_location = 3;
+
+  // Describes lookup of a font.
+  message FontLookup {
+    enum FontLookupType {
+      FONT_LOOKUP_UNKNOWN_TYPE = 0;
+      FONT_LOOKUP_UNIQUE_OR_FAMILY_NAME = 1;
+      FONT_LOOKUP_UNIQUE_NAME_ONLY = 2;
+    }
+    optional FontLookupType type = 1;
+    optional string name = 2;
+    optional uint64 weight = 3;
+    optional uint64 width = 4;
+    optional uint64 slope = 5;
+  }
+  optional FontLookup font_lookup = 4;
 }
 
 // Contains information about a tab switch measurement.
diff --git a/python/generators/diff_tests/runner.py b/python/generators/diff_tests/runner.py
index 6219c25..7cb316a 100644
--- a/python/generators/diff_tests/runner.py
+++ b/python/generators/diff_tests/runner.py
@@ -391,7 +391,9 @@
       metrics_descriptor_paths = [
           os.path.join(metrics_protos_path, 'metrics.descriptor'),
           os.path.join(metrics_protos_path, 'chrome',
-                       'all_chrome_metrics.descriptor')
+                       'all_chrome_metrics.descriptor'),
+          os.path.join(metrics_protos_path, 'webview',
+                       'all_webview_metrics.descriptor')
       ]
     result_str = ""
 
diff --git a/python/generators/stdlib_docs/parse.py b/python/generators/stdlib_docs/parse.py
index 79f4cfe..bdef717 100644
--- a/python/generators/stdlib_docs/parse.py
+++ b/python/generators/stdlib_docs/parse.py
@@ -42,6 +42,8 @@
     m = re.match(Pattern['column'], line)
     if last_col:
       cols[last_col] = ' '.join(last_desc)
+    if not m:
+      print(f'Expected line {line} to match @column format', file=sys.stderr)
     last_col, last_desc = m.group(1), [m.group(2)]
 
   cols[last_col] = ' '.join(last_desc)
@@ -79,6 +81,8 @@
       desc.append(get_text(line))
 
     m = re.match(Pattern['return_arg'], line)
+    if not m:
+      print(f'Expected line {line} to match @ret format', file=sys.stderr)
     ret_type, desc = m.group(1), [m.group(2)]
   return (ret_type, ' '.join(desc))
 
diff --git a/python/generators/trace_processor_table/public.py b/python/generators/trace_processor_table/public.py
index abd0aec..c8bdb0b 100644
--- a/python/generators/trace_processor_table/public.py
+++ b/python/generators/trace_processor_table/public.py
@@ -119,6 +119,8 @@
   Representation of of a C++ table.
 
   Attributes:
+    python_module: Path to the Python module this table is defined in. Always
+    pass __file__.
     class_name: Name of the C++ table class.
     sql_name: Name of the table in SQL.
     columns: The columns in this table.
@@ -129,6 +131,7 @@
     specified table.
     wrapping_sql_view: See |WrappingSqlView|.
   """
+  python_module: str
   class_name: str
   sql_name: str
   columns: List[Column]
diff --git a/python/generators/trace_processor_table/serialize.py b/python/generators/trace_processor_table/serialize.py
index 0a8715c..1b498c3 100644
--- a/python/generators/trace_processor_table/serialize.py
+++ b/python/generators/trace_processor_table/serialize.py
@@ -19,6 +19,8 @@
 from python.generators.trace_processor_table.public import ColumnFlag
 from python.generators.trace_processor_table.util import ParsedTable
 from python.generators.trace_processor_table.util import ParsedColumn
+from python.generators.trace_processor_table.util import parse_type
+from python.generators.trace_processor_table.util import typed_column_type
 
 
 class ColumnSerializer:
@@ -30,8 +32,9 @@
     self.col = self.parsed_col.column
     self.name = self.col.name
     self.flags = self.col.flags
-    self.typed_column_type = table.typed_column_type(self.parsed_col)
-    self.cpp_type = table.parse_type(self.col.type).cpp_type_with_optionality()
+    self.typed_column_type = typed_column_type(table.table, self.parsed_col)
+    self.cpp_type = parse_type(table.table,
+                               self.col.type).cpp_type_with_optionality()
 
     self.is_implicit_id = self.parsed_col.is_implicit_id
     self.is_implicit_type = self.parsed_col.is_implicit_type
@@ -114,7 +117,7 @@
     return f'''
     columns_.emplace_back("{self.name}", &{self.name}_, ColumnFlag::{self.name},
                           this, static_cast<uint32_t>(columns_.size()),
-                          overlay_idx);
+                          olay_idx);
     '''
 
   def shrink_to_fit(self) -> Optional[str]:
@@ -180,11 +183,11 @@
     if self.is_implicit_id or self.is_implicit_type:
       return None
     return f'''
-      schema.columns.emplace_back(Table::Schema::Column{{
-          "{self.name}", ColumnType::{self.name}::SqlValueType(), false,
-          {str(ColumnFlag.SORTED in self.flags).lower()},
-          {str(ColumnFlag.HIDDEN in self.flags).lower()},
-          {str(ColumnFlag.SET_ID in self.flags).lower()}}});
+    schema.columns.emplace_back(Table::Schema::Column{{
+        "{self.name}", ColumnType::{self.name}::SqlValueType(), false,
+        {str(ColumnFlag.SORTED in self.flags).lower()},
+        {str(ColumnFlag.HIDDEN in self.flags).lower()},
+        {str(ColumnFlag.SET_ID in self.flags).lower()}}});
     '''
 
   def row_eq(self) -> Optional[str]:
@@ -192,6 +195,42 @@
       return None
     return f'ColumnType::{self.name}::Equals({self.name}, other.{self.name})'
 
+  def extend_parent_param(self) -> Optional[str]:
+    if self.is_implicit_id or self.is_implicit_type:
+      return None
+    if self.is_ancestor:
+      return None
+    return f'ColumnStorage<ColumnType::{self.name}::stored_type> {self.name}'
+
+  def extend_parent_param_arg(self) -> Optional[str]:
+    if self.is_implicit_id or self.is_implicit_type:
+      return None
+    if self.is_ancestor:
+      return None
+    return f'std::move({self.name})'
+
+  def static_assert_flags(self) -> Optional[str]:
+    if self.is_implicit_id or self.is_implicit_type:
+      return None
+    if self.is_ancestor:
+      return None
+    return f'''
+      static_assert(
+        Column::IsFlagsAndTypeValid<ColumnType::{self.name}::stored_type>(
+          ColumnFlag::{self.name}),
+        "Column type and flag combination is not valid");
+    '''
+
+  def extend_nullable_vector(self) -> Optional[str]:
+    if self.is_implicit_id or self.is_implicit_type:
+      return None
+    if self.is_ancestor:
+      return None
+    return f'''
+    PERFETTO_DCHECK({self.name}.size() == parent_overlay.size());
+    {self.name}_ = std::move({self.name});
+    '''
+
 
 class TableSerializer(object):
   """Functions for seralizing a single Table into C++."""
@@ -243,12 +282,13 @@
         ColumnSerializer.parent_row_initializer, delimiter=', ')
     row_init = self.foreach_col(
         ColumnSerializer.row_initializer, delimiter=',\n          ')
+    parent_separator = ',' if row_init else ''
     row_eq = self.foreach_col(ColumnSerializer.row_eq, delimiter=' &&\n       ')
     return f'''
   struct Row : public {self.parent_class_name}::Row {{
     Row({param},
         std::nullptr_t = nullptr)
-        : {self.parent_class_name}::Row({parent_row_init}),
+        : {self.parent_class_name}::Row({parent_row_init}){parent_separator}
           {row_init} {{
       type_ = "{self.table.sql_name}";
     }}
@@ -297,22 +337,28 @@
     '''
 
   def constructor(self) -> str:
-    col_init = self.foreach_col(
+    storage_init = self.foreach_col(
         ColumnSerializer.storage_init, delimiter=',\n        ')
     if self.table.parent:
       parent_param = f', {self.parent_class_name}* parent'
       parent_arg = 'parent'
-      parent_init = 'parent_(parent), '
+      parent_init = 'parent_(parent)' + (', ' if storage_init else '')
     else:
       parent_param = ''
       parent_arg = 'nullptr'
       parent_init = ''
+    col_init = self.foreach_col(ColumnSerializer.column_init)
+    if col_init:
+      olay = 'uint32_t olay_idx = static_cast<uint32_t>(overlays_.size()) - 1;'
+    else:
+      olay = ''
     return f'''
   explicit {self.table_name}(StringPool* pool{parent_param})
       : macros_internal::MacroTable(pool, {parent_arg}),
-        {parent_init}{col_init} {{
-    uint32_t overlay_idx = static_cast<uint32_t>(overlays_.size()) - 1;
-    {self.foreach_col(ColumnSerializer.column_init)}
+        {parent_init}{storage_init} {{
+    {self.foreach_col(ColumnSerializer.static_assert_flags)}
+    {olay}
+    {col_init}
   }}
     '''
 
@@ -383,6 +429,60 @@
   }};
       '''
 
+  def extend(self) -> str:
+    if not self.table.parent:
+      return ''
+    params = self.foreach_col(
+        ColumnSerializer.extend_parent_param, delimiter='\n, ')
+    args = self.foreach_col(
+        ColumnSerializer.extend_parent_param_arg, delimiter=', ')
+    delim = ',' if params else ''
+    return f'''
+  static std::unique_ptr<Table> ExtendParent(
+      const {self.parent_class_name}& parent{delim}
+      {params}) {{
+    return std::unique_ptr<Table>(new {self.table_name}(
+        parent.string_pool(), parent, RowMap(0, parent.row_count()){delim}
+        {args}));
+  }}
+
+  static std::unique_ptr<Table> SelectAndExtendParent(
+      const {self.parent_class_name}& parent,
+      std::vector<{self.parent_class_name}::RowNumber> parent_overlay{delim}
+      {params}) {{
+    std::vector<uint32_t> prs_untyped(parent_overlay.size());
+    for (uint32_t i = 0; i < parent_overlay.size(); ++i) {{
+      prs_untyped[i] = parent_overlay[i].row_number();
+    }}
+    return std::unique_ptr<Table>(new {self.table_name}(
+        parent.string_pool(), parent, RowMap(std::move(prs_untyped)){delim}
+        {args}));
+  }}
+    '''
+
+  def extend_constructor(self) -> str:
+    if not self.table.parent:
+      return ''
+    params = self.foreach_col(
+        ColumnSerializer.extend_parent_param, delimiter='\n, ')
+    if params:
+      olay = 'uint32_t olay_idx = static_cast<uint32_t>(overlays_.size()) - 1;'
+    else:
+      olay = ''
+    return f'''
+  {self.table_name}(StringPool* pool,
+            const {self.parent_class_name}& parent,
+            const RowMap& parent_overlay{',' if params else ''}
+            {params})
+      : macros_internal::MacroTable(pool, parent, parent_overlay) {{
+    {self.foreach_col(ColumnSerializer.static_assert_flags)}
+    {self.foreach_col(ColumnSerializer.extend_nullable_vector)}
+
+    {olay}
+    {self.foreach_col(ColumnSerializer.column_init)}
+  }}
+    '''
+
   def serialize(self) -> str:
     return f'''
 class {self.table_name} : public macros_internal::MacroTable {{
@@ -482,11 +582,14 @@
                      RowNumber(row_number)}};
   }}
 
+  {self.extend().strip()}
+
   {self.foreach_col(ColumnSerializer.accessor)}
 
   {self.foreach_col(ColumnSerializer.mutable_accessor)}
 
  private:
+  {self.extend_constructor().strip()}
   {self.parent_field().strip()}
   {self.foreach_col(ColumnSerializer.storage)}
 }};
@@ -502,7 +605,7 @@
 #ifndef {ifdef_guard}
 #define {ifdef_guard}
 
-#include "src/trace_processor/tables/macros.h"
+#include "src/trace_processor/tables/macros_internal.h"
 
 {include_paths_str}
 
diff --git a/python/generators/trace_processor_table/util.py b/python/generators/trace_processor_table/util.py
index 015f02c..1f0dc0c 100644
--- a/python/generators/trace_processor_table/util.py
+++ b/python/generators/trace_processor_table/util.py
@@ -14,7 +14,8 @@
 
 import dataclasses
 from dataclasses import dataclass
-import runpy
+import importlib
+import sys
 from typing import Dict
 from typing import List
 from typing import Set
@@ -92,71 +93,78 @@
 
   table: Table
   columns: List[ParsedColumn]
-  input_path: str
 
-  def parse_type(self, col_type: CppColumnType) -> ParsedType:
-    """Parses a CppColumnType into its constiuent parts."""
 
-    if isinstance(col_type, CppInt64):
-      return ParsedType('int64_t')
-    if isinstance(col_type, CppInt32):
-      return ParsedType('int32_t')
-    if isinstance(col_type, CppUint32):
-      return ParsedType('uint32_t')
-    if isinstance(col_type, CppDouble):
-      return ParsedType('double')
-    if isinstance(col_type, CppString):
-      return ParsedType('StringPool::Id')
+def parse_type_with_cols(table: Table, cols: List[Column],
+                         col_type: CppColumnType) -> ParsedType:
+  """Parses a CppColumnType into its constiuent parts."""
 
-    if isinstance(col_type, Alias):
-      col = next(c for c in self.columns
-                 if c.column.name == col_type.underlying_column)
-      return ParsedType(
-          self.parse_type(col.column.type).cpp_type,
-          is_alias=True,
-          alias_underlying_name=col.column.name)
+  if isinstance(col_type, CppInt64):
+    return ParsedType('int64_t')
+  if isinstance(col_type, CppInt32):
+    return ParsedType('int32_t')
+  if isinstance(col_type, CppUint32):
+    return ParsedType('uint32_t')
+  if isinstance(col_type, CppDouble):
+    return ParsedType('double')
+  if isinstance(col_type, CppString):
+    return ParsedType('StringPool::Id')
 
-    if isinstance(col_type, CppTableId):
-      return ParsedType(
-          f'{col_type.table.class_name}::Id', id_table=col_type.table)
+  if isinstance(col_type, Alias):
+    col = next(c for c in cols if c.name == col_type.underlying_column)
+    return ParsedType(
+        parse_type(table, col.type).cpp_type,
+        is_alias=True,
+        alias_underlying_name=col.name)
 
-    if isinstance(col_type, CppSelfTableId):
-      return ParsedType(
-          f'{self.table.class_name}::Id', is_self_id=True, id_table=self.table)
+  if isinstance(col_type, CppTableId):
+    return ParsedType(
+        f'{col_type.table.class_name}::Id', id_table=col_type.table)
 
-    if isinstance(col_type, CppOptional):
-      inner = self.parse_type(col_type.inner)
-      assert not inner.is_optional, 'Nested optional not allowed'
-      return dataclasses.replace(inner, is_optional=True)
+  if isinstance(col_type, CppSelfTableId):
+    return ParsedType(
+        f'{table.class_name}::Id', is_self_id=True, id_table=table)
 
-    raise Exception(f'Unknown type {col_type}')
+  if isinstance(col_type, CppOptional):
+    inner = parse_type(table, col_type.inner)
+    assert not inner.is_optional, 'Nested optional not allowed'
+    return dataclasses.replace(inner, is_optional=True)
 
-  def typed_column_type(self, col: ParsedColumn) -> str:
-    """Returns the TypedColumn/IdColumn C++ type for a given column."""
+  raise Exception(f'Unknown type {col_type}')
 
-    parsed = self.parse_type(col.column.type)
-    if col.is_implicit_id:
-      return f'IdColumn<{parsed.cpp_type}>'
-    return f'TypedColumn<{parsed.cpp_type_with_optionality()}>'
 
-  def find_table_deps(self) -> Set[str]:
-    """Finds all the other table class names this table depends on.
+def parse_type(table: Table, col_type: CppColumnType) -> ParsedType:
+  """Parses a CppColumnType into its constiuent parts."""
+  return parse_type_with_cols(table, table.columns, col_type)
 
-    By "depends", we mean this table in C++ would need the dependency to be
-    defined (or included) before this table is defined."""
 
-    deps: Set[str] = set()
-    if self.table.parent:
-      deps.add(self.table.parent.class_name)
-    for c in self.table.columns:
-      # Aliases cannot have dependencies so simply ignore them: trying to parse
-      # them before adding implicit columns can cause issues.
-      if isinstance(c.type, Alias):
-        continue
-      id_table = self.parse_type(c.type).id_table
-      if id_table:
-        deps.add(id_table.class_name)
-    return deps
+def typed_column_type(table: Table, col: ParsedColumn) -> str:
+  """Returns the TypedColumn/IdColumn C++ type for a given column."""
+
+  parsed = parse_type(table, col.column.type)
+  if col.is_implicit_id:
+    return f'IdColumn<{parsed.cpp_type}>'
+  return f'TypedColumn<{parsed.cpp_type_with_optionality()}>'
+
+
+def find_table_deps(table: Table) -> List[Table]:
+  """Finds all the other table class names this table depends on.
+
+  By "depends", we mean this table in C++ would need the dependency to be
+  defined (or included) before this table is defined."""
+
+  deps: Dict[str, Table] = {}
+  if table.parent:
+    deps[table.parent.class_name] = table.parent
+  for c in table.columns:
+    # Aliases cannot have dependencies so simply ignore them: trying to parse
+    # them before adding implicit columns can cause issues.
+    if isinstance(c.type, Alias):
+      continue
+    id_table = parse_type(table, c.type).id_table
+    if id_table:
+      deps[id_table.class_name] = id_table
+  return list(deps.values())
 
 
 def public_sql_name(table: Table) -> str:
@@ -165,10 +173,9 @@
   wrapping_view = table.wrapping_sql_view
   return wrapping_view.view_name if wrapping_view else table.sql_name
 
-def _create_implicit_columns_for_root(parsed: ParsedTable
-                                     ) -> List[ParsedColumn]:
+
+def _create_implicit_columns_for_root(table: Table) -> List[ParsedColumn]:
   """Given a root table, returns the implicit id and type columns."""
-  table = parsed.table
   assert table.parent is None
 
   sql_name = public_sql_name(table)
@@ -191,26 +198,25 @@
   ]
 
 
-def _topological_sort_tables(parsed: List[ParsedTable]) -> List[ParsedTable]:
+def _topological_sort_table_and_deps(parsed: List[Table]) -> List[Table]:
   """Topologically sorts a list of tables (i.e. dependenices appear earlier).
 
   See [1] for information on a topological sort. We do this to allow
   dependencies to be processed and appear ealier than their dependents.
 
   [1] https://en.wikipedia.org/wiki/Topological_sorting"""
-  table_to_parsed_table = {p.table.class_name: p for p in parsed}
   visited: Set[str] = set()
-  result: List[ParsedTable] = []
+  result: List[Table] = []
 
   # Topological sorting is really just a DFS where we put the nodes in the list
   # after any dependencies.
-  def dfs(t: ParsedTable):
-    if t.table.class_name in visited:
+  def dfs(t: Table):
+    if t.class_name in visited:
       return
-    visited.add(t.table.class_name)
+    visited.add(t.class_name)
 
-    for dep in t.find_table_deps():
-      dfs(table_to_parsed_table[dep])
+    for dep in find_table_deps(t):
+      dfs(dep)
     result.append(t)
 
   for p in parsed:
@@ -226,26 +232,27 @@
   return ColumnDoc(doc=doc)
 
 
-def parse_tables_from_files(input_paths: List[str]) -> List[ParsedTable]:
+def parse_tables_from_modules(modules: List[str]) -> List[ParsedTable]:
   """Creates a list of tables with the associated paths."""
 
   # Create a mapping from the table to a "parsed" version of the table.
+  tables: Dict[str, Table] = {}
+  for module in modules:
+    imported = importlib.import_module(module)
+    run_tables: List[Table] = imported.__dict__['ALL_TABLES']
+    for table in run_tables:
+      existing_table = tables.get(table.class_name)
+      assert not existing_table or existing_table == table
+      tables[table.class_name] = table
+
+  # Sort all the tables: note that this list may include tables which are not
+  # in |tables| dictionary due to dependencies on tables which live in a file
+  # not covered by |input_paths|.
+  sorted_tables = _topological_sort_table_and_deps(list(tables.values()))
+
   parsed_tables: Dict[str, ParsedTable] = {}
-  for in_path in input_paths:
-    tables: List[Table] = runpy.run_path(in_path)['ALL_TABLES']
-    for table in tables:
-      existing_table = parsed_tables.get(table.class_name)
-      assert not existing_table or existing_table.table == table
-      parsed_tables[table.class_name] = ParsedTable(table, [], in_path)
-
-  # Sort all the tables to be in order.
-  sorted_tables = _topological_sort_tables(list(parsed_tables.values()))
-
-  # Create the list of parsed columns
-  for i, parsed in enumerate(sorted_tables):
+  for table in sorted_tables:
     parsed_columns: List[ParsedColumn]
-    table = parsed.table
-
     if table.parent:
       parsed_parent = parsed_tables[table.parent.class_name]
       parsed_columns = [
@@ -253,13 +260,17 @@
           for c in parsed_parent.columns
       ]
     else:
-      parsed_columns = _create_implicit_columns_for_root(parsed)
+      parsed_columns = _create_implicit_columns_for_root(table)
 
     for c in table.columns:
       doc = table.tabledoc.columns.get(c.name) if table.tabledoc else None
       parsed_columns.append(ParsedColumn(c, _to_column_doc(doc)))
+    parsed_tables[table.class_name] = ParsedTable(table, parsed_columns)
 
-    sorted_tables[i] = dataclasses.replace(parsed, columns=parsed_columns)
-    parsed_tables[parsed.table.class_name] = sorted_tables[i]
-
-  return sorted_tables
+  # Only return tables which come directly from |input_paths|. This stops us
+  # generating tables which were not requested.
+  return [
+      parsed_tables[p.class_name]
+      for p in sorted_tables
+      if p.class_name in tables
+  ]
diff --git a/python/perfetto/prebuilts/manifests/trace_processor_shell.py b/python/perfetto/prebuilts/manifests/trace_processor_shell.py
index 85fb30e..2e9e826 100755
--- a/python/perfetto/prebuilts/manifests/trace_processor_shell.py
+++ b/python/perfetto/prebuilts/manifests/trace_processor_shell.py
@@ -1,15 +1,15 @@
-# This file has been generated by: /usr/local/google/home/lalitm/perfetto/tools/roll-prebuilts v33.1
+# This file has been generated by: /Users/hjd/src/perfetto/tools/roll-prebuilts v34.0
 TRACE_PROCESSOR_SHELL_MANIFEST = [{
     'arch':
         'mac-amd64',
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8583152,
+        8714576,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-amd64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-amd64/trace_processor_shell',
     'sha256':
-        '35673d3546dec894b5d55147da2fad523a8f5917b42ec1c327c940b82d3ce565',
+        '9bdb89493f0f00db5d3a73166450ac2f6ee830de16415e79c5a0234990caa644',
     'platform':
         'darwin',
     'machine': ['x86_64']
@@ -19,11 +19,11 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        7303384,
+        7286968,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-arm64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-arm64/trace_processor_shell',
     'sha256':
-        'a4d301cf8c0c01d328a9253d5ba78f4249333d4b04236cf8be0c7dad2a65e7e0',
+        '948536035fbe680b47b94a99d320ff459450738e4aeeb16cef18364f0023622b',
     'platform':
         'darwin',
     'machine': ['arm64']
@@ -33,11 +33,11 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8991600,
+        8576688,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-amd64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-amd64/trace_processor_shell',
     'sha256':
-        'e8dd82c1ec73fbbf4165ab0d9cbbb750cff5bcf723a1eab51adc9382bf652361',
+        '493698c81fffcabc340c72831b175962dba5a31dfe8572a6d5af083a116af4f8',
     'platform':
         'linux',
     'machine': ['x86_64']
@@ -47,11 +47,11 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        7117104,
+        6125384,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm/trace_processor_shell',
     'sha256':
-        'bbfde44ec004815a36cecdc1dbc135f815f46ac6a3989c87cb0c577510c1c8fe',
+        '53f1e27603695cf92d22519993b6eafa9c60957d9cb33bd0b300df8573b87ebb',
     'platform':
         'linux',
     'machine': ['armv6l', 'armv7l', 'armv8l']
@@ -61,11 +61,11 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8384816,
+        8036288,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm64/trace_processor_shell',
     'sha256':
-        'c4f9a499e8c443961725448aabc04cd7dc18cb79883f6b8b615fd8f4ed7c8c16',
+        '2a2cda222c9d5e18b638057688babb00a3a975ccd4b7dd65f26211c2cb7767f9',
     'platform':
         'linux',
     'machine': ['aarch64']
@@ -75,55 +75,55 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        5823560,
+        5813384,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm/trace_processor_shell',
     'sha256':
-        'ec5d23fc761021fe10a7cdb66d35590dab0216b2305f5163ace98da28b535fb8'
+        'f3ec4c194d0b06af5b296c1c479e6b29090e6b7cc7e58fbd55ca2919a126f0ee'
 }, {
     'arch':
         'android-arm64',
     'file_name':
         'trace_processor_shell',
     'file_size':
-        7474864,
+        7294768,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm64/trace_processor_shell',
     'sha256':
-        'f4877f51d0fbb8e9ead576e746a7adf7806b5cb2dffc4373a55ceeec21f615ff'
+        'f44f47d4b873ec68b6fa4f4c69a3e5a13d58b4d9cb2ec591fa687d4480c1950b'
 }, {
     'arch':
         'android-x86',
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8436764,
+        8090716,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x86/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x86/trace_processor_shell',
     'sha256':
-        '68ad60af32890f903afb7cbee7cc8f0f4f4b18dea7ab077cb1d807ea80053dcb'
+        '5636d8251747376787640bc3a4894ecf3091e4bf3d38b007003e1992fc5792df'
 }, {
     'arch':
         'android-x64',
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8781544,
+        8359784,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x64/trace_processor_shell',
     'sha256':
-        'edf5efca4cf46ffbd3586592490b14d61758198c7d46c1bc8e083b1ab19382f5'
+        '50440fa055ab998f6cf24f9a9a7388520cc854708735521505e10291bc52f3d0'
 }, {
     'arch':
         'windows-amd64',
     'file_name':
         'trace_processor_shell.exe',
     'file_size':
-        8252928,
+        8130560,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/windows-amd64/trace_processor_shell.exe',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/windows-amd64/trace_processor_shell.exe',
     'sha256':
-        '323a210f857ce840c4d69dfa7f9b0a32501ffa4a856e5667a0916e3f8006a5d0',
+        '5cbcf98e29a2d989523235e11e4e0dade692a295ebf47a6c93a09a050ce9bc91',
     'platform':
         'win32',
     'machine': ['amd64']
diff --git a/python/perfetto/prebuilts/manifests/tracebox.py b/python/perfetto/prebuilts/manifests/tracebox.py
index effd4d1..46b064a 100755
--- a/python/perfetto/prebuilts/manifests/tracebox.py
+++ b/python/perfetto/prebuilts/manifests/tracebox.py
@@ -1,15 +1,15 @@
-# This file has been generated by: /usr/local/google/home/lalitm/perfetto/tools/roll-prebuilts v33.1
+# This file has been generated by: /Users/hjd/src/perfetto/tools/roll-prebuilts v34.0
 TRACEBOX_MANIFEST = [{
     'arch':
         'mac-amd64',
     'file_name':
         'tracebox',
     'file_size':
-        1415776,
+        1432064,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-amd64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-amd64/tracebox',
     'sha256':
-        '860cccef002f1a7216d301a09b97d7276b8a57c8d85ad1c3aa4697bb115ffca7',
+        '4ceb7646cd99303224ab5e7ff0a9f84c04f3c5466fff65a55dab65171ae9d482',
     'platform':
         'darwin',
     'machine': ['x86_64']
@@ -19,11 +19,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        1309272,
+        1325704,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-arm64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-arm64/tracebox',
     'sha256':
-        '9c079ac561064c33e9bdfe2e23e92fb95c025603e545c1aae31b2bd7de0398ad',
+        '2c560fcce5e19eb692e50487af134e2078347cdb79decba0c572917860528388',
     'platform':
         'darwin',
     'machine': ['arm64']
@@ -33,11 +33,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        2137040,
+        2155496,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-amd64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-amd64/tracebox',
     'sha256':
-        '9eb9ce1a14432c284fecce7886786bb2555bcb6dfb4f00a2df2885984961a5fc',
+        '10b92180bb461a7e21be3f8b3d4640430a98d0547238ce095709213b378217d2',
     'platform':
         'linux',
     'machine': ['x86_64']
@@ -47,11 +47,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        1277896,
+        1288764,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm/tracebox',
     'sha256':
-        '60c71b39be7e04d9d0278e36e7e4d33c32a03d6cc8a3782a9e5ed2484f3f2082',
+        'fa28950ce2b7a9345fbb9272f2dd04d3d4eb2a87f021df25e1e649840eae60b5',
     'platform':
         'linux',
     'machine': ['armv6l', 'armv7l', 'armv8l']
@@ -61,11 +61,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        2065704,
+        2082704,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm64/tracebox',
     'sha256':
-        'a8d9e9e186b5daf45ec80b975b9a3ad04cb578890beda136b821c80b9cc74995',
+        '85c371d79b8e23d22a293c29e6399dc311d891a6bd85d7eeaf2cb0179c69eb27',
     'platform':
         'linux',
     'machine': ['aarch64']
@@ -75,42 +75,42 @@
     'file_name':
         'tracebox',
     'file_size':
-        1161172,
+        1169364,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm/tracebox',
     'sha256':
-        'f9dac5df26d471d1cf0aff942d7249da6b4122543e003813203ef128a15f93fd'
+        '40a3f31600f02dea10e290134d5c862e0e717f4f039756889a4e72c60f1591b6'
 }, {
     'arch':
         'android-arm64',
     'file_name':
         'tracebox',
     'file_size':
-        1764008,
+        1776296,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm64/tracebox',
     'sha256':
-        '3b325a09b6efae0939b73d4d74e6e01e3735508ed31b774f3a21765efab95099'
+        '562505fca18b34a97687dc002aeebcbf20acef68c8a8e48bed6d618c20e07c92'
 }, {
     'arch':
         'android-x86',
     'file_name':
         'tracebox',
     'file_size':
-        1755052,
+        1767340,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x86/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x86/tracebox',
     'sha256':
-        '86e31fa7e2b476187a0222ac2cf6a4ee7e5f8fb5b0e019c1349d14534343a581'
+        'eb47eb43ba93403557dd15a61196799e945ec324d96109db2f155fb131f9996a'
 }, {
     'arch':
         'android-x64',
     'file_name':
         'tracebox',
     'file_size':
-        2034344,
+        2054824,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x64/tracebox',
     'sha256':
-        '7692f6ceaa5d2eb9da42486262610a1820a9b31d46255f624407bf712eff021d'
+        'a3ae6d108e041ba368a9770f952772f111865d4eff7c8e4e4e2f653f45017948'
 }]
diff --git a/python/perfetto/prebuilts/manifests/traceconv.py b/python/perfetto/prebuilts/manifests/traceconv.py
index fad02d9..b093ac6 100755
--- a/python/perfetto/prebuilts/manifests/traceconv.py
+++ b/python/perfetto/prebuilts/manifests/traceconv.py
@@ -1,15 +1,15 @@
-# This file has been generated by: /usr/local/google/home/lalitm/perfetto/tools/roll-prebuilts v33.1
+# This file has been generated by: /Users/hjd/src/perfetto/tools/roll-prebuilts v34.0
 TRACECONV_MANIFEST = [{
     'arch':
         'mac-amd64',
     'file_name':
         'traceconv',
     'file_size':
-        7822272,
+        7904536,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-amd64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-amd64/traceconv',
     'sha256':
-        '2b1bae4755ee0dd7f3a8e55653f8a7c344f688ea29700064ef8211c55bb4ae9f',
+        '037f84ac943f3f4d75447c668cc49c966fe3d85eca3a455c958b24fc6a9e314a',
     'platform':
         'darwin',
     'machine': ['x86_64']
@@ -19,11 +19,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        6604056,
+        6554600,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-arm64/traceconv',
     'sha256':
-        'c0bd6d1ebe2c61ffeefbd4f01426e9b853c81daf70530be7e78c97a4d3af100c',
+        'eda545ef4fa37fdfa1b47ced7cbbe0aa3c0df9bd161cacd7c78e6c55aef98d20',
     'platform':
         'darwin',
     'machine': ['arm64']
@@ -33,11 +33,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        8122112,
+        7664384,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-amd64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-amd64/traceconv',
     'sha256':
-        'c4c57d8e7b435822a1437b2dc7f7154f6ff2e197deff1f9284bbd36bbedb004f',
+        '24285e6e0e873d393fa5a993bac18ec8e1ab5fae6f4e3453214e095ef36e4c45',
     'platform':
         'linux',
     'machine': ['x86_64']
@@ -47,11 +47,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        6692016,
+        5657944,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm/traceconv',
     'sha256':
-        'da666eb9f80bcbec4c959f4adf493a59ff89e4106666fe1884291078dba0243b',
+        'c9af3d976f849fc75e96c2c552cb14fcc9eacce6fe7c45c4a8289080b0f66706',
     'platform':
         'linux',
     'machine': ['armv6l', 'armv7l', 'armv8l']
@@ -61,11 +61,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        7575344,
+        7184224,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm64/traceconv',
     'sha256':
-        '8ca00c39c5ec7bd78576f64c4ab05e663d803b06b36fbddf968825edbe236fca',
+        'c6dc936492d58a40cd8e0b58abc46bd479e0c1c387cd1ba29198a6c9b2000d7a',
     'platform':
         'linux',
     'machine': ['aarch64']
@@ -75,55 +75,55 @@
     'file_name':
         'traceconv',
     'file_size':
-        5376396,
+        5325260,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm/traceconv',
     'sha256':
-        'b77e7f0274ba45ff32d34df347845bc996763291fcc6b2a697f56c0c9a543150'
+        '963267dcb58cdde9f61a952e5cb7f3557833209d3251e7fdcefc3b52db54f77b'
 }, {
     'arch':
         'android-arm64',
     'file_name':
         'traceconv',
     'file_size':
-        6793744,
+        6572688,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm64/traceconv',
     'sha256':
-        'e83f3d43f8782cb57e9d3e8a3cd31826c9713da9f92bd8d8be2c48872ed423eb'
+        '87373c351fe5e947826cd957438cab8a37a352bf83b1cbbb15fe276eee9d873a'
 }, {
     'arch':
         'android-x86',
     'file_name':
         'traceconv',
     'file_size':
-        7694692,
+        7303588,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x86/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x86/traceconv',
     'sha256':
-        'c9ee2c3c91d6c68cb7f52a626767bde5e267f34c6ddf987ff73eec3d813c0a2c'
+        'dfc4e714963b5ed662d29d6028ffa69e67f8cd2f9a28223f715437a260fd456f'
 }, {
     'arch':
         'android-x64',
     'file_name':
         'traceconv',
     'file_size':
-        7940680,
+        7482056,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x64/traceconv',
     'sha256':
-        'f75122ca3e6bbe393b705c3bc5514d81c57f38bf408d857d89c4268b79a39e08'
+        '79c666c629fcffd810635270b45e58b40ed253d22650f41550057e5d8f8c49a7'
 }, {
     'arch':
         'windows-amd64',
     'file_name':
         'traceconv.exe',
     'file_size':
-        7239168,
+        7072768,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/windows-amd64/traceconv.exe',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/windows-amd64/traceconv.exe',
     'sha256':
-        '5be5d698f69d44b4baa8ae1f21955becad9d0e6774e967f923b8386744002cfe',
+        '40fac80fdeae443a924e160650c94629e6463c1fb5a4f04f4ef6e9e5e72a3965',
     'platform':
         'win32',
     'machine': ['amd64']
diff --git a/python/perfetto/trace_processor/metrics.descriptor b/python/perfetto/trace_processor/metrics.descriptor
index 2188781..ffd39d1 100644
--- a/python/perfetto/trace_processor/metrics.descriptor
+++ b/python/perfetto/trace_processor/metrics.descriptor
Binary files differ
diff --git a/python/perfetto/trace_processor/metrics.descriptor.sha1 b/python/perfetto/trace_processor/metrics.descriptor.sha1
deleted file mode 100644
index e350a9a..0000000
--- a/python/perfetto/trace_processor/metrics.descriptor.sha1
+++ /dev/null
@@ -1,6 +0,0 @@
-
-// SHA1(tools/gen_binary_descriptors)
-// 6886b319e65925c037179e71a803b8473d06dc7d
-// SHA1(protos/perfetto/metrics/metrics.proto)
-// 5cdfe579a9253cbaea9dcf23dc66388282429c92
-  
\ No newline at end of file
diff --git a/python/perfetto/trace_processor/trace_processor.descriptor b/python/perfetto/trace_processor/trace_processor.descriptor
index 29fe8c8..20b87cf 100644
--- a/python/perfetto/trace_processor/trace_processor.descriptor
+++ b/python/perfetto/trace_processor/trace_processor.descriptor
Binary files differ
diff --git a/python/perfetto/trace_processor/trace_processor.descriptor.sha1 b/python/perfetto/trace_processor/trace_processor.descriptor.sha1
deleted file mode 100644
index 7f7827f..0000000
--- a/python/perfetto/trace_processor/trace_processor.descriptor.sha1
+++ /dev/null
@@ -1,6 +0,0 @@
-
-// SHA1(tools/gen_binary_descriptors)
-// 6886b319e65925c037179e71a803b8473d06dc7d
-// SHA1(protos/perfetto/trace_processor/trace_processor.proto)
-// 59f86a32aa28f29e290d8ce3f97461725aa8b9f8
-  
\ No newline at end of file
diff --git a/src/base/metatrace.cc b/src/base/metatrace.cc
index 1464ed3..51b8b83 100644
--- a/src/base/metatrace.cc
+++ b/src/base/metatrace.cc
@@ -36,13 +36,6 @@
 std::atomic<bool> RingBuffer::has_overruns_;
 Record RingBuffer::bankruptcy_record_;
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-constexpr size_t RingBuffer::kCapacity;
-constexpr uint16_t Record::kTypeMask;
-constexpr uint16_t Record::kTypeCounter;
-constexpr uint16_t Record::kTypeEvent;
-#endif
-
 namespace {
 
 // std::function<> is not trivially de/constructible. This struct wraps it in a
diff --git a/src/cloud_trace_processor/BUILD.gn b/src/cloud_trace_processor/BUILD.gn
new file mode 100644
index 0000000..e9a4bfc
--- /dev/null
+++ b/src/cloud_trace_processor/BUILD.gn
@@ -0,0 +1,64 @@
+# Copyright (C) 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("../../gn/perfetto.gni")
+import("../../gn/test.gni")
+
+assert(
+    enable_perfetto_trace_processor && enable_perfetto_trace_processor_sqlite)
+
+# The "core" business logic of cloud trace processor which is agnostic to the
+# RPC transport. Allows wrapping with any RPC framework capable of handling
+# protobufs.
+static_library("cloud_trace_processor") {
+  complete_static_lib = true
+  deps = [ ":sources" ]
+  public_deps = [ "../../include/perfetto/ext/cloud_trace_processor" ]
+}
+
+source_set("sources") {
+  sources = [
+    "orchestrator_impl.cc",
+    "orchestrator_impl.h",
+    "trace_processor_wrapper.cc",
+    "trace_processor_wrapper.h",
+    "worker_impl.cc",
+    "worker_impl.h",
+  ]
+  deps = [
+    "../../gn:default_deps",
+    "../../include/perfetto/ext/cloud_trace_processor",
+    "../../protos/perfetto/cloud_trace_processor:lite",
+    "../base",
+    "../base/threading",
+    "../protozero",
+    "../protozero:proto_ring_buffer",
+    "../trace_processor:lib",
+    "../trace_processor/rpc",
+    "../trace_processor/util",
+  ]
+}
+
+perfetto_unittest_source_set("unittests") {
+  testonly = true
+  sources = [ "trace_processor_wrapper_unittest.cc" ]
+  deps = [
+    ":sources",
+    "../../gn:default_deps",
+    "../../gn:gtest_and_gmock",
+    "../../protos/perfetto/cloud_trace_processor:lite",
+    "../base",
+    "../base/threading",
+  ]
+}
diff --git a/src/cloud_trace_processor/orchestrator_impl.cc b/src/cloud_trace_processor/orchestrator_impl.cc
new file mode 100644
index 0000000..69b831f
--- /dev/null
+++ b/src/cloud_trace_processor/orchestrator_impl.cc
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/cloud_trace_processor/orchestrator_impl.h"
+
+#include <memory>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "perfetto/base/status.h"
+#include "perfetto/ext/base/flat_hash_map.h"
+#include "perfetto/ext/base/status_or.h"
+#include "perfetto/ext/base/threading/future.h"
+#include "perfetto/ext/base/threading/stream.h"
+#include "perfetto/ext/cloud_trace_processor/worker.h"
+#include "protos/perfetto/cloud_trace_processor/common.pb.h"
+#include "protos/perfetto/cloud_trace_processor/orchestrator.pb.h"
+#include "protos/perfetto/cloud_trace_processor/worker.pb.h"
+#include "src/trace_processor/util/status_macros.h"
+
+namespace perfetto {
+namespace cloud_trace_processor {
+namespace {
+
+base::Future<base::Status> CreateResponseToStatus(
+    base::StatusOr<protos::TracePoolShardCreateResponse> response_or) {
+  return response_or.status();
+}
+
+base::Future<base::Status> SetTracesResponseToStatus(
+    base::StatusOr<protos::TracePoolShardSetTracesResponse> response_or) {
+  return response_or.status();
+}
+
+base::Future<base::StatusOr<protos::TracePoolQueryResponse>>
+RpcResponseToPoolResponse(
+    base::StatusOr<protos::TracePoolShardQueryResponse> resp) {
+  RETURN_IF_ERROR(resp.status());
+  protos::TracePoolQueryResponse ret;
+  ret.set_trace(std::move(resp->trace()));
+  *ret.mutable_result() = std::move(*resp->mutable_result());
+  return ret;
+}
+
+base::StatusOrStream<protos::TracePoolShardSetTracesResponse>
+RoundRobinSetTraces(const std::vector<std::unique_ptr<Worker>>& workers,
+                    const std::vector<std::string>& traces) {
+  uint32_t worker_idx = 0;
+  std::vector<protos::TracePoolShardSetTracesArgs> protos;
+  protos.resize(workers.size());
+  for (const auto& trace : traces) {
+    protos[worker_idx].add_traces(trace);
+    worker_idx = (worker_idx + 1) % workers.size();
+  }
+
+  using ShardResponse = protos::TracePoolShardSetTracesResponse;
+  std::vector<base::StatusOrStream<ShardResponse>> streams;
+  for (uint32_t i = 0; i < protos.size(); ++i) {
+    streams.emplace_back(workers[i]->TracePoolShardSetTraces(protos[i]));
+  }
+  return base::FlattenStreams(std::move(streams));
+}
+}  // namespace
+
+Orchestrator::~Orchestrator() = default;
+
+std::unique_ptr<Orchestrator> Orchestrator::CreateInProcess(
+    std::vector<std::unique_ptr<Worker>> workers) {
+  return std::unique_ptr<Orchestrator>(
+      new OrchestratorImpl(std::move(workers)));
+}
+
+OrchestratorImpl::OrchestratorImpl(std::vector<std::unique_ptr<Worker>> workers)
+    : workers_(std::move(workers)) {}
+
+base::StatusOrFuture<protos::TracePoolCreateResponse>
+OrchestratorImpl::TracePoolCreate(const protos::TracePoolCreateArgs& args) {
+  if (args.pool_type() != protos::TracePoolType::SHARED) {
+    return base::StatusOr<protos::TracePoolCreateResponse>(
+        base::ErrStatus("Currently only SHARED pools are supported"));
+  }
+  if (!args.has_shared_pool_name()) {
+    return base::StatusOr<protos::TracePoolCreateResponse>(
+        base::ErrStatus("Pool name must be provided for SHARED pools"));
+  }
+
+  std::string id = "shared:" + args.shared_pool_name();
+  TracePool* exist = pools_.Find(id);
+  if (exist) {
+    return base::StatusOr<protos::TracePoolCreateResponse>(
+        base::ErrStatus("Pool %s already exists", id.c_str()));
+  }
+  protos::TracePoolShardCreateArgs group_args;
+  group_args.set_pool_id(id);
+  group_args.set_pool_type(args.pool_type());
+
+  using ShardResponse = protos::TracePoolShardCreateResponse;
+  std::vector<base::StatusOrStream<ShardResponse>> shards;
+  for (uint32_t i = 0; i < workers_.size(); ++i) {
+    shards.emplace_back(
+        base::StreamFromFuture(workers_[i]->TracePoolShardCreate(group_args)));
+  }
+  return base::FlattenStreams(std::move(shards))
+      .MapFuture(&CreateResponseToStatus)
+      .Collect(base::AllOkCollector())
+      .ContinueWith(
+          [this, id](base::StatusOr<ShardResponse> resp)
+              -> base::StatusOrFuture<protos::TracePoolCreateResponse> {
+            RETURN_IF_ERROR(resp.status());
+            auto it_and_inserted = pools_.Insert(id, TracePool());
+            if (!it_and_inserted.second) {
+              return base::ErrStatus("Unable to insert pool %s", id.c_str());
+            }
+            return protos::TracePoolCreateResponse();
+          });
+}
+
+base::StatusOrFuture<protos::TracePoolSetTracesResponse>
+OrchestratorImpl::TracePoolSetTraces(
+    const protos::TracePoolSetTracesArgs& args) {
+  std::string id = args.pool_id();
+  TracePool* pool = pools_.Find(id);
+  if (!pool) {
+    return base::StatusOr<protos::TracePoolSetTracesResponse>(
+        base::ErrStatus("Unable to find pool %s", id.c_str()));
+  }
+  if (!pool->loaded_traces.empty()) {
+    return base::StatusOr<protos::TracePoolSetTracesResponse>(base::ErrStatus(
+        "Incrementally adding/removing items to pool not currently supported"));
+  }
+  pool->loaded_traces.assign(args.traces().begin(), args.traces().end());
+  return RoundRobinSetTraces(workers_, pool->loaded_traces)
+      .MapFuture(&SetTracesResponseToStatus)
+      .Collect(base::AllOkCollector())
+      .ContinueWith(
+          [](base::Status status)
+              -> base::StatusOrFuture<protos::TracePoolSetTracesResponse> {
+            RETURN_IF_ERROR(status);
+            return protos::TracePoolSetTracesResponse();
+          });
+}
+
+base::StatusOrStream<protos::TracePoolQueryResponse>
+OrchestratorImpl::TracePoolQuery(const protos::TracePoolQueryArgs& args) {
+  TracePool* pool = pools_.Find(args.pool_id());
+  if (!pool) {
+    return base::StreamOf(base::StatusOr<protos::TracePoolQueryResponse>(
+        base::ErrStatus("Unable to find pool %s", args.pool_id().c_str())));
+  }
+  protos::TracePoolShardQueryArgs shard_args;
+  *shard_args.mutable_pool_id() = args.pool_id();
+  *shard_args.mutable_sql_query() = args.sql_query();
+
+  using ShardResponse = protos::TracePoolShardQueryResponse;
+  std::vector<base::StatusOrStream<ShardResponse>> streams;
+  for (uint32_t i = 0; i < workers_.size(); ++i) {
+    streams.emplace_back(workers_[i]->TracePoolShardQuery(shard_args));
+  }
+  return base::FlattenStreams(std::move(streams))
+      .MapFuture(&RpcResponseToPoolResponse);
+}
+
+base::StatusOrFuture<protos::TracePoolDestroyResponse>
+OrchestratorImpl::TracePoolDestroy(const protos::TracePoolDestroyArgs& args) {
+  std::string id = args.pool_id();
+  TracePool* pool = pools_.Find(id);
+  if (!pool) {
+    return base::StatusOr<protos::TracePoolDestroyResponse>(
+        base::ErrStatus("Unable to find pool %s", id.c_str()));
+  }
+  protos::TracePoolShardDestroyArgs shard_args;
+  *shard_args.mutable_pool_id() = id;
+
+  using ShardResponse = protos::TracePoolShardDestroyResponse;
+  std::vector<base::StatusOrStream<ShardResponse>> streams;
+  for (uint32_t i = 0; i < workers_.size(); ++i) {
+    streams.emplace_back(
+        base::StreamFromFuture(workers_[i]->TracePoolShardDestroy(shard_args)));
+  }
+  return base::FlattenStreams(std::move(streams))
+      .MapFuture(
+          [](base::StatusOr<ShardResponse> resp) -> base::Future<base::Status> {
+            return resp.status();
+          })
+      .Collect(base::AllOkCollector())
+      .ContinueWith(
+          [this, id](base::Status status)
+              -> base::StatusOrFuture<protos::TracePoolDestroyResponse> {
+            RETURN_IF_ERROR(status);
+            PERFETTO_CHECK(pools_.Erase(id));
+            return protos::TracePoolDestroyResponse();
+          });
+}
+
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
diff --git a/src/cloud_trace_processor/orchestrator_impl.h b/src/cloud_trace_processor/orchestrator_impl.h
new file mode 100644
index 0000000..eef55e5
--- /dev/null
+++ b/src/cloud_trace_processor/orchestrator_impl.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_IMPL_H_
+#define SRC_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_IMPL_H_
+
+#include <memory>
+#include <vector>
+
+#include "perfetto/ext/base/flat_hash_map.h"
+#include "perfetto/ext/base/threading/future.h"
+#include "perfetto/ext/cloud_trace_processor/orchestrator.h"
+
+namespace perfetto {
+namespace protos {
+class TracePoolShardCreateArgs;
+}
+
+namespace cloud_trace_processor {
+
+class OrchestratorImpl : public Orchestrator {
+ public:
+  explicit OrchestratorImpl(std::vector<std::unique_ptr<Worker>> workers);
+
+  base::StatusOrStream<protos::TracePoolQueryResponse> TracePoolQuery(
+      const protos::TracePoolQueryArgs&) override;
+
+  base::StatusOrFuture<protos::TracePoolCreateResponse> TracePoolCreate(
+      const protos::TracePoolCreateArgs&) override;
+
+  base::StatusOrFuture<protos::TracePoolSetTracesResponse> TracePoolSetTraces(
+      const protos::TracePoolSetTracesArgs&) override;
+
+  base::StatusOrFuture<protos::TracePoolDestroyResponse> TracePoolDestroy(
+      const protos::TracePoolDestroyArgs&) override;
+
+ private:
+  struct TracePool {
+    std::vector<std::string> loaded_traces;
+  };
+  std::vector<std::unique_ptr<Worker>> workers_;
+  base::FlatHashMap<std::string, TracePool> pools_;
+};
+
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_IMPL_H_
diff --git a/src/cloud_trace_processor/trace_processor_wrapper.cc b/src/cloud_trace_processor/trace_processor_wrapper.cc
new file mode 100644
index 0000000..5093e52
--- /dev/null
+++ b/src/cloud_trace_processor/trace_processor_wrapper.cc
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/cloud_trace_processor/trace_processor_wrapper.h"
+
+#include <atomic>
+#include <memory>
+#include <mutex>
+#include <optional>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "perfetto/base/status.h"
+#include "perfetto/ext/base/file_utils.h"
+#include "perfetto/ext/base/status_or.h"
+#include "perfetto/ext/base/threading/future.h"
+#include "perfetto/ext/base/threading/poll.h"
+#include "perfetto/ext/base/threading/stream.h"
+#include "perfetto/ext/base/threading/thread_pool.h"
+#include "perfetto/ext/base/threading/util.h"
+#include "perfetto/protozero/proto_utils.h"
+#include "perfetto/protozero/scattered_heap_buffer.h"
+#include "perfetto/trace_processor/trace_blob.h"
+#include "perfetto/trace_processor/trace_blob_view.h"
+#include "perfetto/trace_processor/trace_processor.h"
+#include "protos/perfetto/cloud_trace_processor/worker.pb.h"
+#include "src/protozero/proto_ring_buffer.h"
+#include "src/trace_processor/rpc/query_result_serializer.h"
+#include "src/trace_processor/util/status_macros.h"
+
+namespace perfetto {
+namespace cloud_trace_processor {
+namespace {
+
+using trace_processor::QueryResultSerializer;
+using trace_processor::TraceBlob;
+using trace_processor::TraceBlobView;
+using trace_processor::TraceProcessor;
+using Statefulness = TraceProcessorWrapper::Statefulness;
+
+struct QueryRunner {
+  QueryRunner(std::shared_ptr<TraceProcessor> _tp,
+              std::string _query,
+              std::string _trace_path,
+              Statefulness _statefulness)
+      : tp(std::move(_tp)),
+        query(std::move(_query)),
+        trace_path(std::move(_trace_path)),
+        statefulness(_statefulness) {}
+
+  std::optional<protos::TracePoolShardQueryResponse> operator()() {
+    if (!has_more) {
+      if (statefulness == Statefulness::kStateless) {
+        tp->RestoreInitialTables();
+      }
+      return std::nullopt;
+    }
+    // If the serializer does not exist yet, that means we have not yet run
+    // the query so make sure to do that first.
+    EnsureSerializerExists();
+    has_more = serializer->Serialize(&result);
+
+    protos::TracePoolShardQueryResponse resp;
+    *resp.mutable_trace() = trace_path;
+    resp.mutable_result()->ParseFromArray(result.data(),
+                                          static_cast<int>(result.size()));
+    result.clear();
+    return std::make_optional(std::move(resp));
+  }
+
+  void EnsureSerializerExists() {
+    if (serializer) {
+      return;
+    }
+    auto it = tp->ExecuteQuery(query);
+    serializer.reset(new QueryResultSerializer(std::move(it)));
+  }
+
+  std::shared_ptr<TraceProcessor> tp;
+  std::string query;
+  std::string trace_path;
+  TraceProcessorWrapper::Statefulness statefulness;
+
+  // shared_ptr to allow copying when this type is coerced to std::function.
+  std::shared_ptr<QueryResultSerializer> serializer;
+  std::vector<uint8_t> result;
+  bool has_more = true;
+};
+
+}  // namespace
+
+TraceProcessorWrapper::TraceProcessorWrapper(std::string trace_path,
+                                             base::ThreadPool* thread_pool,
+                                             Statefulness statefulness)
+    : trace_path_(std::move(trace_path)),
+      thread_pool_(thread_pool),
+      statefulness_(statefulness) {
+  trace_processor::Config config;
+  config.ingest_ftrace_in_raw_table = false;
+  trace_processor_ = TraceProcessor::CreateInstance(config);
+}
+
+base::StatusFuture TraceProcessorWrapper::LoadTrace(
+    base::StatusOrStream<std::vector<uint8_t>> file_stream) {
+  if (trace_processor_.use_count() != 1) {
+    return base::ErrStatus("Request is already in flight");
+  }
+  return std::move(file_stream)
+      .MapFuture(
+          [this](base::StatusOr<std::vector<uint8_t>> d) -> base::StatusFuture {
+            RETURN_IF_ERROR(d.status());
+            return base::RunOnceOnThreadPool<base::Status>(
+                thread_pool_, [res = std::move(*d), tp = trace_processor_] {
+                  return tp->Parse(TraceBlobView(
+                      TraceBlob::CopyFrom(res.data(), res.size())));
+                });
+          })
+      .Collect(base::AllOkCollector())
+      .ContinueWith([this](base::Status status) -> base::StatusFuture {
+        RETURN_IF_ERROR(status);
+        return base::RunOnceOnThreadPool<base::Status>(
+            thread_pool_, [tp = trace_processor_] {
+              tp->NotifyEndOfFile();
+              return base::OkStatus();
+            });
+      });
+}
+
+base::StatusOrStream<protos::TracePoolShardQueryResponse>
+TraceProcessorWrapper::Query(const std::string& query) {
+  using StatusOrResponse = base::StatusOr<protos::TracePoolShardQueryResponse>;
+  if (trace_processor_.use_count() != 1) {
+    return base::StreamOf<StatusOrResponse>(
+        base::ErrStatus("Request is already in flight"));
+  }
+  return base::RunOnThreadPool<StatusOrResponse>(
+      thread_pool_,
+      QueryRunner(trace_processor_, query, trace_path_, statefulness_));
+}
+
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
diff --git a/src/cloud_trace_processor/trace_processor_wrapper.h b/src/cloud_trace_processor/trace_processor_wrapper.h
new file mode 100644
index 0000000..9916b72
--- /dev/null
+++ b/src/cloud_trace_processor/trace_processor_wrapper.h
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_CLOUD_TRACE_PROCESSOR_TRACE_PROCESSOR_WRAPPER_H_
+#define SRC_CLOUD_TRACE_PROCESSOR_TRACE_PROCESSOR_WRAPPER_H_
+
+#include "perfetto/ext/base/threading/future.h"
+#include "perfetto/ext/base/threading/stream.h"
+#include "perfetto/ext/base/threading/thread_pool.h"
+#include "perfetto/trace_processor/trace_processor.h"
+#include "src/trace_processor/rpc/query_result_serializer.h"
+
+namespace perfetto {
+namespace protos {
+
+class TracePoolShardQueryResponse;
+
+}  // namespace protos
+}  // namespace perfetto
+
+namespace perfetto {
+namespace cloud_trace_processor {
+
+// Wrapper class around an instance of TraceProcessor to adapt it for the needs
+// of a CloudTraceProcessor Worker.
+class TraceProcessorWrapper {
+ public:
+  enum Statefulness {
+    // Indicates that the state of the trace processor instance should be purged
+    // after every query.
+    kStateless,
+
+    // Indicates that the state of the trace processor instance should be
+    // preserved across queries.
+    kStateful,
+  };
+
+  TraceProcessorWrapper(std::string trace_path,
+                        base::ThreadPool*,
+                        Statefulness);
+
+  // Loads the trace given a stream of chunks to parse.
+  base::StatusFuture LoadTrace(
+      base::StatusOrStream<std::vector<uint8_t>> file_stream);
+
+  // Executes the given query on the trace processor and returns the results
+  // as a stream.
+  base::StatusOrStream<protos::TracePoolShardQueryResponse> Query(
+      const std::string& sql);
+
+ private:
+  using TraceProcessor = trace_processor::TraceProcessor;
+
+  TraceProcessorWrapper(const TraceProcessorWrapper&) = delete;
+  TraceProcessorWrapper& operator=(const TraceProcessorWrapper&) = delete;
+
+  TraceProcessorWrapper(TraceProcessorWrapper&&) = delete;
+  TraceProcessorWrapper& operator=(TraceProcessorWrapper&&) = delete;
+
+  const std::string trace_path_;
+  base::ThreadPool* thread_pool_ = nullptr;
+  const Statefulness statefulness_ = Statefulness::kStateless;
+  std::shared_ptr<TraceProcessor> trace_processor_;
+};
+
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_CLOUD_TRACE_PROCESSOR_TRACE_PROCESSOR_WRAPPER_H_
diff --git a/src/cloud_trace_processor/trace_processor_wrapper_unittest.cc b/src/cloud_trace_processor/trace_processor_wrapper_unittest.cc
new file mode 100644
index 0000000..8739783
--- /dev/null
+++ b/src/cloud_trace_processor/trace_processor_wrapper_unittest.cc
@@ -0,0 +1,205 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/cloud_trace_processor/trace_processor_wrapper.h"
+#include <cstdint>
+#include <vector>
+
+#include "perfetto/base/flat_set.h"
+#include "perfetto/base/platform_handle.h"
+#include "perfetto/base/status.h"
+#include "perfetto/ext/base/status_or.h"
+#include "perfetto/ext/base/string_utils.h"
+#include "perfetto/ext/base/string_view.h"
+#include "perfetto/ext/base/threading/stream.h"
+#include "perfetto/ext/base/threading/thread_pool.h"
+#include "perfetto/ext/base/threading/util.h"
+#include "protos/perfetto/cloud_trace_processor/worker.pb.h"
+#include "test/gtest_and_gmock.h"
+
+namespace perfetto {
+namespace cloud_trace_processor {
+namespace {
+
+using SF = TraceProcessorWrapper::Statefulness;
+
+const char kSimpleSystrace[] = R"--(# tracer
+  surfaceflinger-598   (  598) [004] .... 10852.771242: tracing_mark_write: B|598|some event
+  surfaceflinger-598   (  598) [004] .... 10852.771245: tracing_mark_write: E|598
+)--";
+
+base::StatusOr<std::vector<uint8_t>> SimpleSystrace() {
+  return std::vector<uint8_t>(kSimpleSystrace,
+                              kSimpleSystrace + strlen(kSimpleSystrace));
+}
+
+std::vector<base::StatusOr<std::vector<uint8_t>>> SimpleSystraceChunked() {
+  std::string systrace(kSimpleSystrace);
+  std::vector<base::StatusOr<std::vector<uint8_t>>> chunks;
+  for (auto& chunk : base::SplitString(systrace, "\n")) {
+    auto with_newline = chunk + "\n";
+    chunks.push_back(std::vector<uint8_t>(
+        with_newline.data(), with_newline.data() + with_newline.size()));
+  }
+
+  return chunks;
+}
+
+template <typename T>
+T WaitForFutureReady(base::Future<T>& future) {
+  base::FlatSet<base::PlatformHandle> ready;
+  base::FlatSet<base::PlatformHandle> interested;
+  base::PollContext ctx(&interested, &ready);
+  auto res = future.Poll(&ctx);
+  for (; res.IsPending(); res = future.Poll(&ctx)) {
+    PERFETTO_CHECK(interested.size() == 1);
+    base::BlockUntilReadableFd(*interested.begin());
+    interested = {};
+  }
+  return res.item();
+}
+
+template <typename T>
+std::optional<T> WaitForStreamReady(base::Stream<T>& stream) {
+  base::FlatSet<base::PlatformHandle> ready;
+  base::FlatSet<base::PlatformHandle> interested;
+  base::PollContext ctx(&interested, &ready);
+  auto res = stream.PollNext(&ctx);
+  for (; res.IsPending(); res = stream.PollNext(&ctx)) {
+    PERFETTO_CHECK(interested.size() == 1);
+    base::BlockUntilReadableFd(*interested.begin());
+    interested = {};
+  }
+  return res.IsDone() ? std::nullopt : std::make_optional(res.item());
+}
+
+TEST(TraceProcessorWrapperUnittest, Stateful) {
+  base::ThreadPool pool(1);
+  TraceProcessorWrapper wrapper("foobar", &pool, SF::kStateful);
+  {
+    auto load = wrapper.LoadTrace(base::StreamOf(SimpleSystrace()));
+    base::Status status = WaitForFutureReady(load);
+    ASSERT_TRUE(status.ok()) << status.message();
+  }
+  {
+    auto stream = wrapper.Query("CREATE VIEW foo AS SELECT ts, dur FROM slice");
+    auto proto = WaitForStreamReady(stream);
+    ASSERT_TRUE(proto.has_value());
+    ASSERT_TRUE(proto->ok()) << proto->status().message();
+
+    ASSERT_FALSE(WaitForStreamReady(stream).has_value());
+  }
+  {
+    auto stream = wrapper.Query("SELECT ts, dur FROM foo");
+    auto proto = WaitForStreamReady(stream);
+
+    ASSERT_TRUE(proto.has_value());
+    ASSERT_TRUE(proto->ok()) << proto->status().message();
+
+    ASSERT_EQ(proto->value().trace(), "foobar");
+
+    auto& result = proto.value()->result();
+    ASSERT_EQ(result.batch_size(), 1);
+    ASSERT_EQ(result.batch(0).cells_size(), 2);
+
+    ASSERT_EQ(result.batch(0).cells(0),
+              protos::QueryResult::CellsBatch::CELL_VARINT);
+    ASSERT_EQ(result.batch(0).cells(1),
+              protos::QueryResult::CellsBatch::CELL_VARINT);
+    ASSERT_EQ(result.batch(0).varint_cells(0), 10852771242000);
+    ASSERT_EQ(result.batch(0).varint_cells(1), 3000);
+
+    ASSERT_FALSE(WaitForStreamReady(stream).has_value());
+  }
+}
+
+TEST(TraceProcessorWrapperUnittest, Stateless) {
+  base::ThreadPool pool(1);
+  TraceProcessorWrapper wrapper("foobar", &pool, SF::kStateless);
+  {
+    auto load = wrapper.LoadTrace(base::StreamOf(SimpleSystrace()));
+    base::Status status = WaitForFutureReady(load);
+    ASSERT_TRUE(status.ok()) << status.message();
+  }
+  {
+    auto stream = wrapper.Query("CREATE VIEW foo AS SELECT ts, dur FROM slice");
+    auto proto = WaitForStreamReady(stream);
+    ASSERT_TRUE(proto.has_value());
+    ASSERT_TRUE(proto->ok()) << proto->status().message();
+
+    ASSERT_FALSE(WaitForStreamReady(stream).has_value());
+  }
+
+  // Second CREATE VIEW should also succeed because the first one should have
+  // been wiped.
+  {
+    auto stream = wrapper.Query("CREATE VIEW foo AS SELECT ts, dur FROM slice");
+    auto proto = WaitForStreamReady(stream);
+    ASSERT_TRUE(proto.has_value());
+    ASSERT_TRUE(proto->ok()) << proto->status().message();
+
+    ASSERT_FALSE(WaitForStreamReady(stream).has_value());
+  }
+
+  // Selecting from it should return an error.
+  {
+    auto stream = wrapper.Query("SELECT ts, dur FROM foo");
+    auto proto = WaitForStreamReady(stream);
+    ASSERT_TRUE(proto.has_value());
+    ASSERT_TRUE(proto->ok()) << proto->status().message();
+    ASSERT_TRUE(proto->value().result().has_error());
+
+    ASSERT_FALSE(WaitForStreamReady(stream).has_value());
+  }
+}
+
+TEST(TraceProcessorWrapperUnittest, Chunked) {
+  base::ThreadPool pool(1);
+  TraceProcessorWrapper wrapper("foobar", &pool, SF::kStateless);
+  {
+    auto chunked = SimpleSystraceChunked();
+    ASSERT_EQ(chunked.size(), 3u);
+    auto load = wrapper.LoadTrace(base::StreamFrom(chunked));
+    base::Status status = WaitForFutureReady(load);
+    ASSERT_TRUE(status.ok()) << status.message();
+  }
+  {
+    auto stream = wrapper.Query("SELECT ts, dur FROM slice");
+    auto proto = WaitForStreamReady(stream);
+
+    ASSERT_TRUE(proto.has_value());
+    ASSERT_TRUE(proto->ok()) << proto->status().message();
+
+    ASSERT_EQ(proto->value().trace(), "foobar");
+
+    auto& result = proto.value()->result();
+    ASSERT_EQ(result.batch_size(), 1);
+    ASSERT_EQ(result.batch(0).cells_size(), 2);
+
+    ASSERT_EQ(result.batch(0).cells(0),
+              protos::QueryResult::CellsBatch::CELL_VARINT);
+    ASSERT_EQ(result.batch(0).cells(1),
+              protos::QueryResult::CellsBatch::CELL_VARINT);
+    ASSERT_EQ(result.batch(0).varint_cells(0), 10852771242000);
+    ASSERT_EQ(result.batch(0).varint_cells(1), 3000);
+
+    ASSERT_FALSE(WaitForStreamReady(stream).has_value());
+  }
+}
+
+}  // namespace
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
diff --git a/src/cloud_trace_processor/worker_impl.cc b/src/cloud_trace_processor/worker_impl.cc
new file mode 100644
index 0000000..2f124a0
--- /dev/null
+++ b/src/cloud_trace_processor/worker_impl.cc
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/cloud_trace_processor/worker_impl.h"
+
+#include <memory>
+
+#include "perfetto/base/status.h"
+#include "perfetto/ext/base/status_or.h"
+#include "perfetto/ext/base/threading/stream.h"
+#include "perfetto/ext/base/uuid.h"
+#include "protos/perfetto/cloud_trace_processor/common.pb.h"
+#include "protos/perfetto/cloud_trace_processor/orchestrator.pb.h"
+#include "protos/perfetto/cloud_trace_processor/worker.pb.h"
+#include "src/cloud_trace_processor/trace_processor_wrapper.h"
+#include "src/trace_processor/util/status_macros.h"
+
+namespace perfetto {
+namespace cloud_trace_processor {
+
+Worker::~Worker() = default;
+
+std::unique_ptr<Worker> Worker::CreateInProcesss(CtpEnvironment* environment,
+                                                 base::ThreadPool* pool) {
+  return std::make_unique<WorkerImpl>(environment, pool);
+}
+
+WorkerImpl::WorkerImpl(CtpEnvironment* environment, base::ThreadPool* pool)
+    : environment_(environment), thread_pool_(pool) {}
+
+base::StatusOrFuture<protos::TracePoolShardCreateResponse>
+WorkerImpl::TracePoolShardCreate(const protos::TracePoolShardCreateArgs& args) {
+  if (args.pool_type() == protos::TracePoolType::DEDICATED) {
+    return base::ErrStatus("Dedicated pools are not currently supported");
+  }
+  auto it_and_inserted = shards_.Insert(args.pool_id(), TracePoolShard());
+  if (!it_and_inserted.second) {
+    return base::ErrStatus("Shard for pool %s already exists",
+                           args.pool_id().c_str());
+  }
+  return base::StatusOr(protos::TracePoolShardCreateResponse());
+}
+
+base::StatusOrStream<protos::TracePoolShardSetTracesResponse>
+WorkerImpl::TracePoolShardSetTraces(
+    const protos::TracePoolShardSetTracesArgs& args) {
+  using Response = protos::TracePoolShardSetTracesResponse;
+  using StatusOrResponse = base::StatusOr<Response>;
+
+  TracePoolShard* shard = shards_.Find(args.pool_id());
+  if (!shard) {
+    return base::StreamOf<StatusOrResponse>(base::ErrStatus(
+        "Unable to find shard for pool %s", args.pool_id().c_str()));
+  }
+
+  std::vector<base::StatusOrStream<Response>> streams;
+  for (const std::string& trace : args.traces()) {
+    // TODO(lalitm): add support for stateful trace processor in dedicated
+    // pools.
+    auto tp = std::make_unique<TraceProcessorWrapper>(
+        trace, thread_pool_, TraceProcessorWrapper::Statefulness::kStateless);
+    shard->tps.emplace_back(std::move(tp));
+
+    auto load_trace_future =
+        tp->LoadTrace(environment_->ReadFile(trace))
+            .ContinueWith(
+                [trace](base::Status status) -> base::Future<StatusOrResponse> {
+                  RETURN_IF_ERROR(status);
+                  protos::TracePoolShardSetTracesResponse resp;
+                  *resp.mutable_trace() = trace;
+                  return resp;
+                });
+    streams.emplace_back(base::StreamFromFuture(std::move(load_trace_future)));
+  }
+  return base::FlattenStreams(std::move(streams));
+}
+
+base::StatusOrStream<protos::TracePoolShardQueryResponse>
+WorkerImpl::TracePoolShardQuery(const protos::TracePoolShardQueryArgs& args) {
+  using Response = protos::TracePoolShardQueryResponse;
+  using StatusOrResponse = base::StatusOr<Response>;
+  TracePoolShard* shard = shards_.Find(args.pool_id());
+  if (!shard) {
+    return base::StreamOf<StatusOrResponse>(base::ErrStatus(
+        "Unable to find shard for pool %s", args.pool_id().c_str()));
+  }
+  std::vector<base::StatusOrStream<Response>> streams;
+  streams.reserve(shard->tps.size());
+  for (std::unique_ptr<TraceProcessorWrapper>& tp : shard->tps) {
+    streams.emplace_back(tp->Query(args.sql_query()));
+  }
+  return base::FlattenStreams(std::move(streams));
+}
+
+base::StatusOrFuture<protos::TracePoolShardDestroyResponse>
+WorkerImpl::TracePoolShardDestroy(
+    const protos::TracePoolShardDestroyArgs& args) {
+  if (!shards_.Erase(args.pool_id())) {
+    return base::ErrStatus("Unable to find shard for pool %s",
+                           args.pool_id().c_str());
+  }
+  return base::StatusOr(protos::TracePoolShardDestroyResponse());
+}
+
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
diff --git a/src/cloud_trace_processor/worker_impl.h b/src/cloud_trace_processor/worker_impl.h
new file mode 100644
index 0000000..c7dc754
--- /dev/null
+++ b/src/cloud_trace_processor/worker_impl.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_CLOUD_TRACE_PROCESSOR_WORKER_IMPL_H_
+#define SRC_CLOUD_TRACE_PROCESSOR_WORKER_IMPL_H_
+
+#include <vector>
+
+#include "perfetto/ext/base/flat_hash_map.h"
+#include "perfetto/ext/base/threading/thread_pool.h"
+#include "perfetto/ext/cloud_trace_processor/environment.h"
+#include "perfetto/ext/cloud_trace_processor/worker.h"
+#include "src/cloud_trace_processor/trace_processor_wrapper.h"
+
+namespace perfetto {
+namespace protos {
+
+enum GroupType : int;
+
+}  // namespace protos
+}  // namespace perfetto
+
+namespace perfetto {
+namespace cloud_trace_processor {
+
+class WorkerImpl : public Worker {
+ public:
+  explicit WorkerImpl(CtpEnvironment*, base::ThreadPool*);
+
+  base::StatusOrFuture<protos::TracePoolShardCreateResponse>
+  TracePoolShardCreate(const protos::TracePoolShardCreateArgs&) override;
+
+  base::StatusOrStream<protos::TracePoolShardSetTracesResponse>
+  TracePoolShardSetTraces(const protos::TracePoolShardSetTracesArgs&) override;
+
+  base::StatusOrStream<protos::TracePoolShardQueryResponse> TracePoolShardQuery(
+      const protos::TracePoolShardQueryArgs&) override;
+
+  base::StatusOrFuture<protos::TracePoolShardDestroyResponse>
+  TracePoolShardDestroy(const protos::TracePoolShardDestroyArgs&) override;
+
+ private:
+  struct TracePoolShard {
+    std::vector<std::unique_ptr<TraceProcessorWrapper>> tps;
+  };
+  CtpEnvironment* const environment_;
+  base::ThreadPool* const thread_pool_;
+  base::FlatHashMap<std::string, TracePoolShard> shards_;
+};
+
+}  // namespace cloud_trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_CLOUD_TRACE_PROCESSOR_WORKER_IMPL_H_
diff --git a/src/profiling/memory/heapprofd_producer.cc b/src/profiling/memory/heapprofd_producer.cc
index 7d0cfe8..add6109 100644
--- a/src/profiling/memory/heapprofd_producer.cc
+++ b/src/profiling/memory/heapprofd_producer.cc
@@ -545,12 +545,13 @@
   const auto continuous_dump_config = heapprofd_config.continuous_dump_config();
   uint32_t dump_interval = continuous_dump_config.dump_interval_ms();
   if (dump_interval) {
+    data_source.dump_interval_ms = dump_interval;
     auto weak_producer = weak_factory_.GetWeakPtr();
     task_runner_->PostDelayedTask(
-        [weak_producer, id, dump_interval] {
+        [weak_producer, id] {
           if (!weak_producer)
             return;
-          weak_producer->DoContinuousDump(id, dump_interval);
+          weak_producer->DoDrainAndContinuousDump(id);
         },
         continuous_dump_config.dump_phase_ms());
   }
@@ -632,21 +633,56 @@
       data_source->stop_timeout_ms);
 }
 
-void HeapprofdProducer::DoContinuousDump(DataSourceInstanceID id,
-                                         uint32_t dump_interval) {
+void HeapprofdProducer::DoDrainAndContinuousDump(DataSourceInstanceID id) {
   auto it = data_sources_.find(id);
   if (it == data_sources_.end())
     return;
   DataSource& data_source = it->second;
-  DumpProcessesInDataSource(&data_source);
+  PERFETTO_DCHECK(data_source.pending_free_drains == 0);
+
+  for (auto& [pid, process_state] : data_source.process_states) {
+    UnwinderForPID(pid).PostDrainFree(data_source.id, pid);
+    data_source.pending_free_drains++;
+  }
+
+  // In case there are no pending free drains, dump immediately.
+  DoContinuousDump(&data_source);
+}
+
+void HeapprofdProducer::DoContinuousDump(DataSource* ds) {
+  if (ds->pending_free_drains != 0) {
+    return;
+  }
+
+  DumpProcessesInDataSource(ds);
+  auto id = ds->id;
   auto weak_producer = weak_factory_.GetWeakPtr();
   task_runner_->PostDelayedTask(
-      [weak_producer, id, dump_interval] {
+      [weak_producer, id] {
         if (!weak_producer)
           return;
-        weak_producer->DoContinuousDump(id, dump_interval);
+        weak_producer->DoDrainAndContinuousDump(id);
       },
-      dump_interval);
+      ds->dump_interval_ms);
+}
+
+void HeapprofdProducer::PostDrainDone(UnwindingWorker*,
+                                      DataSourceInstanceID ds_id) {
+  auto weak_this = weak_factory_.GetWeakPtr();
+  task_runner_->PostTask([weak_this, ds_id] {
+    if (weak_this)
+      weak_this->DrainDone(ds_id);
+  });
+}
+
+void HeapprofdProducer::DrainDone(DataSourceInstanceID ds_id) {
+  auto it = data_sources_.find(ds_id);
+  if (it == data_sources_.end()) {
+    return;
+  }
+  DataSource& data_source = it->second;
+  data_source.pending_free_drains--;
+  DoContinuousDump(&data_source);
 }
 
 // static
diff --git a/src/profiling/memory/heapprofd_producer.h b/src/profiling/memory/heapprofd_producer.h
index ac18b54..83c6cac 100644
--- a/src/profiling/memory/heapprofd_producer.h
+++ b/src/profiling/memory/heapprofd_producer.h
@@ -135,6 +135,7 @@
                               DataSourceInstanceID,
                               pid_t,
                               SharedRingBuffer::Stats) override;
+  void PostDrainDone(UnwindingWorker*, DataSourceInstanceID) override;
 
   void HandleAllocRecord(AllocRecord*);
   void HandleFreeRecord(FreeRecord);
@@ -201,8 +202,8 @@
     HeapInfo& GetHeapInfo(uint32_t heap_id) {
       auto it = heap_infos.find(heap_id);
       if (it == heap_infos.end()) {
-        it = heap_infos.emplace_hint(it,
-            std::piecewise_construct, std::forward_as_tuple(heap_id),
+        it = heap_infos.emplace_hint(
+            it, std::piecewise_construct, std::forward_as_tuple(heap_id),
             std::forward_as_tuple(callsites, dump_at_max_mode));
       }
       return it->second;
@@ -236,6 +237,8 @@
     bool hit_guardrail = false;
     bool was_stopped = false;
     uint32_t stop_timeout_ms;
+    uint32_t dump_interval_ms = 0;
+    size_t pending_free_drains = 0;
     GuardrailConfig guardrail_config;
   };
 
@@ -262,7 +265,9 @@
   static void SetStats(protos::pbzero::ProfilePacket::ProcessStats* stats,
                        const ProcessState& process_state);
 
-  void DoContinuousDump(DataSourceInstanceID id, uint32_t dump_interval);
+  void DoDrainAndContinuousDump(DataSourceInstanceID id);
+  void DoContinuousDump(DataSource* ds);
+  void DrainDone(DataSourceInstanceID);
 
   UnwindingWorker& UnwinderForPID(pid_t);
   bool IsPidProfiled(pid_t);
diff --git a/src/profiling/memory/heapprofd_producer_integrationtest.cc b/src/profiling/memory/heapprofd_producer_integrationtest.cc
index d0ea2c4..c01f667 100644
--- a/src/profiling/memory/heapprofd_producer_integrationtest.cc
+++ b/src/profiling/memory/heapprofd_producer_integrationtest.cc
@@ -111,10 +111,25 @@
   std::unique_ptr<base::UnixSocket> listen_sock_;
 };
 
+class TraceConsumer {
+ public:
+  explicit TraceConsumer(base::TestTaskRunner* runner, std::string socket)
+      : socket_(std::move(socket)), consumer_(runner) {
+    consumer_.Connect(
+        ConsumerIPCClient::Connect(socket_.c_str(), &consumer_, runner));
+  }
+
+  NiceMock<MockConsumer>& consumer() { return consumer_; }
+
+ private:
+  // consumer_ refers to socket_.
+  const std::string socket_;
+  NiceMock<MockConsumer> consumer_;
+};
+
 TraceConfig MakeTraceConfig() {
   TraceConfig trace_config;
   trace_config.add_buffers()->set_size_kb(10 * 1024);
-  trace_config.set_data_source_stop_timeout_ms(10000);
 
   auto* ds_config = trace_config.add_data_sources()->mutable_config();
   ds_config->set_name("android.heapprofd");
@@ -151,81 +166,104 @@
   });
 }
 
-// Waits for the heapprofd data source to be registered and starts a trace with
-// it.
-std::unique_ptr<NiceMock<MockConsumer>> StartHeapprofdTrace(
-    const std::string& consumer_socket,
-    base::TestTaskRunner* task_runner) {
-  std::unique_ptr<NiceMock<MockConsumer>> mock_consumer;
-  mock_consumer.reset(new NiceMock<MockConsumer>(task_runner));
-  mock_consumer->Connect(ConsumerIPCClient::Connect(
-      consumer_socket.c_str(), mock_consumer.get(), task_runner));
+class HeapprofdProducerIntegrationTest : public testing::Test {
+ protected:
+  static constexpr char kProducerSock[] = "producer.sock";
+  static constexpr char kConsumerSock[] = "consumer.sock";
+  static constexpr char kHeapprofdSock[] = "heapprofd.sock";
 
-  if (WaitForDsRegistered(mock_consumer.get(), "android.heapprofd") == false) {
-    ADD_FAILURE();
-    return nullptr;
+  std::string ProducerSockPath() const {
+    return tmpdir_.AbsolutePath(kProducerSock);
   }
 
-  mock_consumer->ObserveEvents(ObservableEvents::TYPE_ALL_DATA_SOURCES_STARTED);
-  mock_consumer->EnableTracing(MakeTraceConfig());
-  mock_consumer->WaitForObservableEvents();
+  std::string ConsumerSockPath() const {
+    return tmpdir_.AbsolutePath(kConsumerSock);
+  }
 
-  return mock_consumer;
-}
+  std::string HeapprofdSockPath() const {
+    return tmpdir_.AbsolutePath(kHeapprofdSock);
+  }
 
-TEST(HeapprofdProducerIntegrationTest, Restart) {
+  void SetUp() override {
+    tmpdir_.TrackFile(kProducerSock);
+    tmpdir_.TrackFile(kConsumerSock);
+    StartTracingService();
+
+    tmpdir_.TrackFile(kHeapprofdSock);
+    heapprofd_service_.emplace(ProducerSockPath(), HeapprofdSockPath());
+  }
+
+  void StartTracingService() {
+    tracing_service_.emplace(ProducerSockPath(), ConsumerSockPath());
+  }
+
+  // Waits for the heapprofd data source to be registered and starts a trace
+  // with it.
+  std::unique_ptr<TraceConsumer> StartHeapprofdTrace(TraceConfig cfg) {
+    auto trace_consumer =
+        std::make_unique<TraceConsumer>(&task_runner_, ConsumerSockPath());
+
+    if (WaitForDsRegistered(&trace_consumer->consumer(), "android.heapprofd") ==
+        false) {
+      ADD_FAILURE();
+      return nullptr;
+    }
+
+    trace_consumer->consumer().ObserveEvents(
+        ObservableEvents::TYPE_ALL_DATA_SOURCES_STARTED);
+    trace_consumer->consumer().EnableTracing(cfg);
+    trace_consumer->consumer().WaitForObservableEvents();
+
+    return trace_consumer;
+  }
+
+  std::shared_ptr<Client> CreateHeapprofdClient() const {
+    std::optional<base::UnixSocketRaw> client_sock =
+        perfetto::profiling::Client::ConnectToHeapprofd(HeapprofdSockPath());
+    if (!client_sock.has_value()) {
+      return nullptr;
+    }
+
+    return perfetto::profiling::Client::CreateAndHandshake(
+        std::move(client_sock.value()),
+        UnhookedAllocator<perfetto::profiling::Client>(malloc, free));
+  }
+
   base::TmpDirTree tmpdir_;
+  base::TestTaskRunner task_runner_;
+  std::optional<TracingServiceThread> tracing_service_;
+  std::optional<HeapprofdThread> heapprofd_service_;
+};
 
-  base::TestTaskRunner task_runner;
-
-  tmpdir_.TrackFile("producer.sock");
-  tmpdir_.TrackFile("consumer.sock");
-
-  std::optional<TracingServiceThread> tracing_service;
-  tracing_service.emplace(tmpdir_.AbsolutePath("producer.sock"),
-                          tmpdir_.AbsolutePath("consumer.sock"));
-
-  tmpdir_.TrackFile("heapprofd.sock");
-  HeapprofdThread heapprofd_service(tmpdir_.AbsolutePath("producer.sock"),
-                                    tmpdir_.AbsolutePath("heapprofd.sock"));
-
-  std::unique_ptr<NiceMock<MockConsumer>> consumer =
-      StartHeapprofdTrace(tmpdir_.AbsolutePath("consumer.sock"), &task_runner);
+TEST_F(HeapprofdProducerIntegrationTest, Restart) {
+  std::unique_ptr<TraceConsumer> consumer =
+      StartHeapprofdTrace(MakeTraceConfig());
   ASSERT_THAT(consumer, NotNull());
 
-  std::optional<base::UnixSocketRaw> client_sock =
-      perfetto::profiling::Client::ConnectToHeapprofd(
-          tmpdir_.AbsolutePath("heapprofd.sock"));
-  ASSERT_TRUE(client_sock.has_value());
-
-  std::shared_ptr<Client> client =
-      perfetto::profiling::Client::CreateAndHandshake(
-          std::move(client_sock.value()),
-          UnhookedAllocator<perfetto::profiling::Client>(malloc, free));
+  std::shared_ptr<Client> client = CreateHeapprofdClient();
+  ASSERT_THAT(client, NotNull());
 
   // Shutdown tracing service. This should cause HeapprofdProducer::Restart() to
   // be executed on the heapprofd thread.
-  tracing_service.reset();
+  tracing_service_.reset();
   // Wait for the effects of the tracing service disconnect to propagate to the
   // heapprofd thread.
-  heapprofd_service.Sync();
+  heapprofd_service_->Sync();
 
-  consumer->ForceDisconnect();
+  consumer->consumer().ForceDisconnect();
   consumer.reset();
 
-  task_runner.RunUntilIdle();
+  task_runner_.RunUntilIdle();
 
   // Start tracing service again. Heapprofd should reconnect.
-  ASSERT_EQ(remove(tmpdir_.AbsolutePath("producer.sock").c_str()), 0);
-  ASSERT_EQ(remove(tmpdir_.AbsolutePath("consumer.sock").c_str()), 0);
-  tracing_service.emplace(tmpdir_.AbsolutePath("producer.sock"),
-                          tmpdir_.AbsolutePath("consumer.sock"));
+  ASSERT_EQ(remove(ProducerSockPath().c_str()), 0);
+  ASSERT_EQ(remove(ConsumerSockPath().c_str()), 0);
+  StartTracingService();
 
-  consumer =
-      StartHeapprofdTrace(tmpdir_.AbsolutePath("consumer.sock"), &task_runner);
+  consumer = StartHeapprofdTrace(MakeTraceConfig());
   ASSERT_THAT(consumer, NotNull());
 
-  consumer->ForceDisconnect();
+  consumer->consumer().ForceDisconnect();
   consumer.reset();
 }
 
diff --git a/src/profiling/memory/unwinding.cc b/src/profiling/memory/unwinding.cc
index d0c90be..3e03f5e 100644
--- a/src/profiling/memory/unwinding.cc
+++ b/src/profiling/memory/unwinding.cc
@@ -485,6 +485,20 @@
   alloc_record_arena_.Enable();
 }
 
+void UnwindingWorker::HandleDrainFree(DataSourceInstanceID ds_id, pid_t pid) {
+  auto it = client_data_.find(pid);
+  if (it != client_data_.end()) {
+    ClientData& client_data = it->second;
+
+    if (!client_data.free_records.empty()) {
+      delegate_->PostFreeRecord(this, std::move(client_data.free_records));
+      client_data.free_records.clear();
+      client_data.free_records.reserve(kRecordBatchSize);
+    }
+  }
+  delegate_->PostDrainDone(this, ds_id);
+}
+
 void UnwindingWorker::PostDisconnectSocket(pid_t pid) {
   // We do not need to use a WeakPtr here because the task runner will not
   // outlive its UnwindingWorker.
@@ -504,6 +518,13 @@
   });
 }
 
+void UnwindingWorker::PostDrainFree(DataSourceInstanceID ds_id, pid_t pid) {
+  // We do not need to use a WeakPtr here because the task runner will not
+  // outlive its UnwindingWorker.
+  thread_task_runner_.get()->PostTask(
+      [this, ds_id, pid] { HandleDrainFree(ds_id, pid); });
+}
+
 void UnwindingWorker::HandleDisconnectSocket(pid_t pid) {
   auto it = client_data_.find(pid);
   if (it == client_data_.end()) {
diff --git a/src/profiling/memory/unwinding.h b/src/profiling/memory/unwinding.h
index b5e2e01..15310a2 100644
--- a/src/profiling/memory/unwinding.h
+++ b/src/profiling/memory/unwinding.h
@@ -68,6 +68,7 @@
                                         DataSourceInstanceID,
                                         pid_t pid,
                                         SharedRingBuffer::Stats stats) = 0;
+    virtual void PostDrainDone(UnwindingWorker*, DataSourceInstanceID) = 0;
     virtual ~Delegate();
   };
 
@@ -92,6 +93,7 @@
   void PostDisconnectSocket(pid_t pid);
   void PostPurgeProcess(pid_t pid);
   void PostHandoffSocket(HandoffData);
+  void PostDrainFree(DataSourceInstanceID, pid_t pid);
   void ReturnAllocRecord(std::unique_ptr<AllocRecord> record) {
     alloc_record_arena_.ReturnAllocRecord(std::move(record));
   }
@@ -129,6 +131,7 @@
  private:
   void HandleHandoffSocket(HandoffData data);
   void HandleDisconnectSocket(pid_t pid);
+  void HandleDrainFree(DataSourceInstanceID, pid_t);
   void RemoveClientData(
       std::map<pid_t, ClientData>::iterator client_data_iterator);
   void FinishDisconnect(
diff --git a/src/profiling/memory/unwinding_fuzzer.cc b/src/profiling/memory/unwinding_fuzzer.cc
index e24ce4f..409a9b0 100644
--- a/src/profiling/memory/unwinding_fuzzer.cc
+++ b/src/profiling/memory/unwinding_fuzzer.cc
@@ -38,6 +38,7 @@
                               DataSourceInstanceID,
                               pid_t,
                               SharedRingBuffer::Stats) override {}
+  void PostDrainDone(UnwindingWorker*, DataSourceInstanceID) override {}
 };
 
 int FuzzUnwinding(const uint8_t* data, size_t size) {
diff --git a/src/protozero/filtering/filter_util.cc b/src/protozero/filtering/filter_util.cc
index 8e81cb0..d17a36b 100644
--- a/src/protozero/filtering/filter_util.cc
+++ b/src/protozero/filtering/filter_util.cc
@@ -67,9 +67,13 @@
 FilterUtil::FilterUtil() = default;
 FilterUtil::~FilterUtil() = default;
 
-bool FilterUtil::LoadMessageDefinition(const std::string& proto_file,
-                                       const std::string& root_message,
-                                       const std::string& proto_dir_path) {
+bool FilterUtil::LoadMessageDefinition(
+    const std::string& proto_file,
+    const std::string& root_message,
+    const std::string& proto_dir_path,
+    const std::set<std::string>& passthrough_fields) {
+  passthrough_fields_ = passthrough_fields;
+  passthrough_fields_seen_.clear();
   // The protobuf compiler doesn't like backslashes and prints an error like:
   // Error C:\it7mjanpw3\perfetto-a16500 -1:0: Backslashes, consecutive slashes,
   // ".", or ".." are not allowed in the virtual path.
@@ -122,6 +126,22 @@
   // future without realizing) when performing the Dedupe() pass.
   DescriptorsByNameMap descriptors_by_full_name;
   ParseProtoDescriptor(root_msg, &descriptors_by_full_name);
+
+  // If the user specified a set of fields to pass through, print an error and
+  // fail if any of the passed fields have not been seen while recursing in the
+  // schema. This is to avoid typos or naming changes to be silently ignored.
+  std::vector<std::string> unused_passthrough;
+  std::set_difference(passthrough_fields_.begin(), passthrough_fields_.end(),
+                      passthrough_fields_seen_.begin(),
+                      passthrough_fields_seen_.end(),
+                      std::back_inserter(unused_passthrough));
+  for (const std::string& message_and_field : unused_passthrough) {
+    PERFETTO_ELOG("Field not found %s", message_and_field.c_str());
+  }
+  if (!unused_passthrough.empty()) {
+    PERFETTO_ELOG("Syntax: perfetto.protos.MessageName:field_name");
+    return false;
+  }
   return true;
 }
 
@@ -145,7 +165,15 @@
     auto& field = msg->fields[field_id];
     field.name = proto_field->name();
     field.type = proto_field->type_name();
-    if (proto_field->message_type()) {
+
+    std::string message_and_field = msg->full_name + ":" + field.name;
+    bool passthrough = false;
+    if (passthrough_fields_.count(message_and_field)) {
+      field.type = "bytes";
+      passthrough = true;
+      passthrough_fields_seen_.insert(message_and_field);
+    }
+    if (proto_field->message_type() && !passthrough) {
       msg->has_nested_fields = true;
       // Recurse.
       field.nested_type = ParseProtoDescriptor(proto_field->message_type(),
@@ -253,8 +281,11 @@
       }
 
       const Message* nested_type = id_and_field.second.nested_type;
+      bool passthrough = false;
       if (nested_type) {
-        PERFETTO_CHECK(!result.simple_field() || !filter_bytecode);
+        // result.simple_field might be true if the generated bytecode is
+        // passing through a whole submessage without recursing.
+        passthrough = result.simple_field();
         if (seen_msgs.find(nested_type) == seen_msgs.end()) {
           seen_msgs.insert(nested_type);
           queue.emplace_back(result.nested_msg_index, nested_type);
@@ -267,6 +298,8 @@
       std::string stripped_nested =
           nested_type ? " " + StripPrefix(nested_type->full_name, root_prefix)
                       : "";
+      if (passthrough)
+        stripped_nested += "  # PASSTHROUGH";
       fprintf(print_stream_, "%-60s %3u %-8s %-32s%s\n", stripped_name.c_str(),
               field_id, field.type.c_str(), field.name.c_str(),
               stripped_nested.c_str());
diff --git a/src/protozero/filtering/filter_util.h b/src/protozero/filtering/filter_util.h
index 0c5e74f..276ec6d 100644
--- a/src/protozero/filtering/filter_util.h
+++ b/src/protozero/filtering/filter_util.h
@@ -22,6 +22,7 @@
 #include <list>
 #include <map>
 #include <optional>
+#include <set>
 #include <string>
 
 // We include this intentionally instead of forward declaring to allow
@@ -46,9 +47,14 @@
   // root_message: fully qualified message name (e.g., perfetto.protos.Trace).
   //     If empty, the first message in the file will be used.
   // proto_dir_path: the root for .proto includes. If empty uses CWD.
-  bool LoadMessageDefinition(const std::string& proto_file,
-                             const std::string& root_message,
-                             const std::string& proto_dir_path);
+  // passthrough: an optional set of fields that should be transparently passed
+  //     through without recursing further.
+  //     Syntax: "perfetto.protos.TracePacket:trace_config"
+  bool LoadMessageDefinition(
+      const std::string& proto_file,
+      const std::string& root_message,
+      const std::string& proto_dir_path,
+      const std::set<std::string>& passthrough_fields = {});
 
   // Deduplicates leaf messages having the same sets of field ids.
   // It changes the internal state and affects the behavior of next calls to
@@ -103,6 +109,12 @@
 
   // list<> because pointers need to be stable.
   std::list<Message> descriptors_;
+  std::set<std::string> passthrough_fields_;
+
+  // Used only for debugging aid, to print out an error message when the user
+  // specifies a field to pass through but it doesn't exist.
+  std::set<std::string> passthrough_fields_seen_;
+
   FILE* print_stream_ = stdout;
 };
 
diff --git a/src/protozero/filtering/filter_util_unittest.cc b/src/protozero/filtering/filter_util_unittest.cc
index 7ad4d6f..2b13ae6 100644
--- a/src/protozero/filtering/filter_util_unittest.cc
+++ b/src/protozero/filtering/filter_util_unittest.cc
@@ -302,5 +302,42 @@
             FilterToText(filter, bytecode));
 }
 
+TEST(SchemaParserTest, Passthrough) {
+  auto schema = MkTemp(R"(
+  syntax = "proto2";
+  message Root {
+    optional int32 i32 = 13;
+    optional TracePacket packet = 7;
+  }
+  message TraceConfig {
+    optional int32 f3 = 3;
+    optional int64 f4 = 4;
+  }
+  message TracePacket {
+    optional int32 f1 = 3;
+    optional int64 f2 = 4;
+    optional TraceConfig cfg = 5;
+  }
+  )");
+
+  FilterUtil filter;
+  std::set<std::string> passthrough{"TracePacket:cfg"};
+  ASSERT_TRUE(
+      filter.LoadMessageDefinition(schema.path(), "Root", "", passthrough));
+
+  EXPECT_EQ(R"(Root 7 message packet TracePacket
+Root 13 int32 i32
+TracePacket 3 int32 f1
+TracePacket 4 int64 f2
+TracePacket 5 bytes cfg
+)",
+            FilterToText(filter));
+
+  std::string bytecode = filter.GenerateFilterBytecode();
+  // If we generate bytecode from the schema itself, all fields are allowed and
+  // the result is identical to the unfiltered output.
+  EXPECT_EQ(FilterToText(filter), FilterToText(filter, bytecode));
+}
+
 }  // namespace
 }  // namespace protozero
diff --git a/src/protozero/filtering/message_filter_unittest.cc b/src/protozero/filtering/message_filter_unittest.cc
index 83cb911..3159bfc 100644
--- a/src/protozero/filtering/message_filter_unittest.cc
+++ b/src/protozero/filtering/message_filter_unittest.cc
@@ -128,6 +128,87 @@
   }
 }
 
+TEST(MessageFilterTest, Passthrough) {
+  auto schema = perfetto::base::TempFile::Create();
+  static const char kSchema[] = R"(
+  syntax = "proto2";
+  message TracePacket {
+    optional int64 timestamp = 1;
+    optional TraceConfig cfg = 2;
+    optional TraceConfig cfg_filtered = 3;
+    optional string other = 4;
+  };
+  message SubConfig {
+    optional string f4 = 6;
+  }
+  message TraceConfig {
+    optional int64 f1 = 3;
+    optional string f2 = 4;
+    optional SubConfig f3 = 5;
+  }
+  )";
+
+  perfetto::base::WriteAll(*schema, kSchema, strlen(kSchema));
+  perfetto::base::FlushFile(*schema);
+
+  FilterUtil filter;
+  ASSERT_TRUE(filter.LoadMessageDefinition(
+      schema.path(), "", "", {"TracePacket:other", "TracePacket:cfg"}));
+  std::string bytecode = filter.GenerateFilterBytecode();
+  ASSERT_GT(bytecode.size(), 0u);
+
+  HeapBuffered<Message> msg;
+  msg->AppendVarInt(/*field_id=*/1, 10);
+  msg->AppendString(/*field_id=*/4, "other_string");
+
+  // Fill `cfg`.
+  auto* nest = msg->BeginNestedMessage<Message>(/*field_id=*/2);
+  nest->AppendVarInt(/*field_id=*/3, 100);
+  nest->AppendString(/*field_id=*/4, "f2.payload");
+  nest->AppendString(/*field_id=*/99, "not_in_original_schema");
+  auto* nest2 = nest->BeginNestedMessage<Message>(/*field_id=*/5);
+  nest2->AppendString(/*field_id=*/6, "subconfig.f4");
+  nest2->Finalize();
+  nest->Finalize();
+
+  // Fill `cfg_filtered`.
+  nest = msg->BeginNestedMessage<Message>(/*field_id=*/3);
+  nest->AppendVarInt(/*field_id=*/3, 200);  // This should be propagated.
+  nest->AppendVarInt(/*field_id=*/6, 300);  // This shoudl be filtered out.
+  nest->Finalize();
+
+  MessageFilter flt;
+  ASSERT_TRUE(flt.LoadFilterBytecode(bytecode.data(), bytecode.size()));
+
+  std::vector<uint8_t> encoded = msg.SerializeAsArray();
+
+  auto filtered = flt.FilterMessage(encoded.data(), encoded.size());
+  ASSERT_LT(filtered.size, encoded.size());
+
+  ProtoDecoder dec(filtered.data.get(), filtered.size);
+  EXPECT_EQ(dec.FindField(1).as_int64(), 10);
+  EXPECT_EQ(dec.FindField(4).as_std_string(), "other_string");
+
+  EXPECT_TRUE(dec.FindField(2).valid());
+  ProtoDecoder nest_dec(dec.FindField(2).as_bytes());
+  EXPECT_EQ(nest_dec.FindField(3).as_int32(), 100);
+  EXPECT_EQ(nest_dec.FindField(4).as_std_string(), "f2.payload");
+  EXPECT_TRUE(nest_dec.FindField(5).valid());
+  ProtoDecoder nest_dec2(nest_dec.FindField(5).as_bytes());
+  EXPECT_EQ(nest_dec2.FindField(6).as_std_string(), "subconfig.f4");
+
+  // Field 99 should be preserved anyways even if it wasn't in the original
+  // schema because the whole TracePacket submessage was passed through.
+  EXPECT_TRUE(nest_dec.FindField(99).valid());
+  EXPECT_EQ(nest_dec.FindField(99).as_std_string(), "not_in_original_schema");
+
+  // Check that the field `cfg_filtered` contains only `f1`,`f2`,`f3`.
+  EXPECT_TRUE(dec.FindField(3).valid());
+  ProtoDecoder nest_dec3(dec.FindField(3).as_bytes());
+  EXPECT_EQ(nest_dec3.FindField(3).as_int32(), 200);
+  EXPECT_FALSE(nest_dec3.FindField(6).valid());
+}
+
 TEST(MessageFilterTest, ChangeRoot) {
   auto schema = perfetto::base::TempFile::Create();
   static const char kSchema[] = R"(
diff --git a/src/protozero/packed_repeated_fields.cc b/src/protozero/packed_repeated_fields.cc
index 16d4539..a884b73 100644
--- a/src/protozero/packed_repeated_fields.cc
+++ b/src/protozero/packed_repeated_fields.cc
@@ -20,11 +20,6 @@
 
 namespace protozero {
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-// static
-constexpr size_t PackedBufferBase::kOnStackStorageSize;
-#endif
-
 void PackedBufferBase::GrowSlowpath() {
   size_t write_off = static_cast<size_t>(write_ptr_ - storage_begin_);
   size_t old_size = static_cast<size_t>(storage_end_ - storage_begin_);
diff --git a/src/shared_lib/test/BUILD.gn b/src/shared_lib/test/BUILD.gn
index 220439a..aa87956 100644
--- a/src/shared_lib/test/BUILD.gn
+++ b/src/shared_lib/test/BUILD.gn
@@ -22,7 +22,11 @@
     "../../../gn:gtest_and_gmock",
     "../../../include/perfetto/public",
   ]
-  sources = [ "utils.cc" ]
+  sources = [
+    "utils.cc",
+    "utils.h",
+  ]
+  defines = [ "PERFETTO_SDK_DISABLE_SHLIB_EXPORT" ]
 }
 
 if (enable_perfetto_benchmarks) {
@@ -35,6 +39,7 @@
       "../../../gn:default_deps",
       "../../../include/perfetto/public",
     ]
+    defines = [ "PERFETTO_SDK_DISABLE_SHLIB_EXPORT" ]
     sources = [ "benchmark.cc" ]
   }
 }
@@ -49,6 +54,7 @@
       "../../../gn:gtest_and_gmock",
       "../../../include/perfetto/public",
     ]
+    defines = [ "PERFETTO_SDK_DISABLE_SHLIB_EXPORT" ]
     sources = [ "api_integrationtest.cc" ]
   }
 }
diff --git a/src/tools/ftrace_proto_gen/event_list b/src/tools/ftrace_proto_gen/event_list
index 6f934c4..40dd949 100644
--- a/src/tools/ftrace_proto_gen/event_list
+++ b/src/tools/ftrace_proto_gen/event_list
@@ -475,3 +475,6 @@
 hyp/host_hcall
 hyp/host_smc
 hyp/host_mem_abort
+synthetic/suspend_resume_minimal
+mali/mali_CSF_INTERRUPT_START
+mali/mali_CSF_INTERRUPT_END
diff --git a/src/tools/ftrace_proto_gen/ftrace_proto_gen_unittest.cc b/src/tools/ftrace_proto_gen/ftrace_proto_gen_unittest.cc
index 3f6223d..f2b1d3a 100644
--- a/src/tools/ftrace_proto_gen/ftrace_proto_gen_unittest.cc
+++ b/src/tools/ftrace_proto_gen/ftrace_proto_gen_unittest.cc
@@ -56,6 +56,10 @@
   EXPECT_EQ(InferProtoType(Field{"char foo", 0, 0, false}).ToString(),
             "string");
 
+  EXPECT_EQ(InferProtoType(Field{"bool foo", 0, 8, true}).ToString(), "uint32");
+  EXPECT_EQ(InferProtoType(Field{"bool foo", 0, 8, false}).ToString(),
+            "uint32");
+
   EXPECT_EQ(
       InferProtoType(Field{"unsigned long args[6]", 0, 0, false}).ToString(),
       "uint64");
diff --git a/src/tools/ftrace_proto_gen/proto_gen_utils.cc b/src/tools/ftrace_proto_gen/proto_gen_utils.cc
index 66dfae4..99c65e8 100644
--- a/src/tools/ftrace_proto_gen/proto_gen_utils.cc
+++ b/src/tools/ftrace_proto_gen/proto_gen_utils.cc
@@ -221,6 +221,11 @@
     return ProtoType::Numeric(64, /* is_signed= */ false);
   }
 
+  // Bools should always uint32 even if they are signed.
+  if (StartsWith(field.type_and_name, "bool ")) {
+    return ProtoType::Numeric(32, /* is_signed= */ false);
+  }
+
   // Fixed size array for syscall args. Similar to ino_t choose the largest
   // possible size to cover 32bit and 64bit.
   if (StartsWith(field.type_and_name, "unsigned long args[6]")) {
diff --git a/src/tools/proto_filter/proto_filter.cc b/src/tools/proto_filter/proto_filter.cc
index 04385c2..7bfcb74 100644
--- a/src/tools/proto_filter/proto_filter.cc
+++ b/src/tools/proto_filter/proto_filter.cc
@@ -49,7 +49,7 @@
 # Generate the filter bytecode from a .proto schema
 
   proto_filter -r perfetto.protos.Trace -s protos/perfetto/trace/trace.proto \
-               -F /tmp/bytecode [--dedupe]
+               -F /tmp/bytecode [--dedupe] [-x protos.Message:field_to_pass]
 
 # List the used/filtered fields from a trace file
 
@@ -72,14 +72,15 @@
       {"help", no_argument, nullptr, 'h'},
       {"version", no_argument, nullptr, 'v'},
       {"dedupe", no_argument, nullptr, 'd'},
-      {"proto_path", no_argument, nullptr, 'I'},
-      {"schema_in", no_argument, nullptr, 's'},
-      {"root_message", no_argument, nullptr, 'r'},
-      {"msg_in", no_argument, nullptr, 'i'},
-      {"msg_out", no_argument, nullptr, 'o'},
-      {"filter_in", no_argument, nullptr, 'f'},
-      {"filter_out", no_argument, nullptr, 'F'},
-      {"filter_oct_out", no_argument, nullptr, 'T'},
+      {"proto_path", required_argument, nullptr, 'I'},
+      {"schema_in", required_argument, nullptr, 's'},
+      {"root_message", required_argument, nullptr, 'r'},
+      {"msg_in", required_argument, nullptr, 'i'},
+      {"msg_out", required_argument, nullptr, 'o'},
+      {"filter_in", required_argument, nullptr, 'f'},
+      {"filter_out", required_argument, nullptr, 'F'},
+      {"filter_oct_out", required_argument, nullptr, 'T'},
+      {"passthrough", required_argument, nullptr, 'x'},
       {nullptr, 0, nullptr, 0}};
 
   std::string msg_in;
@@ -90,11 +91,12 @@
   std::string filter_oct_out;
   std::string proto_path;
   std::string root_message_arg;
+  std::set<std::string> passthrough_fields;
   bool dedupe = false;
 
   for (;;) {
     int option =
-        getopt_long(argc, argv, "hvdI:s:r:i:o:f:F:T:", long_options, nullptr);
+        getopt_long(argc, argv, "hvdI:s:r:i:o:f:F:T:x:", long_options, nullptr);
 
     if (option == -1)
       break;  // EOF.
@@ -149,6 +151,11 @@
       continue;
     }
 
+    if (option == 'x') {
+      passthrough_fields.insert(optarg);
+      continue;
+    }
+
     if (option == 'h') {
       fprintf(stdout, kUsage);
       exit(0);
@@ -175,8 +182,8 @@
   protozero::FilterUtil filter;
   if (!schema_in.empty()) {
     PERFETTO_LOG("Loading proto schema from %s", schema_in.c_str());
-    if (!filter.LoadMessageDefinition(schema_in, root_message_arg,
-                                      proto_path)) {
+    if (!filter.LoadMessageDefinition(schema_in, root_message_arg, proto_path,
+                                      passthrough_fields)) {
       PERFETTO_ELOG("Failed to parse proto schema from %s", schema_in.c_str());
       return 1;
     }
@@ -264,7 +271,7 @@
   if (!msg_out.empty()) {
     PERFETTO_LOG("Writing filtered proto bytes (%zu bytes) into %s",
                  msg_filtered_data.size(), msg_out.c_str());
-    auto fd = base::OpenFile(msg_out, O_WRONLY | O_CREAT, 0644);
+    auto fd = base::OpenFile(msg_out, O_WRONLY | O_TRUNC | O_CREAT, 0644);
     base::WriteAll(*fd, msg_filtered_data.data(), msg_filtered_data.size());
   }
 
diff --git a/src/trace_processor/BUILD.gn b/src/trace_processor/BUILD.gn
index 29bd8c5..6f0660c 100644
--- a/src/trace_processor/BUILD.gn
+++ b/src/trace_processor/BUILD.gn
@@ -172,6 +172,7 @@
       "prelude/functions",
       "prelude/operators",
       "prelude/table_functions",
+      "prelude/tables_views",
       "sqlite",
       "stdlib:gen_amalgamated_stdlib",
       "storage",
diff --git a/src/trace_processor/containers/bit_vector.cc b/src/trace_processor/containers/bit_vector.cc
index 0b00e28..3e3adab 100644
--- a/src/trace_processor/containers/bit_vector.cc
+++ b/src/trace_processor/containers/bit_vector.cc
@@ -79,13 +79,87 @@
   Resize(count, value);
 }
 
-BitVector::BitVector(std::vector<Block> blocks,
+BitVector::BitVector(std::vector<uint64_t> words,
                      std::vector<uint32_t> counts,
                      uint32_t size)
-    : size_(size), counts_(std::move(counts)), blocks_(std::move(blocks)) {}
+    : size_(size), counts_(std::move(counts)), words_(std::move(words)) {
+  uint32_t words_size = static_cast<uint32_t>(words_.size());
+  if (words_size % Block::kWords != 0)
+    words_.resize(words_.size() + 8 - (words_.size() % 8u));
+}
+
+void BitVector::Resize(uint32_t new_size, bool filler) {
+  uint32_t old_size = size_;
+  if (new_size == old_size)
+    return;
+
+  // Empty bitvectors should be memory efficient so we don't keep any data
+  // around in the bitvector.
+  if (new_size == 0) {
+    words_.clear();
+    counts_.clear();
+    size_ = 0;
+    return;
+  }
+
+  // Compute the address of the new last bit in the bitvector.
+  Address last_addr = IndexToAddress(new_size - 1);
+  uint32_t old_blocks_size = static_cast<uint32_t>(counts_.size());
+  uint32_t new_blocks_size = last_addr.block_idx + 1;
+
+  // Resize the block and count vectors to have the correct number of entries.
+  words_.resize(Block::kWords * new_blocks_size);
+  counts_.resize(new_blocks_size);
+
+  if (new_size > old_size) {
+    if (filler) {
+      // If the new space should be filled with ones, then set all the bits
+      // between the address of the old size and the new last address.
+      const Address& start = IndexToAddress(old_size);
+      Set(start, last_addr);
+
+      // We then need to update the counts vector to match the changes we
+      // made to the blocks.
+
+      // We start by adding the bits we set in the first block to the
+      // cummulative count before the range we changed.
+      Address end_of_block = {start.block_idx,
+                              {Block::kWords - 1, BitWord::kBits - 1}};
+      uint32_t count_in_block_after_end =
+          AddressToIndex(end_of_block) - AddressToIndex(start) + 1;
+      uint32_t set_count = CountSetBits() + count_in_block_after_end;
+
+      for (uint32_t i = start.block_idx + 1; i <= last_addr.block_idx; ++i) {
+        // Set the count to the cummulative count so far.
+        counts_[i] = set_count;
+
+        // Add a full block of set bits to the count.
+        set_count += Block::kBits;
+      }
+    } else {
+      // If the newly added bits are false, we just need to update the
+      // counts vector with the current size of the bitvector for all
+      // the newly added blocks.
+      if (new_blocks_size > old_blocks_size) {
+        uint32_t count = CountSetBits();
+        for (uint32_t i = old_blocks_size; i < new_blocks_size; ++i) {
+          counts_[i] = count;
+        }
+      }
+    }
+  } else {
+    // Throw away all the bits after the new last bit. We do this to make
+    // future lookup, append and resize operations not have to worrying about
+    // trailing garbage bits in the last block.
+    BlockFromIndex(last_addr.block_idx).ClearAfter(last_addr.block_offset);
+  }
+
+  // Actually update the size.
+  size_ = new_size;
+}
 
 BitVector BitVector::Copy() const {
-  return BitVector(blocks_, counts_, size_);
+  return BitVector(words_, counts_, size_);
 }
 
 BitVector::AllBitsIterator BitVector::IterateAllBits() const {
@@ -96,29 +170,50 @@
   return SetBitsIterator(this);
 }
 
+BitVector BitVector::Not() const {
+  Builder builder(size());
+
+  // Append all words from all blocks except the last one.
+  uint32_t full_words = builder.BitsInCompleteWordsUntilFull();
+  for (uint32_t i = 0; i < full_words; ++i) {
+    builder.AppendWord(ConstBitWord(&words_[i]).Not());
+  }
+
+  // Append bits from the last word.
+  uint32_t bits_from_last_word = builder.BitsUntilFull();
+  ConstBitWord last_word(&words_[full_words]);
+  for (uint32_t i = 0; i < bits_from_last_word; ++i) {
+    builder.Append(!last_word.IsSet(i));
+  }
+
+  return std::move(builder).Build();
+}
+
 void BitVector::UpdateSetBits(const BitVector& update) {
-  static_assert(sizeof(Block) == Block::kWords * sizeof(uint64_t),
-                "Block must just consist of words.");
+  if (update.CountSetBits() == 0 || CountSetBits() == 0) {
+    *this = BitVector();
+    return;
+  }
   PERFETTO_DCHECK(update.size() <= CountSetBits());
 
   // Get the start and end ptrs for the current bitvector.
   // Safe because of the static_assert above.
-  auto* ptr = reinterpret_cast<uint64_t*>(blocks_.data());
-  const uint64_t* ptr_end = ptr + WordCeil(size());
+  uint64_t* ptr = words_.data();
+  const uint64_t* ptr_end = ptr + WordCount(size());
 
-  // Get the start and end ptrs for the current bitvector.
+  // Get the start and end ptrs for the update bitvector.
   // Safe because of the static_assert above.
-  auto* update_ptr = reinterpret_cast<const uint64_t*>(update.blocks_.data());
-  const uint64_t* update_ptr_end = update_ptr + WordCeil(update.size());
+  const uint64_t* update_ptr = update.words_.data();
+  const uint64_t* update_ptr_end = update_ptr + WordCount(update.size());
 
   // |update_unused_bits| contains |unused_bits_count| bits at the bottom
-  // which indicates the how the next |unused_bits_count| set bits in |this|
+  // which indicates how the next |unused_bits_count| set bits in |this|
   // should be changed. This is necessary because word boundaries in |this| will
   // almost always *not* match the word boundaries in |update|.
   uint64_t update_unused_bits = 0;
   uint8_t unused_bits_count = 0;
 
-  // The basic premise of this loop is, for each word in |this| we find the
+  // The basic premise of this loop is, for each word in |this| we find
   // enough bits from |update| to cover every set bit in the word. We then use
   // the PDEP x64 instruction (or equivalent instructions/software emulation) to
   // update the word and store it back in |this|.
@@ -180,7 +275,7 @@
   PERFETTO_DCHECK(update_ptr == update_ptr_end);
 
   for (uint32_t i = 0; i < counts_.size() - 1; ++i) {
-    counts_[i + 1] = counts_[i] + blocks_[i].CountSetBits();
+    counts_[i + 1] = counts_[i] + ConstBlockFromIndex(i).CountSetBits();
   }
 
   // After the loop, we should have precisely the same number of bits
@@ -188,5 +283,47 @@
   PERFETTO_DCHECK(update.CountSetBits() == CountSetBits());
 }
 
+BitVector BitVector::IntersectRange(uint32_t range_start,
+                                    uint32_t range_end) const {
+  uint32_t total_set_bits = CountSetBits();
+  if (total_set_bits == 0 || range_start >= range_end)
+    return BitVector();
+
+  // We should skip all bits until the index of first set bit bigger than
+  // |range_start|.
+  uint32_t start_idx = std::max(range_start, IndexOfNthSet(0));
+  uint32_t end_idx = std::min(range_end, size());
+
+  if (start_idx >= end_idx)
+    return BitVector();
+
+  Builder builder(end_idx);
+
+  // All bits before start should be empty.
+  builder.Skip(start_idx);
+
+  uint32_t front_bits = builder.BitsUntilWordBoundaryOrFull();
+  uint32_t cur_index = start_idx;
+  for (uint32_t i = 0; i < front_bits; ++i, ++cur_index) {
+    builder.Append(IsSet(cur_index));
+  }
+
+  PERFETTO_DCHECK(cur_index == end_idx || cur_index % BitWord::kBits == 0);
+  uint32_t cur_words = cur_index / BitWord::kBits;
+  uint32_t full_words = builder.BitsInCompleteWordsUntilFull() / BitWord::kBits;
+  uint32_t total_full_words = cur_words + full_words;
+  for (; cur_words < total_full_words; ++cur_words) {
+    builder.AppendWord(words_[cur_words]);
+  }
+
+  uint32_t last_bits = builder.BitsUntilFull();
+  cur_index += full_words * BitWord::kBits;
+  for (uint32_t i = 0; i < last_bits; ++i, ++cur_index) {
+    builder.Append(IsSet(cur_index));
+  }
+
+  return std::move(builder).Build();
+}
+
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/containers/bit_vector.h b/src/trace_processor/containers/bit_vector.h
index 8306ac6..c1cdc33 100644
--- a/src/trace_processor/containers/bit_vector.h
+++ b/src/trace_processor/containers/bit_vector.h
@@ -23,6 +23,7 @@
 
 #include <algorithm>
 #include <array>
+#include <optional>
 #include <vector>
 
 #include "perfetto/base/logging.h"
@@ -45,6 +46,97 @@
   using AllBitsIterator = internal::AllBitsIterator;
   using SetBitsIterator = internal::SetBitsIterator;
 
+  static constexpr uint32_t kBitsInWord = 64;
+
+  // Builder class which allows efficiently creating a BitVector by appending
+  // words. Using this class is generally far more efficient than trying to set
+  // bits directly in a BitVector or even appending one bit at a time.
+  class Builder {
+   public:
+    // Creates a Builder for building a BitVector of |size| bits.
+    explicit Builder(uint32_t size) : words_(WordCount(size)), size_(size) {}
+
+    // Skips forward |n| bits leaving them as zeroed.
+    void Skip(uint32_t n) {
+      PERFETTO_DCHECK(global_bit_offset_ + n <= size_);
+      global_bit_offset_ += n;
+    }
+
+    // Appends a single bit to the builder.
+    // Note: |AppendWord| is far more efficient than this method so should be
+    // preferred.
+    void Append(bool value) {
+      PERFETTO_DCHECK(global_bit_offset_ < size_);
+
+      words_[global_bit_offset_ / BitWord::kBits] |=
+          static_cast<uint64_t>(value) << global_bit_offset_ % BitWord::kBits;
+      global_bit_offset_++;
+    }
+
+    // Appends a whole word to the Builder. Builder has to end on a word
+    // boundary before calling this function.
+    void AppendWord(uint64_t word) {
+      PERFETTO_DCHECK(global_bit_offset_ % BitWord::kBits == 0);
+      PERFETTO_DCHECK(global_bit_offset_ + BitWord::kBits <= size_);
+      words_[global_bit_offset_ / BitWord::kBits] = word;
+      global_bit_offset_ += BitWord::kBits;
+    }
+
+    // Creates a BitVector from this Builder.
+    BitVector Build() && {
+      Address addr = IndexToAddress(size_ - 1);
+      uint32_t no_blocks = addr.block_idx + 1;
+      std::vector<uint32_t> counts(no_blocks);
+
+      // Calculate counts only for full blocks.
+      for (uint32_t i = 1; i < no_blocks - 1; ++i) {
+        counts[i] +=
+            counts[i - 1] +
+            ConstBlock(&words_[Block::kWords * (i - 1)]).CountSetBits();
+      }
+      if (size_ % Block::kBits == 0) {
+        counts[no_blocks - 1] +=
+            counts[no_blocks - 2] +
+            ConstBlock(&words_[Block::kWords * (no_blocks - 2)]).CountSetBits();
+      }
+
+      return BitVector{std::move(words_), std::move(counts), size_};
+    }
+
+    // Returns the number of bits which are in complete words which can be
+    // appended to this builder before having to fallback to |Append| due to
+    // being close to the end.
+    uint32_t BitsInCompleteWordsUntilFull() {
+      uint32_t next_word = WordCount(global_bit_offset_);
+      uint32_t end_word = WordFloor(size_);
+      uint32_t complete_words = next_word < end_word ? end_word - next_word : 0;
+      return complete_words * BitWord::kBits;
+    }
+
+    // Returns the number of bits which should be appended using |Append| either
+    // hitting a word boundary (and thus able to use |AppendWord|) or until the
+    // bitvector is full (i.e. no more Appends should happen), whichever would
+    // happen first.
+    uint32_t BitsUntilWordBoundaryOrFull() {
+      if (global_bit_offset_ == 0 && size_ < BitWord::kBits) {
+        return size_;
+      }
+      uint8_t word_bit_offset = global_bit_offset_ % BitWord::kBits;
+      return std::min(BitsUntilFull(),
+                      (BitWord::kBits - word_bit_offset) % BitWord::kBits);
+    }
+
+    // Returns the number of bits which should be appended using |Append| before
+    // hitting a word boundary (and thus able to use |AppendWord|) or until the
+    // bitvector is full (i.e. no more Appends should happen).
+    uint32_t BitsUntilFull() { return size_ - global_bit_offset_; }
+
+   private:
+    std::vector<uint64_t> words_;
+    uint32_t global_bit_offset_ = 0;
+    uint32_t size_ = 0;
+  };
+
   // Creates an empty bitvector.
   BitVector();
 
@@ -60,6 +152,9 @@
   // Create a copy of the bitvector.
   BitVector Copy() const;
 
+  // Create a bitwise Not copy of the bitvector.
+  BitVector Not() const;
+
   // Returns the size of the bitvector.
   uint32_t size() const { return static_cast<uint32_t>(size_); }
 
@@ -67,8 +162,8 @@
   bool IsSet(uint32_t idx) const {
     PERFETTO_DCHECK(idx < size());
 
-    Address a = IndexToAddress(idx);
-    return blocks_[a.block_idx].IsSet(a.block_offset);
+    Address addr = IndexToAddress(idx);
+    return ConstBlockFromIndex(addr.block_idx).IsSet(addr.block_offset);
   }
 
   // Returns the number of set bits in the bitvector.
@@ -85,11 +180,11 @@
     // because we get block rollovers on exclusive ends which means we need
     // to have if checks to ensure we don't overflow the number of blocks).
     Address addr = IndexToAddress(end - 1);
-    uint32_t idx = addr.block_idx;
 
     // Add the number of set bits until the start of the block to the number
     // of set bits until the end address inside the block.
-    return counts_[idx] + blocks_[idx].CountSetBits(addr.block_offset);
+    return counts_[addr.block_idx] +
+           ConstBlockFromIndex(addr.block_idx).CountSetBits(addr.block_offset);
   }
 
   // Returns the index of the |n|th set bit. Should only be called with |n| <
@@ -116,7 +211,8 @@
 
     // Compute the address of the bit in the block then convert the full
     // address back to an index.
-    BlockOffset block_offset = blocks_[block_idx].IndexOfNthSet(set_in_block);
+    BlockOffset block_offset =
+        ConstBlockFromIndex(block_idx).IndexOfNthSet(set_in_block);
     return AddressToIndex(Address{block_idx, block_offset});
   }
 
@@ -125,11 +221,12 @@
     // Set the bit to the correct value inside the block but store the old
     // bit to help fix the counts.
     auto addr = IndexToAddress(idx);
-    bool old_value = blocks_[addr.block_idx].IsSet(addr.block_offset);
+    bool old_value =
+        ConstBlockFromIndex(addr.block_idx).IsSet(addr.block_offset);
 
     // If the old value was unset, set the bit and add one to the count.
     if (PERFETTO_LIKELY(!old_value)) {
-      blocks_[addr.block_idx].Set(addr.block_offset);
+      BlockFromIndex(addr.block_idx).Set(addr.block_offset);
 
       uint32_t size = static_cast<uint32_t>(counts_.size());
       for (uint32_t i = addr.block_idx + 1; i < size; ++i) {
@@ -144,12 +241,13 @@
     // Set the bit to the correct value inside the block but store the old
     // bit to help fix the counts.
     auto addr = IndexToAddress(idx);
-    bool old_value = blocks_[addr.block_idx].IsSet(addr.block_offset);
+    bool old_value =
+        ConstBlockFromIndex(addr.block_idx).IsSet(addr.block_offset);
 
     // If the old value was set, clear the bit and subtract one from all the
     // counts.
     if (PERFETTO_LIKELY(old_value)) {
-      blocks_[addr.block_idx].Clear(addr.block_offset);
+      BlockFromIndex(addr.block_idx).Clear(addr.block_offset);
 
       uint32_t size = static_cast<uint32_t>(counts_.size());
       for (uint32_t i = addr.block_idx + 1; i < size; ++i) {
@@ -160,29 +258,20 @@
 
   // Appends true to the bitvector.
   void AppendTrue() {
-    Address addr = IndexToAddress(size_);
-    uint32_t old_blocks_size = static_cast<uint32_t>(blocks_.size());
-    uint32_t new_blocks_size = addr.block_idx + 1;
-
-    if (PERFETTO_UNLIKELY(new_blocks_size > old_blocks_size)) {
-      uint32_t t = CountSetBits();
-      blocks_.emplace_back();
-      counts_.emplace_back(t);
-    }
-
-    size_++;
-    blocks_[addr.block_idx].Set(addr.block_offset);
+    AppendFalse();
+    Address addr = IndexToAddress(size() - 1);
+    BlockFromIndex(addr.block_idx).Set(addr.block_offset);
   }
 
   // Appends false to the bitvector.
   void AppendFalse() {
     Address addr = IndexToAddress(size_);
-    uint32_t old_blocks_size = static_cast<uint32_t>(blocks_.size());
+    uint32_t old_blocks_size = BlockCount();
     uint32_t new_blocks_size = addr.block_idx + 1;
 
     if (PERFETTO_UNLIKELY(new_blocks_size > old_blocks_size)) {
       uint32_t t = CountSetBits();
-      blocks_.emplace_back();
+      words_.resize(words_.size() + Block::kWords);
       counts_.emplace_back(t);
     }
 
@@ -193,105 +282,54 @@
 
   // Resizes the BitVector to the given |size|.
   // Truncates the BitVector if |size| < |size()| or fills the new space with
-  // |value| if |size| > |size()|. Calling this method is a noop if |size| ==
+  // |filler| if |size| > |size()|. Calling this method is a noop if |size| ==
   // |size()|.
-  void Resize(uint32_t size, bool value = false) {
-    uint32_t old_size = size_;
-    if (size == old_size)
-      return;
-
-    // Empty bitvectors should be memory efficient so we don't keep any data
-    // around in the bitvector.
-    if (size == 0) {
-      blocks_.clear();
-      counts_.clear();
-      size_ = 0;
-      return;
-    }
-
-    // Compute the address of the new last bit in the bitvector.
-    Address last_addr = IndexToAddress(size - 1);
-    uint32_t old_blocks_size = static_cast<uint32_t>(counts_.size());
-    uint32_t new_blocks_size = last_addr.block_idx + 1;
-
-    // Then, resize the block and count vectors to have the correct
-    // number of entries.
-    blocks_.resize(new_blocks_size);
-    counts_.resize(new_blocks_size);
-
-    if (size > old_size) {
-      if (value) {
-        // If the new space should be filled with true, then set all the bits
-        // between the address of the old size and the new last address.
-        const Address& start = IndexToAddress(old_size);
-        Set(start, last_addr);
-
-        // We then need to update the counts vector to match the changes we
-        // made to the blocks.
-
-        // We start by adding the bits we set in the first block to the
-        // cummulative count before the range we changed.
-        Address end_of_block = {start.block_idx,
-                                {Block::kWords - 1, BitWord::kBits - 1}};
-        uint32_t count_in_block_after_end =
-            AddressToIndex(end_of_block) - AddressToIndex(start) + 1;
-        uint32_t set_count = CountSetBits() + count_in_block_after_end;
-
-        for (uint32_t i = start.block_idx + 1; i <= last_addr.block_idx; ++i) {
-          // Set the count to the cummulative count so far.
-          counts_[i] = set_count;
-
-          // Add a full block of set bits to the count.
-          set_count += Block::kBits;
-        }
-      } else {
-        // If the newly added bits are false, we just need to update the
-        // counts vector with the current size of the bitvector for all
-        // the newly added blocks.
-        if (new_blocks_size > old_blocks_size) {
-          uint32_t count = CountSetBits();
-          for (uint32_t i = old_blocks_size; i < new_blocks_size; ++i) {
-            counts_[i] = count;
-          }
-        }
-      }
-    } else {
-      // Throw away all the bits after the new last bit. We do this to make
-      // future lookup, append and resize operations not have to worrying about
-      // trailing garbage bits in the last block.
-      blocks_[last_addr.block_idx].ClearAfter(last_addr.block_offset);
-    }
-
-    // Actually update the size.
-    size_ = size;
-  }
+  void Resize(uint32_t new_size, bool filler = false);
 
   // Creates a BitVector of size |end| with the bits between |start| and |end|
   // filled by calling the filler function |f(index of bit)|.
   //
   // As an example, suppose Range(3, 7, [](x) { return x < 5 }). This would
   // result in the following bitvector:
-  // [0 0 0 1 1 0 0 0]
+  // [0 0 0 1 1 0 0]
   template <typename Filler = bool(uint32_t)>
   static BitVector Range(uint32_t start, uint32_t end, Filler f) {
     // Compute the block index and bitvector index where we start and end
     // working one block at a time.
-    uint32_t start_fast_block = BlockCeil(start);
+    uint32_t start_fast_block = BlockCount(start);
     uint32_t start_fast_idx = BlockToIndex(start_fast_block);
+    BitVector bv(start, false);
+
+    // Minimum value of start_fast_idx is numer of bits in block, so we need to
+    // seperate calculation for shorter ranges.
+    if (start_fast_idx > end) {
+      for (uint32_t i = start; i < end; ++i) {
+        bv.Append(f(i));
+      }
+      bv.counts_.emplace_back(bv.CountSetBits());
+      bv.size_ = end;
+      return bv;
+    }
+
     uint32_t end_fast_block = BlockFloor(end);
     uint32_t end_fast_idx = BlockToIndex(end_fast_block);
 
-    // First, create the BitVector up to |start| then fill up to
-    // |start_fast_index| with values from the filler.
-    BitVector bv(start, false);
+    // Fill up to |start_fast_index| with values from the filler.
     for (uint32_t i = start; i < start_fast_idx; ++i) {
       bv.Append(f(i));
     }
 
+    // Assert words_ vector is full and size_ is properly calculated.
+    PERFETTO_DCHECK(bv.words_.size() % Block::kWords == 0);
+    PERFETTO_DCHECK(bv.words_.size() * BitWord::kBits == bv.size_);
+
     // At this point we can work one block at a time.
+    bv.words_.resize(bv.words_.size() +
+                     Block::kWords * (end_fast_block - start_fast_block));
     for (uint32_t i = start_fast_block; i < end_fast_block; ++i) {
+      uint64_t* block_start_word = &bv.words_[i * Block::kWords];
+      Block(block_start_word).FromFiller(bv.size_, f);
       bv.counts_.emplace_back(bv.CountSetBits());
-      bv.blocks_.emplace_back(Block::FromFiller(bv.size_, f));
       bv.size_ += Block::kBits;
     }
 
@@ -299,13 +337,18 @@
     for (uint32_t i = end_fast_idx; i < end; ++i) {
       bv.Append(f(i));
     }
+
     return bv;
   }
 
+  // Creates a BitVector of size |end| bit the bits between |start| and |end|
+  // filled with corresponding bits |this| BitVector.
+  BitVector IntersectRange(uint32_t range_start, uint32_t range_end) const;
+
   // Requests the removal of unused capacity.
   // Matches the semantics of std::vector::shrink_to_fit.
   void ShrinkToFit() {
-    blocks_.shrink_to_fit();
+    words_.shrink_to_fit();
     counts_.shrink_to_fit();
   }
 
@@ -348,7 +391,7 @@
   static constexpr uint32_t ApproxBytesCost(uint32_t n) {
     // The two main things making up a bitvector is the cost of the blocks of
     // bits and the cost of the counts vector.
-    return BlockCeil(n) * Block::kBits + BlockCeil(n) * sizeof(uint32_t);
+    return BlockCount(n) * Block::kBits + BlockCount(n) * sizeof(uint32_t);
   }
 
  private:
@@ -377,14 +420,10 @@
    public:
     static constexpr uint32_t kBits = 64;
 
-    // Returns whether the bit at the given index is set.
-    bool IsSet(uint32_t idx) const {
-      PERFETTO_DCHECK(idx < kBits);
-      return (word_ >> idx) & 1ull;
-    }
+    explicit BitWord(uint64_t* word) : word_(word) {}
 
     // Bitwise ors the given |mask| to the current value.
-    void Or(uint64_t mask) { word_ |= mask; }
+    void Or(uint64_t mask) { *word_ |= mask; }
 
     // Sets the bit at the given index to true.
     void Set(uint32_t idx) {
@@ -399,11 +438,81 @@
       PERFETTO_DCHECK(idx < kBits);
 
       // And the integer of all bits set apart from |idx| with the word.
-      word_ &= ~(1ull << idx);
+      *word_ &= ~(1ull << idx);
     }
 
     // Clears all the bits (i.e. sets the atom to zero).
-    void ClearAll() { word_ = 0; }
+    void ClearAll() { *word_ = 0; }
+
+    // Retains all bits up to and including the bit at |idx| and clears
+    // all bits after this point.
+    void ClearAfter(uint32_t idx) {
+      PERFETTO_DCHECK(idx < kBits);
+      *word_ = WordUntil(idx);
+    }
+
+    // Sets all bits between the bit at |start| and |end| (inclusive).
+    void Set(uint32_t start, uint32_t end) {
+      uint32_t diff = end - start;
+      *word_ |= (MaskAllBitsSetUntil(diff) << static_cast<uint64_t>(start));
+    }
+
+    // Return a mask of all the bits up to and including bit at |idx|.
+    static uint64_t MaskAllBitsSetUntil(uint32_t idx) {
+      // Start with 1 and shift it up (idx + 1) bits we get:
+      // top : 00000000010000000
+      uint64_t top = 1ull << ((idx + 1ull) % kBits);
+
+      // We need to handle the case where idx == 63. In this case |top| will be
+      // zero because 1 << ((idx + 1) % 64) == 1 << (64 % 64) == 1.
+      // In this case, we actually want top == 0. We can do this by shifting
+      // down by (idx + 1) / kBits - this will be a noop for every index other
+      // than idx == 63. This should also be free on x86 because of the mod
+      // instruction above.
+      top = top >> ((idx + 1) / kBits);
+
+      // Then if we take away 1, we get precisely the mask we want.
+      return top - 1u;
+    }
+
+   private:
+    // Returns the bits up to and including the bit at |idx|.
+    uint64_t WordUntil(uint32_t idx) const {
+      PERFETTO_DCHECK(idx < kBits);
+
+      // To understand what is happeninng here, consider an example.
+      // Suppose we want to all the bits up to the 7th bit in the atom
+      //               7th
+      //                |
+      //                v
+      // atom: 01010101011111000
+      //
+      // The easiest way to do this would be if we had a mask with only
+      // the bottom 7 bits set:
+      // mask: 00000000001111111
+      uint64_t mask = MaskAllBitsSetUntil(idx);
+
+      // Finish up by and'ing the atom with the computed mask.
+      return *word_ & mask;
+    }
+
+    uint64_t* word_;
+  };
+
+  class ConstBitWord {
+   public:
+    static constexpr uint32_t kBits = 64;
+
+    explicit ConstBitWord(const uint64_t* word) : word_(word) {}
+
+    // Returns whether the bit at the given index is set.
+    bool IsSet(uint32_t idx) const {
+      PERFETTO_DCHECK(idx < kBits);
+      return (*word_ >> idx) & 1ull;
+    }
+
+    // Bitwise not.
+    uint64_t Not() const { return ~(*word_); }
 
     // Returns the index of the nth set bit.
     // Undefined if |n| >= |CountSetBits()|.
@@ -425,13 +534,14 @@
       //
       // The code below was taken from the paper
       // http://vigna.di.unimi.it/ftp/papers/Broadword.pdf
-      uint64_t s = word_ - ((word_ & 0xAAAAAAAAAAAAAAAA) >> 1);
+      uint64_t s = *word_ - ((*word_ & 0xAAAAAAAAAAAAAAAA) >> 1);
       s = (s & 0x3333333333333333) + ((s >> 2) & 0x3333333333333333);
       s = ((s + (s >> 4)) & 0x0F0F0F0F0F0F0F0F) * L8;
 
       uint64_t b = (BwLessThan(s, n * L8) >> 7) * L8 >> 53 & ~7ull;
       uint64_t l = n - ((s << 8) >> b & 0xFF);
-      s = (BwGtZero(((word_ >> b & 0xFF) * L8) & 0x8040201008040201) >> 7) * L8;
+      s = (BwGtZero(((*word_ >> b & 0xFF) * L8) & 0x8040201008040201) >> 7) *
+          L8;
 
       uint64_t ret = b + ((BwLessThan(s, l * L8) >> 7) * L8 >> 56);
 
@@ -440,7 +550,7 @@
 
     // Returns the number of set bits.
     uint32_t CountSetBits() const {
-      return static_cast<uint32_t>(PERFETTO_POPCOUNT(word_));
+      return static_cast<uint32_t>(PERFETTO_POPCOUNT(*word_));
     }
 
     // Returns the number of set bits up to and including the bit at |idx|.
@@ -449,19 +559,6 @@
       return static_cast<uint32_t>(PERFETTO_POPCOUNT(WordUntil(idx)));
     }
 
-    // Retains all bits up to and including the bit at |idx| and clears
-    // all bits after this point.
-    void ClearAfter(uint32_t idx) {
-      PERFETTO_DCHECK(idx < kBits);
-      word_ = WordUntil(idx);
-    }
-
-    // Sets all bits between the bit at |start| and |end| (inclusive).
-    void Set(uint32_t start, uint32_t end) {
-      uint32_t diff = end - start;
-      word_ |= (MaskAllBitsSetUntil(diff) << static_cast<uint64_t>(start));
-    }
-
    private:
     // Constant with all the low bit of every byte set.
     static constexpr uint64_t L8 = 0x0101010101010101;
@@ -497,31 +594,13 @@
       // The easiest way to do this would be if we had a mask with only
       // the bottom 7 bits set:
       // mask: 00000000001111111
-      uint64_t mask = MaskAllBitsSetUntil(idx);
+      uint64_t mask = BitWord::MaskAllBitsSetUntil(idx);
 
       // Finish up by and'ing the atom with the computed mask.
-      return word_ & mask;
+      return *word_ & mask;
     }
 
-    // Return a mask of all the bits up to and including bit at |idx|.
-    static uint64_t MaskAllBitsSetUntil(uint32_t idx) {
-      // Start with 1 and shift it up (idx + 1) bits we get:
-      // top : 00000000010000000
-      uint64_t top = 1ull << ((idx + 1ull) % kBits);
-
-      // We need to handle the case where idx == 63. In this case |top| will be
-      // zero because 1 << ((idx + 1) % 64) == 1 << (64 % 64) == 1.
-      // In this case, we actually want top == 0. We can do this by shifting
-      // down by (idx + 1) / kBits - this will be a noop for every index other
-      // than idx == 63. This should also be free on x86 because of the mod
-      // instruction above.
-      top = top >> ((idx + 1) / kBits);
-
-      // Then if we take away 1, we get precisely the mask we want.
-      return top - 1u;
-    }
-
-    uint64_t word_ = 0;
+    const uint64_t* word_;
   };
 
   // Represents a group of bits with a bitcount such that it is
@@ -539,25 +618,102 @@
     static constexpr uint16_t kWords = 8;
     static constexpr uint32_t kBits = kWords * BitWord::kBits;
 
-    // Returns whether the bit at the given address is set.
-    bool IsSet(const BlockOffset& addr) const {
-      PERFETTO_DCHECK(addr.word_idx < kWords);
-
-      return words_[addr.word_idx].IsSet(addr.bit_idx);
-    }
+    explicit Block(uint64_t* start_word) : start_word_(start_word) {}
 
     // Sets the bit at the given address to true.
     void Set(const BlockOffset& addr) {
       PERFETTO_DCHECK(addr.word_idx < kWords);
-
-      words_[addr.word_idx].Set(addr.bit_idx);
+      BitWord(&start_word_[addr.word_idx]).Set(addr.bit_idx);
     }
 
     // Sets the bit at the given address to false.
     void Clear(const BlockOffset& addr) {
       PERFETTO_DCHECK(addr.word_idx < kWords);
 
-      words_[addr.word_idx].Clear(addr.bit_idx);
+      BitWord(&start_word_[addr.word_idx]).Clear(addr.bit_idx);
+    }
+
+    // Retains all bits up to and including the bit at |addr| and clears
+    // all bits after this point.
+    void ClearAfter(const BlockOffset& offset) {
+      PERFETTO_DCHECK(offset.word_idx < kWords);
+
+      // In the first atom, keep the bits until the address specified.
+      BitWord(&start_word_[offset.word_idx]).ClearAfter(offset.bit_idx);
+
+      // For all subsequent atoms, we just clear the whole atom.
+      for (uint32_t i = offset.word_idx + 1; i < kWords; ++i) {
+        BitWord(&start_word_[i]).ClearAll();
+      }
+    }
+
+    // Set all the bits between the offsets given by |start| and |end|
+    // (inclusive).
+    void Set(const BlockOffset& start, const BlockOffset& end) {
+      if (start.word_idx == end.word_idx) {
+        // If there is only one word we will change, just set the range within
+        // the word.
+        BitWord(&start_word_[start.word_idx]).Set(start.bit_idx, end.bit_idx);
+        return;
+      }
+
+      // Otherwise, we have more than one word to set. To do this, we will
+      // do this in three steps.
+
+      // First, we set the first word from the start to the end of the word.
+      BitWord(&start_word_[start.word_idx])
+          .Set(start.bit_idx, BitWord::kBits - 1);
+
+      // Next, we set all words (except the last).
+      for (uint32_t i = start.word_idx + 1; i < end.word_idx; ++i) {
+        BitWord(&start_word_[i]).Set(0, BitWord::kBits - 1);
+      }
+
+      // Finally, we set the word block from the start to the end offset.
+      BitWord(&start_word_[end.word_idx]).Set(0, end.bit_idx);
+    }
+
+    template <typename Filler>
+    void FromFiller(uint32_t offset, Filler f) {
+      // We choose to iterate the bits as the outer loop as this allows us
+      // to reuse the mask and the bit offset between iterations of the loop.
+      // This makes a small (but noticable) impact in the performance of this
+      // function.
+      for (uint32_t i = 0; i < BitWord::kBits; ++i) {
+        uint64_t mask = 1ull << i;
+        uint32_t offset_with_bit = offset + i;
+        for (uint32_t j = 0; j < Block::kWords; ++j) {
+          bool res = f(offset_with_bit + j * BitWord::kBits);
+          BitWord(&start_word_[j]).Or(res ? mask : 0);
+        }
+      }
+    }
+
+    void ReplaceWith(Block block) {
+      for (uint32_t i = 0; i < BitWord::kBits; ++i) {
+        start_word_[i] = block.start_word()[i];
+      }
+    }
+
+    uint64_t* start_word() { return start_word_; }
+
+   private:
+    uint64_t* start_word_;
+  };
+
+  class ConstBlock {
+   public:
+    // See class documentation for how these constants are chosen.
+    static constexpr uint16_t kWords = Block::kWords;
+    static constexpr uint32_t kBits = kWords * BitWord::kBits;
+
+    explicit ConstBlock(const uint64_t* start_word) : start_word_(start_word) {}
+    explicit ConstBlock(Block block) : start_word_(block.start_word()) {}
+
+    // Returns whether the bit at the given address is set.
+    bool IsSet(const BlockOffset& addr) const {
+      PERFETTO_DCHECK(addr.word_idx < kWords);
+      return ConstBitWord(start_word_ + addr.word_idx).IsSet(addr.bit_idx);
     }
 
     // Gets the offset of the nth set bit in this block.
@@ -565,21 +721,23 @@
       uint32_t count = 0;
       for (uint16_t i = 0; i < kWords; ++i) {
         // Keep a running count of all the set bits in the atom.
-        uint32_t value = count + words_[i].CountSetBits();
+        uint32_t value = count + ConstBitWord(start_word_ + i).CountSetBits();
         if (value <= n) {
           count = value;
           continue;
         }
 
-        // The running count of set bits is more than |n|. That means this atom
-        // contains the bit we are looking for.
+        // The running count of set bits is more than |n|. That means this
+        // atom contains the bit we are looking for.
 
-        // Take away the number of set bits to the start of this atom from |n|.
+        // Take away the number of set bits to the start of this atom from
+        // |n|.
         uint32_t set_in_atom = n - count;
 
         // Figure out the index of the set bit inside the atom and create the
         // address of this bit from that.
-        uint16_t bit_idx = words_[i].IndexOfNthSet(set_in_atom);
+        uint16_t bit_idx =
+            ConstBitWord(start_word_ + i).IndexOfNthSet(set_in_atom);
         PERFETTO_DCHECK(bit_idx < 64);
         return BlockOffset{i, bit_idx};
       }
@@ -595,95 +753,57 @@
       // index.
       uint32_t count = 0;
       for (uint32_t i = 0; i < addr.word_idx; ++i) {
-        count += words_[i].CountSetBits();
+        count += ConstBitWord(&start_word_[i]).CountSetBits();
       }
 
       // For the last atom, only count the bits upto and including the bit
       // index.
-      return count + words_[addr.word_idx].CountSetBits(addr.bit_idx);
+      return count + ConstBitWord(&start_word_[addr.word_idx])
+                         .CountSetBits(addr.bit_idx);
     }
 
     // Gets the number of set bits within a block up.
     uint32_t CountSetBits() const {
       uint32_t count = 0;
       for (uint32_t i = 0; i < kWords; ++i) {
-        count += words_[i].CountSetBits();
+        count += ConstBitWord(&start_word_[i]).CountSetBits();
       }
       return count;
     }
 
-    // Retains all bits up to and including the bit at |addr| and clears
-    // all bits after this point.
-    void ClearAfter(const BlockOffset& offset) {
-      PERFETTO_DCHECK(offset.word_idx < kWords);
-
-      // In the first atom, keep the bits until the address specified.
-      words_[offset.word_idx].ClearAfter(offset.bit_idx);
-
-      // For all subsequent atoms, we just clear the whole atom.
-      for (uint32_t i = offset.word_idx + 1; i < kWords; ++i) {
-        words_[i].ClearAll();
-      }
-    }
-
-    // Set all the bits between the offsets given by |start| and |end|
-    // (inclusive).
-    void Set(const BlockOffset& start, const BlockOffset& end) {
-      if (start.word_idx == end.word_idx) {
-        // If there is only one word we will change, just set the range within
-        // the word.
-        words_[start.word_idx].Set(start.bit_idx, end.bit_idx);
-        return;
-      }
-
-      // Otherwise, we have more than one word to set. To do this, we will
-      // do this in three steps.
-
-      // First, we set the first word from the start to the end of the word.
-      words_[start.word_idx].Set(start.bit_idx, BitWord::kBits - 1);
-
-      // Next, we set all words (except the last).
-      for (uint32_t i = start.word_idx + 1; i < end.word_idx; ++i) {
-        words_[i].Set(0, BitWord::kBits - 1);
-      }
-
-      // Finally, we set the word block from the start to the end offset.
-      words_[end.word_idx].Set(0, end.bit_idx);
-    }
-
-    template <typename Filler>
-    static Block FromFiller(uint32_t offset, Filler f) {
-      // We choose to iterate the bits as the outer loop as this allows us
-      // to reuse the mask and the bit offset between iterations of the loop.
-      // This makes a small (but noticable) impact in the performance of this
-      // function.
-      Block b;
-      for (uint32_t i = 0; i < BitWord::kBits; ++i) {
-        uint64_t mask = 1ull << i;
-        uint32_t offset_with_bit = offset + i;
-        for (uint32_t j = 0; j < Block::kWords; ++j) {
-          bool res = f(offset_with_bit + j * BitWord::kBits);
-          b.words_[j].Or(res ? mask : 0);
-        }
-      }
-      return b;
-    }
-
    private:
-    std::array<BitWord, kWords> words_{};
+    const uint64_t* start_word_;
   };
 
-  BitVector(std::vector<Block> blocks,
+  BitVector(std::vector<uint64_t> words,
             std::vector<uint32_t> counts,
             uint32_t size);
 
   BitVector(const BitVector&) = delete;
   BitVector& operator=(const BitVector&) = delete;
 
+  // Returns the number of 8 elements blocks in the bitvector.
+  uint32_t BlockCount() {
+    return static_cast<uint32_t>(words_.size()) / Block::kWords;
+  }
+
+  Block BlockFromIndex(uint32_t idx) {
+    PERFETTO_DCHECK(Block::kWords * (idx + 1) <= words_.size());
+
+    uint64_t* start_word = &words_[Block::kWords * idx];
+    return Block(start_word);
+  }
+
+  ConstBlock ConstBlockFromIndex(uint32_t idx) const {
+    PERFETTO_DCHECK(Block::kWords * (idx + 1) <= words_.size());
+
+    return ConstBlock(&words_[Block::kWords * idx]);
+  }
+
   // Set all the bits between the addresses given by |start| and |end|
   // (inclusive).
   // Note: this method does not update the counts vector - that is the
-  // responibility of the caller.
+  // responsibility of the caller.
   void Set(const Address& start, const Address& end) {
     static constexpr BlockOffset kFirstBlockOffset = BlockOffset{0, 0};
     static constexpr BlockOffset kLastBlockOffset =
@@ -692,7 +812,7 @@
     if (start.block_idx == end.block_idx) {
       // If there is only one block we will change, just set the range within
       // the block.
-      blocks_[start.block_idx].Set(start.block_offset, end.block_offset);
+      BlockFromIndex(start.block_idx).Set(start.block_offset, end.block_offset);
       return;
     }
 
@@ -700,15 +820,16 @@
     // do this in three steps.
 
     // First, we set the first block from the start to the end of the block.
-    blocks_[start.block_idx].Set(start.block_offset, kLastBlockOffset);
+    BlockFromIndex(start.block_idx).Set(start.block_offset, kLastBlockOffset);
 
     // Next, we set all blocks (except the last).
-    for (uint32_t i = start.block_idx + 1; i < end.block_idx; ++i) {
-      blocks_[i].Set(kFirstBlockOffset, kLastBlockOffset);
+    for (uint32_t cur_block_idx = start.block_idx + 1;
+         cur_block_idx < end.block_idx; ++cur_block_idx) {
+      BlockFromIndex(cur_block_idx).Set(kFirstBlockOffset, kLastBlockOffset);
     }
 
     // Finally, we set the last block from the start to the end offset.
-    blocks_[end.block_idx].Set(kFirstBlockOffset, end.block_offset);
+    BlockFromIndex(end.block_idx).Set(kFirstBlockOffset, end.block_offset);
   }
 
   // Helper function to append a bit. Generally, prefer to call AppendTrue
@@ -722,11 +843,15 @@
     }
   }
 
-  // Returns the number of words which would be required to store a bit at
-  // |idx|.
-  static uint32_t WordCeil(uint32_t idx) {
-    // See |BlockCeil| for an explanation of this trick.
-    return (idx + BitWord::kBits - 1) / BitWord::kBits;
+  // Returns the index of the word which would store |idx|.
+  static constexpr uint32_t WordFloor(uint32_t idx) {
+    return idx / BitWord::kBits;
+  }
+
+  // Returns number of words (int64_t) required to store |bit_count| bits.
+  static uint32_t WordCount(uint32_t bit_count) {
+    // See |BlockCount| for an explanation of this trick.
+    return (bit_count + BitWord::kBits - 1) / BitWord::kBits;
   }
 
   static Address IndexToAddress(uint32_t idx) {
@@ -745,17 +870,16 @@
            addr.block_offset.bit_idx;
   }
 
-  // Rounds |idx| up to the nearest block boundary and returns the block
-  // index. If |idx| is already on a block boundary, the current block is
-  // returned.
+  // Returns number of blocks (arrays of 8 int64_t) required to store
+  // |bit_count| bits.
   //
-  // This is useful to be able to find indices where "fast" algorithms can start
-  // which work on entire blocks.
-  static constexpr uint32_t BlockCeil(uint32_t idx) {
-    // Adding |Block::kBits - 1| gives us a quick way to get the ceil. We
+  // This is useful to be able to find indices where "fast" algorithms can
+  // start which work on entire blocks.
+  static constexpr uint32_t BlockCount(uint32_t bit_count) {
+    // Adding |Block::kBits - 1| gives us a quick way to get the count. We
     // do this instead of adding 1 at the end because that gives incorrect
-    // answers for index % Block::kBits == 0.
-    return (idx + Block::kBits - 1) / Block::kBits;
+    // answers for bit_count % Block::kBits == 0.
+    return (bit_count + Block::kBits - 1) / Block::kBits;
   }
 
   // Returns the index of the block which would store |idx|.
@@ -764,13 +888,16 @@
   }
 
   // Converts a block index to a index in the BitVector.
-  static constexpr uint32_t BlockToIndex(uint32_t block) {
-    return block * Block::kBits;
+  static constexpr uint32_t BlockToIndex(uint32_t block_idx) {
+    return block_idx * Block::kBits;
   }
 
   uint32_t size_ = 0;
+  // See class documentation for how these constants are chosen.
+  static constexpr uint16_t kWordsInBlock = Block::kWords;
+  static constexpr uint32_t kBitsInBlock = kWordsInBlock * BitWord::kBits;
   std::vector<uint32_t> counts_;
-  std::vector<Block> blocks_;
+  std::vector<uint64_t> words_;
 };
 
 }  // namespace trace_processor
diff --git a/src/trace_processor/containers/bit_vector_iterators.cc b/src/trace_processor/containers/bit_vector_iterators.cc
index 482655e..076a129 100644
--- a/src/trace_processor/containers/bit_vector_iterators.cc
+++ b/src/trace_processor/containers/bit_vector_iterators.cc
@@ -20,18 +20,13 @@
 namespace trace_processor {
 namespace internal {
 
-BaseIterator::BaseIterator(BitVector* bv) : bv_(bv) {
-  size_ = bv->size();
-
-  if (size_ > 0) {
-    block_ = bv_->blocks_[0];
-  }
-}
+BaseIterator::BaseIterator(BitVector* bv)
+    : size_(bv->size()), bv_(bv), block_(bv_->words_.data()) {}
 
 BaseIterator::~BaseIterator() {
   if (size_ > 0) {
-    uint32_t block_idx = index_ / BitVector::Block::kBits;
-    uint32_t last_block_idx = static_cast<uint32_t>(bv_->blocks_.size()) - 1;
+    uint32_t block_idx = bv_->IndexToAddress(index_).block_idx;
+    uint32_t last_block_idx = bv_->BlockCount() - 1;
 
     // If |index_| == |size_| and the last index was on a block boundary, we
     // can end up one block past the end of the bitvector. Take the
@@ -40,19 +35,15 @@
   }
 }
 
-void BaseIterator::OnBlockChange(uint32_t old_block, uint32_t new_block) {
-  // If we touched the current block, flush the block to the bitvector.
-  if (is_block_changed_) {
-    bv_->blocks_[old_block] = block_;
-  }
-
+void BaseIterator::OnBlockChange(uint32_t old_block_idx,
+                                 uint32_t new_block_idx) {
   if (set_bit_count_diff_ != 0) {
     // If the count of set bits has changed, go through all the counts between
     // the old and new blocks and modify them.
     // We only need to go to new_block and not to the end of the bitvector as
     // the blocks after new_block will either be updated in a future call to
     // OnBlockChange or in the destructor.
-    for (uint32_t i = old_block + 1; i <= new_block; ++i) {
+    for (uint32_t i = old_block_idx + 1; i <= new_block_idx; ++i) {
       int32_t new_count =
           static_cast<int32_t>(bv_->counts_[i]) + set_bit_count_diff_;
       PERFETTO_DCHECK(new_count >= 0);
@@ -63,7 +54,7 @@
 
   // Reset the changed flag and cache the new block.
   is_block_changed_ = false;
-  block_ = bv_->blocks_[new_block];
+  block_ = bv_->BlockFromIndex(new_block_idx);
 }
 
 AllBitsIterator::AllBitsIterator(const BitVector* bv)
@@ -110,7 +101,8 @@
     }
 
     // If the bit is not set, just bail out.
-    const auto& block = bv().blocks_[addr.block_idx];
+    const BitVector::ConstBlock& block =
+        bv().ConstBlockFromIndex(addr.block_idx);
     if (!block.IsSet(addr.block_offset))
       continue;
 
diff --git a/src/trace_processor/containers/bit_vector_iterators.h b/src/trace_processor/containers/bit_vector_iterators.h
index 62094ff..e4ee878 100644
--- a/src/trace_processor/containers/bit_vector_iterators.h
+++ b/src/trace_processor/containers/bit_vector_iterators.h
@@ -57,7 +57,7 @@
   }
 
   // Returns whether the current bit the iterator points to is set.
-  bool IsSet() { return block_.IsSet(block_offset()); }
+  bool IsSet() { return BitVector::ConstBlock(block_).IsSet(block_offset()); }
 
   // Returns the index of the current bit the iterator points to.
   uint32_t index() const { return index_; }
@@ -79,8 +79,8 @@
     if (index >= size_)
       return;
 
-    uint32_t old_block = old_index / BitVector::Block::kBits;
-    uint32_t new_block = index / BitVector::Block::kBits;
+    uint32_t old_block = bv_->IndexToAddress(old_index).block_idx;
+    uint32_t new_block = bv_->IndexToAddress(index).block_idx;
 
     // Fast path: we're in the same block so we don't need to do
     // any other work.
@@ -88,12 +88,11 @@
       return;
 
     // Slow path: we have to change block so this will involve flushing the old
-    // block and counts (if necessary) and caching the new block.
+    // block and counts (if necessary).
     OnBlockChange(old_block, new_block);
   }
 
-  // Handles flushing count changes and modified blocks to the bitvector
-  // and caching the new block.
+  // Handles flushing count changes and caches a new block.
   void OnBlockChange(uint32_t old_block, uint32_t new_block);
 
   uint32_t size() const { return size_; }
@@ -119,9 +118,8 @@
   bool is_block_changed_ = false;
   int32_t set_bit_count_diff_ = 0;
 
-  BitVector* bv_ = nullptr;
-
-  BitVector::Block block_{};
+  BitVector* bv_;
+  BitVector::Block block_{bv_->words_.data()};
 };
 
 // Iterator over all the bits in a bitvector.
diff --git a/src/trace_processor/containers/bit_vector_unittest.cc b/src/trace_processor/containers/bit_vector_unittest.cc
index 40b061b..3db984c 100644
--- a/src/trace_processor/containers/bit_vector_unittest.cc
+++ b/src/trace_processor/containers/bit_vector_unittest.cc
@@ -215,10 +215,12 @@
 TEST(BitVectorUnittest, AppendAfterResizeDown) {
   BitVector bv(2049, false);
   bv.Set(2048);
-
+  ASSERT_TRUE(bv.IsSet(2048));
   bv.Resize(2048);
+  ASSERT_EQ(bv.size(), 2048u);
   bv.AppendFalse();
-  ASSERT_EQ(bv.IsSet(2048), false);
+  ASSERT_EQ(bv.size(), 2049u);
+  ASSERT_FALSE(bv.IsSet(2048));
   ASSERT_EQ(bv.CountSetBits(), 0u);
 }
 
@@ -450,18 +452,181 @@
   ASSERT_FALSE(it);
 }
 
+TEST(BitVectorUnittest, IntersectRange) {
+  BitVector bv = BitVector::Range(1, 20, [](uint32_t t) { return t % 2 == 0; });
+  BitVector intersected = bv.IntersectRange(3, 10);
+
+  ASSERT_EQ(intersected.IndexOfNthSet(0), 4u);
+  ASSERT_EQ(intersected.CountSetBits(), 3u);
+}
+
+TEST(BitVectorUnittest, IntersectRangeFromStart) {
+  BitVector bv = BitVector::Range(1, 20, [](uint32_t t) { return t % 2 == 0; });
+  BitVector intersected = bv.IntersectRange(0, 10);
+
+  ASSERT_EQ(intersected.IndexOfNthSet(0), 2u);
+  ASSERT_EQ(intersected.CountSetBits(), 4u);
+}
+
+TEST(BitVectorUnittest, IntersectRange2) {
+  BitVector bv{true, false, true, true, false, true};
+  BitVector intersected = bv.IntersectRange(2, 4);
+
+  ASSERT_EQ(intersected.IndexOfNthSet(0), 2u);
+}
+
+TEST(BitVectorUnittest, IntersectRangeAfterWord) {
+  BitVector bv =
+      BitVector::Range(64 + 1, 64 + 20, [](uint32_t t) { return t % 2 == 0; });
+  BitVector intersected = bv.IntersectRange(64 + 3, 64 + 10);
+
+  ASSERT_EQ(intersected.IndexOfNthSet(0), 64 + 4u);
+  ASSERT_EQ(intersected.CountSetBits(), 3u);
+}
+
+TEST(BitVectorUnittest, IntersectRangeSetBitsBeforeRange) {
+  BitVector bv = BitVector::Range(10, 30, [](uint32_t t) { return t < 15; });
+  BitVector intersected = bv.IntersectRange(16, 50);
+
+  ASSERT_FALSE(intersected.CountSetBits());
+}
+
+TEST(BitVectorUnittest, IntersectRangeSetBitOnBoundary) {
+  BitVector bv = BitVector(10, false);
+  bv.Set(5);
+  BitVector intersected = bv.IntersectRange(5, 20);
+
+  ASSERT_EQ(intersected.CountSetBits(), 1u);
+  ASSERT_EQ(intersected.IndexOfNthSet(0), 5u);
+}
+
+TEST(BitVectorUnittest, IntersectRangeStressTest) {
+  BitVector bv =
+      BitVector::Range(65, 1024 + 1, [](uint32_t t) { return t % 2 == 0; });
+  BitVector intersected = bv.IntersectRange(30, 500);
+
+  ASSERT_EQ(intersected.IndexOfNthSet(0), 66u);
+  ASSERT_EQ(intersected.CountSetBits(), 217u);
+}
+
 TEST(BitVectorUnittest, Range) {
+  BitVector bv = BitVector::Range(1, 9, [](uint32_t t) { return t % 3 == 0; });
+  ASSERT_EQ(bv.size(), 9u);
+
+  ASSERT_FALSE(bv.IsSet(0));
+  ASSERT_TRUE(bv.IsSet(3));
+  ASSERT_TRUE(bv.IsSet(6));
+
+  ASSERT_EQ(bv.CountSetBits(), 2u);
+}
+
+TEST(BitVectorUnittest, RangeStressTest) {
   BitVector bv =
       BitVector::Range(1, 1025, [](uint32_t t) { return t % 3 == 0; });
-
+  ASSERT_EQ(bv.size(), 1025u);
   ASSERT_FALSE(bv.IsSet(0));
   for (uint32_t i = 1; i < 1025; ++i) {
     ASSERT_EQ(i % 3 == 0, bv.IsSet(i));
   }
-  ASSERT_EQ(bv.size(), 1025u);
   ASSERT_EQ(bv.CountSetBits(), 341u);
 }
 
+TEST(BitVectorUnittest, BuilderSkip) {
+  BitVector::Builder builder(128);
+
+  builder.Skip(127);
+  builder.Append(1);
+
+  BitVector bv = std::move(builder).Build();
+  ASSERT_EQ(bv.size(), 128u);
+
+  ASSERT_FALSE(bv.IsSet(10));
+  ASSERT_FALSE(bv.IsSet(126));
+  ASSERT_TRUE(bv.IsSet(127));
+}
+
+TEST(BitVectorUnittest, BuilderBitsInCompleteWordsUntilFull) {
+  BitVector::Builder builder(128 + 1);
+
+  ASSERT_EQ(builder.BitsInCompleteWordsUntilFull(), 128u);
+}
+
+TEST(BitVectorUnittest, BuilderBitsUntilWordBoundaryOrFull) {
+  BitVector::Builder builder(41);
+
+  ASSERT_EQ(builder.BitsUntilWordBoundaryOrFull(), 41u);
+}
+
+TEST(BitVectorUnittest, Builder) {
+  BitVector::Builder builder(128);
+
+  // 100100011010001010110011110001001 as a hex literal.
+  builder.AppendWord(0x123456789);
+  builder.AppendWord(0xFF);
+
+  BitVector bv = std::move(builder).Build();
+  ASSERT_EQ(bv.size(), 128u);
+
+  ASSERT_TRUE(bv.IsSet(0));
+  ASSERT_FALSE(bv.IsSet(1));
+  ASSERT_FALSE(bv.IsSet(2));
+}
+
+TEST(BitVectorUnittest, BuilderStressTest) {
+  // Space for 128 words and 1 bit
+  uint32_t size = 8 * 1024 + 1;
+  BitVector::Builder builder(size);
+
+  // 15 full words + 40 bits
+  for (uint32_t i = 0; i < 1000; ++i) {
+    builder.Append(1);
+  }
+  ASSERT_EQ(builder.BitsUntilFull(), size - 1000);
+
+  // 24 bits to hit word boundary. We filled 16 words now.
+  for (uint32_t i = 0; i < 24; ++i) {
+    builder.Append(0);
+  }
+  ASSERT_EQ(builder.BitsUntilFull(), size - 1024);
+  ASSERT_EQ(builder.BitsUntilWordBoundaryOrFull(), 0u);
+
+  // 100100011010001010110011110001001 as a hex literal.
+  uint64_t word = 0x123456789;
+
+  // Add all of the remaining words.
+  ASSERT_EQ(builder.BitsInCompleteWordsUntilFull(), (128 - 16) * 64u);
+  ASSERT_EQ(builder.BitsUntilFull(), (128 - 16) * 64u + 1);
+  for (uint32_t i = 0; i < (128 - 16); ++i) {
+    builder.AppendWord(word);
+  }
+
+  ASSERT_EQ(builder.BitsUntilWordBoundaryOrFull(), 0u);
+  ASSERT_EQ(builder.BitsUntilFull(), 1u);
+
+  // One last bit.
+  builder.Append(1);
+
+  BitVector bv = std::move(builder).Build();
+  ASSERT_EQ(bv.size(), 8u * 1024u + 1u);
+
+  ASSERT_TRUE(bv.IsSet(0));
+  ASSERT_FALSE(bv.IsSet(1000));
+
+  ASSERT_TRUE(bv.IsSet(1024));
+  ASSERT_FALSE(bv.IsSet(1025));
+
+  ASSERT_TRUE(bv.IsSet(8 * 1024));
+}
+
+TEST(BitVectorUnittest, Not) {
+  BitVector bv(10);
+  bv.Set(2);
+
+  BitVector not_bv = bv.Not();
+  EXPECT_FALSE(not_bv.IsSet(2));
+  EXPECT_EQ(not_bv.CountSetBits(), 9u);
+}
+
 TEST(BitVectorUnittest, QueryStressTest) {
   BitVector bv;
   std::vector<bool> bool_vec;
diff --git a/src/trace_processor/containers/nullable_vector.h b/src/trace_processor/containers/nullable_vector.h
index 0880b12..4e11a86 100644
--- a/src/trace_processor/containers/nullable_vector.h
+++ b/src/trace_processor/containers/nullable_vector.h
@@ -70,12 +70,11 @@
   // Returns the optional value at |idx| or std::nullopt if the value is null.
   std::optional<T> Get(uint32_t idx) const {
     bool contains = valid_.IsSet(idx);
-    if (mode_ == Mode::kDense) {
+    if (mode_ == Mode::kDense)
       return contains ? std::make_optional(data_[idx]) : std::nullopt;
-    } else {
-      return contains ? std::make_optional(data_[valid_.CountSetBits(idx)])
-                      : std::nullopt;
-    }
+
+    return contains ? std::make_optional(data_[valid_.CountSetBits(idx)])
+                    : std::nullopt;
   }
 
   // Adds the given value to the NullableVector.
@@ -124,6 +123,9 @@
   // Returns whether data in this NullableVector is stored densely.
   bool IsDense() const { return mode_ == Mode::kDense; }
 
+  const std::vector<T>& non_null_vector() const { return data_; }
+  const BitVector& non_null_bit_vector() const { return valid_; }
+
  private:
   explicit NullableVector(Mode mode) : mode_(mode) {}
 
diff --git a/src/trace_processor/containers/row_map.cc b/src/trace_processor/containers/row_map.cc
index b3d1d59..d00d487 100644
--- a/src/trace_processor/containers/row_map.cc
+++ b/src/trace_processor/containers/row_map.cc
@@ -15,6 +15,7 @@
  */
 
 #include "src/trace_processor/containers/row_map.h"
+#include <unordered_set>
 
 #include "src/trace_processor/containers/row_map_algorithms.h"
 
@@ -23,22 +24,19 @@
 
 namespace {
 
-RowMap SelectRangeWithRange(uint32_t start,
-                            uint32_t end,
-                            uint32_t selector_start,
-                            uint32_t selector_end) {
-  PERFETTO_DCHECK(start <= end);
-  PERFETTO_DCHECK(selector_start <= selector_end);
-  PERFETTO_DCHECK(selector_end <= end - start);
+using Range = RowMap::Range;
+using OutputIndex = RowMap::OutputIndex;
+using Variant = std::variant<Range, BitVector, std::vector<OutputIndex>>;
 
-  return RowMap(start + selector_start, start + selector_end);
+RowMap Select(Range range, Range selector) {
+  PERFETTO_DCHECK(selector.start <= selector.end);
+  PERFETTO_DCHECK(selector.end <= range.size());
+
+  return RowMap(range.start + selector.start, range.start + selector.end);
 }
 
-RowMap SelectRangeWithBv(uint32_t start,
-                         uint32_t end,
-                         const BitVector& selector) {
-  PERFETTO_DCHECK(start <= end);
-  PERFETTO_DCHECK(selector.size() <= end - start);
+RowMap Select(Range range, const BitVector& selector) {
+  PERFETTO_DCHECK(selector.size() <= range.size());
 
   // If |start| == 0 and |selector.size()| <= |end - start| (which is a
   // precondition for this function), the BitVector we generate is going to be
@@ -48,60 +46,52 @@
   // SelectRows is called on all the table RowMaps with a BitVector. The self
   // RowMap will always be a range so we expect this case to be hit at least
   // once every filter operation.
-  if (start == 0u)
+  if (range.start == 0u)
     return RowMap(selector.Copy());
 
   // We only need to resize to |start| + |selector.size()| as we know any rows
   // not covered by |selector| are going to be removed below.
-  BitVector bv(start, false);
-  bv.Resize(start + selector.size(), true);
+  BitVector bv(range.start, false);
+  bv.Resize(range.start + selector.size(), true);
 
   bv.UpdateSetBits(selector);
   return RowMap(std::move(bv));
 }
 
-RowMap SelectRangeWithIv(uint32_t start,
-                         uint32_t end,
-                         const std::vector<uint32_t>& selector) {
-  PERFETTO_DCHECK(start <= end);
-
+RowMap Select(Range range, const std::vector<OutputIndex>& selector) {
   std::vector<uint32_t> iv(selector.size());
   for (uint32_t i = 0; i < selector.size(); ++i) {
-    PERFETTO_DCHECK(selector[i] < end - start);
-    iv[i] = selector[i] + start;
+    PERFETTO_DCHECK(selector[i] < range.size());
+    iv[i] = selector[i] + range.start;
   }
   return RowMap(std::move(iv));
 }
 
-RowMap SelectBvWithRange(const BitVector& bv,
-                         uint32_t selector_start,
-                         uint32_t selector_end) {
-  PERFETTO_DCHECK(selector_start <= selector_end);
-  PERFETTO_DCHECK(selector_end <= bv.CountSetBits());
+RowMap Select(const BitVector& bv, Range selector) {
+  PERFETTO_DCHECK(selector.end <= bv.CountSetBits());
 
   // If we're simply selecting every element in the bitvector, just
   // return a copy of the BitVector without iterating.
   BitVector ret = bv.Copy();
-  if (selector_start == 0 && selector_end == bv.CountSetBits()) {
+  if (selector.start == 0 && selector.end == bv.CountSetBits()) {
     return RowMap(std::move(ret));
   }
 
   for (auto it = ret.IterateSetBits(); it; it.Next()) {
     auto set_idx = it.ordinal();
-    if (set_idx < selector_start || set_idx >= selector_end)
+    if (set_idx < selector.start || set_idx >= selector.end)
       it.Clear();
   }
   return RowMap(std::move(ret));
 }
 
-RowMap SelectBvWithBv(const BitVector& bv, const BitVector& selector) {
+RowMap Select(const BitVector& bv, const BitVector& selector) {
   BitVector ret = bv.Copy();
   ret.UpdateSetBits(selector);
   return RowMap(std::move(ret));
 }
 
-RowMap SelectBvWithIv(const BitVector& bv,
-                      const std::vector<uint32_t>& selector) {
+RowMap Select(const BitVector& bv, const std::vector<uint32_t>& selector) {
   // The value of this constant was found by considering the benchmarks
   // |BM_SelectBvWithIvByConvertToIv| and |BM_SelectBvWithIvByIndexOfNthSet|.
   //
@@ -130,21 +120,17 @@
       row_map_algorithms::SelectBvWithIvByIndexOfNthSet(bv, selector));
 }
 
-RowMap SelectIvWithRange(const std::vector<uint32_t>& iv,
-                         uint32_t selector_start,
-                         uint32_t selector_end) {
-  PERFETTO_DCHECK(selector_start <= selector_end);
-  PERFETTO_DCHECK(selector_end <= iv.size());
+RowMap Select(const std::vector<uint32_t>& iv, Range selector) {
+  PERFETTO_DCHECK(selector.end <= iv.size());
 
-  std::vector<uint32_t> ret(selector_end - selector_start);
-  for (uint32_t i = selector_start; i < selector_end; ++i) {
-    ret[i - selector_start] = iv[i];
+  std::vector<uint32_t> ret(selector.size());
+  for (uint32_t i = selector.start; i < selector.end; ++i) {
+    ret[i - selector.start] = iv[i];
   }
   return RowMap(std::move(ret));
 }
 
-RowMap SelectIvWithBv(const std::vector<uint32_t>& iv,
-                      const BitVector& selector) {
+RowMap Select(const std::vector<uint32_t>& iv, const BitVector& selector) {
   PERFETTO_DCHECK(selector.size() <= iv.size());
 
   std::vector<uint32_t> copy = iv;
@@ -158,83 +144,133 @@
   return RowMap(std::move(copy));
 }
 
-RowMap SelectIvWithIv(const std::vector<uint32_t>& iv,
-                      const std::vector<uint32_t>& selector) {
+RowMap Select(const std::vector<uint32_t>& iv,
+              const std::vector<uint32_t>& selector) {
   return RowMap(row_map_algorithms::SelectIvWithIv(iv, selector));
 }
 
+Variant IntersectInternal(BitVector& first, const BitVector& second) {
+  for (auto set_bit = first.IterateSetBits(); set_bit; set_bit.Next()) {
+    if (!second.IsSet(set_bit.index()))
+      set_bit.Clear();
+  }
+  return std::move(first);
+}
+
+Variant IntersectInternal(Range first, Range second) {
+  // If both RowMaps have ranges, we can just take the smallest intersection
+  // of them as the new RowMap.
+  // We have this as an explicit fast path as this is very common for
+  // constraints on id and sorted columns to satisfy this condition.
+  OutputIndex start = std::max(first.start, second.start);
+  OutputIndex end = std::max(start, std::min(first.end, second.end));
+  return Range{start, end};
+}
+
+Variant IntersectInternal(std::vector<OutputIndex>& first,
+                          const std::vector<OutputIndex>& second) {
+  std::unordered_set<OutputIndex> lookup(second.begin(), second.end());
+  first.erase(std::remove_if(first.begin(), first.end(),
+                             [lookup](OutputIndex ind) {
+                               return lookup.find(ind) == lookup.end();
+                             }),
+              first.end());
+  return std::move(first);
+}
+
+Variant IntersectInternal(Range range, const BitVector& bv) {
+  return bv.IntersectRange(range.start, range.end);
+}
+
+Variant IntersectInternal(BitVector& bv, Range range) {
+  return IntersectInternal(range, bv);
+}
+
+Variant IntersectInternal(const std::vector<OutputIndex>& index_vec,
+                          const BitVector& bv) {
+  std::vector<OutputIndex> new_vec(index_vec.begin(), index_vec.end());
+  new_vec.erase(std::remove_if(new_vec.begin(), new_vec.end(),
+                               [&bv](uint32_t i) { return !bv.IsSet(i); }),
+                new_vec.end());
+  return std::move(new_vec);
+}
+
+Variant IntersectInternal(const BitVector& bv,
+                          const std::vector<OutputIndex>& index_vec) {
+  return IntersectInternal(index_vec, bv);
+}
+
+Variant IntersectInternal(Range range,
+                          const std::vector<OutputIndex>& index_vec) {
+  std::vector<OutputIndex> new_vec(index_vec.begin(), index_vec.end());
+  new_vec.erase(std::remove_if(new_vec.begin(), new_vec.end(),
+                               [range](uint32_t i) {
+                                 return i < range.start || i >= range.end;
+                               }),
+                new_vec.end());
+  return std::move(new_vec);
+}
+
+Variant IntersectInternal(const std::vector<OutputIndex>& index_vec,
+                          Range range) {
+  return IntersectInternal(range, index_vec);
+}
+
 }  // namespace
 
-RowMap::RowMap() : RowMap(0, 0) {}
+RowMap::RowMap() : RowMap(Range()) {}
 
 RowMap::RowMap(uint32_t start, uint32_t end, OptimizeFor optimize_for)
-    : mode_(Mode::kRange),
-      start_index_(start),
-      end_index_(end),
-      optimize_for_(optimize_for) {}
+    : data_(Range{start, end}), optimize_for_(optimize_for) {}
 
-RowMap::RowMap(BitVector bit_vector)
-    : mode_(Mode::kBitVector), bit_vector_(std::move(bit_vector)) {}
+RowMap::RowMap(Variant def) : data_(std::move(def)) {}
 
-RowMap::RowMap(std::vector<uint32_t> vec)
-    : mode_(Mode::kIndexVector), index_vector_(std::move(vec)) {}
+RowMap::RowMap(Range r) : data_(r) {}
+
+// Creates a RowMap backed by a BitVector.
+RowMap::RowMap(BitVector bit_vector) : data_(std::move(bit_vector)) {}
+
+// Creates a RowMap backed by an std::vector<uint32_t>.
+RowMap::RowMap(IndexVector vec) : data_(vec) {}
 
 RowMap RowMap::Copy() const {
-  switch (mode_) {
-    case Mode::kRange:
-      return RowMap(start_index_, end_index_);
-    case Mode::kBitVector:
-      return RowMap(bit_vector_.Copy());
-    case Mode::kIndexVector:
-      return RowMap(index_vector_);
+  if (auto* range = std::get_if<Range>(&data_)) {
+    return RowMap(*range);
   }
-  PERFETTO_FATAL("For GCC");
+  if (auto* bv = std::get_if<BitVector>(&data_)) {
+    return RowMap(bv->Copy());
+  }
+  if (auto* vec = std::get_if<IndexVector>(&data_)) {
+    return RowMap(*vec);
+  }
+  NoVariantMatched();
 }
 
 RowMap RowMap::SelectRowsSlow(const RowMap& selector) const {
-  // Pick the strategy based on the selector as there is more common code
-  // between selectors of the same mode than between the RowMaps being
-  // selected of the same mode.
-  switch (selector.mode_) {
-    case Mode::kRange:
-      switch (mode_) {
-        case Mode::kRange:
-          return SelectRangeWithRange(start_index_, end_index_,
-                                      selector.start_index_,
-                                      selector.end_index_);
-        case Mode::kBitVector:
-          return SelectBvWithRange(bit_vector_, selector.start_index_,
-                                   selector.end_index_);
-        case Mode::kIndexVector:
-          return SelectIvWithRange(index_vector_, selector.start_index_,
-                                   selector.end_index_);
-      }
-      break;
-    case Mode::kBitVector:
-      switch (mode_) {
-        case Mode::kRange:
-          return SelectRangeWithBv(start_index_, end_index_,
-                                   selector.bit_vector_);
-        case Mode::kBitVector:
-          return SelectBvWithBv(bit_vector_, selector.bit_vector_);
-        case Mode::kIndexVector:
-          return SelectIvWithBv(index_vector_, selector.bit_vector_);
-      }
-      break;
-    case Mode::kIndexVector:
-      switch (mode_) {
-        case Mode::kRange:
-          return SelectRangeWithIv(start_index_, end_index_,
-                                   selector.index_vector_);
-        case Mode::kBitVector:
-          return SelectBvWithIv(bit_vector_, selector.index_vector_);
-        case Mode::kIndexVector:
-          return SelectIvWithIv(index_vector_, selector.index_vector_);
-      }
-      break;
-  }
-  PERFETTO_FATAL("For GCC");
+  return std::visit(
+      [](const auto& def, const auto& selector_def) {
+        return Select(def, selector_def);
+      },
+      data_, selector.data_);
 }
 
+void RowMap::Intersect(const RowMap& second) {
+  data_ = std::visit(
+      [](auto& def, auto& selector_def) {
+        return IntersectInternal(def, selector_def);
+      },
+      data_, second.data_);
+}
+
+RowMap::Iterator::Iterator(const RowMap* rm) : rm_(rm) {
+  if (auto* range = std::get_if<Range>(&rm_->data_)) {
+    ordinal_ = range->start;
+    return;
+  }
+  if (auto* bv = std::get_if<BitVector>(&rm_->data_)) {
+    set_bits_it_.reset(new BitVector::SetBitsIterator(bv->IterateSetBits()));
+    return;
+  }
+}
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/containers/row_map.h b/src/trace_processor/containers/row_map.h
index 8ab3915..283455c 100644
--- a/src/trace_processor/containers/row_map.h
+++ b/src/trace_processor/containers/row_map.h
@@ -21,6 +21,7 @@
 
 #include <memory>
 #include <optional>
+#include <variant>
 #include <vector>
 
 #include "perfetto/base/logging.h"
@@ -73,55 +74,24 @@
 // more efficient than a BitVector; in this case, we will make a best effort
 // switch to it but the cases where this happens is not precisely defined.
 class RowMap {
- private:
-  // We need to declare these iterator classes before RowMap::Iterator as it
-  // depends on them. However, we don't want to make these public so keep them
-  // under a special private section.
-
-  // Iterator for ranged mode of RowMap.
-  // This class should act as a drop-in replacement for
-  // BitVector::SetBitsIterator.
-  class RangeIterator {
-   public:
-    RangeIterator(const RowMap* rm) : rm_(rm), index_(rm->start_index_) {}
-
-    void Next() { ++index_; }
-
-    operator bool() const { return index_ < rm_->end_index_; }
-
-    uint32_t index() const { return index_; }
-
-    uint32_t ordinal() const { return index_ - rm_->start_index_; }
-
-   private:
-    const RowMap* rm_ = nullptr;
-    uint32_t index_ = 0;
-  };
-
-  // Iterator for index vector mode of RowMap.
-  // This class should act as a drop-in replacement for
-  // BitVector::SetBitsIterator.
-  class IndexVectorIterator {
-   public:
-    IndexVectorIterator(const RowMap* rm) : rm_(rm) {}
-
-    void Next() { ++ordinal_; }
-
-    operator bool() const { return ordinal_ < rm_->index_vector_.size(); }
-
-    uint32_t index() const { return rm_->index_vector_[ordinal_]; }
-
-    uint32_t ordinal() const { return ordinal_; }
-
-   private:
-    const RowMap* rm_ = nullptr;
-    uint32_t ordinal_ = 0;
-  };
-
  public:
-  // Input type.
   using InputRow = uint32_t;
   using OutputIndex = uint32_t;
+  using IndexVector = std::vector<OutputIndex>;
+
+  struct Range {
+    Range(OutputIndex start_index, OutputIndex end_index)
+        : start(start_index), end(end_index) {}
+    Range() : start(0), end(0) {}
+
+    OutputIndex start = 0;  // This is an inclusive index.
+    OutputIndex end = 0;    // This is an exclusive index.
+
+    uint32_t size() const {
+      PERFETTO_DCHECK(end >= start);
+      return end - start;
+    }
+  };
 
   // Allows efficient iteration over the rows of a RowMap.
   //
@@ -130,87 +100,72 @@
   // of the RowMap on every method call.
   class Iterator {
    public:
-    Iterator(const RowMap* rm) : rm_(rm) {
-      switch (rm->mode_) {
-        case Mode::kRange:
-          range_it_.reset(new RangeIterator(rm));
-          break;
-        case Mode::kBitVector:
-          set_bits_it_.reset(
-              new BitVector::SetBitsIterator(rm->bit_vector_.IterateSetBits()));
-          break;
-        case Mode::kIndexVector:
-          iv_it_.reset(new IndexVectorIterator(rm));
-          break;
-      }
-    }
+    explicit Iterator(const RowMap* rm);
 
     Iterator(Iterator&&) noexcept = default;
     Iterator& operator=(Iterator&&) = default;
 
     // Forwards the iterator to the next row of the RowMap.
     void Next() {
-      switch (rm_->mode_) {
-        case Mode::kRange:
-          range_it_->Next();
-          break;
-        case Mode::kBitVector:
-          set_bits_it_->Next();
-          break;
-        case Mode::kIndexVector:
-          iv_it_->Next();
-          break;
+      if (std::get_if<Range>(&rm_->data_)) {
+        ++ordinal_;
+      } else if (std::get_if<BitVector>(&rm_->data_)) {
+        set_bits_it_->Next();
+      } else if (std::get_if<IndexVector>(&rm_->data_)) {
+        ++ordinal_;
       }
     }
 
     // Returns if the iterator is still valid.
     operator bool() const {
-      switch (rm_->mode_) {
-        case Mode::kRange:
-          return *range_it_;
-        case Mode::kBitVector:
-          return *set_bits_it_;
-        case Mode::kIndexVector:
-          return *iv_it_;
+      if (auto* range = std::get_if<Range>(&rm_->data_)) {
+        return ordinal_ < range->end;
       }
-      PERFETTO_FATAL("For GCC");
+      if (std::get_if<BitVector>(&rm_->data_)) {
+        return bool(*set_bits_it_);
+      }
+      if (auto* vec = std::get_if<IndexVector>(&rm_->data_)) {
+        return ordinal_ < vec->size();
+      }
+      PERFETTO_FATAL("Didn't match any variant type.");
     }
 
     // Returns the index pointed to by this iterator.
     OutputIndex index() const {
-      switch (rm_->mode_) {
-        case Mode::kRange:
-          return range_it_->index();
-        case Mode::kBitVector:
-          return set_bits_it_->index();
-        case Mode::kIndexVector:
-          return iv_it_->index();
+      if (std::get_if<Range>(&rm_->data_)) {
+        return ordinal_;
       }
-      PERFETTO_FATAL("For GCC");
+      if (std::get_if<BitVector>(&rm_->data_)) {
+        return set_bits_it_->index();
+      }
+      if (auto* vec = std::get_if<IndexVector>(&rm_->data_)) {
+        return (*vec)[ordinal_];
+      }
+      PERFETTO_FATAL("Didn't match any variant type.");
     }
 
     // Returns the row of the index the iterator points to.
     InputRow row() const {
-      switch (rm_->mode_) {
-        case Mode::kRange:
-          return range_it_->ordinal();
-        case Mode::kBitVector:
-          return set_bits_it_->ordinal();
-        case Mode::kIndexVector:
-          return iv_it_->ordinal();
+      if (auto* range = std::get_if<Range>(&rm_->data_)) {
+        return ordinal_ - range->start;
       }
-      PERFETTO_FATAL("For GCC");
+      if (std::get_if<BitVector>(&rm_->data_)) {
+        return set_bits_it_->ordinal();
+      }
+      if (std::get_if<IndexVector>(&rm_->data_)) {
+        return ordinal_;
+      }
+      PERFETTO_FATAL("Didn't match any variant type.");
     }
 
    private:
     Iterator(const Iterator&) = delete;
     Iterator& operator=(const Iterator&) = delete;
 
-    // Only one of the below will be non-null depending on the mode of the
-    // RowMap.
-    std::unique_ptr<RangeIterator> range_it_;
+    // Ordinal will not be used for BitVector based RowMap.
+    uint32_t ordinal_ = 0;
+    // Not nullptr for BitVector based RowMap.
     std::unique_ptr<BitVector::SetBitsIterator> set_bits_it_;
-    std::unique_ptr<IndexVectorIterator> iv_it_;
 
     const RowMap* rm_ = nullptr;
   };
@@ -228,15 +183,15 @@
 
   // Creates a RowMap containing the range of indices between |start| and |end|
   // i.e. all indices between |start| (inclusive) and |end| (exclusive).
-  explicit RowMap(OutputIndex start,
-                  OutputIndex end,
-                  OptimizeFor optimize_for = OptimizeFor::kMemory);
+  RowMap(OutputIndex start,
+         OutputIndex end,
+         OptimizeFor optimize_for = OptimizeFor::kMemory);
 
   // Creates a RowMap backed by a BitVector.
-  explicit RowMap(BitVector bit_vector);
+  explicit RowMap(BitVector);
 
   // Creates a RowMap backed by an std::vector<uint32_t>.
-  explicit RowMap(std::vector<OutputIndex> vec);
+  explicit RowMap(IndexVector);
 
   RowMap(const RowMap&) noexcept = delete;
   RowMap& operator=(const RowMap&) = delete;
@@ -259,15 +214,16 @@
   // Returns the size of the RowMap; that is the number of indices in the
   // RowMap.
   uint32_t size() const {
-    switch (mode_) {
-      case Mode::kRange:
-        return end_index_ - start_index_;
-      case Mode::kBitVector:
-        return bit_vector_.CountSetBits();
-      case Mode::kIndexVector:
-        return static_cast<uint32_t>(index_vector_.size());
+    if (auto* range = std::get_if<Range>(&data_)) {
+      return range->size();
     }
-    PERFETTO_FATAL("For GCC");
+    if (auto* bv = std::get_if<BitVector>(&data_)) {
+      return bv->CountSetBits();
+    }
+    if (auto* vec = std::get_if<IndexVector>(&data_)) {
+      return static_cast<uint32_t>(vec->size());
+    }
+    NoVariantMatched();
   }
 
   // Returns whether this rowmap is empty.
@@ -275,57 +231,51 @@
 
   // Returns the index at the given |row|.
   OutputIndex Get(InputRow row) const {
-    PERFETTO_DCHECK(row < size());
-    switch (mode_) {
-      case Mode::kRange:
-        return GetRange(row);
-      case Mode::kBitVector:
-        return GetBitVector(row);
-      case Mode::kIndexVector:
-        return GetIndexVector(row);
+    if (auto* range = std::get_if<Range>(&data_)) {
+      return GetRange(*range, row);
     }
-    PERFETTO_FATAL("For GCC");
+    if (auto* bv = std::get_if<BitVector>(&data_)) {
+      return GetBitVector(*bv, row);
+    }
+    if (auto* vec = std::get_if<IndexVector>(&data_)) {
+      return GetIndexVector(*vec, row);
+    }
+    NoVariantMatched();
   }
 
   // Returns whether the RowMap contains the given index.
   bool Contains(OutputIndex index) const {
-    switch (mode_) {
-      case Mode::kRange: {
-        return index >= start_index_ && index < end_index_;
-      }
-      case Mode::kBitVector: {
-        return index < bit_vector_.size() && bit_vector_.IsSet(index);
-      }
-      case Mode::kIndexVector: {
-        auto it = std::find(index_vector_.begin(), index_vector_.end(), index);
-        return it != index_vector_.end();
-      }
+    if (auto* range = std::get_if<Range>(&data_)) {
+      return index >= range->start && index < range->end;
     }
-    PERFETTO_FATAL("For GCC");
+    if (auto* bv = std::get_if<BitVector>(&data_)) {
+      return index < bv->size() && bv->IsSet(index);
+    }
+    if (auto* vec = std::get_if<IndexVector>(&data_)) {
+      return std::find(vec->begin(), vec->end(), index) != vec->end();
+    }
+    NoVariantMatched();
   }
 
   // Returns the first row of the given |index| in the RowMap.
   std::optional<InputRow> RowOf(OutputIndex index) const {
-    switch (mode_) {
-      case Mode::kRange: {
-        if (index < start_index_ || index >= end_index_)
-          return std::nullopt;
-        return index - start_index_;
-      }
-      case Mode::kBitVector: {
-        return index < bit_vector_.size() && bit_vector_.IsSet(index)
-                   ? std::make_optional(bit_vector_.CountSetBits(index))
-                   : std::nullopt;
-      }
-      case Mode::kIndexVector: {
-        auto it = std::find(index_vector_.begin(), index_vector_.end(), index);
-        return it != index_vector_.end()
-                   ? std::make_optional(static_cast<InputRow>(
-                         std::distance(index_vector_.begin(), it)))
-                   : std::nullopt;
-      }
+    if (auto* range = std::get_if<Range>(&data_)) {
+      if (index < range->start || index >= range->end)
+        return std::nullopt;
+      return index - range->start;
     }
-    PERFETTO_FATAL("For GCC");
+    if (auto* bv = std::get_if<BitVector>(&data_)) {
+      return index < bv->size() && bv->IsSet(index)
+                 ? std::make_optional(bv->CountSetBits(index))
+                 : std::nullopt;
+    }
+    if (auto* vec = std::get_if<IndexVector>(&data_)) {
+      auto it = std::find(vec->begin(), vec->end(), index);
+      return it != vec->end() ? std::make_optional(static_cast<InputRow>(
+                                    std::distance(vec->begin(), it)))
+                              : std::nullopt;
+    }
+    NoVariantMatched();
   }
 
   // Performs an ordered insert of the index into the current RowMap
@@ -343,34 +293,36 @@
   // the RowMap is in range or BitVector mode but is a required condition for
   // IndexVector mode.
   void Insert(OutputIndex index) {
-    switch (mode_) {
-      case Mode::kRange:
-        if (index == end_index_) {
-          // Fast path: if we're just appending to the end of the range, we can
-          // stay in range mode and just bump the end index.
-          end_index_++;
-        } else {
-          // Slow path: the insert is somewhere else other than the end. This
-          // means we need to switch to using a BitVector instead.
-          bit_vector_.Resize(start_index_, false);
-          bit_vector_.Resize(end_index_, true);
-          *this = RowMap(std::move(bit_vector_));
-
-          InsertIntoBitVector(index);
-        }
-        break;
-      case Mode::kBitVector:
-        InsertIntoBitVector(index);
-        break;
-      case Mode::kIndexVector: {
-        PERFETTO_DCHECK(
-            std::is_sorted(index_vector_.begin(), index_vector_.end()));
-        auto it =
-            std::upper_bound(index_vector_.begin(), index_vector_.end(), index);
-        index_vector_.insert(it, index);
-        break;
+    if (auto* range = std::get_if<Range>(&data_)) {
+      if (index == range->end) {
+        // Fast path: if we're just appending to the end
+        // of the range, we can stay in range mode and
+        // just bump the end index.
+        range->end++;
+        return;
       }
+
+      // Slow path: the insert is somewhere else other
+      // than the end. This means we need to switch to
+      // using a BitVector instead.
+      BitVector bv;
+      bv.Resize(range->start, false);
+      bv.Resize(range->end, true);
+      InsertIntoBitVector(bv, index);
+      data_ = std::move(bv);
+      return;
     }
+    if (auto* bv = std::get_if<BitVector>(&data_)) {
+      InsertIntoBitVector(*bv, index);
+      return;
+    }
+    if (auto* vec = std::get_if<IndexVector>(&data_)) {
+      PERFETTO_DCHECK(std::is_sorted(vec->begin(), vec->end()));
+      auto it = std::upper_bound(vec->begin(), vec->end(), index);
+      vec->insert(it, index);
+      return;
+    }
+    NoVariantMatched();
   }
 
   // Updates this RowMap by 'picking' the indices given by |picker|.
@@ -413,22 +365,7 @@
   //   if (start_index <= idx && idx < end_index)
   //     continue;
   //   Remove(idx)
-  void Intersect(uint32_t start_index, uint32_t end_index) {
-    if (mode_ == Mode::kRange) {
-      // If both RowMaps have ranges, we can just take the smallest intersection
-      // of them as the new RowMap.
-      // We have this as an explicit fast path as this is very common for
-      // constraints on id and sorted columns to satisfy this condition.
-      start_index_ = std::max(start_index_, start_index);
-      end_index_ = std::max(start_index_, std::min(end_index_, end_index));
-      return;
-    }
-
-    // TODO(lalitm): improve efficiency of this if we end up needing it.
-    Filter([start_index, end_index](OutputIndex index) {
-      return index >= start_index && index < end_index;
-    });
-  }
+  void Intersect(const RowMap& second);
 
   // Intersects this RowMap with |index|. If this RowMap contained |index|, then
   // it will *only* contain |index|. Otherwise, it will be empty.
@@ -444,71 +381,82 @@
   void Clear() { *this = RowMap(); }
 
   template <typename Comparator = bool(uint32_t, uint32_t)>
-  void StableSort(std::vector<uint32_t>* out, Comparator c) const {
-    switch (mode_) {
-      case Mode::kRange:
-        std::stable_sort(out->begin(), out->end(),
-                         [this, c](uint32_t a, uint32_t b) {
-                           return c(GetRange(a), GetRange(b));
-                         });
-        break;
-      case Mode::kBitVector:
-        std::stable_sort(out->begin(), out->end(),
-                         [this, c](uint32_t a, uint32_t b) {
-                           return c(GetBitVector(a), GetBitVector(b));
-                         });
-        break;
-      case Mode::kIndexVector:
-        std::stable_sort(out->begin(), out->end(),
-                         [this, c](uint32_t a, uint32_t b) {
-                           return c(GetIndexVector(a), GetIndexVector(b));
-                         });
-        break;
+  void StableSort(IndexVector* out, Comparator c) const {
+    if (auto* range = std::get_if<Range>(&data_)) {
+      std::stable_sort(out->begin(), out->end(),
+                       [range, c](uint32_t a, uint32_t b) {
+                         return c(GetRange(*range, a), GetRange(*range, b));
+                       });
+      return;
     }
+    if (auto* bv = std::get_if<BitVector>(&data_)) {
+      std::stable_sort(out->begin(), out->end(),
+                       [&bv, c](uint32_t a, uint32_t b) {
+                         return c(GetBitVector(*bv, a), GetBitVector(*bv, b));
+                       });
+      return;
+    }
+    if (auto* vec = std::get_if<IndexVector>(&data_)) {
+      std::stable_sort(
+          out->begin(), out->end(), [vec, c](uint32_t a, uint32_t b) {
+            return c(GetIndexVector(*vec, a), GetIndexVector(*vec, b));
+          });
+      return;
+    }
+    NoVariantMatched();
   }
 
   // Filters the indices in |out| by keeping those which meet |p|.
   template <typename Predicate = bool(OutputIndex)>
   void Filter(Predicate p) {
-    switch (mode_) {
-      case Mode::kRange:
-        FilterRange(p);
-        break;
-      case Mode::kBitVector: {
-        for (auto it = bit_vector_.IterateSetBits(); it; it.Next()) {
-          if (!p(it.index()))
-            it.Clear();
-        }
-        break;
-      }
-      case Mode::kIndexVector: {
-        auto ret = std::remove_if(index_vector_.begin(), index_vector_.end(),
-                                  [p](uint32_t i) { return !p(i); });
-        index_vector_.erase(ret, index_vector_.end());
-        break;
-      }
+    if (auto* range = std::get_if<Range>(&data_)) {
+      data_ = FilterRange(p, *range);
+      return;
     }
+    if (auto* bv = std::get_if<BitVector>(&data_)) {
+      for (auto it = bv->IterateSetBits(); it; it.Next()) {
+        if (!p(it.index()))
+          it.Clear();
+      }
+      return;
+    }
+    if (auto* vec = std::get_if<IndexVector>(&data_)) {
+      auto ret = std::remove_if(vec->begin(), vec->end(),
+                                [p](uint32_t i) { return !p(i); });
+      vec->erase(ret, vec->end());
+      return;
+    }
+    NoVariantMatched();
   }
 
   // Returns the iterator over the rows in this RowMap.
   Iterator IterateRows() const { return Iterator(this); }
 
   // Returns if the RowMap is internally represented using a range.
-  bool IsRange() const { return mode_ == Mode::kRange; }
+  bool IsRange() const { return std::holds_alternative<Range>(data_); }
+
+  // Returns if the RowMap is internally represented using a BitVector.
+  bool IsBitVector() const { return std::holds_alternative<BitVector>(data_); }
+
+  // Returns if the RowMap is internally represented using an index vector.
+  bool IsIndexVector() const {
+    return std::holds_alternative<IndexVector>(data_);
+  }
 
  private:
-  enum class Mode {
-    kRange,
-    kBitVector,
-    kIndexVector,
-  };
+  using Variant = std::variant<Range, BitVector, IndexVector>;
+
+  explicit RowMap(Range);
+
+  explicit RowMap(Variant);
+
   // TODO(lalitm): remove this when the coupling between RowMap and
   // ColumnStorage Selector is broken (after filtering is moved out of here).
   friend class ColumnStorageOverlay;
 
   template <typename Predicate>
-  void FilterRange(Predicate p) {
-    uint32_t count = end_index_ - start_index_;
+  Variant FilterRange(Predicate p, Range r) {
+    uint32_t count = r.size();
 
     // Optimization: if we are only going to scan a few indices, it's not
     // worth the haslle of working with a BitVector.
@@ -517,7 +465,7 @@
 
     // Optimization: weif the cost of a BitVector is more than the highest
     // possible cost an index vector could have, use the index vector.
-    uint32_t bit_vector_cost = BitVector::ApproxBytesCost(end_index_);
+    uint32_t bit_vector_cost = BitVector::ApproxBytesCost(r.end);
     uint32_t index_vector_cost_ub = sizeof(uint32_t) * count;
 
     // If either of the conditions hold which make it better to use an
@@ -527,7 +475,7 @@
         optimize_for_ == OptimizeFor::kLookupSpeed) {
       // Try and strike a good balance between not making the vector too
       // big and good performance.
-      std::vector<uint32_t> iv(std::min(kSmallRangeLimit, count));
+      IndexVector iv(std::min(kSmallRangeLimit, count));
 
       uint32_t out_i = 0;
       for (uint32_t i = 0; i < count; ++i) {
@@ -537,8 +485,8 @@
 
         // We keep this branch free by always writing the index but only
         // incrementing the out index if the return value is true.
-        bool value = p(i + start_index_);
-        iv[out_i] = i + start_index_;
+        bool value = p(i + r.start);
+        iv[out_i] = i + r.start;
         out_i += value;
       }
 
@@ -546,58 +494,44 @@
       iv.resize(out_i);
       iv.shrink_to_fit();
 
-      *this = RowMap(std::move(iv));
-      return;
+      return std::move(iv);
     }
 
     // Otherwise, create a bitvector which spans the full range using
     // |p| as the filler for the bits between start and end.
-    *this = RowMap(BitVector::Range(start_index_, end_index_, p));
+    return BitVector::Range(r.start, r.end, p);
   }
 
-  void InsertIntoBitVector(uint32_t row) {
-    PERFETTO_DCHECK(mode_ == Mode::kBitVector);
-
-    // If we're adding a row to precisely the end of the BitVector, just append
-    // true instead of resizing and then setting.
-    if (row == bit_vector_.size()) {
-      bit_vector_.AppendTrue();
-      return;
-    }
-
-    if (row > bit_vector_.size()) {
-      bit_vector_.Resize(row + 1, false);
-    }
-    bit_vector_.Set(row);
+  PERFETTO_ALWAYS_INLINE static OutputIndex GetRange(Range r, InputRow row) {
+    return r.start + row;
   }
-
-  PERFETTO_ALWAYS_INLINE OutputIndex GetRange(InputRow row) const {
-    PERFETTO_DCHECK(mode_ == Mode::kRange);
-    return start_index_ + row;
+  PERFETTO_ALWAYS_INLINE static OutputIndex GetBitVector(const BitVector& bv,
+                                                         uint32_t row) {
+    return bv.IndexOfNthSet(row);
   }
-  PERFETTO_ALWAYS_INLINE OutputIndex GetBitVector(uint32_t row) const {
-    PERFETTO_DCHECK(mode_ == Mode::kBitVector);
-    return bit_vector_.IndexOfNthSet(row);
-  }
-  PERFETTO_ALWAYS_INLINE OutputIndex GetIndexVector(uint32_t row) const {
-    PERFETTO_DCHECK(mode_ == Mode::kIndexVector);
-    return index_vector_[row];
+  PERFETTO_ALWAYS_INLINE static OutputIndex GetIndexVector(
+      const IndexVector& vec,
+      uint32_t row) {
+    return vec[row];
   }
 
   RowMap SelectRowsSlow(const RowMap& selector) const;
 
-  Mode mode_ = Mode::kRange;
+  static void InsertIntoBitVector(BitVector& bv, OutputIndex row) {
+    if (row == bv.size()) {
+      bv.AppendTrue();
+      return;
+    }
+    if (row > bv.size())
+      bv.Resize(row + 1, false);
+    bv.Set(row);
+  }
 
-  // Only valid when |mode_| == Mode::kRange.
-  OutputIndex start_index_ = 0;  // This is an inclusive index.
-  OutputIndex end_index_ = 0;    // This is an exclusive index.
+  PERFETTO_NORETURN void NoVariantMatched() const {
+    PERFETTO_FATAL("Didn't match any variant type.");
+  }
 
-  // Only valid when |mode_| == Mode::kBitVector.
-  BitVector bit_vector_;
-
-  // Only valid when |mode_| == Mode::kIndexVector.
-  std::vector<OutputIndex> index_vector_;
-
+  Variant data_;
   OptimizeFor optimize_for_ = OptimizeFor::kMemory;
 };
 
diff --git a/src/trace_processor/containers/row_map_unittest.cc b/src/trace_processor/containers/row_map_unittest.cc
index 6e1ca11..7f919bd 100644
--- a/src/trace_processor/containers/row_map_unittest.cc
+++ b/src/trace_processor/containers/row_map_unittest.cc
@@ -25,6 +25,191 @@
 namespace trace_processor {
 namespace {
 
+TEST(RowMapUnittest, SingleRow) {
+  RowMap rm(10, 20);
+  RowMap rm_row = rm.SingleRow(15u);
+  ASSERT_EQ(rm_row.size(), 1u);
+  ASSERT_TRUE(rm_row.Contains(15));
+  ASSERT_FALSE(rm_row.Contains(11));
+}
+
+TEST(RowMapUnittest, CopyRange) {
+  RowMap rm(10, 20);
+  RowMap rm_copy = rm.Copy();
+  ASSERT_EQ(rm_copy.size(), 10u);
+}
+
+TEST(RowMapUnittest, CopyBitVector) {
+  RowMap rm(BitVector{true, false, false, false, true, true});
+  RowMap rm_copy = rm.Copy();
+  ASSERT_EQ(rm_copy.size(), 3u);
+}
+
+TEST(RowMapUnittest, CopyIndexVector) {
+  RowMap rm(std::vector<uint32_t>{10, 17, 20, 21});
+  RowMap rm_copy = rm.Copy();
+  ASSERT_EQ(rm_copy.size(), 4u);
+}
+
+TEST(RowMapUnittest, GetFromRange) {
+  RowMap rm(10, 20);
+  ASSERT_EQ(rm.Get(5), 15u);
+}
+
+TEST(RowMapUnittest, GetFromBitVector) {
+  RowMap rm(BitVector{true, false, false, false, true, true});
+  ASSERT_EQ(rm.Get(1), 4u);
+}
+
+TEST(RowMapUnittest, GetFromIndexVector) {
+  RowMap rm(std::vector<uint32_t>{10, 17, 20, 21});
+  ASSERT_EQ(rm.Get(1), 17u);
+}
+
+TEST(RowMapUnittest, ContainsFromRange) {
+  RowMap rm(10, 20);
+  ASSERT_FALSE(rm.Contains(5));
+  ASSERT_TRUE(rm.Contains(15));
+}
+
+TEST(RowMapUnittest, ContainsFromBitVector) {
+  RowMap rm(BitVector{true, false, false, false, true, true});
+  ASSERT_FALSE(rm.Contains(3));
+  ASSERT_TRUE(rm.Contains(5));
+}
+
+TEST(RowMapUnittest, ContainsFromIndexVector) {
+  RowMap rm(std::vector<uint32_t>{10, 17, 20, 21});
+  ASSERT_FALSE(rm.Contains(5));
+  ASSERT_TRUE(rm.Contains(10));
+}
+
+TEST(RowMapUnittest, RowOfRange) {
+  RowMap rm(10, 20);
+  ASSERT_EQ(rm.RowOf(15).value(), 5u);
+  ASSERT_EQ(rm.RowOf(5), std::nullopt);
+}
+
+TEST(RowMapUnittest, RowOfBitVector) {
+  RowMap rm(BitVector{true, false, false, false, true, true});
+  ASSERT_EQ(rm.RowOf(4), 1u);
+  ASSERT_EQ(rm.RowOf(1), std::nullopt);
+}
+
+TEST(RowMapUnittest, RowOfIndexVector) {
+  RowMap rm(std::vector<uint32_t>{10, 17, 20, 21});
+  ASSERT_EQ(rm.RowOf(17), 1u);
+  ASSERT_EQ(rm.RowOf(5), std::nullopt);
+}
+
+TEST(RowMapUnittest, InsertIntoRangeAtTheEnd) {
+  RowMap rm(10, 20);
+  rm.Insert(21);
+  ASSERT_EQ(rm.size(), 11u);
+  ASSERT_TRUE(rm.Contains(21));
+}
+
+TEST(RowMapUnittest, InsertIntoRange) {
+  RowMap rm(10, 20);
+  rm.Insert(25);
+  ASSERT_EQ(rm.size(), 11u);
+  ASSERT_TRUE(rm.Contains(25));
+}
+
+TEST(RowMapUnittest, InsertIntoBitVector) {
+  RowMap rm(BitVector{true, false, false, false, true, true});
+  rm.Insert(25);
+  ASSERT_EQ(rm.size(), 4u);
+  ASSERT_TRUE(rm.Contains(25));
+}
+
+TEST(RowMapUnittest, InsertIntoIndexVector) {
+  RowMap rm(std::vector<uint32_t>{10, 17, 20, 21});
+  rm.Insert(25);
+  ASSERT_EQ(rm.size(), 5u);
+  ASSERT_TRUE(rm.Contains(25));
+}
+
+TEST(RowMapUnittest, SelectRowsFromRangeWithRange) {
+  RowMap rm(10, 20);
+
+  RowMap selector(4, 8);
+  RowMap selected = rm.SelectRows(selector);
+  ASSERT_EQ(selected.size(), 4u);
+  ASSERT_EQ(selected.Get(0), 14u);
+}
+
+TEST(RowMapUnittest, SelectRowsFromRangeWithBV) {
+  RowMap rm(10, 20);
+  // BitVector with values at 16, 18, 20 and so on.
+  RowMap selector(
+      BitVector::Range(4, 8, [](uint32_t x) { return x % 2 == 0; }));
+  RowMap selected = rm.SelectRows(selector);
+  ASSERT_EQ(selected.size(), 2u);
+  ASSERT_EQ(selected.Get(0), 14u);
+}
+
+TEST(RowMapUnittest, SelectRowsFromRangeWithIV) {
+  RowMap rm(10, 20);
+  RowMap selector(std::vector<uint32_t>{4, 6});
+  RowMap selected = rm.SelectRows(selector);
+  ASSERT_EQ(selected.size(), 2u);
+  ASSERT_EQ(selected.Get(0), 14u);
+}
+
+TEST(RowMapUnittest, SelectRowsFromBVWithRange) {
+  RowMap rm(BitVector::Range(10, 50, [](uint32_t x) { return x % 2 == 0; }));
+
+  RowMap selector(4, 8);
+  RowMap selected = rm.SelectRows(selector);
+  ASSERT_EQ(selected.size(), 4u);
+  ASSERT_EQ(selected.Get(0), 18u);
+}
+
+TEST(RowMapUnittest, SelectRowsFromBVWithBV) {
+  RowMap rm(BitVector::Range(10, 50, [](uint32_t x) { return x % 2 == 0; }));
+  // BitVector with values at 16, 18, 20 and so on.
+  RowMap selector(
+      BitVector::Range(4, 8, [](uint32_t x) { return x % 2 == 0; }));
+  RowMap selected = rm.SelectRows(selector);
+  ASSERT_EQ(selected.size(), 2u);
+  ASSERT_EQ(selected.Get(0), 18u);
+}
+
+TEST(RowMapUnittest, SelectRowsFromBVWithIV) {
+  RowMap rm(BitVector::Range(10, 50, [](uint32_t x) { return x % 2 == 0; }));
+  RowMap selector(std::vector<uint32_t>{4, 6});
+  RowMap selected = rm.SelectRows(selector);
+  ASSERT_EQ(selected.size(), 2u);
+  ASSERT_EQ(selected.Get(0), 18u);
+}
+
+TEST(RowMapUnittest, SelectRowsFromIVWithRange) {
+  RowMap rm(std::vector<uint32_t>{10, 12, 14, 16, 18, 20, 22, 24});
+
+  RowMap selector(4, 8);
+  RowMap selected = rm.SelectRows(selector);
+  ASSERT_EQ(selected.size(), 4u);
+  ASSERT_EQ(selected.Get(0), 18u);
+}
+
+TEST(RowMapUnittest, SelectRowsFromIVWithBV) {
+  RowMap rm(std::vector<uint32_t>{10, 12, 14, 16, 18, 20, 22, 24});
+  RowMap selector(
+      BitVector::Range(4, 8, [](uint32_t x) { return x % 2 == 0; }));
+  RowMap selected = rm.SelectRows(selector);
+  ASSERT_EQ(selected.size(), 2u);
+  ASSERT_EQ(selected.Get(0), 18u);
+}
+
+TEST(RowMapUnittest, SelectRowsFromIVWithIV) {
+  RowMap rm(std::vector<uint32_t>{10, 12, 14, 16, 18, 20, 22, 24});
+  RowMap selector(std::vector<uint32_t>{4, 6});
+  RowMap selected = rm.SelectRows(selector);
+  ASSERT_EQ(selected.size(), 2u);
+  ASSERT_EQ(selected.Get(0), 18u);
+}
+
 TEST(RowMapUnittest, SmokeRange) {
   RowMap rm(30, 47);
 
@@ -327,22 +512,86 @@
   ASSERT_EQ(rm.size(), 0u);
 }
 
-TEST(RowMapUnittest, IntersectManyRange) {
+TEST(RowMapUnittest, IntersectRangeWithRange) {
   RowMap rm(3, 7);
-  rm.Intersect(2, 4);
+  RowMap sec(2, 4);
+  rm.Intersect(sec);
 
   ASSERT_EQ(rm.size(), 1u);
   ASSERT_EQ(rm.Get(0u), 3u);
 }
 
-TEST(RowMapUnittest, IntersectManyIv) {
-  RowMap rm(std::vector<uint32_t>{3u, 2u, 0u, 1u, 1u, 3u});
-  rm.Intersect(2, 4);
+TEST(RowMapUnittest, IntersectRangeWithBV) {
+  RowMap rm(2, 4);
+  RowMap sec(BitVector{true, false, true, true, false, true});
+  rm.Intersect(sec);
+
+  ASSERT_EQ(rm.size(), 2u);
+  ASSERT_EQ(rm.Get(0), 2u);
+}
+
+TEST(RowMapUnittest, IntersectRangeWithIV) {
+  RowMap rm(2, 10);
+  RowMap sec(std::vector<uint32_t>{0, 2, 5});
+  rm.Intersect(sec);
+
+  ASSERT_EQ(rm.size(), 2u);
+  ASSERT_EQ(rm.Get(0u), 2u);
+}
+
+TEST(RowMapUnittest, IntersectBVWithRange) {
+  RowMap rm(BitVector{true, false, true, true, false, true});
+  RowMap sec(2, 4);
+  rm.Intersect(sec);
+
+  ASSERT_EQ(rm.size(), 2u);
+  ASSERT_EQ(rm.Get(0), 2u);
+}
+
+TEST(RowMapUnittest, IntersectBVWithBV) {
+  RowMap rm(BitVector{true, false, true, true, false, true});
+  RowMap sec(BitVector{false, true, true, false, false, true, true});
+  rm.Intersect(sec);
+
+  ASSERT_EQ(rm.size(), 2u);
+  ASSERT_EQ(rm.Get(0), 2u);
+}
+
+TEST(RowMapUnittest, IntersectBVWithIV) {
+  RowMap rm(BitVector{true, false, true, true, false, true});
+  RowMap sec(std::vector<uint32_t>{0, 2, 5});
+  rm.Intersect(sec);
 
   ASSERT_EQ(rm.size(), 3u);
-  ASSERT_EQ(rm.Get(0u), 3u);
-  ASSERT_EQ(rm.Get(1u), 2u);
-  ASSERT_EQ(rm.Get(2u), 3u);
+  ASSERT_EQ(rm.Get(0), 0u);
+}
+
+TEST(RowMapUnittest, IntersectIVWithRange) {
+  RowMap rm(std::vector<uint32_t>{0, 2, 5});
+  RowMap sec(2, 10);
+  rm.Intersect(sec);
+
+  ASSERT_EQ(rm.size(), 2u);
+  ASSERT_EQ(rm.Get(0u), 2u);
+}
+
+TEST(RowMapUnittest, IntersectIVWithBV) {
+  RowMap rm(std::vector<uint32_t>{0, 2, 5});
+  RowMap sec(BitVector{true, false, true, true, false, true});
+  rm.Intersect(sec);
+
+  ASSERT_EQ(rm.size(), 3u);
+  ASSERT_EQ(rm.Get(0), 0u);
+}
+
+TEST(RowMapUnittest, IntersectIVWithIV) {
+  RowMap rm(std::vector<uint32_t>{0, 2, 5});
+  RowMap sec(std::vector<uint32_t>{1, 2, 6});
+
+  rm.Intersect(sec);
+
+  ASSERT_EQ(rm.size(), 1u);
+  ASSERT_EQ(rm.Get(0u), 2u);
 }
 
 }  // namespace
diff --git a/src/trace_processor/containers/string_pool.cc b/src/trace_processor/containers/string_pool.cc
index ab0b42a..3dacca2 100644
--- a/src/trace_processor/containers/string_pool.cc
+++ b/src/trace_processor/containers/string_pool.cc
@@ -25,23 +25,6 @@
 namespace perfetto {
 namespace trace_processor {
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-// static
-constexpr size_t StringPool::kNumBlockIndexBits;
-// static
-constexpr size_t StringPool::kNumBlockOffsetBits;
-// static
-constexpr size_t StringPool::kLargeStringFlagBitMask;
-// static
-constexpr size_t StringPool::kBlockOffsetBitMask;
-// static
-constexpr size_t StringPool::kBlockIndexBitMask;
-// static
-constexpr size_t StringPool::kBlockSizeBytes;
-// static
-constexpr size_t StringPool::kMinLargeStringSizeBytes;
-#endif
-
 StringPool::StringPool() {
   static_assert(
       StringPool::kMinLargeStringSizeBytes <= StringPool::kBlockSizeBytes + 1,
diff --git a/src/trace_processor/db/BUILD.gn b/src/trace_processor/db/BUILD.gn
index bfe5e8a..bcde78f 100644
--- a/src/trace_processor/db/BUILD.gn
+++ b/src/trace_processor/db/BUILD.gn
@@ -12,6 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import("../../../gn/perfetto_tp_tables.gni")
 import("../../../gn/test.gni")
 
 source_set("db") {
@@ -19,10 +20,19 @@
     "base_id.h",
     "column.cc",
     "column.h",
+    "column_overlay.h",
     "column_storage.cc",
     "column_storage.h",
     "column_storage_overlay.h",
     "compare.h",
+    "null_overlay.h",
+    "numeric_storage.cc",
+    "numeric_storage.h",
+    "sorting_overlay.h",
+    "storage.cc",
+    "storage.h",
+    "storage_overlay.h",
+    "storage_variants.h",
     "table.cc",
     "table.h",
     "typed_column.h",
@@ -40,16 +50,21 @@
   ]
 }
 
+perfetto_tp_tables("view_unittest") {
+  sources = [ "view_unittest.py" ]
+}
+
 perfetto_unittest_source_set("unittests") {
   testonly = true
   sources = [
     "column_storage_overlay_unittest.cc",
     "compare_unittest.cc",
-    "table_unittest.cc",
+    "storage_unittest.cc",
     "view_unittest.cc",
   ]
   deps = [
     ":db",
+    ":view_unittest",
     "../../../gn:default_deps",
     "../../../gn:gtest_and_gmock",
     "../../base",
diff --git a/src/trace_processor/db/column.h b/src/trace_processor/db/column.h
index 04425b9..f1adb96 100644
--- a/src/trace_processor/db/column.h
+++ b/src/trace_processor/db/column.h
@@ -367,6 +367,9 @@
   // Returns the type of this Column in terms of SqlValue::Type.
   SqlValue::Type type() const { return ToSqlValueType(type_); }
 
+  // Returns the type of this Column in terms of ColumnType.
+  ColumnType col_type() const { return type_; }
+
   // Test the type of this Column.
   template <typename T>
   bool IsColumnType() const {
@@ -382,6 +385,9 @@
   // Returns true if this column is a sorted column.
   bool IsSorted() const { return IsSorted(flags_); }
 
+  // Returns true if this column is a dense column.
+  bool IsDense() const { return IsDense(flags_); }
+
   // Returns true if this column is a set id column.
   // Public for testing.
   bool IsSetId() const { return IsSetId(flags_); }
@@ -439,30 +445,27 @@
     return IsFlagsAndTypeValid(flags, ColumnTypeHelper<T>::ToColumnType());
   }
 
- protected:
   template <typename T>
   using stored_type = typename tc_internal::TypeHandler<T>::stored_type;
 
   // Returns the backing sparse vector cast to contain data of type T.
   // Should only be called when |type_| == ToColumnType<T>().
   template <typename T>
-  ColumnStorage<stored_type<T>>* mutable_storage() {
-    PERFETTO_DCHECK(ColumnTypeHelper<T>::ToColumnType() == type_);
-    PERFETTO_DCHECK(tc_internal::TypeHandler<T>::is_optional == IsNullable());
-    return static_cast<ColumnStorage<stored_type<T>>*>(storage_);
-  }
-
-  // Returns the backing sparse vector cast to contain data of type T.
-  // Should only be called when |type_| == ToColumnType<T>().
-  template <typename T>
   const ColumnStorage<stored_type<T>>& storage() const {
     PERFETTO_DCHECK(ColumnTypeHelper<T>::ToColumnType() == type_);
     PERFETTO_DCHECK(tc_internal::TypeHandler<T>::is_optional == IsNullable());
     return *static_cast<ColumnStorage<stored_type<T>>*>(storage_);
   }
 
-  // Returns true if this column is a dense column.
-  bool IsDense() const { return IsDense(flags_); }
+ protected:
+  // Returns the backing sparse vector cast to contain data of type T.
+  // Should only be called when |type_| == ToColumnType<T>().
+  template <typename T>
+  ColumnStorage<stored_type<T>>* mutable_storage() {
+    PERFETTO_DCHECK(ColumnTypeHelper<T>::ToColumnType() == type_);
+    PERFETTO_DCHECK(tc_internal::TypeHandler<T>::is_optional == IsNullable());
+    return static_cast<ColumnStorage<stored_type<T>>*>(storage_);
+  }
 
   // Returns true if this column is a hidden column.
   bool IsHidden() const { return (flags_ & Flag::kHidden) != 0; }
@@ -545,31 +548,31 @@
             b, std::lower_bound(b, e, value, &compare::SqlValueComparator));
         uint32_t end = std::distance(
             b, std::upper_bound(b, e, value, &compare::SqlValueComparator));
-        rm->Intersect(beg, end);
+        rm->Intersect({beg, end});
         return true;
       }
       case FilterOp::kLe: {
         uint32_t end = std::distance(
             b, std::upper_bound(b, e, value, &compare::SqlValueComparator));
-        rm->Intersect(0, end);
+        rm->Intersect({0, end});
         return true;
       }
       case FilterOp::kLt: {
         uint32_t end = std::distance(
             b, std::lower_bound(b, e, value, &compare::SqlValueComparator));
-        rm->Intersect(0, end);
+        rm->Intersect({0, end});
         return true;
       }
       case FilterOp::kGe: {
         uint32_t beg = std::distance(
             b, std::lower_bound(b, e, value, &compare::SqlValueComparator));
-        rm->Intersect(beg, overlay().size());
+        rm->Intersect({beg, overlay().size()});
         return true;
       }
       case FilterOp::kGt: {
         uint32_t beg = std::distance(
             b, std::upper_bound(b, e, value, &compare::SqlValueComparator));
-        rm->Intersect(beg, overlay().size());
+        rm->Intersect({beg, overlay().size()});
         return true;
       }
       case FilterOp::kNe:
@@ -608,11 +611,13 @@
     // Otherwise, find the end of the set and return the intersection for this.
     for (uint32_t i = set_id + 1; i < ov.size(); ++i) {
       if (st.Get(ov.Get(i)) != filter_set_id) {
-        rm->Intersect(set_id, i);
+        RowMap r(set_id, i);
+        rm->Intersect(r);
         return;
       }
     }
-    rm->Intersect(set_id, ov.size());
+    RowMap r(set_id, ov.size());
+    rm->Intersect(r);
   }
 
   // Slow path filter method which will perform a full table scan.
diff --git a/src/trace_processor/db/column_overlay.h b/src/trace_processor/db/column_overlay.h
new file mode 100644
index 0000000..7dc15f9
--- /dev/null
+++ b/src/trace_processor/db/column_overlay.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_TRACE_PROCESSOR_DB_COLUMN_OVERLAY_H_
+#define SRC_TRACE_PROCESSOR_DB_COLUMN_OVERLAY_H_
+
+#include <variant>
+#include "perfetto/ext/base/status_or.h"
+#include "src/trace_processor/db/column.h"
+#include "src/trace_processor/db/storage.h"
+
+namespace perfetto {
+namespace trace_processor {
+namespace column {
+
+// Column overlay introduce separation between column storage (vector of data)
+// and state (nullability, sorting) and actions (filtering, expanding, joining)
+// done on the storage. This is a composable design - one ColumnOverlay
+// subclass might hold another subclass, and each of them implements all of the
+// functions in it's own specific way.
+class ColumnOverlay {
+ public:
+  virtual ~ColumnOverlay();
+
+  // Clears the rows of RowMap, on which data don't match the FilterOp operation
+  // with SqlValue. Efficient.
+  virtual void Filter(FilterOp, SqlValue, RowMap&) = 0;
+
+  // Sorts (ascending) provided vector of indices based on storage.
+  virtual void Sort(std::vector<uint32_t>&) = 0;
+};
+}  // namespace column
+}  // namespace trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_TRACE_PROCESSOR_DB_COLUMN_OVERLAY_H_
diff --git a/src/trace_processor/db/column_storage.h b/src/trace_processor/db/column_storage.h
index 6cf2f30..7e6a609 100644
--- a/src/trace_processor/db/column_storage.h
+++ b/src/trace_processor/db/column_storage.h
@@ -53,6 +53,7 @@
   void Set(uint32_t idx, T val) { vector_[idx] = val; }
   uint32_t size() const { return static_cast<uint32_t>(vector_.size()); }
   void ShrinkToFit() { vector_.shrink_to_fit(); }
+  const std::vector<T>& vector() const { return vector_; }
 
   template <bool IsDense>
   static ColumnStorage<T> Create() {
@@ -83,6 +84,14 @@
   uint32_t size() const { return nv_.size(); }
   bool IsDense() const { return nv_.IsDense(); }
   void ShrinkToFit() { nv_.ShrinkToFit(); }
+  // For dense columns the size of the vector is equal to size of the bit
+  // vector. For sparse it's equal to count set bits of the bit vector.
+  const std::vector<T>& non_null_vector() const {
+    return nv_.non_null_vector();
+  }
+  const BitVector& non_null_bit_vector() const {
+    return nv_.non_null_bit_vector();
+  }
 
   template <bool IsDense>
   static ColumnStorage<std::optional<T>> Create() {
diff --git a/src/trace_processor/db/column_storage_overlay.h b/src/trace_processor/db/column_storage_overlay.h
index 108dccd..997d4be 100644
--- a/src/trace_processor/db/column_storage_overlay.h
+++ b/src/trace_processor/db/column_storage_overlay.h
@@ -183,24 +183,12 @@
     // meet |p|. However, if |this| is a BitVector, we end up needing expensive
     // |IndexOfNthSet| calls (as we need to convert the row to an index before
     // passing it to |p|).
-    switch (row_map_.mode_) {
-      case RowMap::Mode::kRange: {
-        auto ip = [this, p](uint32_t row) { return p(row_map_.GetRange(row)); };
-        out->Filter(ip);
-        break;
-      }
-      case RowMap::Mode::kBitVector: {
-        FilterIntoScanSelfBv(out, p);
-        break;
-      }
-      case RowMap::Mode::kIndexVector: {
-        auto ip = [this, p](uint32_t row) {
-          return p(row_map_.GetIndexVector(row));
-        };
-        out->Filter(ip);
-        break;
-      }
+    if (row_map_.IsBitVector()) {
+      FilterIntoScanSelfBv(out, p);
+      return;
     }
+    auto ip = [this, p](uint32_t row) { return p(row_map_.Get(row)); };
+    out->Filter(ip);
   }
 
   template <typename Comparator = bool(uint32_t, uint32_t)>
@@ -217,54 +205,57 @@
   // Filters the current ColumnStorageOverlay into |out| by performing a full
   // scan on |row_map.bit_vector_|. See |FilterInto| for a full breakdown of the
   // semantics of this function.
-  template <typename Predicate>
-  void FilterIntoScanSelfBv(RowMap* out, Predicate p) const {
-    auto it = row_map_.bit_vector_.IterateSetBits();
-    switch (out->mode_) {
-      case RowMap::Mode::kRange: {
-        // TODO(lalitm): investigate whether we can reuse the data inside
-        // out->bit_vector_ at some point.
-        BitVector bv(out->end_index_, false);
-        for (auto out_it = bv.IterateAllBits(); it; it.Next(), out_it.Next()) {
-          uint32_t ordinal = it.ordinal();
-          if (ordinal < out->start_index_)
-            continue;
-          if (ordinal >= out->end_index_)
-            break;
 
-          if (p(it.index())) {
-            out_it.Set();
-          }
+  template <typename Predicate>
+  struct FilterIntoScanSelfBvVisitor {
+    void operator()(RowMap::Range out_r) {
+      BitVector bv(out_r.end, false);
+      for (auto out_it = bv.IterateAllBits(); bv_iter;
+           bv_iter.Next(), out_it.Next()) {
+        uint32_t ordinal = bv_iter.ordinal();
+        if (ordinal < out_r.start)
+          continue;
+        if (ordinal >= out_r.end)
+          break;
+
+        if (p(bv_iter.index())) {
+          out_it.Set();
         }
-        *out = RowMap(std::move(bv));
-        break;
       }
-      case RowMap::Mode::kBitVector: {
-        auto out_it = out->bit_vector_.IterateAllBits();
-        for (; out_it; it.Next(), out_it.Next()) {
-          PERFETTO_DCHECK(it);
-          if (out_it.IsSet() && !p(it.index()))
-            out_it.Clear();
-        }
-        break;
-      }
-      case RowMap::Mode::kIndexVector: {
-        PERFETTO_DCHECK(std::is_sorted(out->index_vector_.begin(),
-                                       out->index_vector_.end()));
-        auto fn = [&p, &it](uint32_t i) {
-          while (it.ordinal() < i) {
-            it.Next();
-            PERFETTO_DCHECK(it);
-          }
-          PERFETTO_DCHECK(it.ordinal() == i);
-          return !p(it.index());
-        };
-        auto iv_it = std::remove_if(out->index_vector_.begin(),
-                                    out->index_vector_.end(), fn);
-        out->index_vector_.erase(iv_it, out->index_vector_.end());
-        break;
+      *out = RowMap(std::move(bv));
+    }
+    void operator()(const BitVector& out_bv) {
+      auto out_it = out_bv.IterateAllBits();
+      for (; out_it; bv_iter.Next(), out_it.Next()) {
+        PERFETTO_DCHECK(bv_iter);
+        if (out_it.IsSet() && !p(bv_iter.index()))
+          out_it.Clear();
       }
     }
+    void operator()(std::vector<OutputIndex>& out_vec) {
+      PERFETTO_DCHECK(std::is_sorted(out_vec.begin(), out_vec.end()));
+      auto fn = [this](uint32_t i) {
+        while (bv_iter.ordinal() < i) {
+          bv_iter.Next();
+          PERFETTO_DCHECK(bv_iter);
+        }
+        PERFETTO_DCHECK(bv_iter.ordinal() == i);
+        return !p(bv_iter.index());
+      };
+      auto iv_it = std::remove_if(out_vec.begin(), out_vec.end(), fn);
+      out_vec.erase(iv_it, out_vec.end());
+    }
+    RowMap* out;
+    Predicate p;
+    internal::SetBitsIterator bv_iter;
+  };
+
+  template <typename Predicate>
+  void FilterIntoScanSelfBv(RowMap* out, Predicate p) const {
+    const BitVector* bv = std::get_if<BitVector>(&row_map_.data_);
+    auto it = bv->IterateSetBits();
+    std::visit(FilterIntoScanSelfBvVisitor<Predicate>{out, p, std::move(it)},
+               out->data_);
   }
 
   RowMap row_map_;
diff --git a/src/trace_processor/db/null_overlay.h b/src/trace_processor/db/null_overlay.h
new file mode 100644
index 0000000..52cf85c
--- /dev/null
+++ b/src/trace_processor/db/null_overlay.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_TRACE_PROCESSOR_DB_NULL_OVERLAY_H_
+#define SRC_TRACE_PROCESSOR_DB_NULL_OVERLAY_H_
+
+#include <variant>
+#include "perfetto/ext/base/status_or.h"
+#include "src/trace_processor/db/column.h"
+#include "src/trace_processor/db/column_overlay.h"
+#include "src/trace_processor/db/storage.h"
+
+namespace perfetto {
+namespace trace_processor {
+namespace column {
+
+// Overlay responsible for operations related to column nullability.
+class NullOverlay : public ColumnOverlay {
+ public:
+  explicit NullOverlay(std::unique_ptr<ColumnOverlay>);
+  void Filter(FilterOp, SqlValue, RowMap&) override;
+  void Sort(std::vector<uint32_t>&) override;
+
+ private:
+  std::unique_ptr<ColumnOverlay> inner_;
+
+  // Vector of data nullability.
+  const BitVector* null_bv_;
+};
+
+}  // namespace column
+}  // namespace trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_TRACE_PROCESSOR_DB_NULL_OVERLAY_H_
diff --git a/src/trace_processor/db/numeric_storage.cc b/src/trace_processor/db/numeric_storage.cc
new file mode 100644
index 0000000..a1984a8
--- /dev/null
+++ b/src/trace_processor/db/numeric_storage.cc
@@ -0,0 +1,230 @@
+
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <variant>
+
+#include "perfetto/ext/base/status_or.h"
+#include "src/trace_processor/db/column.h"
+#include "src/trace_processor/db/numeric_storage.h"
+
+namespace perfetto {
+namespace trace_processor {
+namespace column {
+
+namespace {
+// As we don't template those functions, we need to use std::visitor to type
+// `start`, hence this wrapping.
+inline uint32_t UpperBoundIndex(NumericValue val,
+                                const void* start,
+                                uint32_t num_elements) {
+  return std::visit(
+      [start, num_elements](auto val_data) {
+        using T = decltype(val_data);
+        const T* typed_start = static_cast<const T*>(start);
+        auto upper =
+            std::upper_bound(typed_start, typed_start + num_elements, val_data);
+        return static_cast<uint32_t>(std::distance(typed_start, upper));
+      },
+      val);
+}
+
+// As we don't template those functions, we need to use std::visitor to type
+// `start`, hence this wrapping.
+inline uint32_t LowerBoundIndex(NumericValue val,
+                                const void* start,
+                                uint32_t num_elements) {
+  return std::visit(
+      [start, num_elements](auto val_data) {
+        using T = decltype(val_data);
+        const T* typed_start = static_cast<const T*>(start);
+        auto upper =
+            std::lower_bound(typed_start, typed_start + num_elements, val_data);
+        return static_cast<uint32_t>(std::distance(typed_start, upper));
+      },
+      val);
+}
+
+// Templated part of FastPathComparison.
+template <typename T>
+inline void TypedFastPathComparison(std::optional<NumericValue> val,
+                                    FilterOp op,
+                                    const T* start,
+                                    uint32_t num_elements,
+                                    BitVector::Builder& builder) {
+  if (!val) {
+    builder.Skip(num_elements);
+    return;
+  }
+  std::visit(
+      [val, start, num_elements, &builder](auto comparator) {
+        T typed_val = std::get<T>(*val);
+        for (uint32_t i = 0; i < num_elements; i += BitVector::kBitsInWord) {
+          uint64_t word = 0;
+          // This part should be optimised by SIMD and is expected to be fast.
+          for (uint32_t k = 0; k < BitVector::kBitsInWord; ++k) {
+            bool comp_result = comparator(start[i + k], typed_val);
+            word |= static_cast<uint64_t>(comp_result) << k;
+          }
+          builder.AppendWord(word);
+        }
+      },
+      GetFilterOpVariant<T>(op));
+}
+
+// Templated part of SlowPathComparison.
+template <typename T>
+inline void TypedSlowPathComparison(std::optional<NumericValue> val,
+                                    FilterOp op,
+                                    const T* start,
+                                    uint32_t num_elements,
+                                    BitVector::Builder& builder) {
+  if (!val) {
+    builder.Skip(num_elements);
+    return;
+  }
+  std::visit(
+      [val, start, num_elements, &builder](auto comparator) {
+        T typed_val = std::get<T>(*val);
+        for (uint32_t i = 0; i < num_elements; ++i) {
+          builder.Append(comparator(start[i], typed_val));
+        }
+      },
+      GetFilterOpVariant<T>(op));
+}
+
+}  // namespace
+
+void NumericStorage::StableSort(std::vector<uint32_t>& out) const {
+  NumericValue val = *GetNumericTypeVariant(type_, SqlValue::Long(0));
+  std::visit(
+      [this, &out](auto val_data) {
+        using T = decltype(val_data);
+        const T* typed_start = static_cast<const T*>(data_);
+        std::stable_sort(out.begin(), out.end(),
+                         [typed_start](uint32_t a_idx, uint32_t b_idx) {
+                           T first_val = typed_start[a_idx];
+                           T second_val = typed_start[b_idx];
+                           return first_val < second_val;
+                         });
+      },
+      val);
+}
+
+// Responsible for invoking templated version of FastPathComparison.
+void NumericStorage::CompareFast(FilterOp op,
+                                 SqlValue sql_val,
+                                 const void* start,
+                                 uint32_t num_elements,
+                                 BitVector::Builder& builder) const {
+  std::optional<NumericValue> val = GetNumericTypeVariant(type_, sql_val);
+
+  // If the value is invalid we should just ignore those elements.
+  if (!val.has_value() || op == FilterOp::kIsNotNull ||
+      op == FilterOp::kIsNull || op == FilterOp::kGlob) {
+    builder.Skip(num_elements);
+    return;
+  }
+  std::visit(
+      [op, start, num_elements, &builder](auto num_val) {
+        using T = decltype(num_val);
+        auto* typed_start = static_cast<const T*>(start);
+        TypedFastPathComparison(num_val, op, typed_start, num_elements,
+                                builder);
+      },
+      *val);
+}
+
+// Responsible for invoking templated version of SlowPathComparison.
+void NumericStorage::CompareSlow(FilterOp op,
+                                 SqlValue sql_val,
+                                 const void* start,
+                                 uint32_t num_elements,
+                                 BitVector::Builder& builder) const {
+  std::optional<NumericValue> val = GetNumericTypeVariant(type_, sql_val);
+
+  // If the value is invalid we should just ignore those elements.
+  if (!val.has_value() || op == FilterOp::kIsNotNull ||
+      op == FilterOp::kIsNull || op == FilterOp::kGlob) {
+    builder.Skip(num_elements);
+    return;
+  }
+
+  std::visit(
+      [op, start, num_elements, &builder](auto val) {
+        using T = decltype(val);
+        auto* typed_start = static_cast<const T*>(start);
+        TypedSlowPathComparison(val, op, typed_start, num_elements, builder);
+      },
+      *val);
+}
+
+void NumericStorage::CompareSorted(FilterOp op,
+                                   SqlValue sql_val,
+                                   const void* start,
+                                   uint32_t num_elements,
+                                   RowMap& rm) const {
+  std::optional<NumericValue> val = GetNumericTypeVariant(type_, sql_val);
+  if (!val.has_value() || op == FilterOp::kIsNotNull ||
+      op == FilterOp::kIsNull || op == FilterOp::kGlob) {
+    rm.Clear();
+    return;
+  }
+
+  switch (op) {
+    case FilterOp::kEq: {
+      uint32_t beg = LowerBoundIndex(*val, start, num_elements);
+      uint32_t end = UpperBoundIndex(*val, start, num_elements);
+      RowMap sec(beg, end);
+      rm.Intersect(sec);
+      return;
+    }
+    case FilterOp::kLe: {
+      uint32_t end = UpperBoundIndex(*val, start, num_elements);
+      RowMap sec(0, end);
+      rm.Intersect(sec);
+      return;
+    }
+    case FilterOp::kLt: {
+      uint32_t end = LowerBoundIndex(*val, start, num_elements);
+      RowMap sec(0, end);
+      rm.Intersect(sec);
+      return;
+    }
+    case FilterOp::kGe: {
+      uint32_t beg = LowerBoundIndex(*val, start, num_elements);
+      RowMap sec(beg, num_elements);
+      rm.Intersect(sec);
+      return;
+    }
+    case FilterOp::kGt: {
+      uint32_t beg = UpperBoundIndex(*val, start, num_elements);
+      RowMap sec(beg, num_elements);
+      rm.Intersect(sec);
+      return;
+    }
+    case FilterOp::kNe:
+    case FilterOp::kIsNull:
+    case FilterOp::kIsNotNull:
+    case FilterOp::kGlob:
+      rm.Clear();
+  }
+  return;
+}
+
+}  // namespace column
+}  // namespace trace_processor
+}  // namespace perfetto
diff --git a/src/trace_processor/db/numeric_storage.h b/src/trace_processor/db/numeric_storage.h
new file mode 100644
index 0000000..7677f82
--- /dev/null
+++ b/src/trace_processor/db/numeric_storage.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef SRC_TRACE_PROCESSOR_DB_NUMERIC_STORAGE_H_
+#define SRC_TRACE_PROCESSOR_DB_NUMERIC_STORAGE_H_
+
+#include <variant>
+#include "perfetto/ext/base/status_or.h"
+#include "src/trace_processor/db/column.h"
+#include "src/trace_processor/db/storage.h"
+#include "src/trace_processor/db/storage_variants.h"
+
+namespace perfetto {
+namespace trace_processor {
+namespace column {
+
+class NumericStorage : public Storage {
+ public:
+  NumericStorage(const void* data, ColumnType type)
+      : type_(type), data_(data) {}
+
+  void StableSort(std::vector<uint32_t>&) const override;
+
+  void CompareFast(FilterOp op,
+                   SqlValue val,
+                   const void* start,
+                   uint32_t num_elements,
+                   BitVector::Builder& builder) const override;
+
+  // Inefficiently compares series of |num_elements| of data from |data_start|
+  // to comparator value and appends results to BitVector::Builder. Should be
+  // avoided if possible, with `FastSeriesComparison` used instead.
+  void CompareSlow(FilterOp op,
+                   SqlValue val,
+                   const void* start,
+                   uint32_t num_elements,
+                   BitVector::Builder& builder) const override;
+
+  // Compares sorted (asc) series of |num_elements| of data from |data_start| to
+  // comparator value. Should be used where possible.
+  void CompareSorted(FilterOp op,
+                     SqlValue val,
+                     const void* data_start,
+                     uint32_t num_elements,
+                     RowMap&) const override;
+
+ private:
+  const ColumnType type_;
+  const void* data_;
+};
+
+}  // namespace column
+}  // namespace trace_processor
+}  // namespace perfetto
+#endif  // SRC_TRACE_PROCESSOR_DB_NUMERIC_STORAGE_H_
diff --git a/src/trace_processor/db/sorting_overlay.h b/src/trace_processor/db/sorting_overlay.h
new file mode 100644
index 0000000..86a5676
--- /dev/null
+++ b/src/trace_processor/db/sorting_overlay.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_TRACE_PROCESSOR_DB_SORTING_OVERLAY_H_
+#define SRC_TRACE_PROCESSOR_DB_SORTING_OVERLAY_H_
+
+#include <variant>
+#include "perfetto/ext/base/status_or.h"
+#include "src/trace_processor/db/column.h"
+#include "src/trace_processor/db/column_overlay.h"
+#include "src/trace_processor/db/storage.h"
+
+namespace perfetto {
+namespace trace_processor {
+namespace column {
+
+// Overlay responsible for operations related to column sorted state.
+class SortingOverlay : public ColumnOverlay {
+ public:
+  explicit SortingOverlay(ColumnOverlay* ancestor);
+  void Filter(FilterOp, SqlValue, RowMap&) override;
+  void Sort(std::vector<uint32_t>&) override;
+
+ private:
+  std::unique_ptr<ColumnOverlay> inner_;
+
+  // Index vector of data sorted in ascending order.
+  const std::vector<uint32_t>* sorted_state_;
+};
+}  // namespace column
+}  // namespace trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_TRACE_PROCESSOR_DB_SORTING_OVERLAY_H_
diff --git a/src/trace_processor/types/variadic.cc b/src/trace_processor/db/storage.cc
similarity index 77%
rename from src/trace_processor/types/variadic.cc
rename to src/trace_processor/db/storage.cc
index 9a26bd5..4799d04 100644
--- a/src/trace_processor/types/variadic.cc
+++ b/src/trace_processor/db/storage.cc
@@ -1,5 +1,5 @@
-#/*
- * Copyright (C) 2018 The Android Open Source Project
+/*
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,14 +14,14 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/types/variadic.h"
+#include "src/trace_processor/db/storage.h"
 
 namespace perfetto {
 namespace trace_processor {
+namespace column {
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-constexpr const char* Variadic::kTypeNames[];
-#endif
+Storage::~Storage() = default;
 
+}  // namespace column
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/storage.h b/src/trace_processor/db/storage.h
new file mode 100644
index 0000000..dbf037d
--- /dev/null
+++ b/src/trace_processor/db/storage.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_H_
+#define SRC_TRACE_PROCESSOR_DB_STORAGE_H_
+
+#include <variant>
+#include "perfetto/ext/base/status_or.h"
+#include "src/trace_processor/db/column.h"
+
+namespace perfetto {
+namespace trace_processor {
+namespace column {
+
+// Most base column interpreting layer - responsible for implementing operations
+// that require looking at the data, such as comparison or sorting.
+class Storage {
+ public:
+  virtual ~Storage();
+
+  // Changes the vector of indices to represent the sorted state of the column.
+  virtual void StableSort(std::vector<uint32_t>&) const = 0;
+
+  // Efficiently compares series of |num_elements| of data from |data_start| to
+  // comparator value and appends results to BitVector::Builder. Should be used
+  // on as much data as possible.
+  virtual void CompareFast(FilterOp op,
+                           SqlValue value,
+                           const void* start,
+                           uint32_t compare_elements_count,
+                           BitVector::Builder&) const = 0;
+
+  // Inefficiently compares series of |num_elements| of data from |data_start|
+  // to comparator value and appends results to BitVector::Builder. Should be
+  // avoided if possible, with `FastSeriesComparison` used instead.
+  virtual void CompareSlow(FilterOp op,
+                           SqlValue value,
+                           const void* data_start,
+                           uint32_t compare_elements_count,
+                           BitVector::Builder&) const = 0;
+
+  // Compares sorted (asc) series of |num_elements| of data from |data_start| to
+  // comparator value. Should be used where possible.
+  virtual void CompareSorted(FilterOp op,
+                             SqlValue value,
+                             const void* data_start,
+                             uint32_t compare_elements_count,
+                             RowMap&) const = 0;
+};
+
+}  // namespace column
+}  // namespace trace_processor
+}  // namespace perfetto
+#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_H_
diff --git a/src/trace_processor/db/storage_overlay.h b/src/trace_processor/db/storage_overlay.h
new file mode 100644
index 0000000..2690919
--- /dev/null
+++ b/src/trace_processor/db/storage_overlay.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_OVERLAY_H_
+#define SRC_TRACE_PROCESSOR_DB_STORAGE_OVERLAY_H_
+
+#include <variant>
+#include "perfetto/ext/base/status_or.h"
+#include "src/trace_processor/db/column.h"
+#include "src/trace_processor/db/column_overlay.h"
+#include "src/trace_processor/db/storage.h"
+
+namespace perfetto {
+namespace trace_processor {
+namespace column {
+
+// Overlay responsible for doing operations on storage.
+class StorageOverlay : public ColumnOverlay {
+ public:
+  explicit StorageOverlay(const Storage*);
+  void Filter(FilterOp, SqlValue, RowMap&) override;
+  void Sort(std::vector<uint32_t>&) override;
+
+ private:
+  const Storage* storage_;
+};
+}  // namespace column
+}  // namespace trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_OVERLAY_H_
diff --git a/src/trace_processor/db/storage_unittest.cc b/src/trace_processor/db/storage_unittest.cc
new file mode 100644
index 0000000..3b8f7c4
--- /dev/null
+++ b/src/trace_processor/db/storage_unittest.cc
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/trace_processor/db/numeric_storage.h"
+
+#include "test/gtest_and_gmock.h"
+
+namespace perfetto {
+namespace trace_processor {
+namespace column {
+
+namespace {
+
+TEST(StorageUnittest, StableSortTrivial) {
+  std::vector<uint32_t> data_vec{0, 1, 2, 0, 1, 2, 0, 1, 2};
+  std::vector<uint32_t> out = {0, 1, 2, 3, 4, 5, 6, 7, 8};
+
+  NumericStorage storage(data_vec.data(), ColumnType::kUint32);
+  RowMap rm(0, 9);
+  storage.StableSort(out);
+
+  std::vector<uint32_t> stable_out{0, 3, 6, 1, 4, 7, 2, 5, 8};
+  ASSERT_EQ(out, stable_out);
+}
+
+TEST(StorageUnittest, StableSort) {
+  std::vector<uint32_t> data_vec{0, 1, 2, 0, 1, 2, 0, 1, 2};
+  std::vector<uint32_t> out = {1, 7, 4, 0, 6, 3, 2, 5, 8};
+
+  NumericStorage storage(data_vec.data(), ColumnType::kUint32);
+  RowMap rm(0, 9);
+  storage.StableSort(out);
+
+  std::vector<uint32_t> stable_out{0, 6, 3, 1, 7, 4, 2, 5, 8};
+  ASSERT_EQ(out, stable_out);
+}
+
+TEST(StorageUnittest, CompareSlow) {
+  std::vector<uint32_t> data_vec{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+  NumericStorage storage(data_vec.data(), ColumnType::kUint32);
+  BitVector::Builder builder(10);
+  storage.CompareSlow(FilterOp::kGe, SqlValue::Long(5), data_vec.data(), 10,
+                      builder);
+  BitVector bv = std::move(builder).Build();
+
+  ASSERT_EQ(bv.CountSetBits(), 5u);
+  ASSERT_EQ(bv.IndexOfNthSet(0), 5u);
+}
+
+TEST(StorageUnittest, CompareFast) {
+  std::vector<uint32_t> data_vec;
+  for (uint32_t i = 0; i < 128; ++i) {
+    data_vec.push_back(i);
+  }
+  NumericStorage storage(data_vec.data(), ColumnType::kUint32);
+  BitVector::Builder builder(128);
+  storage.CompareFast(FilterOp::kGe, SqlValue::Long(100), data_vec.data(), 128,
+                      builder);
+  BitVector bv = std::move(builder).Build();
+
+  ASSERT_EQ(bv.CountSetBits(), 28u);
+  ASSERT_EQ(bv.IndexOfNthSet(0), 100u);
+}
+
+TEST(StorageUnittest, CompareSorted) {
+  std::vector<uint32_t> data_vec;
+  for (uint32_t i = 0; i < 128; ++i) {
+    data_vec.push_back(i);
+  }
+  NumericStorage storage(data_vec.data(), ColumnType::kUint32);
+  RowMap rm(0, 128);
+  storage.CompareSorted(FilterOp::kGe, SqlValue::Long(100), data_vec.data(),
+                        128, rm);
+
+  ASSERT_EQ(rm.size(), 28u);
+  ASSERT_EQ(rm.Get(0), 100u);
+}
+
+}  // namespace
+}  // namespace column
+}  // namespace trace_processor
+}  // namespace perfetto
diff --git a/src/trace_processor/db/storage_variants.h b/src/trace_processor/db/storage_variants.h
new file mode 100644
index 0000000..bc169b9
--- /dev/null
+++ b/src/trace_processor/db/storage_variants.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef SRC_TRACE_PROCESSOR_DB_STORAGE_VARIANTS_H_
+#define SRC_TRACE_PROCESSOR_DB_STORAGE_VARIANTS_H_
+
+#include <variant>
+#include "perfetto/ext/base/status_or.h"
+#include "src/trace_processor/db/column.h"
+#include "src/trace_processor/db/storage.h"
+
+namespace perfetto {
+namespace trace_processor {
+namespace column {
+
+// All viable numeric values for ColumnTypes.
+using NumericValue = std::variant<uint32_t, int32_t, int64_t, double_t>;
+
+// Using the fact that binary operators in std are operators() of classes, we
+// can wrap those classes in variants and use them for std::visit in
+// SerialComparators. This helps prevent excess templating and switches.
+template <typename T>
+using FilterOpVariant = std::variant<std::greater<T>,
+                                     std::greater_equal<T>,
+                                     std::less<T>,
+                                     std::less_equal<T>,
+                                     std::equal_to<T>,
+                                     std::not_equal_to<T>>;
+
+// Based on SqlValue and ColumnType, casts SqlValue to proper type, returns
+// std::nullopt if SqlValue can't be cast and should be considered invalid for
+// comparison.
+inline std::optional<NumericValue> GetNumericTypeVariant(ColumnType type,
+                                                         SqlValue val) {
+  if (val.is_null())
+    return std::nullopt;
+
+  switch (type) {
+    case ColumnType::kDouble:
+      return val.AsDouble();
+    case ColumnType::kInt64:
+      return val.AsLong();
+    case ColumnType::kInt32:
+      if (val.AsLong() > std::numeric_limits<int32_t>::max() ||
+          val.AsLong() < std::numeric_limits<int32_t>::min())
+        return std::nullopt;
+      return static_cast<int32_t>(val.AsLong());
+    case ColumnType::kUint32:
+      if (val.AsLong() > std::numeric_limits<uint32_t>::max() ||
+          val.AsLong() < std::numeric_limits<uint32_t>::min())
+        return std::nullopt;
+      return static_cast<uint32_t>(val.AsLong());
+    case ColumnType::kString:
+    case ColumnType::kDummy:
+    case ColumnType::kId:
+      return std::nullopt;
+  }
+  PERFETTO_FATAL("For GCC");
+}
+
+// Based on SqlValue and ColumnType, casts SqlValue to proper type, returns
+// std::nullopt if SqlValue can't be cast and should be considered invalid for
+// comparison.
+inline std::optional<NumericValue> GetNumericTypeVariant(ColumnType type) {
+  return GetNumericTypeVariant(type, SqlValue::Long(0));
+}
+
+// Fetch std binary comparator class based on FilterOp. Can be used in
+// std::visit for comparison.
+template <typename T>
+inline FilterOpVariant<T> GetFilterOpVariant(FilterOp op) {
+  switch (op) {
+    case FilterOp::kEq:
+      return FilterOpVariant<T>(std::equal_to<T>());
+    case FilterOp::kNe:
+      return FilterOpVariant<T>(std::not_equal_to<T>());
+    case FilterOp::kGe:
+      return FilterOpVariant<T>(std::greater_equal<T>());
+    case FilterOp::kGt:
+      return FilterOpVariant<T>(std::greater<T>());
+    case FilterOp::kLe:
+      return FilterOpVariant<T>(std::less_equal<T>());
+    case FilterOp::kLt:
+      return FilterOpVariant<T>(std::less<T>());
+    case FilterOp::kGlob:
+    case FilterOp::kIsNotNull:
+    case FilterOp::kIsNull:
+      PERFETTO_FATAL("Not a valid operation on numeric type.");
+  }
+  PERFETTO_FATAL("For GCC");
+}
+
+}  // namespace column
+}  // namespace trace_processor
+}  // namespace perfetto
+#endif  // SRC_TRACE_PROCESSOR_DB_STORAGE_VARIANTS_H_
diff --git a/src/trace_processor/db/table_unittest.cc b/src/trace_processor/db/table_unittest.cc
deleted file mode 100644
index 6f370ca..0000000
--- a/src/trace_processor/db/table_unittest.cc
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "src/trace_processor/db/table.h"
-#include "src/trace_processor/db/typed_column.h"
-#include "src/trace_processor/tables/macros.h"
-
-#include "test/gtest_and_gmock.h"
-
-namespace perfetto {
-namespace trace_processor {
-namespace {
-
-#define PERFETTO_TP_TEST_EVENT_TABLE_DEF(NAME, PARENT, C) \
-  NAME(TestEventTable, "event")                           \
-  PARENT(PERFETTO_TP_ROOT_TABLE_PARENT_DEF, C)            \
-  C(int64_t, ts, Column::Flag::kSorted)                   \
-  C(int64_t, dur)                                         \
-  C(uint32_t, arg_set_id, Column::Flag::kSorted | Column::Flag::kSetId)
-PERFETTO_TP_TABLE(PERFETTO_TP_TEST_EVENT_TABLE_DEF);
-
-TestEventTable::~TestEventTable() = default;
-
-TEST(TableTest, SetIdColumns) {
-  StringPool pool;
-  TestEventTable table{&pool, nullptr};
-
-  table.Insert(TestEventTable::Row(0, 0, 0));
-  table.Insert(TestEventTable::Row(1, 0, 0));
-  table.Insert(TestEventTable::Row(2, 0, 2));
-  table.Insert(TestEventTable::Row(3, 0, 3));
-  table.Insert(TestEventTable::Row(4, 0, 4));
-  table.Insert(TestEventTable::Row(5, 0, 4));
-  table.Insert(TestEventTable::Row(6, 0, 4));
-  table.Insert(TestEventTable::Row(7, 0, 4));
-  table.Insert(TestEventTable::Row(8, 0, 8));
-
-  ASSERT_EQ(table.row_count(), 9u);
-  ASSERT_TRUE(table.arg_set_id().IsSetId());
-
-  // Verify that not-present ids are not returned.
-  {
-    static constexpr uint32_t kFilterArgSetId = 1;
-    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
-    ASSERT_EQ(res.row_count(), 0u);
-  }
-  {
-    static constexpr uint32_t kFilterArgSetId = 9;
-    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
-    ASSERT_EQ(res.row_count(), 0u);
-  }
-
-  // Verify that kSetId flag is correctly removed after filtering/sorting.
-  {
-    static constexpr uint32_t kFilterArgSetId = 3;
-    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
-    ASSERT_EQ(res.row_count(), 1u);
-    ASSERT_FALSE(res.GetColumnByName("arg_set_id")->IsSetId());
-  }
-  {
-    auto res = table.Sort({table.dur().descending()});
-    ASSERT_FALSE(res.GetColumnByName("arg_set_id")->IsSetId());
-  }
-
-  uint32_t arg_set_id_col_idx =
-      static_cast<uint32_t>(TestEventTable::ColumnIndex::arg_set_id);
-
-  // Verify that filtering equality for real arg set ids works as expected.
-  {
-    static constexpr uint32_t kFilterArgSetId = 4;
-    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
-    ASSERT_EQ(res.row_count(), 4u);
-    for (auto it = res.IterateRows(); it; it.Next()) {
-      uint32_t arg_set_id =
-          static_cast<uint32_t>(it.Get(arg_set_id_col_idx).AsLong());
-      ASSERT_EQ(arg_set_id, kFilterArgSetId);
-    }
-  }
-  {
-    static constexpr uint32_t kFilterArgSetId = 0;
-    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
-    ASSERT_EQ(res.row_count(), 2u);
-    for (auto it = res.IterateRows(); it; it.Next()) {
-      uint32_t arg_set_id =
-          static_cast<uint32_t>(it.Get(arg_set_id_col_idx).AsLong());
-      ASSERT_EQ(arg_set_id, kFilterArgSetId);
-    }
-  }
-  {
-    static constexpr uint32_t kFilterArgSetId = 8;
-    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
-    ASSERT_EQ(res.row_count(), 1u);
-    for (auto it = res.IterateRows(); it; it.Next()) {
-      uint32_t arg_set_id =
-          static_cast<uint32_t>(it.Get(arg_set_id_col_idx).AsLong());
-      ASSERT_EQ(arg_set_id, kFilterArgSetId);
-    }
-  }
-
-  // Verify that filtering equality for arg set ids after filtering another
-  // column works.
-  {
-    static constexpr uint32_t kFilterArgSetId = 4;
-    auto res = table.Filter(
-        {table.ts().ge(6), table.arg_set_id().eq(kFilterArgSetId)});
-    ASSERT_EQ(res.row_count(), 2u);
-    for (auto it = res.IterateRows(); it; it.Next()) {
-      uint32_t arg_set_id =
-          static_cast<uint32_t>(it.Get(arg_set_id_col_idx).AsLong());
-      ASSERT_EQ(arg_set_id, kFilterArgSetId);
-    }
-  }
-}
-
-}  // namespace
-}  // namespace trace_processor
-}  // namespace perfetto
diff --git a/src/trace_processor/db/view_unittest.cc b/src/trace_processor/db/view_unittest.cc
index 2507b92..221753a 100644
--- a/src/trace_processor/db/view_unittest.cc
+++ b/src/trace_processor/db/view_unittest.cc
@@ -15,53 +15,23 @@
  */
 
 #include "src/trace_processor/db/view.h"
-#include "src/trace_processor/tables/macros.h"
+#include "src/trace_processor/db/view_unittest_py.h"
 #include "src/trace_processor/views/macros.h"
 
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
 namespace trace_processor {
+namespace tables {
+
+ViewThreadTable::~ViewThreadTable() = default;
+ViewTrackTable::~ViewTrackTable() = default;
+ViewThreadTrackTable::~ViewThreadTrackTable() = default;
+ViewEventTable::~ViewEventTable() = default;
+ViewSliceTable::~ViewSliceTable() = default;
+
 namespace {
 
-#define PERFETTO_TP_TEST_THREAD_TABLE_DEF(NAME, PARENT, C) \
-  NAME(TestThreadTable, "thread_table")                    \
-  PARENT(PERFETTO_TP_ROOT_TABLE_PARENT_DEF, C)             \
-  C(StringPool::Id, name)                                  \
-  C(uint32_t, tid)
-PERFETTO_TP_TABLE(PERFETTO_TP_TEST_THREAD_TABLE_DEF);
-
-#define PERFETTO_TP_TEST_TRACK_TABLE_DEF(NAME, PARENT, C) \
-  NAME(TestTrackTable, "track_table")                     \
-  PARENT(PERFETTO_TP_ROOT_TABLE_PARENT_DEF, C)            \
-  C(StringPool::Id, name)
-PERFETTO_TP_TABLE(PERFETTO_TP_TEST_TRACK_TABLE_DEF);
-
-#define PERFETTO_TP_TEST_THREAD_TRACK_TABLE_DEF(NAME, PARENT, C) \
-  NAME(TestThreadTrackTable, "thread_track_table")               \
-  PARENT(PERFETTO_TP_TEST_TRACK_TABLE_DEF, C)                    \
-  C(TestThreadTable::Id, utid)
-PERFETTO_TP_TABLE(PERFETTO_TP_TEST_THREAD_TRACK_TABLE_DEF);
-
-#define PERFETTO_TP_TEST_EVENT_TABLE_DEF(NAME, PARENT, C) \
-  NAME(TestEventTable, "event_table")                     \
-  PARENT(PERFETTO_TP_ROOT_TABLE_PARENT_DEF, C)            \
-  C(int64_t, ts, Column::Flag::kSorted)                   \
-  C(TestTrackTable::Id, track_id)
-PERFETTO_TP_TABLE(PERFETTO_TP_TEST_EVENT_TABLE_DEF);
-
-#define PERFETTO_TP_TEST_SLICE_TABLE_DEF(NAME, PARENT, C) \
-  NAME(TestSliceTable, "slice_table")                     \
-  PARENT(PERFETTO_TP_TEST_EVENT_TABLE_DEF, C)             \
-  C(StringPool::Id, name)
-PERFETTO_TP_TABLE(PERFETTO_TP_TEST_SLICE_TABLE_DEF);
-
-TestThreadTable::~TestThreadTable() = default;
-TestTrackTable::~TestTrackTable() = default;
-TestThreadTrackTable::~TestThreadTrackTable() = default;
-TestEventTable::~TestEventTable() = default;
-TestSliceTable::~TestSliceTable() = default;
-
 template <typename ViewSubclass>
 class AbstractViewTest : public ::testing::Test {
  protected:
@@ -106,17 +76,17 @@
 };
 
 #define PERFETTO_TP_EVENT_VIEW_DEF(NAME, FROM, JOIN, COL, _)               \
-  NAME(TestEventView, "event_view")                                        \
-  FROM(TestEventTable, event)                                              \
-  JOIN(TestTrackTable, track, id, event, track_id, View::kIdAlwaysPresent) \
+  NAME(ViewEventView, "event_view")                                        \
+  FROM(ViewEventTable, event)                                              \
+  JOIN(ViewTrackTable, track, id, event, track_id, View::kIdAlwaysPresent) \
   COL(id, event, id)                                                       \
   COL(ts, event, ts)                                                       \
   COL(track_id, event, track_id)                                           \
   COL(track_name, track, name)
 PERFETTO_TP_DECLARE_VIEW(PERFETTO_TP_EVENT_VIEW_DEF);
-PERFETTO_TP_DEFINE_VIEW(TestEventView);
+PERFETTO_TP_DEFINE_VIEW(ViewEventView);
 
-class EventViewTest : public AbstractViewTest<TestEventView> {
+class EventViewTest : public AbstractViewTest<ViewEventView> {
  protected:
   EventViewTest() {
     t1_id_ = track_.Insert({/* name */ Intern("foo")}).id;
@@ -127,26 +97,26 @@
     event_table_.Insert({/* ts */ 102, t1_id_});
   }
 
-  virtual TestEventView& view() override { return event_view_; }
+  virtual ViewEventView& view() override { return event_view_; }
 
-  TestTrackTable::Id t1_id_;
-  TestTrackTable::Id t2_id_;
+  ViewTrackTable::Id t1_id_;
+  ViewTrackTable::Id t2_id_;
 
  private:
-  TestEventTable event_table_{&pool_, nullptr};
-  TestTrackTable track_{&pool_, nullptr};
-  TestEventView event_view_{&event_table_, &track_};
+  ViewEventTable event_table_{&pool_};
+  ViewTrackTable track_{&pool_};
+  ViewEventView event_view_{&event_table_, &track_};
 };
 
 TEST_F(EventViewTest, UnusedColumnsAreDummy) {
-  TestEventView::QueryResult result = QueryUsingCols({ColIdx::track_name});
+  ViewEventView::QueryResult result = QueryUsingCols({ColIdx::track_name});
   ASSERT_TRUE(result.columns()[ColIdx::id].IsDummy());
   ASSERT_TRUE(result.columns()[ColIdx::ts].IsDummy());
   ASSERT_FALSE(result.columns()[ColIdx::track_name].IsDummy());
 }
 
 TEST_F(EventViewTest, Iterate) {
-  TestEventView::QueryResult result = Query();
+  ViewEventView::QueryResult result = Query();
   auto it = result.IterateRows();
   ASSERT_TRUE(it);
   ASSERT_EQ(it.row_number().row_number(), 0u);
@@ -170,13 +140,13 @@
 }
 
 TEST_F(EventViewTest, FilterEventEmpty) {
-  TestEventView::QueryResult result = Query({view().ts().eq(0)});
+  ViewEventView::QueryResult result = Query({view().ts().eq(0)});
   auto it = result.IterateRows();
   ASSERT_FALSE(it);
 }
 
 TEST_F(EventViewTest, FilterEventNoUseTrack) {
-  TestEventView::QueryResult result =
+  ViewEventView::QueryResult result =
       Query({view().ts().eq(100)}, {}, {ColIdx::ts});
   auto it = result.IterateRows();
   ASSERT_TRUE(it);
@@ -186,7 +156,7 @@
 }
 
 TEST_F(EventViewTest, FilterEventUseTrack) {
-  TestEventView::QueryResult result =
+  ViewEventView::QueryResult result =
       Query({view().ts().eq(100)}, {},
             {ColIdx::ts, ColIdx::track_name, ColIdx::track_id});
   auto it = result.IterateRows();
@@ -199,13 +169,13 @@
 }
 
 TEST_F(EventViewTest, FilterTrackEmpty) {
-  TestEventView::QueryResult result = Query({view().track_id().eq(102398)});
+  ViewEventView::QueryResult result = Query({view().track_id().eq(102398)});
   auto it = result.IterateRows();
   ASSERT_FALSE(it);
 }
 
 TEST_F(EventViewTest, FilterTrackNoUseEvent) {
-  TestEventView::QueryResult result =
+  ViewEventView::QueryResult result =
       Query({view().track_name().eq("foo")}, {},
             {ColIdx::track_name, ColIdx::track_id});
   auto it = result.IterateRows();
@@ -221,7 +191,7 @@
 }
 
 TEST_F(EventViewTest, FilterTrackUseEvent) {
-  TestEventView::QueryResult result =
+  ViewEventView::QueryResult result =
       Query({view().track_id().eq(t1_id_.value)}, {},
             {ColIdx::ts, ColIdx::track_name, ColIdx::track_id});
   auto it = result.IterateRows();
@@ -239,10 +209,10 @@
 }
 
 #define PERFETTO_TP_THREAD_EVENT_VIEW_DEF(NAME, FROM, JOIN, COL, _)      \
-  NAME(TestThreadEventView, "thread_event_view")                         \
-  FROM(TestEventTable, event)                                            \
-  JOIN(TestThreadTrackTable, track, id, event, track_id, View::kNoFlag)  \
-  JOIN(TestThreadTable, thread, id, track, utid, View::kIdAlwaysPresent) \
+  NAME(ViewThreadEventView, "thread_event_view")                         \
+  FROM(ViewEventTable, event)                                            \
+  JOIN(ViewThreadTrackTable, track, id, event, track_id, View::kNoFlag)  \
+  JOIN(ViewThreadTable, thread, id, track, utid, View::kIdAlwaysPresent) \
   COL(id, event, id)                                                     \
   COL(ts, event, ts)                                                     \
   COL(track_id, track, id)                                               \
@@ -250,9 +220,9 @@
   COL(utid, track, utid)                                                 \
   COL(thread_name, thread, name)
 PERFETTO_TP_DECLARE_VIEW(PERFETTO_TP_THREAD_EVENT_VIEW_DEF);
-PERFETTO_TP_DEFINE_VIEW(TestThreadEventView);
+PERFETTO_TP_DEFINE_VIEW(ViewThreadEventView);
 
-class ThreadEventViewTest : public AbstractViewTest<TestThreadEventView> {
+class ThreadEventViewTest : public AbstractViewTest<ViewThreadEventView> {
  protected:
   ThreadEventViewTest() {
     th1_id_ = thread_.Insert({Intern("th1"), 1}).id;
@@ -275,24 +245,24 @@
     event_table_.Insert({/* ts */ 107, t4_id_});
   }
 
-  virtual TestThreadEventView& view() override { return event_view_; }
+  virtual ViewThreadEventView& view() override { return event_view_; }
 
-  TestThreadTable::Id th1_id_;
-  TestThreadTable::Id th2_id_;
+  ViewThreadTable::Id th1_id_;
+  ViewThreadTable::Id th2_id_;
 
-  TestTrackTable::Id t1_id_;
-  TestTrackTable::Id t2_id_;
-  TestTrackTable::Id t3_id_;
-  TestTrackTable::Id t4_id_;
-  TestTrackTable::Id t5_id_;
-  TestTrackTable::Id t6_id_;
+  ViewTrackTable::Id t1_id_;
+  ViewTrackTable::Id t2_id_;
+  ViewTrackTable::Id t3_id_;
+  ViewTrackTable::Id t4_id_;
+  ViewTrackTable::Id t5_id_;
+  ViewTrackTable::Id t6_id_;
 
  private:
-  TestEventTable event_table_{&pool_, nullptr};
-  TestTrackTable track_{&pool_, nullptr};
-  TestThreadTrackTable thread_track_{&pool_, &track_};
-  TestThreadTable thread_{&pool_, nullptr};
-  TestThreadEventView event_view_{&event_table_, &thread_track_, &thread_};
+  ViewEventTable event_table_{&pool_};
+  ViewTrackTable track_{&pool_};
+  ViewThreadTrackTable thread_track_{&pool_, &track_};
+  ViewThreadTable thread_{&pool_};
+  ViewThreadEventView event_view_{&event_table_, &thread_track_, &thread_};
 };
 
 TEST_F(ThreadEventViewTest, Iterate) {
@@ -427,7 +397,7 @@
 }
 
 #define PERFETTO_TP_THREAD_SLICE_VIEW_DEF(NAME, FROM, JOIN, COL, _)     \
-  NAME(TestThreadSliceView, "thread_slice_view")                        \
+  NAME(ViewThreadSliceView, "thread_slice_view")                        \
   COL(id, slice, id)                                                    \
   COL(ts, slice, ts)                                                    \
   COL(name, slice, name)                                                \
@@ -435,13 +405,13 @@
   COL(track_name, track, name)                                          \
   COL(utid, thread, id)                                                 \
   COL(thread_name, thread, name)                                        \
-  FROM(TestSliceTable, slice)                                           \
-  JOIN(TestThreadTrackTable, track, id, slice, track_id, View::kNoFlag) \
-  JOIN(TestThreadTable, thread, id, track, utid, View::kIdAlwaysPresent)
+  FROM(ViewSliceTable, slice)                                           \
+  JOIN(ViewThreadTrackTable, track, id, slice, track_id, View::kNoFlag) \
+  JOIN(ViewThreadTable, thread, id, track, utid, View::kIdAlwaysPresent)
 PERFETTO_TP_DECLARE_VIEW(PERFETTO_TP_THREAD_SLICE_VIEW_DEF);
-PERFETTO_TP_DEFINE_VIEW(TestThreadSliceView);
+PERFETTO_TP_DEFINE_VIEW(ViewThreadSliceView);
 
-class ThreadSliceViewTest : public AbstractViewTest<TestThreadSliceView> {
+class ThreadSliceViewTest : public AbstractViewTest<ViewThreadSliceView> {
  protected:
   ThreadSliceViewTest() {
     th1_id_ = thread_.Insert({Intern("th1"), 1}).id;
@@ -464,25 +434,25 @@
     slice_table_.Insert({/* ts */ 107, t4_id_, Intern("ts107")});
   }
 
-  TestThreadSliceView& view() override { return slice_view_; }
+  ViewThreadSliceView& view() override { return slice_view_; }
 
-  TestThreadTable::Id th1_id_;
-  TestThreadTable::Id th2_id_;
+  ViewThreadTable::Id th1_id_;
+  ViewThreadTable::Id th2_id_;
 
-  TestTrackTable::Id t1_id_;
-  TestTrackTable::Id t2_id_;
-  TestTrackTable::Id t3_id_;
-  TestTrackTable::Id t4_id_;
-  TestTrackTable::Id t5_id_;
-  TestTrackTable::Id t6_id_;
+  ViewTrackTable::Id t1_id_;
+  ViewTrackTable::Id t2_id_;
+  ViewTrackTable::Id t3_id_;
+  ViewTrackTable::Id t4_id_;
+  ViewTrackTable::Id t5_id_;
+  ViewTrackTable::Id t6_id_;
 
  private:
-  TestEventTable event_{&pool_, nullptr};
-  TestSliceTable slice_table_{&pool_, &event_};
-  TestTrackTable track_{&pool_, nullptr};
-  TestThreadTrackTable thread_track_{&pool_, &track_};
-  TestThreadTable thread_{&pool_, nullptr};
-  TestThreadSliceView slice_view_{&slice_table_, &thread_track_, &thread_};
+  ViewEventTable event_{&pool_};
+  ViewSliceTable slice_table_{&pool_, &event_};
+  ViewTrackTable track_{&pool_};
+  ViewThreadTrackTable thread_track_{&pool_, &track_};
+  ViewThreadTable thread_{&pool_};
+  ViewThreadSliceView slice_view_{&slice_table_, &thread_track_, &thread_};
 };
 
 TEST_F(ThreadSliceViewTest, Iterate) {
@@ -600,5 +570,6 @@
 }
 
 }  // namespace
+}  // namespace tables
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/db/view_unittest.py b/src/trace_processor/db/view_unittest.py
new file mode 100644
index 0000000..a7f7abd
--- /dev/null
+++ b/src/trace_processor/db/view_unittest.py
@@ -0,0 +1,75 @@
+# Copyright (C) 2022 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Contains tables for unitviewing."""
+
+from python.generators.trace_processor_table.public import Column as C
+from python.generators.trace_processor_table.public import ColumnFlag
+from python.generators.trace_processor_table.public import Table
+from python.generators.trace_processor_table.public import CppTableId
+from python.generators.trace_processor_table.public import CppUint32
+from python.generators.trace_processor_table.public import CppInt64
+from python.generators.trace_processor_table.public import CppString
+
+VIEW_THREAD_TABLE = Table(
+    python_module=__file__,
+    class_name="ViewThreadTable",
+    sql_name="thread_table",
+    columns=[
+        C("name", CppString()),
+        C("tid", CppUint32()),
+    ])
+
+VIEW_TRACK_TABLE = Table(
+    python_module=__file__,
+    class_name="ViewTrackTable",
+    sql_name="track_table",
+    columns=[
+        C("name", CppString()),
+    ])
+
+VIEW_THREAD_TRACK_TABLE = Table(
+    python_module=__file__,
+    class_name="ViewThreadTrackTable",
+    sql_name="thread_track_table",
+    parent=VIEW_TRACK_TABLE,
+    columns=[
+        C("utid", CppTableId(VIEW_THREAD_TABLE)),
+    ])
+
+VIEW_EVENT_TABLE = Table(
+    python_module=__file__,
+    class_name="ViewEventTable",
+    sql_name="event_table",
+    columns=[
+        C("ts", CppInt64(), flags=ColumnFlag.SORTED),
+        C("track_id", CppTableId(VIEW_TRACK_TABLE)),
+    ])
+
+VIEW_SLICE_TABLE = Table(
+    python_module=__file__,
+    class_name="ViewSliceTable",
+    sql_name="slice_table",
+    parent=VIEW_EVENT_TABLE,
+    columns=[
+        C("name", CppString()),
+    ])
+
+# Keep this list sorted.
+ALL_TABLES = [
+    VIEW_EVENT_TABLE,
+    VIEW_SLICE_TABLE,
+    VIEW_THREAD_TABLE,
+    VIEW_THREAD_TRACK_TABLE,
+    VIEW_TRACK_TABLE,
+]
diff --git a/src/trace_processor/importers/common/BUILD.gn b/src/trace_processor/importers/common/BUILD.gn
index 7795398..71e28b3 100644
--- a/src/trace_processor/importers/common/BUILD.gn
+++ b/src/trace_processor/importers/common/BUILD.gn
@@ -23,6 +23,8 @@
     "async_track_set_tracker.cc",
     "async_track_set_tracker.h",
     "chunked_trace_reader.h",
+    "clock_converter.cc",
+    "clock_converter.h",
     "clock_tracker.cc",
     "clock_tracker.h",
     "deobfuscation_mapping_table.cc",
@@ -87,6 +89,7 @@
   sources = [
     "args_translation_table_unittest.cc",
     "async_track_set_tracker_unittest.cc",
+    "clock_converter_unittest.cc",
     "clock_tracker_unittest.cc",
     "deobfuscation_mapping_table_unittest.cc",
     "event_tracker_unittest.cc",
diff --git a/src/trace_processor/importers/common/args_translation_table.cc b/src/trace_processor/importers/common/args_translation_table.cc
index 74cdc34..8aa9a0d 100644
--- a/src/trace_processor/importers/common/args_translation_table.cc
+++ b/src/trace_processor/importers/common/args_translation_table.cc
@@ -52,25 +52,6 @@
 
 }  // namespace
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-constexpr char ArgsTranslationTable::kChromeHistogramHashKey[];
-constexpr char ArgsTranslationTable::kChromeHistogramNameKey[];
-
-constexpr char ArgsTranslationTable::kChromeUserEventHashKey[];
-constexpr char ArgsTranslationTable::kChromeUserEventActionKey[];
-
-constexpr char ArgsTranslationTable::kChromePerformanceMarkSiteHashKey[];
-constexpr char ArgsTranslationTable::kChromePerformanceMarkSiteKey[];
-
-constexpr char ArgsTranslationTable::kChromePerformanceMarkMarkHashKey[];
-constexpr char ArgsTranslationTable::kChromePerformanceMarkMarkKey[];
-
-constexpr char ArgsTranslationTable::kMojoMethodMappingIdKey[];
-constexpr char ArgsTranslationTable::kMojoMethodRelPcKey[];
-constexpr char ArgsTranslationTable::kMojoMethodNameKey[];
-constexpr char ArgsTranslationTable::kMojoIntefaceTagKey[];
-#endif
-
 ArgsTranslationTable::ArgsTranslationTable(TraceStorage* storage)
     : storage_(storage),
       interned_chrome_histogram_hash_key_(
diff --git a/src/trace_processor/importers/common/clock_converter.cc b/src/trace_processor/importers/common/clock_converter.cc
new file mode 100644
index 0000000..908340f
--- /dev/null
+++ b/src/trace_processor/importers/common/clock_converter.cc
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/trace_processor/importers/common/clock_converter.h"
+
+#include <time.h>
+
+#include <algorithm>
+#include <atomic>
+#include <cinttypes>
+#include <queue>
+
+#include "perfetto/base/logging.h"
+#include "perfetto/ext/base/hash.h"
+#include "src/trace_processor/storage/trace_storage.h"
+#include "src/trace_processor/types/trace_processor_context.h"
+
+#include "protos/perfetto/common/builtin_clock.pbzero.h"
+#include "protos/perfetto/trace/clock_snapshot.pbzero.h"
+
+namespace perfetto {
+namespace trace_processor {
+
+ClockConverter::ClockConverter(TraceProcessorContext* context)
+    : context_(context) {}
+
+void ClockConverter::MaybeInitialize() {
+  if (is_initialized)
+    return;
+
+  is_initialized = true;
+  timelines_.Insert(kRealClock, {});
+  timelines_.Insert(kMonoClock, {});
+  for (auto it = context_->storage->clock_snapshot_table().IterateRows(); it;
+       ++it) {
+    if (it.clock_id() == kRealClock || it.clock_id() == kMonoClock)
+      timelines_.Find(it.clock_id())->emplace(it.ts(), it.clock_value());
+  }
+}
+
+base::StatusOr<ClockConverter::Timestamp> ClockConverter::FromTraceTime(
+    ClockId clock_id,
+    Timestamp ts) {
+  MaybeInitialize();
+
+  Timeline* timeline = timelines_.Find(clock_id);
+  if (!timeline) {
+    return base::ErrStatus(
+        "Provided clock has not been found in the converter "
+        "clocks.");
+  }
+
+  if (timeline->empty()) {
+    return base::ErrStatus("Target clock is not in the trace.");
+  }
+
+  auto next_snapshot = timeline->lower_bound(ts);
+
+  // If lower bound was not found, it means that the ts was higher then the last
+  // one. If that's the case we look for thhe last element and return clock
+  // value for this + offset.
+  if (next_snapshot == timeline->end()) {
+    next_snapshot--;
+    return next_snapshot->second + ts - next_snapshot->first;
+  }
+
+  // If there is a snapshot with this ts or lower bound is the first snapshot,
+  // we have no other option then to return the clock value for this snapshot.
+  if (next_snapshot == timeline->begin() || next_snapshot->first == ts)
+    return next_snapshot->second;
+
+  auto prev_snapshot = next_snapshot;
+  prev_snapshot--;
+
+  // The most truthful way to calculate the clock value is to use this formula,
+  // as there is no reason to assume that the clock is monotonistic. This
+  // prevents us from going back in time.
+  return std::min(prev_snapshot->second + ts - prev_snapshot->first,
+                  next_snapshot->second);
+}
+
+std::string ClockConverter::TimeToStr(Timestamp ts) {
+  constexpr int64_t one_second_in_ns = 1LL * 1000LL * 1000LL * 1000LL;
+  int64_t s = ts / one_second_in_ns;
+  int64_t ns = ts % one_second_in_ns;
+
+  time_t time_s = static_cast<time_t>(s);
+  struct tm* time_tm = gmtime(&time_s);
+
+  int seconds = time_tm->tm_sec;
+  int minutes = time_tm->tm_min;
+  int hours = time_tm->tm_hour;
+  int day = time_tm->tm_mday;
+  int month = time_tm->tm_mon + 1;
+  int year = time_tm->tm_year + 1900;
+
+  base::StackString<64> buf("%04d-%02d-%02dT%02d:%02d:%02d.%09" PRId64, year,
+                            month, day, hours, minutes, seconds, ns);
+  return buf.ToStdString();
+}
+
+}  // namespace trace_processor
+}  // namespace perfetto
diff --git a/src/trace_processor/importers/common/clock_converter.h b/src/trace_processor/importers/common/clock_converter.h
new file mode 100644
index 0000000..a5662b4
--- /dev/null
+++ b/src/trace_processor/importers/common/clock_converter.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_TRACE_PROCESSOR_IMPORTERS_COMMON_CLOCK_CONVERTER_H_
+#define SRC_TRACE_PROCESSOR_IMPORTERS_COMMON_CLOCK_CONVERTER_H_
+
+#include <stdint.h>
+
+#include <array>
+#include <cinttypes>
+#include <map>
+#include <random>
+#include <set>
+#include <vector>
+
+#include "perfetto/base/logging.h"
+#include "perfetto/ext/base/status_or.h"
+#include "perfetto/ext/base/string_utils.h"
+#include "src/trace_processor/storage/trace_storage.h"
+#include "src/trace_processor/types/trace_processor_context.h"
+
+#include "protos/perfetto/common/builtin_clock.pbzero.h"
+#include "protos/perfetto/trace/clock_snapshot.pbzero.h"
+
+namespace perfetto {
+namespace trace_processor {
+
+// Used for conversion to REAL and MONO clocks for provided timestamps. Can only
+// be used after trace parsing. Only works if there has been at least one
+// snapshot with a target clock. Data is based on clock snapshots table.
+class ClockConverter {
+ public:
+  using ClockId = int64_t;
+  using Timestamp = int64_t;
+
+  explicit ClockConverter(TraceProcessorContext*);
+
+  // Converts trace time to REAL clock as string.
+  base::StatusOr<std::string> ToAbsTime(Timestamp ts) {
+    base::StatusOr<Timestamp> real_ts = FromTraceTime(kRealClock, ts);
+    if (!real_ts.ok())
+      return real_ts.status();
+    return TimeToStr(*real_ts);
+  }
+
+  // Converts trace time to MONO clock time.
+  base::StatusOr<Timestamp> ToMonotonic(Timestamp ts) {
+    return FromTraceTime(kMonoClock, ts);
+  }
+
+ private:
+  static constexpr int64_t kRealClock =
+      protos::pbzero::ClockSnapshot::Clock::REALTIME;
+  static constexpr int64_t kMonoClock = protos::pbzero::BUILTIN_CLOCK_MONOTONIC;
+
+  // Timeline uses Trace Time clock as keys and other clocks time as values.
+  using Timeline = std::map<Timestamp, Timestamp>;
+
+  // Reads the clocks snapshots table and fetches the data required for
+  // conversion. We initialize timelines of only selected clocks to minimize
+  // memory usage. Currently those are MONO and REAL clocks.
+  void MaybeInitialize();
+
+  // Converts trace time to provided clock.
+  base::StatusOr<Timestamp> FromTraceTime(ClockId, Timestamp);
+
+  // Converts timestamp to string.
+  std::string TimeToStr(Timestamp);
+
+  TraceProcessorContext* context_;
+  bool is_initialized = false;
+  base::FlatHashMap<ClockId, Timeline> timelines_;
+};
+
+}  // namespace trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_TRACE_PROCESSOR_IMPORTERS_COMMON_CLOCK_CONVERTER_H_
diff --git a/src/trace_processor/importers/common/clock_converter_unittest.cc b/src/trace_processor/importers/common/clock_converter_unittest.cc
new file mode 100644
index 0000000..f88fd13
--- /dev/null
+++ b/src/trace_processor/importers/common/clock_converter_unittest.cc
@@ -0,0 +1,142 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/trace_processor/importers/common/clock_converter.h"
+#include "src/trace_processor/importers/common/clock_tracker.h"
+
+#include <random>
+
+#include "src/trace_processor/importers/common/metadata_tracker.h"
+#include "src/trace_processor/storage/trace_storage.h"
+#include "src/trace_processor/types/trace_processor_context.h"
+#include "test/gtest_and_gmock.h"
+
+namespace perfetto {
+namespace trace_processor {
+
+class ClockConverterTest : public ::testing::Test {
+ public:
+  ClockConverterTest() { context_.storage.reset(new TraceStorage()); }
+
+  TraceProcessorContext context_;
+  ClockConverter cc_{&context_};
+};
+
+namespace {
+
+using ::testing::NiceMock;
+using Clock = protos::pbzero::ClockSnapshot::Clock;
+
+static constexpr int64_t kMonotonic =
+    protos::pbzero::BuiltinClock::BUILTIN_CLOCK_MONOTONIC;
+static constexpr int64_t kReal = protos::pbzero::ClockSnapshot::Clock::REALTIME;
+
+TEST_F(ClockConverterTest, EmptyTable) {
+  EXPECT_FALSE(cc_.ToAbsTime(10).ok());
+  EXPECT_FALSE(cc_.ToMonotonic(10).ok());
+}
+
+TEST_F(ClockConverterTest, TrivialMonotonic) {
+  tables::ClockSnapshotTable::Row row;
+  row.ts = 10;
+  row.clock_id = kMonotonic;
+  row.clock_value = 20;
+  context_.storage->mutable_clock_snapshot_table()->Insert(row);
+
+  EXPECT_TRUE(cc_.ToMonotonic(10).ok());
+  EXPECT_EQ(cc_.ToMonotonic(10).value(), 20);
+}
+
+TEST_F(ClockConverterTest, TrivialToAbsTime) {
+  tables::ClockSnapshotTable::Row row;
+  row.ts = 10;
+  row.clock_id = kReal;
+  row.clock_value = 20;
+  context_.storage->mutable_clock_snapshot_table()->Insert(row);
+
+  EXPECT_TRUE(cc_.ToAbsTime(10).ok());
+  EXPECT_EQ(cc_.ToAbsTime(10).value(), "1970-01-01T00:00:00.000000020");
+}
+
+TEST_F(ClockConverterTest, Monotonic) {
+  {
+    tables::ClockSnapshotTable::Row rows;
+    rows.ts = 10;
+    rows.clock_id = kMonotonic;
+    rows.clock_value = 10;
+    context_.storage->mutable_clock_snapshot_table()->Insert(rows);
+  }
+  {
+    tables::ClockSnapshotTable::Row rows;
+    rows.ts = 20;
+    rows.clock_id = kMonotonic;
+    rows.clock_value = 10;
+    context_.storage->mutable_clock_snapshot_table()->Insert(rows);
+  }
+  {
+    tables::ClockSnapshotTable::Row rows;
+    rows.ts = 30;
+    rows.clock_id = kMonotonic;
+    rows.clock_value = 20;
+    context_.storage->mutable_clock_snapshot_table()->Insert(rows);
+  }
+  {
+    tables::ClockSnapshotTable::Row rows;
+    rows.ts = 40;
+    rows.clock_id = kMonotonic;
+    rows.clock_value = 20;
+    context_.storage->mutable_clock_snapshot_table()->Insert(rows);
+  }
+
+  EXPECT_EQ(cc_.ToMonotonic(15).value(), 10);
+  EXPECT_EQ(cc_.ToMonotonic(25).value(), 15);
+  EXPECT_EQ(cc_.ToMonotonic(35).value(), 20);
+  EXPECT_EQ(cc_.ToMonotonic(45).value(), 25);
+}
+
+TEST_F(ClockConverterTest, AbsTime) {
+  // We will add 3 snapshots for real time clock, and the last snapshot will be
+  // earlier then the second one.
+  {
+    tables::ClockSnapshotTable::Row rows;
+    rows.ts = 10;
+    rows.clock_id = kReal;
+    rows.clock_value = 0;
+    context_.storage->mutable_clock_snapshot_table()->Insert(rows);
+  }
+  {
+    tables::ClockSnapshotTable::Row rows;
+    rows.ts = 20;
+    rows.clock_id = kReal;
+    rows.clock_value = 1652904000000000000;
+    context_.storage->mutable_clock_snapshot_table()->Insert(rows);
+  }
+  {
+    tables::ClockSnapshotTable::Row rows;
+    rows.ts = 30;
+    rows.clock_id = kReal;
+    rows.clock_value = 1652904000000000000 - 5;
+    context_.storage->mutable_clock_snapshot_table()->Insert(rows);
+  }
+
+  EXPECT_EQ(cc_.ToAbsTime(15).value(), "1970-01-01T00:00:00.000000005");
+  EXPECT_EQ(cc_.ToAbsTime(25).value(), "2022-05-18T19:59:59.999999995");
+  EXPECT_EQ(cc_.ToAbsTime(35).value(), "2022-05-18T20:00:00.000000000");
+}
+
+}  // namespace
+}  // namespace trace_processor
+}  // namespace perfetto
diff --git a/src/trace_processor/importers/common/clock_tracker.cc b/src/trace_processor/importers/common/clock_tracker.cc
index 987739c..e8454f2 100644
--- a/src/trace_processor/importers/common/clock_tracker.cc
+++ b/src/trace_processor/importers/common/clock_tracker.cc
@@ -42,7 +42,7 @@
 
 ClockTracker::~ClockTracker() = default;
 
-uint32_t ClockTracker::AddSnapshot(
+base::StatusOr<uint32_t> ClockTracker::AddSnapshot(
     const std::vector<ClockTimestamp>& clock_timestamps) {
   const auto snapshot_id = cur_snapshot_id_++;
 
@@ -60,15 +60,16 @@
   for (const auto& clock_ts : clock_timestamps) {
     ClockId clock_id = clock_ts.clock.id;
     ClockDomain& domain = clocks_[clock_id];
+
     if (domain.snapshots.empty()) {
       if (clock_ts.clock.is_incremental &&
           !IsConvertedSequenceClock(clock_id)) {
-        PERFETTO_ELOG("Clock sync error: the global clock with id=%" PRIu64
-                      " cannot use incremental encoding; this is only "
-                      "supported for sequence-scoped clocks.",
-                      clock_id);
         context_->storage->IncrementStats(stats::invalid_clock_snapshots);
-        return snapshot_id;
+        return base::ErrStatus(
+            "Clock sync error: the global clock with id=%" PRId64
+            " cannot use incremental encoding; this is only "
+            "supported for sequence-scoped clocks.",
+            clock_id);
       }
       domain.unit_multiplier_ns = clock_ts.clock.unit_multiplier_ns;
       domain.is_incremental = clock_ts.clock.is_incremental;
@@ -76,15 +77,15 @@
                                      clock_ts.clock.unit_multiplier_ns ||
                                  domain.is_incremental !=
                                      clock_ts.clock.is_incremental)) {
-      PERFETTO_ELOG("Clock sync error: the clock domain with id=%" PRIu64
-                    " (unit=%" PRIu64
-                    ", incremental=%d), was previously registered with "
-                    "different properties (unit=%" PRIu64 ", incremental=%d).",
-                    clock_id, clock_ts.clock.unit_multiplier_ns,
-                    clock_ts.clock.is_incremental, domain.unit_multiplier_ns,
-                    domain.is_incremental);
       context_->storage->IncrementStats(stats::invalid_clock_snapshots);
-      return snapshot_id;
+      return base::ErrStatus(
+          "Clock sync error: the clock domain with id=%" PRId64
+          " (unit=%" PRId64
+          ", incremental=%d), was previously registered with "
+          "different properties (unit=%" PRId64 ", incremental=%d).",
+          clock_id, clock_ts.clock.unit_multiplier_ns,
+          clock_ts.clock.is_incremental, domain.unit_multiplier_ns,
+          domain.is_incremental);
     }
     const int64_t timestamp_ns = clock_ts.timestamp * domain.unit_multiplier_ns;
     domain.last_timestamp_ns = timestamp_ns;
@@ -92,11 +93,11 @@
     ClockSnapshots& vect = domain.snapshots[snapshot_hash];
     if (!vect.snapshot_ids.empty() &&
         PERFETTO_UNLIKELY(vect.snapshot_ids.back() == snapshot_id)) {
-      PERFETTO_ELOG("Clock sync error: duplicate clock domain with id=%" PRIu64
-                    " at snapshot %" PRIu32 ".",
-                    clock_id, snapshot_id);
       context_->storage->IncrementStats(stats::invalid_clock_snapshots);
-      return snapshot_id;
+      return base::ErrStatus(
+          "Clock sync error: duplicate clock domain with id=%" PRId64
+          " at snapshot %" PRIu32 ".",
+          clock_id, snapshot_id);
     }
 
     // Clock ids in the range [64, 128) are sequence-scoped and must be
@@ -113,17 +114,16 @@
       // Clock is not monotonic.
 
       if (clock_id == trace_time_clock_id_) {
-        // The trace clock cannot be non-monotonic.
-        PERFETTO_ELOG("Clock sync error: the trace clock (id=%" PRIu64
-                      ") is not monotonic at snapshot %" PRIu32 ". %" PRId64
-                      " not >= %" PRId64 ".",
-                      clock_id, snapshot_id, timestamp_ns,
-                      vect.timestamps_ns.back());
         context_->storage->IncrementStats(stats::invalid_clock_snapshots);
-        return snapshot_id;
+        // The trace clock cannot be non-monotonic.
+        return base::ErrStatus("Clock sync error: the trace clock (id=%" PRId64
+                               ") is not monotonic at snapshot %" PRIu32
+                               ". %" PRId64 " not >= %" PRId64 ".",
+                               clock_id, snapshot_id, timestamp_ns,
+                               vect.timestamps_ns.back());
       }
 
-      PERFETTO_DLOG("Detected non-monotonic clock with ID %" PRIu64, clock_id);
+      PERFETTO_DLOG("Detected non-monotonic clock with ID %" PRId64, clock_id);
 
       // For the other clocks the best thing we can do is mark it as
       // non-monotonic and refuse to use it as a source clock in the resolution
@@ -164,6 +164,7 @@
         graph_.emplace(it2->clock.id, it1->clock.id, snapshot_hash);
     }
   }
+
   return snapshot_id;
 }
 
@@ -214,6 +215,20 @@
   return ClockPath();  // invalid path.
 }
 
+std::optional<int64_t> ClockTracker::ToTraceTimeFromSnapshot(
+    const std::vector<ClockTimestamp>& snapshot) {
+  auto maybe_found_trace_time_clock = std::find_if(
+      snapshot.begin(), snapshot.end(),
+      [this](const ClockTimestamp& clock_timestamp) {
+        return clock_timestamp.clock.id == this->trace_time_clock_id_;
+      });
+
+  if (maybe_found_trace_time_clock == snapshot.end())
+    return std::nullopt;
+
+  return maybe_found_trace_time_clock->timestamp;
+}
+
 base::StatusOr<int64_t> ClockTracker::ConvertSlowpath(ClockId src_clock_id,
                                                       int64_t src_timestamp,
                                                       ClockId target_clock_id) {
@@ -223,10 +238,11 @@
   context_->storage->IncrementStats(stats::clock_sync_cache_miss);
 
   ClockPath path = FindPath(src_clock_id, target_clock_id);
+
   if (!path.valid()) {
     // Too many logs maybe emitted when path is invalid.
     context_->storage->IncrementStats(stats::clock_sync_failure);
-    return base::ErrStatus("No path from clock %" PRIu64 " to %" PRIu64
+    return base::ErrStatus("No path from clock %" PRId64 " to %" PRId64
                            " at timestamp %" PRId64,
                            src_clock_id, target_clock_id, src_timestamp);
   }
@@ -316,34 +332,5 @@
   return ns;
 }
 
-base::StatusOr<std::string> ClockTracker::FromTraceTimeAsISO8601(
-    int64_t timestamp) {
-  constexpr ClockId unix_epoch_clock =
-      protos::pbzero::ClockSnapshot::Clock::REALTIME;
-  base::StatusOr<int64_t> opt_ts = FromTraceTime(unix_epoch_clock, timestamp);
-  if (!opt_ts.ok()) {
-    return opt_ts.status();
-  }
-  int64_t ts = opt_ts.value();
-
-  constexpr int64_t one_second_in_ns = 1LL * 1000LL * 1000LL * 1000LL;
-  int64_t s = ts / one_second_in_ns;
-  int64_t ns = ts % one_second_in_ns;
-
-  time_t time_s = static_cast<time_t>(s);
-  struct tm* time_tm = gmtime(&time_s);
-
-  int seconds = time_tm->tm_sec;
-  int minutes = time_tm->tm_min;
-  int hours = time_tm->tm_hour;
-  int day = time_tm->tm_mday;
-  int month = time_tm->tm_mon + 1;
-  int year = time_tm->tm_year + 1900;
-
-  base::StackString<64> buf("%04d-%02d-%02dT%02d:%02d:%02d.%09" PRId64, year,
-                            month, day, hours, minutes, seconds, ns);
-  return buf.ToStdString();
-}
-
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/importers/common/clock_tracker.h b/src/trace_processor/importers/common/clock_tracker.h
index a4edd3c..a812593 100644
--- a/src/trace_processor/importers/common/clock_tracker.h
+++ b/src/trace_processor/importers/common/clock_tracker.h
@@ -34,6 +34,9 @@
 #include "src/trace_processor/storage/trace_storage.h"
 #include "src/trace_processor/types/trace_processor_context.h"
 
+#include "protos/perfetto/common/builtin_clock.pbzero.h"
+#include "protos/perfetto/trace/clock_snapshot.pbzero.h"
+
 namespace perfetto {
 namespace trace_processor {
 
@@ -49,8 +52,6 @@
 //   been snapshotted at the same time (within technical limits).
 // - ToTraceTime(src_clock_id, src_timestamp):
 //   converts a timestamp between clock domain and TraceTime.
-// - FromTraceTime(target_clock_id, src_timestamp):
-//   converts a timestamp between TraceTime and clock domain.
 //
 // Concepts:
 // - Snapshot hash:
@@ -161,7 +162,7 @@
   // Appends a new snapshot for the given clock domains.
   // This is typically called by the code that reads the ClockSnapshot packet.
   // Returns the internal snapshot id of this set of clocks.
-  uint32_t AddSnapshot(const std::vector<ClockTimestamp>&);
+  base::StatusOr<uint32_t> AddSnapshot(const std::vector<ClockTimestamp>&);
 
   base::StatusOr<int64_t> ToTraceTime(ClockId clock_id, int64_t timestamp) {
     if (PERFETTO_UNLIKELY(!trace_time_clock_id_used_for_conversion_)) {
@@ -176,15 +177,10 @@
     return Convert(clock_id, timestamp, trace_time_clock_id_);
   }
 
-  base::StatusOr<int64_t> FromTraceTime(ClockId to_clock_id,
-                                        int64_t timestamp) {
-    trace_time_clock_id_used_for_conversion_ = true;
-    if (to_clock_id == trace_time_clock_id_)
-      return timestamp;
-    return Convert(trace_time_clock_id_, timestamp, to_clock_id);
-  }
-
-  base::StatusOr<std::string> FromTraceTimeAsISO8601(int64_t timestamp);
+  // If trace clock and source clock are available in the snapshot will return
+  // the trace clock time in snapshot.
+  std::optional<int64_t> ToTraceTimeFromSnapshot(
+      const std::vector<ClockTimestamp>&);
 
   void SetTraceTimeClock(ClockId clock_id) {
     PERFETTO_DCHECK(!IsSequenceClock(clock_id));
diff --git a/src/trace_processor/importers/common/clock_tracker_unittest.cc b/src/trace_processor/importers/common/clock_tracker_unittest.cc
index 74a665f..717592f 100644
--- a/src/trace_processor/importers/common/clock_tracker_unittest.cc
+++ b/src/trace_processor/importers/common/clock_tracker_unittest.cc
@@ -87,6 +87,15 @@
             static_cast<int64_t>(100000 - 1000 + 1e6));
 }
 
+TEST_F(ClockTrackerTest, ToTraceTimeFromSnapshot) {
+  EXPECT_FALSE(ct_.ToTraceTime(REALTIME, 0).ok());
+
+  EXPECT_EQ(*ct_.ToTraceTimeFromSnapshot({{REALTIME, 10}, {BOOTTIME, 10010}}),
+            10010);
+  EXPECT_EQ(ct_.ToTraceTimeFromSnapshot({{MONOTONIC, 10}, {REALTIME, 10010}}),
+            std::nullopt);
+}
+
 // When a clock moves backwards conversions *from* that clock are forbidden
 // but conversions *to* that clock should still work.
 // Think to the case of REALTIME going backwards from 3AM to 2AM during DST day.
@@ -105,16 +114,16 @@
 
   // Now only BOOTIME -> REALTIME conversion should be possible.
   EXPECT_FALSE(ct_.ToTraceTime(REALTIME, 11).ok());
-  EXPECT_EQ(*ct_.FromTraceTime(REALTIME, 10011), 11);
-  EXPECT_EQ(*ct_.FromTraceTime(REALTIME, 10029), 29);
-  EXPECT_EQ(*ct_.FromTraceTime(REALTIME, 40030), 30);
-  EXPECT_EQ(*ct_.FromTraceTime(REALTIME, 40040), 40);
+  EXPECT_EQ(*Convert(BOOTTIME, 10011, REALTIME), 11);
+  EXPECT_EQ(*Convert(BOOTTIME, 10029, REALTIME), 29);
+  EXPECT_EQ(*Convert(BOOTTIME, 40030, REALTIME), 30);
+  EXPECT_EQ(*Convert(BOOTTIME, 40040, REALTIME), 40);
 
   ct_.AddSnapshot({{BOOTTIME, 50000}, {REALTIME, 50}});
-  EXPECT_EQ(*ct_.FromTraceTime(REALTIME, 50005), 55);
+  EXPECT_EQ(*Convert(BOOTTIME, 50005, REALTIME), 55);
 
   ct_.AddSnapshot({{BOOTTIME, 60020}, {REALTIME, 20}});
-  EXPECT_EQ(*ct_.FromTraceTime(REALTIME, 60020), 20);
+  EXPECT_EQ(*Convert(BOOTTIME, 60020, REALTIME), 20);
 }
 
 // Simulate the following scenario:
@@ -294,16 +303,6 @@
   }
 }
 
-TEST_F(ClockTrackerTest, FromTraceTimeAsISO8601) {
-  EXPECT_FALSE(ct_.FromTraceTimeAsISO8601(0).ok());
-
-  ct_.AddSnapshot({{REALTIME, 1603224822123456789}, {BOOTTIME, 42}});
-  ct_.AddSnapshot({{REALTIME, 1641092645000000001}, {BOOTTIME, 43}});
-
-  EXPECT_EQ(*ct_.FromTraceTimeAsISO8601(42), "2020-10-20T20:13:42.123456789");
-  EXPECT_EQ(*ct_.FromTraceTimeAsISO8601(43), "2022-01-02T03:04:05.000000001");
-}
-
 }  // namespace
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/importers/common/track_tracker.cc b/src/trace_processor/importers/common/track_tracker.cc
index 07bd848..f6a99f1 100644
--- a/src/trace_processor/importers/common/track_tracker.cc
+++ b/src/trace_processor/importers/common/track_tracker.cc
@@ -16,12 +16,43 @@
 
 #include "src/trace_processor/importers/common/track_tracker.h"
 
+#include <optional>
+
 #include "src/trace_processor/importers/common/args_tracker.h"
 #include "src/trace_processor/importers/common/process_tracker.h"
+#include "src/trace_processor/storage/trace_storage.h"
 
 namespace perfetto {
 namespace trace_processor {
 
+namespace {
+
+const char* GetNameForGroup(TrackTracker::Group group) {
+  switch (group) {
+    case TrackTracker::Group::kMemory:
+      return "Memory";
+    case TrackTracker::Group::kIo:
+      return "IO";
+    case TrackTracker::Group::kVirtio:
+      return "Virtio";
+    case TrackTracker::Group::kNetwork:
+      return "Network";
+    case TrackTracker::Group::kPower:
+      return "Power";
+    case TrackTracker::Group::kDeviceState:
+      return "Device State";
+    case TrackTracker::Group::kThermals:
+      return "Thermals";
+    case TrackTracker::Group::kClockFrequency:
+      return "Clock Freqeuncy";
+    case TrackTracker::Group::kSizeSentinel:
+      PERFETTO_FATAL("Unexpected size passed as group");
+  }
+  PERFETTO_FATAL("For GCC");
+}
+
+}  // namespace
+
 TrackTracker::TrackTracker(TraceProcessorContext* context)
     : source_key_(context->storage->InternString("source")),
       source_id_key_(context->storage->InternString("source_id")),
@@ -193,7 +224,8 @@
   return *trigger_track_id_;
 }
 
-TrackId TrackTracker::InternGlobalCounterTrack(StringId name,
+TrackId TrackTracker::InternGlobalCounterTrack(TrackTracker::Group group,
+                                               StringId name,
                                                SetArgsCallback callback,
                                                StringId unit,
                                                StringId description) {
@@ -203,6 +235,7 @@
   }
 
   tables::CounterTrackTable::Row row(name);
+  row.parent_id = InternTrackForGroup(group);
   row.unit = unit;
   row.description = description;
   TrackId track =
@@ -380,5 +413,18 @@
   return context_->storage->mutable_perf_counter_track_table()->Insert(row).id;
 }
 
+TrackId TrackTracker::InternTrackForGroup(TrackTracker::Group group) {
+  uint32_t group_idx = static_cast<uint32_t>(group);
+  const std::optional<TrackId>& group_id = group_track_ids_[group_idx];
+  if (group_id) {
+    return *group_id;
+  }
+
+  StringId id = context_->storage->InternString(GetNameForGroup(group));
+  TrackId track_id = context_->storage->mutable_track_table()->Insert({id}).id;
+  group_track_ids_[group_idx] = track_id;
+  return track_id;
+}
+
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/importers/common/track_tracker.h b/src/trace_processor/importers/common/track_tracker.h
index c4a4232..99076f3 100644
--- a/src/trace_processor/importers/common/track_tracker.h
+++ b/src/trace_processor/importers/common/track_tracker.h
@@ -17,6 +17,7 @@
 #ifndef SRC_TRACE_PROCESSOR_IMPORTERS_COMMON_TRACK_TRACKER_H_
 #define SRC_TRACE_PROCESSOR_IMPORTERS_COMMON_TRACK_TRACKER_H_
 
+#include <optional>
 #include "src/trace_processor/importers/common/args_tracker.h"
 #include "src/trace_processor/storage/trace_storage.h"
 #include "src/trace_processor/types/trace_processor_context.h"
@@ -27,6 +28,23 @@
 // Tracks and stores tracks based on track types, ids and scopes.
 class TrackTracker {
  public:
+  // Enum which groups global tracks to avoid an explosion of tracks at the top
+  // level.
+  // Try and keep members of this enum high level as every entry here
+  // corresponds to ~1 extra UI track.
+  enum class Group : uint32_t {
+    kMemory = 0,
+    kIo,
+    kVirtio,
+    kNetwork,
+    kPower,
+    kDeviceState,
+    kThermals,
+    kClockFrequency,
+
+    // Keep this last.
+    kSizeSentinel,
+  };
   using SetArgsCallback = std::function<void(ArgsTracker::BoundInserter&)>;
 
   explicit TrackTracker(TraceProcessorContext*);
@@ -67,7 +85,8 @@
   TrackId GetOrCreateTriggerTrack();
 
   // Interns a global counter track into the storage.
-  TrackId InternGlobalCounterTrack(StringId name,
+  TrackId InternGlobalCounterTrack(Group group,
+                                   StringId name,
                                    SetArgsCallback = {},
                                    StringId unit = kNullStringId,
                                    StringId description = kNullStringId);
@@ -155,6 +174,12 @@
              std::tie(r.source_id, r.upid, r.source_scope);
     }
   };
+  static constexpr size_t kGroupCount =
+      static_cast<uint32_t>(Group::kSizeSentinel);
+
+  TrackId InternTrackForGroup(Group group);
+
+  std::array<std::optional<TrackId>, kGroupCount> group_track_ids_;
 
   std::map<UniqueTid, TrackId> thread_tracks_;
   std::map<UniquePid, TrackId> process_tracks_;
diff --git a/src/trace_processor/importers/ftrace/ftrace_descriptors.cc b/src/trace_processor/importers/ftrace/ftrace_descriptors.cc
index 088d93a..27df202 100644
--- a/src/trace_processor/importers/ftrace/ftrace_descriptors.cc
+++ b/src/trace_processor/importers/ftrace/ftrace_descriptors.cc
@@ -24,7 +24,7 @@
 namespace trace_processor {
 namespace {
 
-std::array<FtraceMessageDescriptor, 481> descriptors{{
+std::array<FtraceMessageDescriptor, 484> descriptors{{
     {nullptr, 0, {}},
     {nullptr, 0, {}},
     {nullptr, 0, {}},
@@ -5295,6 +5295,34 @@
             {"addr", ProtoSchemaType::kUint64},
         },
     },
+    {
+        "suspend_resume_minimal",
+        1,
+        {
+            {},
+            {"start", ProtoSchemaType::kUint32},
+        },
+    },
+    {
+        "mali_mali_CSF_INTERRUPT_START",
+        3,
+        {
+            {},
+            {"kctx_tgid", ProtoSchemaType::kInt32},
+            {"kctx_id", ProtoSchemaType::kUint32},
+            {"info_val", ProtoSchemaType::kUint64},
+        },
+    },
+    {
+        "mali_mali_CSF_INTERRUPT_END",
+        3,
+        {
+            {},
+            {"kctx_tgid", ProtoSchemaType::kInt32},
+            {"kctx_id", ProtoSchemaType::kUint32},
+            {"info_val", ProtoSchemaType::kUint64},
+        },
+    },
 }};
 
 }  // namespace
diff --git a/src/trace_processor/importers/ftrace/ftrace_parser.cc b/src/trace_processor/importers/ftrace/ftrace_parser.cc
index 29af4bc..d0d58ba 100644
--- a/src/trace_processor/importers/ftrace/ftrace_parser.cc
+++ b/src/trace_processor/importers/ftrace/ftrace_parser.cc
@@ -25,6 +25,7 @@
 #include "src/trace_processor/importers/common/metadata_tracker.h"
 #include "src/trace_processor/importers/common/parser_types.h"
 #include "src/trace_processor/importers/common/process_tracker.h"
+#include "src/trace_processor/importers/common/track_tracker.h"
 #include "src/trace_processor/importers/ftrace/binder_tracker.h"
 #include "src/trace_processor/importers/ftrace/thread_state_tracker.h"
 #include "src/trace_processor/importers/ftrace/v4l2_tracker.h"
@@ -1013,6 +1014,12 @@
         mali_gpu_event_tracker_.ParseMaliGpuEvent(ts, fld.id(), pid);
         break;
       }
+      case FtraceEvent::kMaliMaliCSFINTERRUPTSTARTFieldNumber:
+      case FtraceEvent::kMaliMaliCSFINTERRUPTENDFieldNumber: {
+        mali_gpu_event_tracker_.ParseMaliGpuIrqEvent(ts, fld.id(), cpu,
+                                                     fld_bytes);
+        break;
+      }
 
       default:
         break;
@@ -1097,7 +1104,7 @@
   protos::pbzero::GenericFtraceEvent::Decoder evt(blob.data, blob.size);
   StringId event_id = context_->storage->InternString(evt.event_name());
   UniqueTid utid = context_->process_tracker->GetOrCreateThread(tid);
-  RawId id = context_->storage->mutable_raw_table()
+  RawId id = context_->storage->mutable_ftrace_event_table()
                  ->Insert({ts, event_id, cpu, utid})
                  .id;
   auto inserter = context_->args_tracker->AddArgsTo(id);
@@ -1139,7 +1146,7 @@
   const auto& message_strings = ftrace_message_strings_[ftrace_id];
   UniqueTid utid = context_->process_tracker->GetOrCreateThread(tid);
   RawId id =
-      context_->storage->mutable_raw_table()
+      context_->storage->mutable_ftrace_event_table()
           ->Insert({timestamp, message_strings.message_name_id, cpu, utid})
           .id;
   auto inserter = context_->args_tracker->AddArgsTo(id);
@@ -1428,8 +1435,8 @@
   }
 
   // Push the global counter.
-  TrackId track =
-      context_->track_tracker->InternGlobalCounterTrack(global_name_id);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kMemory, global_name_id);
   context_->event_tracker->PushCounter(timestamp,
                                        static_cast<double>(total_bytes), track);
 
@@ -1466,8 +1473,8 @@
                                 protozero::ConstBytes data) {
   protos::pbzero::IonStatFtraceEvent::Decoder ion(data.data, data.size);
   // Push the global counter.
-  TrackId track =
-      context_->track_tracker->InternGlobalCounterTrack(ion_total_id_);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kMemory, ion_total_id_);
   context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(ion.total_allocated()), track);
 
@@ -1502,8 +1509,8 @@
   protos::pbzero::DmaHeapStatFtraceEvent::Decoder dma_heap(data.data,
                                                            data.size);
   // Push the global counter.
-  TrackId track =
-      context_->track_tracker->InternGlobalCounterTrack(dma_heap_total_id_);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kMemory, dma_heap_total_id_);
   context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(dma_heap.total_allocated()), track);
 
@@ -1815,7 +1822,8 @@
                                       clock_name.data(), int(subtitle.size()),
                                       subtitle.data());
   StringId name = context_->storage->InternString(counter_name.c_str());
-  TrackId track = context_->track_tracker->InternGlobalCounterTrack(name);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kClockFrequency, name);
   context_->event_tracker->PushCounter(timestamp, static_cast<double>(rate),
                                        track);
 }
@@ -2090,8 +2098,8 @@
   if (pid == 0) {
     // Pid 0 is used to indicate the global total
     track = context_->track_tracker->InternGlobalCounterTrack(
-        gpu_mem_total_name_id_, {}, gpu_mem_total_unit_id_,
-        gpu_mem_total_global_desc_id_);
+        TrackTracker::Group::kMemory, gpu_mem_total_name_id_, {},
+        gpu_mem_total_unit_id_, gpu_mem_total_global_desc_id_);
   } else {
     // It's possible for GpuMemTotal ftrace events to be emitted by kworker
     // threads *after* process death. In this case, we simply want to discard
@@ -2129,7 +2137,8 @@
   base::StackString<255> counter_name(
       "%.*s Temperature", int(thermal_zone.size()), thermal_zone.data());
   StringId name = context_->storage->InternString(counter_name.string_view());
-  TrackId track = context_->track_tracker->InternGlobalCounterTrack(name);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kThermals, name);
   context_->event_tracker->PushCounter(timestamp, event.temp(), track);
 }
 
@@ -2140,7 +2149,8 @@
   base::StackString<255> counter_name("%.*s Cooling Device", int(type.size()),
                                       type.data());
   StringId name = context_->storage->InternString(counter_name.string_view());
-  TrackId track = context_->track_tracker->InternGlobalCounterTrack(name);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kThermals, name);
   context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(event.target()), track);
 }
@@ -2192,7 +2202,8 @@
   }
 
   // Push the global counter.
-  TrackId track = context_->track_tracker->InternGlobalCounterTrack(total_name);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kMemory, total_name);
   context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(event.total_allocated()), track);
 
@@ -2225,7 +2236,8 @@
   nic_received_bytes_[name] += event.len();
 
   uint64_t nic_received_kilobytes = nic_received_bytes_[name] / 1024;
-  TrackId track = context_->track_tracker->InternGlobalCounterTrack(name);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kNetwork, name);
   std::optional<CounterId> id = context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(nic_received_kilobytes), track);
   if (!id) {
@@ -2256,7 +2268,8 @@
   nic_transmitted_bytes_[name] += evt.len();
 
   uint64_t nic_transmitted_kilobytes = nic_transmitted_bytes_[name] / 1024;
-  TrackId track = context_->track_tracker->InternGlobalCounterTrack(name);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kNetwork, name);
   std::optional<CounterId> id = context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(nic_transmitted_kilobytes), track);
   if (!id) {
@@ -2392,14 +2405,14 @@
   // Push max freq to global counter.
   StringId max_name = context_->storage->InternString(max_counter_name.c_str());
   TrackId max_track =
-      context_->track_tracker->InternGlobalCounterTrack(max_name);
+      context_->track_tracker->InternCpuCounterTrack(max_name, evt.cpu_id());
   context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(evt.max_freq()), max_track);
 
   // Push min freq to global counter.
   StringId min_name = context_->storage->InternString(min_counter_name.c_str());
   TrackId min_track =
-      context_->track_tracker->InternGlobalCounterTrack(min_name);
+      context_->track_tracker->InternCpuCounterTrack(min_name, evt.cpu_id());
   context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(evt.min_freq()), min_track);
 }
@@ -2414,8 +2427,8 @@
   }
   num_of_kfree_skb_ip_prot += 1;
 
-  TrackId track =
-      context_->track_tracker->InternGlobalCounterTrack(kfree_skb_name_id_);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kNetwork, kfree_skb_name_id_);
   std::optional<CounterId> id = context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(num_of_kfree_skb_ip_prot), track);
   if (!id) {
@@ -2435,6 +2448,7 @@
 
   // Push the global counter.
   TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kDeviceState,
       context_->storage->InternString(
           base::StringView("cros_ec.cros_ec_sensorhub_data." +
                            std::to_string(evt.ec_sensor_num()))));
@@ -2474,8 +2488,8 @@
       clk_state = 2;
       break;
   }
-  TrackId track =
-      context_->track_tracker->InternGlobalCounterTrack(ufs_clkgating_id_);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kNetwork, ufs_clkgating_id_);
   context_->event_tracker->PushCounter(timestamp,
                                        static_cast<double>(clk_state), track);
 }
@@ -2796,8 +2810,8 @@
   uint32_t num = evt.doorbell() > 0
                      ? static_cast<uint32_t>(PERFETTO_POPCOUNT(evt.doorbell()))
                      : (evt.str_t() == 1 ? 0 : 1);
-  TrackId track =
-      context_->track_tracker->InternGlobalCounterTrack(ufs_command_count_id_);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kIo, ufs_command_count_id_);
   context_->event_tracker->PushCounter(timestamp, static_cast<double>(num),
                                        track);
 
@@ -2917,8 +2931,8 @@
   StringId util_track_name_id =
       context_->storage->InternString(util_track_name.string_view());
 
-  TrackId util_track =
-      context_->track_tracker->InternGlobalCounterTrack(util_track_name_id);
+  TrackId util_track = context_->track_tracker->InternCpuCounterTrack(
+      util_track_name_id, evt.cpu());
   context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(evt.cpu_util()), util_track);
 
@@ -2926,8 +2940,8 @@
   StringId cap_track_name_id =
       context_->storage->InternString(cap_track_name.string_view());
 
-  TrackId cap_track =
-      context_->track_tracker->InternGlobalCounterTrack(cap_track_name_id);
+  TrackId cap_track = context_->track_tracker->InternCpuCounterTrack(
+      cap_track_name_id, evt.cpu());
   context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(evt.capacity()), cap_track);
 
@@ -2936,8 +2950,8 @@
   StringId nrr_track_name_id =
       context_->storage->InternString(nrr_track_name.string_view());
 
-  TrackId nrr_track =
-      context_->track_tracker->InternGlobalCounterTrack(nrr_track_name_id);
+  TrackId nrr_track = context_->track_tracker->InternCpuCounterTrack(
+      nrr_track_name_id, evt.cpu());
   context_->event_tracker->PushCounter(
       timestamp, static_cast<double>(evt.nr_running()), nrr_track);
 }
diff --git a/src/trace_processor/importers/ftrace/iostat_tracker.cc b/src/trace_processor/importers/ftrace/iostat_tracker.cc
index 27e5762..d3c40d8 100644
--- a/src/trace_processor/importers/ftrace/iostat_tracker.cc
+++ b/src/trace_processor/importers/ftrace/iostat_tracker.cc
@@ -43,8 +43,8 @@
                                                    uint64_t value) {
     std::string track_name = tagPrefix + "." + std::string(counter_name);
     StringId string_id = context_->storage->InternString(track_name.c_str());
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(string_id);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kIo, string_id);
     context_->event_tracker->PushCounter(timestamp, static_cast<double>(value),
                                          track);
   };
@@ -83,8 +83,8 @@
                                                    uint64_t value) {
     std::string track_name = tagPrefix + "." + std::string(counter_name);
     StringId string_id = context_->storage->InternString(track_name.c_str());
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(string_id);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kIo, string_id);
     context_->event_tracker->PushCounter(timestamp, static_cast<double>(value),
                                          track);
   };
diff --git a/src/trace_processor/importers/ftrace/mali_gpu_event_tracker.cc b/src/trace_processor/importers/ftrace/mali_gpu_event_tracker.cc
index c59bdcc..4064797 100644
--- a/src/trace_processor/importers/ftrace/mali_gpu_event_tracker.cc
+++ b/src/trace_processor/importers/ftrace/mali_gpu_event_tracker.cc
@@ -16,6 +16,7 @@
 
 #include "src/trace_processor/importers/ftrace/mali_gpu_event_tracker.h"
 
+#include "perfetto/ext/base/string_utils.h"
 #include "protos/perfetto/trace/ftrace/ftrace_event.pbzero.h"
 #include "protos/perfetto/trace/ftrace/mali.pbzero.h"
 #include "src/trace_processor/importers/common/async_track_set_tracker.h"
@@ -35,7 +36,11 @@
       mali_KCPU_FENCE_SIGNAL_id_(
           context->storage->InternString("mali_KCPU_FENCE_SIGNAL")),
       mali_KCPU_FENCE_WAIT_id_(
-          context->storage->InternString("mali_KCPU_FENCE_WAIT")) {}
+          context->storage->InternString("mali_KCPU_FENCE_WAIT")),
+      mali_CSF_INTERRUPT_id_(
+          context->storage->InternString("mali_CSF_INTERRUPT")),
+      mali_CSF_INTERRUPT_info_val_id_(
+          context->storage->InternString("info_val")) {}
 
 void MaliGpuEventTracker::ParseMaliGpuEvent(int64_t ts,
                                             int32_t field_id,
@@ -76,6 +81,36 @@
   }
 }
 
+void MaliGpuEventTracker::ParseMaliGpuIrqEvent(int64_t ts,
+                                               int32_t field_id,
+                                               uint32_t cpu,
+                                               protozero::ConstBytes blob) {
+  using protos::pbzero::FtraceEvent;
+
+  // Since these events are called from an interrupt context they cannot be
+  // associated to a single process or thread. Add to a custom Mali Irq track
+  // instead.
+  base::StackString<255> track_name("Mali Irq Cpu %d", cpu);
+  StringId track_name_id =
+      context_->storage->InternString(track_name.string_view());
+  TrackId track_id =
+      context_->track_tracker->InternCpuTrack(track_name_id, cpu);
+
+  switch (field_id) {
+    case FtraceEvent::kMaliMaliCSFINTERRUPTSTARTFieldNumber: {
+      ParseMaliCSFInterruptStart(ts, track_id, blob);
+      break;
+    }
+    case FtraceEvent::kMaliMaliCSFINTERRUPTENDFieldNumber: {
+      ParseMaliCSFInterruptEnd(ts, track_id, blob);
+      break;
+    }
+    default:
+      PERFETTO_DFATAL("Unexpected field id");
+      break;
+  }
+}
+
 void MaliGpuEventTracker::ParseMaliKcpuCqsSet(int64_t timestamp,
                                               TrackId track_id) {
   context_->slice_tracker->Scoped(timestamp, track_id, kNullStringId,
@@ -111,5 +146,34 @@
   context_->slice_tracker->End(timestamp, track_id, kNullStringId,
                                mali_KCPU_FENCE_WAIT_id_);
 }
+
+void MaliGpuEventTracker::ParseMaliCSFInterruptStart(
+    int64_t timestamp,
+    TrackId track_id,
+    protozero::ConstBytes blob) {
+  protos::pbzero::MaliMaliCSFINTERRUPTSTARTFtraceEvent::Decoder evt(blob.data,
+                                                                    blob.size);
+  auto args_inserter = [this, &evt](ArgsTracker::BoundInserter* inserter) {
+    inserter->AddArg(mali_CSF_INTERRUPT_info_val_id_,
+                     Variadic::UnsignedInteger(evt.info_val()));
+  };
+
+  context_->slice_tracker->Begin(timestamp, track_id, kNullStringId,
+                                 mali_CSF_INTERRUPT_id_, args_inserter);
+}
+
+void MaliGpuEventTracker::ParseMaliCSFInterruptEnd(int64_t timestamp,
+                                                   TrackId track_id,
+                                                   protozero::ConstBytes blob) {
+  protos::pbzero::MaliMaliCSFINTERRUPTSTARTFtraceEvent::Decoder evt(blob.data,
+                                                                    blob.size);
+  auto args_inserter = [this, &evt](ArgsTracker::BoundInserter* inserter) {
+    inserter->AddArg(mali_CSF_INTERRUPT_info_val_id_,
+                     Variadic::UnsignedInteger(evt.info_val()));
+  };
+
+  context_->slice_tracker->End(timestamp, track_id, kNullStringId,
+                               mali_CSF_INTERRUPT_id_, args_inserter);
+}
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/importers/ftrace/mali_gpu_event_tracker.h b/src/trace_processor/importers/ftrace/mali_gpu_event_tracker.h
index 9f74c63..9342666 100644
--- a/src/trace_processor/importers/ftrace/mali_gpu_event_tracker.h
+++ b/src/trace_processor/importers/ftrace/mali_gpu_event_tracker.h
@@ -18,6 +18,7 @@
 #define SRC_TRACE_PROCESSOR_IMPORTERS_FTRACE_MALI_GPU_EVENT_TRACKER_H_
 
 #include "src/trace_processor/storage/trace_storage.h"
+#include "src/trace_processor/util/descriptors.h"
 
 namespace perfetto {
 namespace trace_processor {
@@ -28,6 +29,10 @@
  public:
   explicit MaliGpuEventTracker(TraceProcessorContext*);
   void ParseMaliGpuEvent(int64_t timestamp, int32_t field_id, uint32_t pid);
+  void ParseMaliGpuIrqEvent(int64_t timestamp,
+                            int32_t field_id,
+                            uint32_t cpu,
+                            protozero::ConstBytes blob);
 
  private:
   TraceProcessorContext* context_;
@@ -35,12 +40,20 @@
   StringId mali_KCPU_CQS_WAIT_id_;
   StringId mali_KCPU_FENCE_SIGNAL_id_;
   StringId mali_KCPU_FENCE_WAIT_id_;
+  StringId mali_CSF_INTERRUPT_id_;
+  StringId mali_CSF_INTERRUPT_info_val_id_;
   void ParseMaliKcpuFenceSignal(int64_t timestamp, TrackId track_id);
   void ParseMaliKcpuFenceWaitStart(int64_t timestamp, TrackId track_id);
   void ParseMaliKcpuFenceWaitEnd(int64_t timestamp, TrackId track_id);
   void ParseMaliKcpuCqsSet(int64_t timestamp, TrackId track_id);
   void ParseMaliKcpuCqsWaitStart(int64_t timestamp, TrackId track_id);
   void ParseMaliKcpuCqsWaitEnd(int64_t timestamp, TrackId track_id);
+  void ParseMaliCSFInterruptStart(int64_t timestamp,
+                                  TrackId track_id,
+                                  protozero::ConstBytes blob);
+  void ParseMaliCSFInterruptEnd(int64_t timestamp,
+                                TrackId track_id,
+                                protozero::ConstBytes blob);
 };
 
 }  // namespace trace_processor
diff --git a/src/trace_processor/importers/ftrace/sched_event_tracker.cc b/src/trace_processor/importers/ftrace/sched_event_tracker.cc
index f67e571..68fe3b7 100644
--- a/src/trace_processor/importers/ftrace/sched_event_tracker.cc
+++ b/src/trace_processor/importers/ftrace/sched_event_tracker.cc
@@ -240,7 +240,7 @@
 
   if (PERFETTO_LIKELY(context_->config.ingest_ftrace_in_raw_table)) {
     // Add an entry to the raw table.
-    RawId id = context_->storage->mutable_raw_table()
+    RawId id = context_->storage->mutable_ftrace_event_table()
                    ->Insert({ts, sched_waking_id_, cpu, curr_utid})
                    .id;
 
@@ -277,7 +277,7 @@
   if (PERFETTO_LIKELY(context_->config.ingest_ftrace_in_raw_table)) {
     // Push the raw event - this is done as the raw ftrace event codepath does
     // not insert sched_switch.
-    RawId id = context_->storage->mutable_raw_table()
+    RawId id = context_->storage->mutable_ftrace_event_table()
                    ->Insert({ts, sched_switch_id_, cpu, prev_utid})
                    .id;
 
diff --git a/src/trace_processor/importers/ftrace/virtio_gpu_tracker.cc b/src/trace_processor/importers/ftrace/virtio_gpu_tracker.cc
index d4d09a2..9813311 100644
--- a/src/trace_processor/importers/ftrace/virtio_gpu_tracker.cc
+++ b/src/trace_processor/importers/ftrace/virtio_gpu_tracker.cc
@@ -160,8 +160,8 @@
 
 void VirtioGpuTracker::VirtioGpuQueue::HandleNumFree(int64_t timestamp,
                                                      uint32_t num_free) {
-  TrackId track =
-      context_->track_tracker->InternGlobalCounterTrack(num_free_id_);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kVirtio, num_free_id_);
   context_->event_tracker->PushCounter(timestamp, static_cast<double>(num_free),
                                        track);
 }
@@ -201,10 +201,10 @@
 
   int64_t duration = timestamp - *start_timestamp;
 
-  TrackId track =
-      context_->track_tracker->InternGlobalCounterTrack(latency_id_);
-  context_->event_tracker->PushCounter(timestamp,
-                                       static_cast<double>(duration), track);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kVirtio, latency_id_);
+  context_->event_tracker->PushCounter(timestamp, static_cast<double>(duration),
+                                       track);
 
   start_timestamps_.Erase(seqno);
 }
diff --git a/src/trace_processor/importers/fuchsia/fuchsia_parser_unittest.cc b/src/trace_processor/importers/fuchsia/fuchsia_parser_unittest.cc
index 8acc450..e61a137 100644
--- a/src/trace_processor/importers/fuchsia/fuchsia_parser_unittest.cc
+++ b/src/trace_processor/importers/fuchsia/fuchsia_parser_unittest.cc
@@ -333,6 +333,44 @@
   EXPECT_EQ(context_.storage->stats()[stats::fuchsia_invalid_event].value, 0);
 }
 
+TEST_F(FuchsiaTraceParserTest, BooleanArguments) {
+  // Inline name of 8 bytes
+  uint64_t name_ref = uint64_t{0x8008} << 48;
+  // Inline category of 8 bytes
+  uint64_t category_ref = uint64_t{0x8008} << 32;
+  // Inline threadref
+  uint64_t threadref = uint64_t{0};
+  // 2 arguments
+  uint64_t argument_count = uint64_t{2} << 20;
+  // Instant Event
+  uint64_t event_type = 0 << 16;
+  uint64_t size = 8 << 4;
+  uint64_t record_type = 4;
+
+  auto header = name_ref | category_ref | threadref | event_type |
+                argument_count | size | record_type;
+  push_word(header);
+  // Timestamp
+  push_word(0xAAAAAAAAAAAAAAAA);
+  // Pid + tid
+  push_word(0xBBBBBBBBBBBBBBBB);
+  push_word(0xCCCCCCCCCCCCCCCC);
+  // Inline Category
+  push_word(0xDDDDDDDDDDDDDDDD);
+  // Inline Name
+  push_word(0xEEEEEEEEEEEEEEEE);
+  // Boolean argument true
+  push_word(0x0000'0001'8008'0029);
+  // 8 byte arg name stream
+  push_word(0x0000'0000'0000'0000);
+  // Boolean argument false
+  push_word(0x0000'0000'8008'002A);
+  // 8 byte arg name stream
+  push_word(0x0000'0000'0000'0000);
+  EXPECT_TRUE(Tokenize().ok());
+  EXPECT_EQ(context_.storage->stats()[stats::fuchsia_invalid_event].value, 0);
+}
+
 TEST_F(FuchsiaTraceParserTest, FxtWithProtos) {
   // Serialize some protos to bytes
   protozero::HeapBuffered<protos::pbzero::Trace> protos;
diff --git a/src/trace_processor/importers/fuchsia/fuchsia_trace_parser.cc b/src/trace_processor/importers/fuchsia/fuchsia_trace_parser.cc
index 0143060..0b18a77 100644
--- a/src/trace_processor/importers/fuchsia/fuchsia_trace_parser.cc
+++ b/src/trace_processor/importers/fuchsia/fuchsia_trace_parser.cc
@@ -55,6 +55,7 @@
 constexpr uint32_t kString = 6;
 constexpr uint32_t kPointer = 7;
 constexpr uint32_t kKoid = 8;
+constexpr uint32_t kBool = 9;
 
 }  // namespace
 
@@ -169,6 +170,11 @@
         arg.value = fuchsia_trace_utils::ArgValue::Koid(value);
         break;
       }
+      case kBool: {
+        arg.value = fuchsia_trace_utils::ArgValue::Bool(
+            fuchsia_trace_utils::ReadField<bool>(arg_header, 32, 63));
+        break;
+      }
       default:
         arg.value = fuchsia_trace_utils::ArgValue::Unknown();
         break;
@@ -325,6 +331,7 @@
               case fuchsia_trace_utils::ArgValue::kString:
               case fuchsia_trace_utils::ArgValue::kPointer:
               case fuchsia_trace_utils::ArgValue::kKoid:
+              case fuchsia_trace_utils::ArgValue::kBool:
               case fuchsia_trace_utils::ArgValue::kUnknown:
                 context_->storage->IncrementStats(
                     stats::fuchsia_non_numeric_counters);
diff --git a/src/trace_processor/importers/fuchsia/fuchsia_trace_utils.cc b/src/trace_processor/importers/fuchsia/fuchsia_trace_utils.cc
index 47de0f8..48dfe2e 100644
--- a/src/trace_processor/importers/fuchsia/fuchsia_trace_utils.cc
+++ b/src/trace_processor/importers/fuchsia/fuchsia_trace_utils.cc
@@ -83,6 +83,8 @@
       return Variadic::Pointer(pointer_);
     case ArgType::kKoid:
       return Variadic::Integer(static_cast<int64_t>(koid_));
+    case ArgType::kBool:
+      return Variadic::Boolean(bool_);
     case ArgType::kUnknown:
       return Variadic::String(storage->InternString("unknown"));
   }
diff --git a/src/trace_processor/importers/fuchsia/fuchsia_trace_utils.h b/src/trace_processor/importers/fuchsia/fuchsia_trace_utils.h
index f4ae231..d4a3efa 100644
--- a/src/trace_processor/importers/fuchsia/fuchsia_trace_utils.h
+++ b/src/trace_processor/importers/fuchsia/fuchsia_trace_utils.h
@@ -52,6 +52,7 @@
     kString,
     kPointer,
     kKoid,
+    kBool,
     kUnknown,
   };
 
@@ -118,6 +119,13 @@
     return v;
   }
 
+  static ArgValue Bool(bool value) {
+    ArgValue v;
+    v.type_ = ArgType::kBool;
+    v.bool_ = value;
+    return v;
+  }
+
   static ArgValue Unknown() {
     ArgValue v;
     v.type_ = ArgType::kUnknown;
@@ -167,6 +175,11 @@
     return koid_;
   }
 
+  uint64_t Bool() const {
+    PERFETTO_DCHECK(type_ == ArgType::kBool);
+    return bool_;
+  }
+
   Variadic ToStorageVariadic(TraceStorage*) const;
 
  private:
@@ -180,6 +193,7 @@
     StringId string_;
     uint64_t pointer_;
     uint64_t koid_;
+    bool bool_;
   };
 };
 
diff --git a/src/trace_processor/importers/json/json_trace_tokenizer.cc b/src/trace_processor/importers/json/json_trace_tokenizer.cc
index 12414f2..1557f51 100644
--- a/src/trace_processor/importers/json/json_trace_tokenizer.cc
+++ b/src/trace_processor/importers/json/json_trace_tokenizer.cc
@@ -570,7 +570,9 @@
       position_ = TracePosition::kEof;
       return SetOutAndReturn(next, out);
     case ReadKeyRes::kNeedsMoreData:
-      return SetOutAndReturn(next, out);
+      // If we didn't manage to read the key we need to set |out| to |start|
+      // (*not* |next|) to keep the state machine happy.
+      return SetOutAndReturn(start, out);
     case ReadKeyRes::kFoundKey:
       break;
   }
@@ -619,7 +621,10 @@
           "Failure parsing JSON: error while parsing value for key %s",
           key.c_str());
     case SkipValueRes::kNeedsMoreData:
-      return SetOutAndReturn(next, out);
+      // If we didn't manage to read the key *and* the value, we need to set
+      // |out| to |start| (*not* |next|) to keep the state machine happy (as
+      // we expect to always see a key before the value).
+      return SetOutAndReturn(start, out);
     case SkipValueRes::kEndOfValue:
       return ParseInternal(next, end, out);
   }
diff --git a/src/trace_processor/importers/proto/android_camera_event_module.h b/src/trace_processor/importers/proto/android_camera_event_module.h
index 88e7476..1d55081 100644
--- a/src/trace_processor/importers/proto/android_camera_event_module.h
+++ b/src/trace_processor/importers/proto/android_camera_event_module.h
@@ -24,7 +24,7 @@
 #include "protos/perfetto/trace/trace_packet.pbzero.h"
 #include "src/trace_processor/importers/common/parser_types.h"
 #include "src/trace_processor/importers/proto/proto_importer_module.h"
-#include "src/trace_processor/tables/slice_tables.h"
+#include "src/trace_processor/tables/slice_tables_py.h"
 #include "src/trace_processor/tables/track_tables_py.h"
 #include "src/trace_processor/types/trace_processor_context.h"
 
diff --git a/src/trace_processor/importers/proto/android_probes_module.cc b/src/trace_processor/importers/proto/android_probes_module.cc
index e1feb51..94a9cb5 100644
--- a/src/trace_processor/importers/proto/android_probes_module.cc
+++ b/src/trace_processor/importers/proto/android_probes_module.cc
@@ -155,7 +155,8 @@
     StringId counter_name_id =
         context_->storage->InternString(counter_name.string_view());
     TrackId track = context_->track_tracker->InternGlobalCounterTrack(
-        counter_name_id, [this, &desc](ArgsTracker::BoundInserter& inserter) {
+        TrackTracker::Group::kPower, counter_name_id,
+        [this, &desc](ArgsTracker::BoundInserter& inserter) {
           StringId raw_name = context_->storage->InternString(desc.rail_name());
           inserter.AddArg(power_rail_raw_name_id_, Variadic::String(raw_name));
 
diff --git a/src/trace_processor/importers/proto/android_probes_parser.cc b/src/trace_processor/importers/proto/android_probes_parser.cc
index 754f30a..7521061 100644
--- a/src/trace_processor/importers/proto/android_probes_parser.cc
+++ b/src/trace_processor/importers/proto/android_probes_parser.cc
@@ -82,14 +82,14 @@
         std::string("batt.").append(batt_name).append(".current.avg_ua")));
   }
   if (evt.has_charge_counter_uah()) {
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(batt_charge_id);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kPower, batt_charge_id);
     context_->event_tracker->PushCounter(
         ts, static_cast<double>(evt.charge_counter_uah()), track);
   } else if (evt.has_energy_counter_uwh() && evt.has_voltage_uv()) {
     // Calculate charge counter from energy counter and voltage.
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(batt_charge_id);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kPower, batt_charge_id);
     auto energy = evt.energy_counter_uwh();
     auto voltage = evt.voltage_uv();
     if (voltage > 0) {
@@ -99,20 +99,20 @@
   }
 
   if (evt.has_capacity_percent()) {
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(batt_capacity_id);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kPower, batt_capacity_id);
     context_->event_tracker->PushCounter(
         ts, static_cast<double>(evt.capacity_percent()), track);
   }
   if (evt.has_current_ua()) {
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(batt_current_id);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kPower, batt_current_id);
     context_->event_tracker->PushCounter(
         ts, static_cast<double>(evt.current_ua()), track);
   }
   if (evt.has_current_avg_ua()) {
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(batt_current_avg_id);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kPower, batt_current_avg_id);
     context_->event_tracker->PushCounter(
         ts, static_cast<double>(evt.current_avg_ua()), track);
   }
@@ -219,7 +219,7 @@
     }
 
     TrackId track = context_->track_tracker->InternGlobalCounterTrack(
-        entity_state->overall_name);
+        TrackTracker::Group::kPower, entity_state->overall_name);
     context_->event_tracker->PushCounter(
         ts, double(residency.total_time_in_state_ms()), track);
   }
@@ -396,8 +396,8 @@
                                                    ConstBytes blob) {
   protos::pbzero::InitialDisplayState::Decoder state(blob.data, blob.size);
 
-  TrackId track =
-      context_->track_tracker->InternGlobalCounterTrack(screen_state_id_);
+  TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+      TrackTracker::Group::kDeviceState, screen_state_id_);
   context_->event_tracker->PushCounter(ts, state.display_state(), track);
 }
 
@@ -427,8 +427,8 @@
       std::optional<int32_t> state =
           base::StringToInt32(kv.value().ToStdString());
       if (state) {
-        TrackId track =
-            context_->track_tracker->InternGlobalCounterTrack(name_id);
+        TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+            TrackTracker::Group::kNetwork, name_id);
         context_->event_tracker->PushCounter(ts, *state, track);
       }
     } else if (name == "debug.tracing.screen_state") {
@@ -442,8 +442,8 @@
       std::optional<int32_t> state =
           base::StringToInt32(kv.value().ToStdString());
       if (state) {
-        TrackId track =
-            context_->track_tracker->InternGlobalCounterTrack(*mapped_name_id);
+        TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+            TrackTracker::Group::kDeviceState, *mapped_name_id);
         context_->event_tracker->PushCounter(ts, *state, track);
       }
     }
diff --git a/src/trace_processor/importers/proto/atoms.descriptor b/src/trace_processor/importers/proto/atoms.descriptor
index daeacb7..2d4c191 100644
--- a/src/trace_processor/importers/proto/atoms.descriptor
+++ b/src/trace_processor/importers/proto/atoms.descriptor
Binary files differ
diff --git a/src/trace_processor/importers/proto/gpu_event_parser.cc b/src/trace_processor/importers/proto/gpu_event_parser.cc
index 56bc165..9022cbb 100644
--- a/src/trace_processor/importers/proto/gpu_event_parser.cc
+++ b/src/trace_processor/importers/proto/gpu_event_parser.cc
@@ -735,8 +735,8 @@
   if (pid == 0) {
     // Pid 0 is used to indicate the global total
     track = context_->track_tracker->InternGlobalCounterTrack(
-        gpu_mem_total_name_id_, {}, gpu_mem_total_unit_id_,
-        gpu_mem_total_global_desc_id_);
+        TrackTracker::Group::kMemory, gpu_mem_total_name_id_, {},
+        gpu_mem_total_unit_id_, gpu_mem_total_global_desc_id_);
   } else {
     // Process emitting the packet can be different from the pid in the event.
     UniqueTid utid = context_->process_tracker->UpdateThread(pid, pid);
diff --git a/src/trace_processor/importers/proto/proto_trace_parser_unittest.cc b/src/trace_processor/importers/proto/proto_trace_parser_unittest.cc
index 2444215..97779d4 100644
--- a/src/trace_processor/importers/proto/proto_trace_parser_unittest.cc
+++ b/src/trace_processor/importers/proto/proto_trace_parser_unittest.cc
@@ -647,11 +647,11 @@
   meminfo->set_value(value);
 
   EXPECT_CALL(*event_, PushCounter(static_cast<int64_t>(ts),
-                                   DoubleEq(value * 1024.0), TrackId{0u}));
+                                   DoubleEq(value * 1024.0), TrackId{1u}));
   Tokenize();
   context_.sorter->ExtractEventsForced();
 
-  EXPECT_EQ(context_.storage->track_table().row_count(), 1u);
+  EXPECT_EQ(context_.storage->track_table().row_count(), 2u);
 }
 
 TEST_F(ProtoTraceParserTest, LoadVmStats) {
@@ -665,11 +665,11 @@
   meminfo->set_value(value);
 
   EXPECT_CALL(*event_, PushCounter(static_cast<int64_t>(ts), DoubleEq(value),
-                                   TrackId{0u}));
+                                   TrackId{1u}));
   Tokenize();
   context_.sorter->ExtractEventsForced();
 
-  EXPECT_EQ(context_.storage->track_table().row_count(), 1u);
+  EXPECT_EQ(context_.storage->track_table().row_count(), 2u);
 }
 
 TEST_F(ProtoTraceParserTest, LoadProcessPacket) {
diff --git a/src/trace_processor/importers/proto/proto_trace_reader.cc b/src/trace_processor/importers/proto/proto_trace_reader.cc
index f947c0f..003f06c 100644
--- a/src/trace_processor/importers/proto/proto_trace_reader.cc
+++ b/src/trace_processor/importers/proto/proto_trace_reader.cc
@@ -362,7 +362,15 @@
                                   clk.is_incremental());
   }
 
-  uint32_t snapshot_id = context_->clock_tracker->AddSnapshot(clock_timestamps);
+  base::StatusOr<uint32_t> snapshot_id =
+      context_->clock_tracker->AddSnapshot(clock_timestamps);
+  if (!snapshot_id.ok()) {
+    PERFETTO_ELOG("%s", snapshot_id.status().c_message());
+    return base::OkStatus();
+  }
+
+  std::optional<int64_t> trace_time_from_snapshot =
+      context_->clock_tracker->ToTraceTimeFromSnapshot(clock_timestamps);
 
   // Add the all the clock snapshots to the clock snapshot table.
   std::optional<int64_t> trace_ts_for_check;
@@ -371,13 +379,19 @@
     // |absolute_timestamp|.
     int64_t ts_to_convert =
         clock_timestamp.clock.is_incremental ? 0 : clock_timestamp.timestamp;
+    // Even if we have trace time from snapshot, we still run ToTraceTime to
+    // optimise future conversions.
     base::StatusOr<int64_t> opt_trace_ts = context_->clock_tracker->ToTraceTime(
         clock_timestamp.clock.id, ts_to_convert);
+
     if (!opt_trace_ts.ok()) {
-      // This can happen if |AddSnapshot| failed to resolve this clock. Just
-      // ignore this and move on.
-      PERFETTO_DLOG("%s", opt_trace_ts.status().c_message());
-      continue;
+      // This can happen if |AddSnapshot| failed to resolve this clock, e.g. if
+      // clock is not monotonic. Try to fetch trace time from snapshot.
+      if (!trace_time_from_snapshot) {
+        PERFETTO_DLOG("%s", opt_trace_ts.status().c_message());
+        continue;
+      }
+      opt_trace_ts = *trace_time_from_snapshot;
     }
 
     // Double check that all the clocks in this snapshot resolve to the same
@@ -391,7 +405,7 @@
     row.clock_id = static_cast<int64_t>(clock_timestamp.clock.id);
     row.clock_value = clock_timestamp.timestamp;
     row.clock_name = GetBuiltinClockNameOrNull(clock_timestamp.clock.id);
-    row.snapshot_id = snapshot_id;
+    row.snapshot_id = *snapshot_id;
 
     context_->storage->mutable_clock_snapshot_table()->Insert(row);
   }
diff --git a/src/trace_processor/importers/proto/statsd_module.h b/src/trace_processor/importers/proto/statsd_module.h
index 999a339..430b7a2 100644
--- a/src/trace_processor/importers/proto/statsd_module.h
+++ b/src/trace_processor/importers/proto/statsd_module.h
@@ -26,7 +26,7 @@
 #include "src/trace_processor/importers/common/trace_parser.h"
 #include "src/trace_processor/importers/proto/proto_importer_module.h"
 #include "src/trace_processor/storage/trace_storage.h"
-#include "src/trace_processor/tables/slice_tables.h"
+#include "src/trace_processor/tables/slice_tables_py.h"
 #include "src/trace_processor/tables/track_tables_py.h"
 #include "src/trace_processor/types/trace_processor_context.h"
 #include "src/trace_processor/util/descriptors.h"
diff --git a/src/trace_processor/importers/proto/system_probes_parser.cc b/src/trace_processor/importers/proto/system_probes_parser.cc
index da175fa..999d365 100644
--- a/src/trace_processor/importers/proto/system_probes_parser.cc
+++ b/src/trace_processor/importers/proto/system_probes_parser.cc
@@ -170,8 +170,8 @@
     base::StackString<512> track_name("%s.%s", tag_prefix.c_str(),
                                       counter_name);
     StringId string_id = context_->storage->InternString(track_name.c_str());
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(string_id);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kIo, string_id);
     context_->event_tracker->PushCounter(ts, value, track);
   };
 
@@ -244,7 +244,7 @@
     }
     // /proc/meminfo counters are in kB, convert to bytes
     TrackId track = context_->track_tracker->InternGlobalCounterTrack(
-        meminfo_strs_id_[key]);
+        TrackTracker::Group::kMemory, meminfo_strs_id_[key]);
     context_->event_tracker->PushCounter(
         ts, static_cast<double>(mi.value()) * 1024., track);
   }
@@ -259,7 +259,8 @@
         "%.*s %.*s", int(key.size()), key.data(), int(devfreq_subtitle.size()),
         devfreq_subtitle.data());
     StringId name = context_->storage->InternString(counter_name.string_view());
-    TrackId track = context_->track_tracker->InternGlobalCounterTrack(name);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kClockFrequency, name);
     context_->event_tracker->PushCounter(ts, static_cast<double>(vm.value()),
                                          track);
   }
@@ -279,8 +280,8 @@
       context_->storage->IncrementStats(stats::vmstat_unknown_keys);
       continue;
     }
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(vmstat_strs_id_[key]);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kMemory, vmstat_strs_id_[key]);
     context_->event_tracker->PushCounter(ts, static_cast<double>(vm.value()),
                                          track);
   }
@@ -348,22 +349,22 @@
   }
 
   if (sys_stats.has_num_forks()) {
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(num_forks_name_id_);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kDeviceState, num_forks_name_id_);
     context_->event_tracker->PushCounter(
         ts, static_cast<double>(sys_stats.num_forks()), track);
   }
 
   if (sys_stats.has_num_irq_total()) {
     TrackId track = context_->track_tracker->InternGlobalCounterTrack(
-        num_irq_total_name_id_);
+        TrackTracker::Group::kDeviceState, num_irq_total_name_id_);
     context_->event_tracker->PushCounter(
         ts, static_cast<double>(sys_stats.num_irq_total()), track);
   }
 
   if (sys_stats.has_num_softirq_total()) {
     TrackId track = context_->track_tracker->InternGlobalCounterTrack(
-        num_softirq_total_name_id_);
+        TrackTracker::Group::kDeviceState, num_softirq_total_name_id_);
     context_->event_tracker->PushCounter(
         ts, static_cast<double>(sys_stats.num_softirq_total()), track);
   }
@@ -380,7 +381,8 @@
                                           node.c_str(), zone.c_str(), size_kb);
       StringId name =
           context_->storage->InternString(counter_name.string_view());
-      TrackId track = context_->track_tracker->InternGlobalCounterTrack(name);
+      TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+          TrackTracker::Group::kMemory, name);
       context_->event_tracker->PushCounter(ts, static_cast<double>(*order_it),
                                            track);
       order++;
diff --git a/src/trace_processor/importers/proto/track_event_tracker.cc b/src/trace_processor/importers/proto/track_event_tracker.cc
index 7591028..c656564 100644
--- a/src/trace_processor/importers/proto/track_event_tracker.cc
+++ b/src/trace_processor/importers/proto/track_event_tracker.cc
@@ -24,11 +24,6 @@
 namespace perfetto {
 namespace trace_processor {
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-// static
-constexpr uint64_t TrackEventTracker::kDefaultDescriptorTrackUuid;
-#endif
-
 TrackEventTracker::TrackEventTracker(TraceProcessorContext* context)
     : source_key_(context->storage->InternString("source")),
       source_id_key_(context->storage->InternString("source_id")),
diff --git a/src/trace_processor/importers/systrace/systrace_line_parser.cc b/src/trace_processor/importers/systrace/systrace_line_parser.cc
index 958cb7e..c0851d7 100644
--- a/src/trace_processor/importers/systrace/systrace_line_parser.cc
+++ b/src/trace_processor/importers/systrace/systrace_line_parser.cc
@@ -216,8 +216,8 @@
     std::string clock_name_str = args["name"] + subtitle;
     StringId clock_name =
         context_->storage->InternString(base::StringView(clock_name_str));
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(clock_name);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kClockFrequency, clock_name);
     context_->event_tracker->PushCounter(line.ts, rate.value(), track);
   } else if (line.event_name == "workqueue_execute_start") {
     auto split = base::SplitString(line.args_str, "function ");
@@ -232,8 +232,8 @@
     std::string thermal_zone = args["thermal_zone"] + " Temperature";
     StringId track_name =
         context_->storage->InternString(base::StringView(thermal_zone));
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(track_name);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kThermals, track_name);
     auto temp = base::StringToInt32(args["temp"]);
     if (!temp.has_value()) {
       return util::Status("Could not convert temp");
@@ -243,8 +243,8 @@
     std::string type = args["type"] + " Cooling Device";
     StringId track_name =
         context_->storage->InternString(base::StringView(type));
-    TrackId track =
-        context_->track_tracker->InternGlobalCounterTrack(track_name);
+    TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+        TrackTracker::Group::kThermals, track_name);
     auto target = base::StringToDouble(args["target"]);
     if (!target.has_value()) {
       return util::Status("Could not convert target");
diff --git a/src/trace_processor/importers/systrace/systrace_parser.cc b/src/trace_processor/importers/systrace/systrace_parser.cc
index ac16506..b06bb71 100644
--- a/src/trace_processor/importers/systrace/systrace_parser.cc
+++ b/src/trace_processor/importers/systrace/systrace_parser.cc
@@ -277,16 +277,16 @@
         // once the UI has support for displaying instants.
       } else if (point.name == "ScreenState") {
         // Promote ScreenState to its own top level counter.
-        TrackId track =
-            context_->track_tracker->InternGlobalCounterTrack(screen_state_id_);
+        TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+            TrackTracker::Group::kDeviceState, screen_state_id_);
         context_->event_tracker->PushCounter(
             ts, static_cast<double>(point.int_value), track);
         return;
       } else if (point.name.StartsWith("battery_stats.")) {
         // Promote battery_stats conters to global tracks.
         StringId name_id = context_->storage->InternString(point.name);
-        TrackId track =
-            context_->track_tracker->InternGlobalCounterTrack(name_id);
+        TrackId track = context_->track_tracker->InternGlobalCounterTrack(
+            TrackTracker::Group::kPower, name_id);
         context_->event_tracker->PushCounter(
             ts, static_cast<double>(point.int_value), track);
         return;
diff --git a/src/trace_processor/metrics/BUILD.gn b/src/trace_processor/metrics/BUILD.gn
index 8ac796e..5a9757b 100644
--- a/src/trace_processor/metrics/BUILD.gn
+++ b/src/trace_processor/metrics/BUILD.gn
@@ -28,6 +28,11 @@
   descriptor_target = "../../../protos/perfetto/metrics/chrome:descriptor"
 }
 
+perfetto_cc_proto_descriptor("gen_cc_all_webview_metrics_descriptor") {
+  descriptor_name = "all_webview_metrics.descriptor"
+  descriptor_target = "../../../protos/perfetto/metrics/webview:descriptor"
+}
+
 source_set("metrics") {
   sources = [
     "metrics.cc",
@@ -47,6 +52,7 @@
   ]
   public_deps = [
     ":gen_cc_all_chrome_metrics_descriptor",
+    ":gen_cc_all_webview_metrics_descriptor",
     ":gen_cc_metrics_descriptor",
     "../util",
     "../util:descriptors",
diff --git a/src/trace_processor/metrics/metrics_unittest.cc b/src/trace_processor/metrics/metrics_unittest.cc
index 6ba25e2..7d90e81 100644
--- a/src/trace_processor/metrics/metrics_unittest.cc
+++ b/src/trace_processor/metrics/metrics_unittest.cc
@@ -79,7 +79,7 @@
                              ".perfetto.protos.TestProto",
                              ProtoDescriptor::Type::kMessage, std::nullopt);
   descriptor.AddField(FieldDescriptor(
-      "int_value", 1, FieldDescriptorProto::TYPE_INT64, "", false));
+      "int_value", 1, FieldDescriptorProto::TYPE_INT64, "", false, false));
 
   ProtoBuilder builder(&pool, &descriptor);
   ASSERT_TRUE(builder.AppendLong("int_value", 12345).ok());
@@ -102,7 +102,7 @@
                              ".perfetto.protos.TestProto",
                              ProtoDescriptor::Type::kMessage, std::nullopt);
   descriptor.AddField(FieldDescriptor(
-      "double_value", 1, FieldDescriptorProto::TYPE_DOUBLE, "", false));
+      "double_value", 1, FieldDescriptorProto::TYPE_DOUBLE, "", false, false));
 
   ProtoBuilder builder(&pool, &descriptor);
   ASSERT_TRUE(builder.AppendDouble("double_value", 1.2345).ok());
@@ -125,7 +125,7 @@
                              ".perfetto.protos.TestProto",
                              ProtoDescriptor::Type::kMessage, std::nullopt);
   descriptor.AddField(FieldDescriptor(
-      "string_value", 1, FieldDescriptorProto::TYPE_STRING, "", false));
+      "string_value", 1, FieldDescriptorProto::TYPE_STRING, "", false, false));
 
   ProtoBuilder builder(&pool, &descriptor);
   ASSERT_TRUE(builder.AppendString("string_value", "hello world!").ok());
@@ -151,14 +151,15 @@
                          ".perfetto.protos.TestProto.NestedProto",
                          ProtoDescriptor::Type::kMessage, std::nullopt);
   nested.AddField(FieldDescriptor("nested_int_value", 1,
-                                  FieldDescriptorProto::TYPE_INT64, "", false));
+                                  FieldDescriptorProto::TYPE_INT64, "", false,
+                                  false));
 
   ProtoDescriptor descriptor("file.proto", ".perfetto.protos",
                              ".perfetto.protos.TestProto",
                              ProtoDescriptor::Type::kMessage, std::nullopt);
   auto field =
       FieldDescriptor("nested_value", 1, FieldDescriptorProto::TYPE_MESSAGE,
-                      ".perfetto.protos.TestProto.NestedProto", false);
+                      ".perfetto.protos.TestProto.NestedProto", false, false);
   field.set_resolved_type_name(".perfetto.protos.TestProto.NestedProto");
   descriptor.AddField(field);
 
@@ -199,7 +200,7 @@
                              ".perfetto.protos.TestProto",
                              ProtoDescriptor::Type::kMessage, std::nullopt);
   descriptor.AddField(FieldDescriptor(
-      "rep_int_value", 1, FieldDescriptorProto::TYPE_INT64, "", true));
+      "rep_int_value", 1, FieldDescriptorProto::TYPE_INT64, "", true, false));
 
   RepeatedFieldBuilder rep_builder;
   rep_builder.AddLong(1234);
@@ -245,7 +246,7 @@
                              ".perfetto.protos.TestMessage",
                              ProtoDescriptor::Type::kMessage, std::nullopt);
   FieldDescriptor enum_field("enum_value", 1, FieldDescriptorProto::TYPE_ENUM,
-                             ".perfetto.protos.TestEnum", false);
+                             ".perfetto.protos.TestEnum", false, false);
   enum_field.set_resolved_type_name(".perfetto.protos.TestEnum");
   descriptor.AddField(enum_field);
   pool.AddProtoDescriptorForTesting(descriptor);
diff --git a/src/trace_processor/metrics/sql/android/android_jank_cuj.sql b/src/trace_processor/metrics/sql/android/android_jank_cuj.sql
index d4cf1b9..299e830 100644
--- a/src/trace_processor/metrics/sql/android/android_jank_cuj.sql
+++ b/src/trace_processor/metrics/sql/android/android_jank_cuj.sql
@@ -75,7 +75,7 @@
 -- The same numbers are also reported by FrameTracker to statsd.
 SELECT RUN_METRIC('android/jank/internal/counters.sql');
 
--- Creates derived events to visualize a few of the the created tables.
+-- Creates derived events to visualize a few of the created tables.
 -- Used only for debugging so by default not used and not displayed in the UI.
 -- See https://perfetto.dev/docs/contributing/common-tasks#adding-new-derived-events
 -- for instructions on how to add these events to the UI.
@@ -102,6 +102,8 @@
               'missed_app_frames', missed_app_frames,
               'missed_sf_frames', missed_sf_frames,
               'missed_frames_max_successive', missed_frames_max_successive,
+              'sf_callback_missed_frames', sf_callback_missed_frames,
+              'hwui_callback_missed_frames', hwui_callback_missed_frames,
               'frame_dur_max', frame_dur_max)
             FROM android_jank_cuj_counter_metrics cm
             WHERE cm.cuj_id = cuj.cuj_id),
@@ -111,6 +113,8 @@
               'missed_frames', SUM(app_missed OR sf_missed),
               'missed_app_frames', SUM(app_missed),
               'missed_sf_frames', SUM(sf_missed),
+              'sf_callback_missed_frames', SUM(sf_callback_missed),
+              'hwui_callback_missed_frames', SUM(hwui_callback_missed),
               'frame_dur_max', MAX(f.dur),
               'frame_dur_avg', CAST(AVG(f.dur) AS INTEGER),
               'frame_dur_p50', CAST(PERCENTILE(f.dur, 50) AS INTEGER),
@@ -129,6 +133,8 @@
               'missed_frames', SUM(app_missed OR sf_missed),
               'missed_app_frames', SUM(app_missed),
               'missed_sf_frames', SUM(sf_missed),
+              'sf_callback_missed_frames', SUM(sf_callback_missed),
+              'hwui_callback_missed_frames', SUM(hwui_callback_missed),
               'frame_dur_max', MAX(f.dur),
               'frame_dur_avg', CAST(AVG(f.dur) AS INTEGER),
               'frame_dur_p50', CAST(PERCENTILE(f.dur, 50) AS INTEGER),
@@ -150,7 +156,9 @@
                 'dur', f.dur,
                 'dur_expected', f.dur_expected,
                 'app_missed', f.app_missed,
-                'sf_missed', f.sf_missed))
+                'sf_missed', f.sf_missed,
+                'sf_callback_missed', f.sf_callback_missed,
+                'hwui_callback_missed', f.hwui_callback_missed))
             FROM android_jank_cuj_frame f
             WHERE f.cuj_id = cuj.cuj_id
             ORDER BY frame_number ASC),
diff --git a/src/trace_processor/metrics/sql/android/android_startup.sql b/src/trace_processor/metrics/sql/android/android_startup.sql
index 50da014..ab76b6c 100644
--- a/src/trace_processor/metrics/sql/android/android_startup.sql
+++ b/src/trace_processor/metrics/sql/android/android_startup.sql
@@ -209,14 +209,18 @@
       'time_gc_total', (
         SELECT NULL_IF_EMPTY(STARTUP_SLICE_PROTO(TOTAL_GC_TIME_BY_LAUNCH(launches.startup_id)))
       ),
+      'time_dex_open_thread_main',
+      DUR_SUM_MAIN_THREAD_SLICE_PROTO_FOR_LAUNCH(
+        launches.startup_id,
+        'OpenDexFilesFromOat*'),
       'time_lock_contention_thread_main',
       DUR_SUM_MAIN_THREAD_SLICE_PROTO_FOR_LAUNCH(
-       launches.startup_id,
+        launches.startup_id,
         'Lock contention on*'
       ),
       'time_monitor_contention_thread_main',
       DUR_SUM_MAIN_THREAD_SLICE_PROTO_FOR_LAUNCH(
-       launches.startup_id,
+        launches.startup_id,
         'Lock contention on a monitor*'
       ),
       'time_before_start_process', (
@@ -279,6 +283,15 @@
         ORDER BY slice_name
       )
     ),
+    'verify_class', (
+      SELECT RepeatedField(AndroidStartupMetric_VerifyClass(
+        'name', STR_SPLIT(slice_name, "VerifyClass ", 1),
+        'dur_ns', slice_dur))
+      FROM android_thread_slices_for_all_startups
+      WHERE startup_id = launches.startup_id AND slice_name GLOB "VerifyClass *"
+      ORDER BY slice_dur DESC
+      LIMIT 5
+    ),
     'startup_concurrent_to_launch', (
       SELECT RepeatedField(package)
       FROM android_startups l
@@ -303,6 +316,26 @@
     ),
     'slow_start_reason', (SELECT RepeatedField(slow_cause)
       FROM (
+        SELECT 'No baseline or cloud profiles' AS slow_cause
+        WHERE MISSING_BASELINE_PROFILE_FOR_LAUNCH(launches.startup_id, launches.package)
+
+        UNION ALL
+        SELECT 'Optimized artifacts missing, run from apk'
+        WHERE  RUN_FROM_APK_FOR_LAUNCH(launches.startup_id)
+
+        UNION ALL
+        SELECT 'Unlock running during launch'
+        WHERE IS_UNLOCK_RUNNING_DURING_LAUNCH(launches.startup_id)
+
+        UNION ALL
+        SELECT 'App in debuggable mode'
+        WHERE IS_PROCESS_DEBUGGABLE(launches.package)
+
+        UNION ALL
+        SELECT 'GC Activity'
+        WHERE TOTAL_GC_TIME_BY_LAUNCH(launches.startup_id) > 0
+
+        UNION ALL
         SELECT 'dex2oat running during launch' AS slow_cause
         WHERE
           DUR_OF_PROCESS_RUNNING_CONCURRENT_TO_LAUNCH(launches.startup_id, '*dex2oat64') > 0
@@ -334,11 +367,10 @@
         WHERE MAIN_THREAD_TIME_FOR_LAUNCH_STATE_AND_IO_WAIT(launches.startup_id, 'D*', TRUE) > 155e6
 
         UNION ALL
-        SELECT 'Time spent in OpenDexFilesFromOat*'
+        SELECT 'Main Thread - Time spent in OpenDexFilesFromOat*'
           AS slow_cause
-        WHERE
-          ANDROID_SUM_DUR_FOR_STARTUP_AND_SLICE(launches.startup_id, 'OpenDexFilesFromOat*')
-            > launches.dur * 0.2
+        WHERE ANDROID_SUM_DUR_ON_MAIN_THREAD_FOR_STARTUP_AND_SLICE(
+          launches.startup_id, 'OpenDexFilesFromOat*') > launches.dur * 0.2
 
         UNION ALL
         SELECT 'Time spent in bindApplication'
@@ -364,9 +396,7 @@
             > launches.dur * 0.15
 
         UNION ALL
-        SELECT 'Potential CPU contention with '
-          || MOST_ACTIVE_PROCESS_FOR_LAUNCH(launches.startup_id)
-          AS slow_cause
+        SELECT 'Potential CPU contention with another process' AS slow_cause
         WHERE MAIN_THREAD_TIME_FOR_LAUNCH_IN_RUNNABLE_STATE(launches.startup_id) > 100e6
           AND MOST_ACTIVE_PROCESS_FOR_LAUNCH(launches.startup_id) IS NOT NULL
 
@@ -396,10 +426,6 @@
         ) > launches.dur * 0.15
 
         UNION ALL
-        SELECT 'GC Activity'
-        WHERE TOTAL_GC_TIME_BY_LAUNCH(launches.startup_id) > 0
-
-        UNION ALL
         SELECT 'JIT compiled methods'
         WHERE (
           SELECT COUNT(1)
@@ -422,14 +448,6 @@
         ) > 50
 
         UNION ALL
-        SELECT 'No baseline or cloud profiles'
-        WHERE MISSING_BASELINE_PROFILE_FOR_LAUNCH(launches.startup_id, launches.package)
-
-        UNION ALL
-        SELECT 'Optimized artifacts missing, run from apk'
-        WHERE  RUN_FROM_APK_FOR_LAUNCH(launches.startup_id)
-
-        UNION ALL
         SELECT 'Startup running concurrent to launch'
         WHERE EXISTS(
           SELECT package
@@ -445,14 +463,6 @@
           FROM BINDER_TRANSACTION_REPLY_SLICES_FOR_LAUNCH(launches.startup_id, 2e7)
         ) > 0
 
-        UNION ALL
-        SELECT 'Unlock running during launch'
-        WHERE IS_UNLOCK_RUNNING_DURING_LAUNCH(launches.startup_id)
-
-        UNION ALL
-        SELECT 'App in debuggable mode'
-        WHERE IS_PROCESS_DEBUGGABLE(launches.package)
-
       )
     )
   ) AS startup
diff --git a/src/trace_processor/metrics/sql/android/android_surfaceflinger.sql b/src/trace_processor/metrics/sql/android/android_surfaceflinger.sql
index b14ce84..498baf8 100644
--- a/src/trace_processor/metrics/sql/android/android_surfaceflinger.sql
+++ b/src/trace_processor/metrics/sql/android/android_surfaceflinger.sql
@@ -86,6 +86,37 @@
 )
 WHERE event_type = 0 AND fence_id = next_fence_id;
 
+
+DROP VIEW IF EXISTS display_ids;
+CREATE VIEW display_ids AS
+SELECT DISTINCT display_id
+FROM (
+  SELECT display_id FROM frame_missed
+  UNION
+  SELECT display_id FROM hwc_frame_missed
+  UNION
+  SELECT display_id FROM gpu_frame_missed
+);
+
+DROP VIEW IF EXISTS metrics_per_display;
+CREATE VIEW metrics_per_display AS
+SELECT AndroidSurfaceflingerMetric_MetricsPerDisplay(
+  'display_id', d.display_id,
+  'missed_frames',
+  (SELECT COUNT(1) FROM frame_missed WHERE value = 1 AND display_id = d.display_id),
+  'missed_hwc_frames',
+  (SELECT COUNT(1) FROM hwc_frame_missed WHERE value = 1 AND display_id = d.display_id),
+  'missed_gpu_frames',
+  (SELECT COUNT(1) FROM gpu_frame_missed WHERE value = 1 AND display_id = d.display_id),
+  'missed_frame_rate',
+  (SELECT AVG(value) FROM frame_missed WHERE display_id = d.display_id),
+  'missed_hwc_frame_rate',
+  (SELECT AVG(value) FROM hwc_frame_missed WHERE display_id = d.display_id),
+  'missed_gpu_frame_rate',
+  (SELECT AVG(value) FROM gpu_frame_missed WHERE display_id = d.display_id)
+) AS proto
+FROM display_ids d;
+
 DROP VIEW IF EXISTS android_surfaceflinger_output;
 CREATE VIEW android_surfaceflinger_output AS
 SELECT
@@ -99,5 +130,6 @@
     'gpu_invocations', (SELECT COUNT(1) FROM gpu_waiting_end),
     'avg_gpu_waiting_dur_ms', (SELECT AVG(dur) / 1e6 FROM gpu_waiting_span),
     'total_non_empty_gpu_waiting_dur_ms',
-    (SELECT SUM(dur) / 1e6 FROM gpu_waiting_end)
+    (SELECT SUM(dur) / 1e6 FROM gpu_waiting_end),
+    'metrics_per_display', (SELECT RepeatedField(proto) FROM metrics_per_display)
   );
diff --git a/src/trace_processor/metrics/sql/android/frame_missed.sql b/src/trace_processor/metrics/sql/android/frame_missed.sql
index e6546ba..5372177 100644
--- a/src/trace_processor/metrics/sql/android/frame_missed.sql
+++ b/src/trace_processor/metrics/sql/android/frame_missed.sql
@@ -22,12 +22,18 @@
     -- track should ever exist with this name (the track from
     -- surfaceflinger).
     ts - LAG(ts) OVER (ORDER BY ts) AS dur,
+    name,
+    INSTR(name, ' ') AS separator_pos,
     value
   FROM counter c
   JOIN process_counter_track t ON c.track_id = t.id
-  WHERE t.name = '{{track_name}}'
+  WHERE t.name GLOB '{{track_name}}*'
 )
 SELECT
+  CASE
+    WHEN separator_pos = 0 THEN 'unspecified'
+    ELSE SUBSTR(name, separator_pos + 1)
+  END AS display_id,
   ts,
   dur,
   value
diff --git a/src/trace_processor/metrics/sql/android/jank/cujs.sql b/src/trace_processor/metrics/sql/android/jank/cujs.sql
index 3e38843..03d0d96 100644
--- a/src/trace_processor/metrics/sql/android/jank/cujs.sql
+++ b/src/trace_processor/metrics/sql/android/jank/cujs.sql
@@ -50,11 +50,11 @@
   SELECT
     cujs.cuj_id,
     CASE
-      WHEN cuj_state_marker.name GLOB '*#FT#begin*' THEN 'begin'
-      WHEN cuj_state_marker.name GLOB '*#FT#deferMonitoring*' THEN 'deferMonitoring'
-      WHEN cuj_state_marker.name GLOB '*#FT#end*' THEN 'end'
-      WHEN cuj_state_marker.name GLOB '*#FT#cancel*' THEN 'cancel'
-      WHEN cuj_state_marker.name GLOB '*#FT#layerId*' THEN 'layerId'
+      WHEN cuj_state_marker.name GLOB '*FT#begin*' THEN 'begin'
+      WHEN cuj_state_marker.name GLOB '*FT#deferMonitoring*' THEN 'deferMonitoring'
+      WHEN cuj_state_marker.name GLOB '*FT#end*' THEN 'end'
+      WHEN cuj_state_marker.name GLOB '*FT#cancel*' THEN 'cancel'
+      WHEN cuj_state_marker.name GLOB '*FT#layerId*' THEN 'layerId'
     ELSE 'other'
     END AS marker_type,
     cuj_state_marker.name as marker_name
@@ -62,8 +62,11 @@
   LEFT JOIN slice cuj_state_marker
     ON cuj_state_marker.ts >= cujs.ts
       AND cuj_state_marker.ts < cujs.ts_end
-      -- e.g. J<CUJ_NAME>#FT#end#0
-      AND cuj_state_marker.name GLOB (cujs.cuj_slice_name || "#FT#*")
+  LEFT JOIN track marker_track on marker_track.id = cuj_state_marker.track_id
+  WHERE
+    -- e.g. J<CUJ_NAME>#FT#end#0 this for backward compatibility
+    cuj_state_marker.name GLOB (cujs.cuj_slice_name || "#FT#*")
+    OR (marker_track.name = cuj_slice_name and cuj_state_marker.name GLOB 'FT#*')
 )
 SELECT
   cujs.*,
@@ -87,11 +90,23 @@
     FROM cuj_state_markers csm
     WHERE csm.cuj_id = cujs.cuj_id AND csm.marker_name GLOB '*layerId#*'
     LIMIT 1
-  ) AS layer_id
+  ) AS layer_id,
+  (
+    SELECT CAST(STR_SPLIT(csm.marker_name, 'beginVsync#', 1) AS INTEGER)
+    FROM cuj_state_markers csm
+    WHERE csm.cuj_id = cujs.cuj_id AND csm.marker_name GLOB '*beginVsync#*'
+    LIMIT 1
+  ) AS begin_vsync,
+  (
+    SELECT CAST(STR_SPLIT(csm.marker_name, 'endVsync#', 1) AS INTEGER)
+    FROM cuj_state_markers csm
+    WHERE csm.cuj_id = cujs.cuj_id AND csm.marker_name GLOB '*endVsync#*'
+    LIMIT 1
+  ) AS end_vsync
 FROM cujs
 WHERE
   state != 'canceled'
   -- Older builds don't have the state markers so we allow NULL but filter out
   -- CUJs that are <4ms long - assuming CUJ was canceled in that case.
   OR (state IS NULL AND cujs.dur > 4e6)
-ORDER BY ts ASC;
+ORDER BY ts ASC;
\ No newline at end of file
diff --git a/src/trace_processor/metrics/sql/android/jank/cujs_boundaries.sql b/src/trace_processor/metrics/sql/android/jank/cujs_boundaries.sql
index 0d91cb8..687b808 100644
--- a/src/trace_processor/metrics/sql/android/jank/cujs_boundaries.sql
+++ b/src/trace_processor/metrics/sql/android/jank/cujs_boundaries.sql
@@ -13,8 +13,9 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
--- Stores the min and max vsync IDs for each of the CUJs.
--- We calculate that by extracting the vsync ID from the
+-- Stores the min and max vsync IDs for each of the CUJs which are extracted
+-- from the CUJ markers. For backward compatibility (In case the markers don't
+-- exist), We calculate that by extracting the vsync ID from the
 -- `Choreographer#doFrame` slices that are within the CUJ markers.
 DROP TABLE IF EXISTS android_jank_cuj_vsync_boundary;
 CREATE TABLE android_jank_cuj_vsync_boundary AS
@@ -22,8 +23,8 @@
   cuj.cuj_id,
   cuj.upid, -- also store upid to simplify further queries
   cuj.layer_id,  -- also store layer_id to simplify further queries
-  MIN(vsync) AS vsync_min,
-  MAX(vsync) AS vsync_max
+  IFNULL(cuj.begin_vsync, MIN(vsync)) AS vsync_min,
+  IFNULL(cuj.end_vsync, MAX(vsync)) AS vsync_max
 FROM android_jank_cuj cuj
 JOIN android_jank_cuj_do_frame_slice USING (cuj_id)
 GROUP BY cuj.cuj_id, cuj.upid, cuj.layer_id;
diff --git a/src/trace_processor/metrics/sql/android/jank/frames.sql b/src/trace_processor/metrics/sql/android/jank/frames.sql
index 66f6639..ffef19d 100644
--- a/src/trace_processor/metrics/sql/android/jank/frames.sql
+++ b/src/trace_processor/metrics/sql/android/jank/frames.sql
@@ -13,6 +13,14 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
+DROP TABLE IF EXISTS vsync_missed_callback;
+CREATE TABLE vsync_missed_callback AS
+SELECT CAST(STR_SPLIT(name, 'Callback#', 1) AS INTEGER) AS vsync,
+       MAX(name GLOB '*SF*') as sf_callback_missed,
+       MAX(name GLOB '*HWUI*') as hwui_callback_missed
+FROM slice
+WHERE name GLOB '*FT#Missed*Callback*'
+GROUP BY vsync;
 
 DROP TABLE IF EXISTS android_jank_cuj_frame_timeline;
 CREATE TABLE android_jank_cuj_frame_timeline AS
@@ -35,6 +43,8 @@
     OR jank_type GLOB '*SurfaceFlinger Scheduling*'
     OR jank_type GLOB '*Prediction Error*'
     OR jank_type GLOB '*Display HAL*') AS sf_missed,
+  IFNULL(MAX(sf_callback_missed), 0) AS sf_callback_missed,
+  IFNULL(MAX(hwui_callback_missed), 0) AS hwui_callback_missed,
   -- We use MIN to check if ALL layers finished on time
   MIN(on_time_finish) AS on_time_finish,
   MAX(timeline.ts + timeline.dur) AS ts_end_actual,
@@ -54,6 +64,7 @@
     AND vsync <= vsync_max
 LEFT JOIN expected_frame_timeline_slice expected
   ON expected.upid = timeline.upid AND expected.name = timeline.name
+LEFT JOIN vsync_missed_callback missed_callback USING(vsync)
 WHERE
   boundary.layer_id IS NULL
   OR (
@@ -99,6 +110,8 @@
   frame_base.*,
   app_missed,
   sf_missed,
+  sf_callback_missed,
+  hwui_callback_missed,
   on_time_finish,
   ts_end_actual - ts AS dur,
   ts_end_actual - ts_do_frame_start AS dur_unadjusted,
diff --git a/src/trace_processor/metrics/sql/android/jank/internal/counters.sql b/src/trace_processor/metrics/sql/android/jank/internal/counters.sql
index fdcc04c..d04229d 100644
--- a/src/trace_processor/metrics/sql/android/jank/internal/counters.sql
+++ b/src/trace_processor/metrics/sql/android/jank/internal/counters.sql
@@ -51,6 +51,30 @@
   '
 );
 
+DROP TABLE IF EXISTS cuj_marker_missed_callback;
+CREATE TABLE cuj_marker_missed_callback AS
+SELECT
+  marker_track.name AS cuj_slice_name,
+  marker.ts,
+  marker.name AS marker_name
+FROM slice marker
+JOIN track marker_track on  marker_track.id = marker.track_id
+WHERE marker.name GLOB '*FT#Missed*';
+
+SELECT CREATE_FUNCTION(
+   'ANDROID_MISSED_VSYNCS_FOR_CALLBACK(cuj_slice_name STRING, ts_min INT, ts_max INT, callback_missed STRING)',
+   'INT',
+   '
+   SELECT IFNULL(SUM(marker_name GLOB $callback_missed), 0)
+   FROM cuj_marker_missed_callback
+   WHERE
+     cuj_slice_name = $cuj_slice_name
+     AND ts >= $ts_min
+     AND ($ts_max IS NULL OR ts <= $ts_max)
+   ORDER BY ts ASC LIMIT 1
+   '
+);
+
 DROP TABLE IF EXISTS android_jank_cuj_counter_metrics;
 CREATE TABLE android_jank_cuj_counter_metrics AS
 -- Order CUJs to get the ts of the next CUJ with the same name.
@@ -60,6 +84,7 @@
   SELECT
     cuj_id,
     cuj_name,
+    cuj_slice_name,
     upid,
     state,
     ts_end,
@@ -83,5 +108,7 @@
   ANDROID_JANK_CUJ_COUNTER_VALUE(cuj_name, 'missedSfFrames', ts_earliest_allowed_counter, ts_end_next_cuj) AS missed_sf_frames,
   ANDROID_JANK_CUJ_COUNTER_VALUE(cuj_name, 'maxSuccessiveMissedFrames', ts_earliest_allowed_counter, ts_end_next_cuj) AS missed_frames_max_successive,
   -- convert ms to nanos to align with the unit for `dur` in the other tables
-  ANDROID_JANK_CUJ_COUNTER_VALUE(cuj_name, 'maxFrameTimeMillis', ts_earliest_allowed_counter, ts_end_next_cuj) * 1000000 AS frame_dur_max
+  ANDROID_JANK_CUJ_COUNTER_VALUE(cuj_name, 'maxFrameTimeMillis', ts_earliest_allowed_counter, ts_end_next_cuj) * 1000000 AS frame_dur_max,
+  ANDROID_MISSED_VSYNCS_FOR_CALLBACK(cuj_slice_name, ts_earliest_allowed_counter, ts_end_next_cuj, '*SF*') AS sf_callback_missed_frames,
+  ANDROID_MISSED_VSYNCS_FOR_CALLBACK(cuj_slice_name, ts_earliest_allowed_counter, ts_end_next_cuj, '*HWUI*') AS hwui_callback_missed_frames
 FROM cujs_ordered cuj;
diff --git a/src/trace_processor/metrics/sql/android/jank/relevant_slices.sql b/src/trace_processor/metrics/sql/android/jank/relevant_slices.sql
index b779d3c..da5951a 100644
--- a/src/trace_processor/metrics/sql/android/jank/relevant_slices.sql
+++ b/src/trace_processor/metrics/sql/android/jank/relevant_slices.sql
@@ -69,6 +69,8 @@
     AND main_thread.track_id = slice.track_id
 WHERE
   slice.name GLOB 'Choreographer#doFrame*'
+-- Ignore child slice e.g. "Choreographer#doFrame - resynced to 1234 in 20.0ms"
+  AND slice.name not GLOB '*resynced*'
   AND slice.dur > 0;
 
 
diff --git a/src/trace_processor/metrics/sql/android/startup/hsc.sql b/src/trace_processor/metrics/sql/android/startup/hsc.sql
index 9813b69..69dcdab 100644
--- a/src/trace_processor/metrics/sql/android/startup/hsc.sql
+++ b/src/trace_processor/metrics/sql/android/startup/hsc.sql
@@ -203,6 +203,7 @@
 WHERE android_frame_times.number = 8 AND android_frame_times.name GLOB "*maps*" AND android_frame_times.startup_id = launches.startup_id;
 
 -- Messages
+-- Use the first choreographer frame that is emitted after all animator:translationZ slices end.
 INSERT INTO hsc_based_startup_times
 SELECT
   launches.package AS package,
@@ -210,7 +211,7 @@
   android_frame_times.ts_end - launches.ts AS ts_total
 FROM android_frame_times
 JOIN android_startups launches ON launches.package GLOB '*' || android_frame_times.name || '*'
-WHERE android_frame_times.ts_end > (SELECT ts + dur FROM animators WHERE animator_name = "animator:translationZ" AND process_name GLOB "*apps.messaging*" ORDER BY ts LIMIT 1) AND android_frame_times.name GLOB "*apps.messaging*" AND android_frame_times.startup_id = launches.startup_id
+WHERE android_frame_times.ts_end > (SELECT ts + dur FROM animators WHERE animator_name = "animator:translationZ" AND process_name GLOB "*apps.messaging*" ORDER BY (ts + dur) DESC LIMIT 1) AND android_frame_times.name GLOB "*apps.messaging*" AND android_frame_times.startup_id = launches.startup_id
 ORDER BY ts_total LIMIT 1;
 
 -- Netflix
diff --git a/src/trace_processor/metrics/sql/android/startup/slice_functions.sql b/src/trace_processor/metrics/sql/android/startup/slice_functions.sql
index 2a9d1cc..3d460a1 100644
--- a/src/trace_processor/metrics/sql/android/startup/slice_functions.sql
+++ b/src/trace_processor/metrics/sql/android/startup/slice_functions.sql
@@ -132,18 +132,25 @@
   '
 );
 
+-- Given a launch id, returns if there is a main thread run-from-apk slice.
+-- Add an exception if "split_config" is in parent slice's name(b/277809828).
+-- TODO: remove the exception after Sep 2023 (b/78772867)
 SELECT CREATE_FUNCTION(
   'RUN_FROM_APK_FOR_LAUNCH(launch_id LONG)',
   'BOOL',
   '
     SELECT EXISTS(
       SELECT slice_name, startup_id, is_main_thread
-      FROM android_thread_slices_for_all_startups
+      FROM android_thread_slices_for_all_startups s
+      JOIN slice ON slice.id = s.slice_id
+      LEFT JOIN slice parent ON slice.parent_id = parent.id
       WHERE
         startup_id = $launch_id AND is_main_thread AND
         slice_name GLOB "location=* status=* filter=* reason=*" AND
         STR_SPLIT(STR_SPLIT(slice_name, " filter=", 1), " reason=", 0)
-          GLOB ("*" || "run-from-apk" || "*")
+          GLOB ("*" || "run-from-apk" || "*") AND
+        (parent.name IS NULL OR
+          parent.name NOT GLOB ("OpenDexFilesFromOat(*split_config*apk)"))
     )
   '
 );
diff --git a/src/trace_processor/metrics/sql/experimental/chrome_long_latency.sql b/src/trace_processor/metrics/sql/experimental/chrome_long_latency.sql
index ad7eb4d..612b379 100644
--- a/src/trace_processor/metrics/sql/experimental/chrome_long_latency.sql
+++ b/src/trace_processor/metrics/sql/experimental/chrome_long_latency.sql
@@ -16,7 +16,7 @@
 -- Find all long EventLatency slices > 100ms and also get the
 -- type of the event stored as 'debug.event' argument.
 -- In order to group all events
--- Note that a long latency event is represented by the the ending time
+-- Note that a long latency event is represented by the ending time
 -- of an EventLatency slice, i.e. the timestamp of the frame presentation
 -- that reflects the event.
 DROP VIEW IF EXISTS long_eventlatency_slice;
diff --git a/src/trace_processor/metrics/sql/webview/BUILD.gn b/src/trace_processor/metrics/sql/webview/BUILD.gn
index 8c08b3d..2a24c97 100644
--- a/src/trace_processor/metrics/sql/webview/BUILD.gn
+++ b/src/trace_processor/metrics/sql/webview/BUILD.gn
@@ -18,5 +18,8 @@
 assert(enable_perfetto_trace_processor_sqlite)
 
 perfetto_sql_source_set("webview") {
-  sources = [ "webview_power_usage.sql" ]
+  sources = [
+    "webview_jank_approximation.sql",
+    "webview_power_usage.sql",
+  ]
 }
diff --git a/src/trace_processor/metrics/sql/webview/webview_jank_approximation.sql b/src/trace_processor/metrics/sql/webview/webview_jank_approximation.sql
new file mode 100644
index 0000000..6b3f449
--- /dev/null
+++ b/src/trace_processor/metrics/sql/webview/webview_jank_approximation.sql
@@ -0,0 +1,148 @@
+--
+-- Copyright 2023 The Android Open Source Project
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+--     https://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+-- We approximate WebView-related app janks by selecting WebView renderer
+-- slices and overlapping them with app jank slices for known apps.
+
+-- Select all WebView processes
+DROP VIEW IF EXISTS webview_processes;
+CREATE VIEW webview_processes AS
+SELECT * FROM process
+WHERE name IN ('com.google.android.gm',
+  'com.google.android.googlequicksearchbox',
+  'com.google.android.apps.searchlite',
+  'com.google.android.apps.magazines');
+
+-- Select all system processes
+DROP VIEW IF EXISTS system_processes;
+CREATE VIEW system_processes AS
+SELECT * FROM process
+WHERE name IN ('com.android.systemui',
+  '/system/bin/surfaceflinger',
+  'system_server');
+
+-- Select all slices related to startup
+DROP TABLE IF EXISTS webview_browser_startup_slices;
+CREATE TABLE webview_browser_startup_slices AS
+SELECT slice.id AS browser_startup_id, slice.ts, slice.dur
+FROM slice
+WHERE name = 'WebViewChromium.init';
+
+-- Select all scheduler slices from WebView renderer processes
+DROP TABLE IF EXISTS webview_renderer_slices;
+CREATE TABLE webview_renderer_slices AS
+SELECT sched_slice.id as renderer_id, sched_slice.ts, sched_slice.dur
+FROM sched_slice
+JOIN thread
+USING(utid)
+JOIN process
+USING (upid)
+WHERE process.name GLOB '*webview*Sand*';
+
+-- Select all jank slices
+DROP TABLE IF EXISTS all_self_jank_slices;
+CREATE TABLE all_self_jank_slices AS
+SELECT *
+FROM actual_frame_timeline_slice
+WHERE jank_type NOT IN ('None', 'Buffer Stuffing')
+  AND jank_tag = 'Self Jank';
+
+-- Select all jank slices from WebView processes
+-- @column id Id of jank slice from a WebView process
+-- @column ts Timestamp of the start of jank slice in a WebView process (in nanoseconds)
+-- @column dur Duration of jank slice in a WebView process (in nanoseconds)
+DROP VIEW IF EXISTS webview_app_jank_slices;
+CREATE VIEW webview_app_jank_slices AS
+SELECT * FROM all_self_jank_slices
+WHERE upid IN (SELECT upid FROM webview_processes);
+
+-- Select all jank slices from all processes except system processes
+-- @column id Id of jank slice from all processes except system processes
+-- @column ts Timestamp of the start of jank slice from all processes except system processes (in nanoseconds)
+-- @column dur Duration of the jank slice from all processes except system processes (in nanoseconds)
+DROP VIEW IF EXISTS webview_all_app_jank_slices;
+CREATE VIEW webview_all_app_jank_slices AS
+SELECT * FROM all_self_jank_slices
+WHERE upid NOT IN (SELECT upid FROM system_processes);
+
+-- Select jank slices from WebView processes overlapping WebView renderer
+-- scheduler slices
+-- @column id Id of jank slice from WebView processes overlapping WebView renderer
+-- @column ts Timestamp of the start of jank slice from WebView processes overlapping WebView renderer (in nanoseconds)
+-- @column dur Duration of jank slice from WebView processes overlapping WebView renderer (in nanoseconds)
+DROP TABLE IF EXISTS webview_jank_slices;
+CREATE VIRTUAL TABLE webview_jank_slices
+USING SPAN_JOIN(webview_renderer_slices,
+                webview_app_jank_slices);
+
+-- Select jank slices overlapping WebView startup slices
+-- @column id Id of jank slice overlapping WebView startup slices
+-- @column ts Timestamp of the start of jank slice overlapping WebView startup slices (in nanoseconds)
+-- @column dur Duration of jank slice overlapping WebView startup slices (in nanoseconds)
+DROP TABLE IF EXISTS webview_browser_startup_jank_slices;
+CREATE VIRTUAL TABLE webview_browser_startup_jank_slices
+USING SPAN_JOIN(webview_browser_startup_slices,
+               webview_app_jank_slices);
+
+-- Select jank slices from all processes except system processes overlapping
+-- WebView renderer scheduler slices
+-- @column id Id of jank slice from all processes except system processes overlapping WebView renderer scheduler slices
+-- @column ts Timestamp of the start of jank slice from all processes except system processes overlapping WebView renderer scheduler slices (in nanoseconds)
+-- @column dur Duration of jank slice from all processes except system processes overlapping WebView renderer scheduler slices (in nanoseconds)
+DROP TABLE IF EXISTS webview_total_jank_slices;
+CREATE VIRTUAL TABLE webview_total_jank_slices
+USING SPAN_JOIN(webview_renderer_slices,
+                webview_all_app_jank_slices);
+
+-- Select jank slices from WebView processes overlapping WebView renderer
+-- scheduler slices excluding WebView startup slices
+-- @column id Id of jank slice from WebView processes overlapping WebView renderer scheduler slices excluding WebView startup slices
+-- @column ts Timestamp of the start of jank slice from WebView processes overlapping WebView renderer scheduler slices excluding WebView startup slices (in nanoseconds)
+-- @column dur Duration of jank slice from WebView processes overlapping WebView renderer scheduler slices excluding WebView startup slices (in nanoseconds)
+DROP VIEW IF EXISTS webview_janks_slices_without_startup;
+CREATE VIEW webview_janks_slices_without_startup AS
+SELECT * FROM webview_jank_slices
+WHERE id NOT IN (SELECT id FROM webview_browser_startup_jank_slices);
+
+-- Summary for all types of janks
+-- @column webview_janks janks in WebView apps that overlap with WebView renderer
+-- @column webview_janks_without_startup same as above but excluding startup
+-- @column webview_app_janks janks in WebView apps
+-- @column webview_total_janks janks in all apps (except system) that overlap with WebView renderer
+-- @column total_janks janks in all apps (except system)
+DROP VIEW IF EXISTS webview_jank_approximation_summary;
+CREATE VIEW webview_jank_approximation_summary AS
+WITH wvj AS (SELECT COUNT(DISTINCT(id)) AS webview_janks
+  FROM webview_jank_slices),
+wvjwos AS (SELECT COUNT(DISTINCT(id))
+  AS webview_janks_without_startup FROM webview_janks_slices_without_startup),
+wvaj AS (SELECT COUNT(DISTINCT(id))
+  AS webview_app_janks FROM webview_app_jank_slices),
+wvtj AS (SELECT COUNT(DISTINCT(id)) AS webview_total_janks
+  FROM webview_total_jank_slices),
+tj AS (SELECT COUNT(DISTINCT(id))
+  AS total_janks FROM webview_all_app_jank_slices)
+SELECT *
+from wvj, wvjwos, wvaj, wvtj, tj;
+
+DROP VIEW IF EXISTS webview_jank_approximation_output;
+CREATE VIEW webview_jank_approximation_output AS
+SELECT WebViewJankApproximation(
+  'webview_janks', (SELECT webview_janks FROM webview_jank_approximation_summary),
+  'webview_janks_without_startup', (SELECT webview_janks_without_startup FROM webview_jank_approximation_summary),
+  'webview_app_janks', (SELECT webview_app_janks FROM webview_jank_approximation_summary),
+  'webview_total_janks', (SELECT webview_total_janks FROM webview_jank_approximation_summary),
+  'total_janks', (SELECT total_janks FROM webview_jank_approximation_summary)
+);
\ No newline at end of file
diff --git a/src/trace_processor/prelude/functions/BUILD.gn b/src/trace_processor/prelude/functions/BUILD.gn
index 02cb90f..f7f2cd7 100644
--- a/src/trace_processor/prelude/functions/BUILD.gn
+++ b/src/trace_processor/prelude/functions/BUILD.gn
@@ -18,6 +18,7 @@
 
 source_set("functions") {
   sources = [
+    "clock_functions.h",
     "create_function.cc",
     "create_function.h",
     "create_function_internal.cc",
@@ -36,6 +37,8 @@
     "sqlite3_str_split.h",
     "stack_functions.cc",
     "stack_functions.h",
+    "to_ftrace.cc",
+    "to_ftrace.h",
     "utils.h",
     "window_functions.h",
   ]
@@ -47,6 +50,7 @@
     "../../../../gn:sqlite",
     "../../../../include/perfetto/protozero:protozero",
     "../../../../protos/perfetto/common:zero",
+    "../../../../protos/perfetto/trace:zero",
     "../../../../protos/perfetto/trace/ftrace:zero",
     "../../../../protos/perfetto/trace_processor:zero",
     "../../../base",
diff --git a/src/trace_processor/prelude/functions/clock_functions.h b/src/trace_processor/prelude/functions/clock_functions.h
new file mode 100644
index 0000000..34f23f2
--- /dev/null
+++ b/src/trace_processor/prelude/functions/clock_functions.h
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CLOCK_FUNCTIONS_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CLOCK_FUNCTIONS_H_
+
+#include <sqlite3.h>
+#include <unordered_map>
+#include "perfetto/ext/base/base64.h"
+#include "protos/perfetto/common/builtin_clock.pbzero.h"
+#include "src/trace_processor/importers/common/clock_converter.h"
+#include "src/trace_processor/prelude/functions/create_function_internal.h"
+#include "src/trace_processor/util/status_macros.h"
+
+#include "src/trace_processor/prelude/functions/register_function.h"
+
+namespace perfetto {
+namespace trace_processor {
+
+struct AbsTimeStr : public SqlFunction {
+  using Context = ClockConverter;
+  static base::Status Run(ClockConverter* tracker,
+                          size_t argc,
+                          sqlite3_value** argv,
+                          SqlValue& out,
+                          Destructors& destructors);
+};
+
+base::Status AbsTimeStr::Run(ClockConverter* tracker,
+                             size_t argc,
+                             sqlite3_value** argv,
+                             SqlValue& out,
+                             Destructors& destructors) {
+  if (argc != 1) {
+    return base::ErrStatus("ABS_TIME_STR: 1 arg required");
+  }
+
+  // If the timestamp is null, just return null as the result.
+  if (sqlite3_value_type(argv[0]) == SQLITE_NULL) {
+    return base::OkStatus();
+  }
+  if (sqlite3_value_type(argv[0]) != SQLITE_INTEGER) {
+    return base::ErrStatus("ABS_TIME_STR: first argument should be timestamp");
+  }
+
+  int64_t ts = sqlite3_value_int64(argv[0]);
+  base::StatusOr<std::string> iso8601 = tracker->ToAbsTime(ts);
+  if (!iso8601.ok()) {
+    // We are returning an OkStatus, because one bad timestamp shouldn't stop
+    // the query.
+    return base::OkStatus();
+  }
+
+  std::unique_ptr<char, base::FreeDeleter> s(
+      static_cast<char*>(malloc(iso8601->size() + 1)));
+  memcpy(s.get(), iso8601->c_str(), iso8601->size() + 1);
+
+  destructors.string_destructor = free;
+  out = SqlValue::String(s.release());
+  return base::OkStatus();
+}
+
+struct ToMonotonic : public SqlFunction {
+  using Context = ClockConverter;
+  static base::Status Run(ClockConverter* tracker,
+                          size_t argc,
+                          sqlite3_value** argv,
+                          SqlValue& out,
+                          Destructors& destructors);
+};
+
+base::Status ToMonotonic::Run(ClockConverter* tracker,
+                              size_t argc,
+                              sqlite3_value** argv,
+                              SqlValue& out,
+                              Destructors&) {
+  if (argc != 1) {
+    return base::ErrStatus("TO_MONOTONIC: 1 arg required");
+  }
+
+  // If the timestamp is null, just return null as the result.
+  if (sqlite3_value_type(argv[0]) == SQLITE_NULL) {
+    return base::OkStatus();
+  }
+  if (sqlite3_value_type(argv[0]) != SQLITE_INTEGER) {
+    return base::ErrStatus("TO_MONOTONIC: first argument should be timestamp");
+  }
+
+  int64_t ts = sqlite3_value_int64(argv[0]);
+  base::StatusOr<int64_t> monotonic = tracker->ToMonotonic(ts);
+
+  if (!monotonic.ok()) {
+    // We are returning an OkStatus, because one bad timestamp shouldn't stop
+    // the query.
+    return base::OkStatus();
+  }
+
+  out = SqlValue::Long(*monotonic);
+  return base::OkStatus();
+}
+
+}  // namespace trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CLOCK_FUNCTIONS_H_
diff --git a/src/trace_processor/prelude/functions/create_view_function.cc b/src/trace_processor/prelude/functions/create_view_function.cc
index 3989de4..9b7dab9 100644
--- a/src/trace_processor/prelude/functions/create_view_function.cc
+++ b/src/trace_processor/prelude/functions/create_view_function.cc
@@ -41,12 +41,12 @@
     explicit Cursor(CreatedViewFunction* table);
     ~Cursor() override;
 
-    int Filter(const QueryConstraints& qc,
-               sqlite3_value**,
-               FilterHistory) override;
-    int Next() override;
-    int Eof() override;
-    int Column(sqlite3_context* context, int N) override;
+    base::Status Filter(const QueryConstraints& qc,
+                        sqlite3_value**,
+                        FilterHistory) override;
+    base::Status Next() override;
+    bool Eof() override;
+    base::Status Column(sqlite3_context* context, int N) override;
 
    private:
     ScopedStmt scoped_stmt_;
@@ -64,8 +64,11 @@
   int BestIndex(const QueryConstraints& qc, BestIndexInfo* info) override;
 
   static void Register(sqlite3* db) {
+    RegistrationFlags flags;
+    flags.type = RegistrationFlags::kExplicitCreateStateless;
+
     SqliteTable::Register<CreatedViewFunction>(
-        db, nullptr, "internal_view_function_impl", false, true);
+        db, nullptr, "internal_view_function_impl", flags);
   }
 
  private:
@@ -276,9 +279,9 @@
 
 CreatedViewFunction::Cursor::~Cursor() = default;
 
-int CreatedViewFunction::Cursor::Filter(const QueryConstraints& qc,
-                                        sqlite3_value** argv,
-                                        FilterHistory) {
+base::Status CreatedViewFunction::Cursor::Filter(const QueryConstraints& qc,
+                                                 sqlite3_value** argv,
+                                                 FilterHistory) {
   PERFETTO_TP_TRACE(metatrace::Category::FUNCTION, "CREATE_VIEW_FUNCTION",
                     [this](metatrace::Record* r) {
                       r->AddArg("Function",
@@ -302,10 +305,8 @@
     // We only support equality constraints as we're expecting "input arguments"
     // to our "function".
     if (!sqlite_utils::IsOpEq(cs.op)) {
-      table_->SetErrorMessage(
-          sqlite3_mprintf("%s: non-equality constraint passed",
-                          table_->prototype_.function_name.c_str()));
-      return SQLITE_ERROR;
+      return base::ErrStatus("%s: non-equality constraint passed",
+                             table_->prototype_.function_name.c_str());
     }
 
     const auto& arg = table_->prototype_.arguments[col_to_arg_idx(cs.column)];
@@ -313,11 +314,9 @@
         argv[i], sql_argument::TypeToSqlValueType(arg.type()),
         sql_argument::TypeToHumanFriendlyString(arg.type()));
     if (!status.ok()) {
-      table_->SetErrorMessage(
-          sqlite3_mprintf("%s: argument %s (index %u) %s",
-                          table_->prototype_.function_name.c_str(),
-                          arg.name().c_str(), i, status.c_message()));
-      return SQLITE_ERROR;
+      return base::ErrStatus("%s: argument %s (index %zu) %s",
+                             table_->prototype_.function_name.c_str(),
+                             arg.name().c_str(), i, status.c_message());
     }
 
     seen_argument_constraints++;
@@ -325,12 +324,11 @@
 
   // Verify that we saw one valid constriant for every input argument.
   if (seen_argument_constraints < table_->prototype_.arguments.size()) {
-    table_->SetErrorMessage(sqlite3_mprintf(
-        "%s: missing value for input argument. Saw %u arguments but expected "
-        "%u",
+    return base::ErrStatus(
+        "%s: missing value for input argument. Saw %zu arguments but expected "
+        "%zu",
         table_->prototype_.function_name.c_str(), seen_argument_constraints,
-        table_->prototype_.arguments.size()));
-    return SQLITE_ERROR;
+        table_->prototype_.arguments.size());
   }
 
   // Prepare the SQL definition as a statement using SQLite.
@@ -361,10 +359,7 @@
     const auto& arg = table_->prototype_.arguments[index];
     auto status = MaybeBindArgument(stmt_, table_->prototype_.function_name,
                                     arg, argv[i]);
-    if (!status.ok()) {
-      table_->SetErrorMessage(sqlite3_mprintf("%s", status.c_message()));
-      return SQLITE_ERROR;
-    }
+    RETURN_IF_ERROR(status);
   }
 
   // Reset the next call count - this is necessary because the same cursor
@@ -373,26 +368,25 @@
   return Next();
 }
 
-int CreatedViewFunction::Cursor::Next() {
+base::Status CreatedViewFunction::Cursor::Next() {
   int ret = sqlite3_step(stmt_);
   is_eof_ = ret == SQLITE_DONE;
   next_call_count_++;
   if (ret != SQLITE_ROW && ret != SQLITE_DONE) {
-    table_->SetErrorMessage(sqlite3_mprintf(
+    return base::ErrStatus(
         "%s: SQLite error while stepping statement: %s",
         table_->prototype_.function_name.c_str(),
         sqlite_utils::FormatErrorMessage(stmt_, std::nullopt, table_->db_, ret)
-            .c_message()));
-    return ret;
+            .c_message());
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int CreatedViewFunction::Cursor::Eof() {
+bool CreatedViewFunction::Cursor::Eof() {
   return is_eof_;
 }
 
-int CreatedViewFunction::Cursor::Column(sqlite3_context* ctx, int i) {
+base::Status CreatedViewFunction::Cursor::Column(sqlite3_context* ctx, int i) {
   size_t idx = static_cast<size_t>(i);
   if (table_->IsReturnValueColumn(idx)) {
     sqlite3_result_value(ctx, sqlite3_column_value(stmt_, i));
@@ -406,7 +400,7 @@
     PERFETTO_DCHECK(table_->IsPrimaryKeyColumn(idx));
     sqlite3_result_int(ctx, next_call_count_);
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
 }  // namespace
diff --git a/src/trace_processor/sqlite/sqlite_raw_table.cc b/src/trace_processor/prelude/functions/to_ftrace.cc
similarity index 93%
rename from src/trace_processor/sqlite/sqlite_raw_table.cc
rename to src/trace_processor/prelude/functions/to_ftrace.cc
index feaca00..5bb138f 100644
--- a/src/trace_processor/sqlite/sqlite_raw_table.cc
+++ b/src/trace_processor/prelude/functions/to_ftrace.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#include "src/trace_processor/sqlite/sqlite_raw_table.h"
-
-#include <cinttypes>
+#include "src/trace_processor/prelude/functions/to_ftrace.h"
 
 #include "perfetto/base/compiler.h"
+#include "perfetto/base/status.h"
 #include "perfetto/ext/base/string_utils.h"
+#include "perfetto/trace_processor/basic_types.h"
 #include "src/trace_processor/importers/common/system_info_tracker.h"
 #include "src/trace_processor/importers/ftrace/ftrace_descriptors.h"
 #include "src/trace_processor/sqlite/sqlite_utils.h"
@@ -538,46 +538,24 @@
 
 }  // namespace
 
-SqliteRawTable::SqliteRawTable(sqlite3* db, Context context)
-    : DbSqliteTable(db,
-                    {context.cache, TableComputation::kStatic,
-                     &context.context->storage->raw_table(), nullptr}),
-      serializer_(context.context) {
-  auto fn = [](sqlite3_context* ctx, int argc, sqlite3_value** argv) {
-    auto* thiz = static_cast<SqliteRawTable*>(sqlite3_user_data(ctx));
-    thiz->ToSystrace(ctx, argc, argv);
-  };
-  sqlite3_create_function(db, "to_ftrace", 1,
-                          SQLITE_UTF8 | SQLITE_DETERMINISTIC, this, fn, nullptr,
-                          nullptr);
-}
-
-SqliteRawTable::~SqliteRawTable() = default;
-
-void SqliteRawTable::RegisterTable(sqlite3* db,
-                                   QueryCache* cache,
-                                   TraceProcessorContext* context) {
-  SqliteTable::Register<SqliteRawTable, Context>(db, Context{cache, context},
-                                                 "raw");
-}
-
-void SqliteRawTable::ToSystrace(sqlite3_context* ctx,
-                                int argc,
-                                sqlite3_value** argv) {
+base::Status ToFtrace::Run(Context* context,
+                           size_t argc,
+                           sqlite3_value** argv,
+                           SqlValue& out,
+                           Destructors& destructors) {
   if (argc != 1 || sqlite3_value_type(argv[0]) != SQLITE_INTEGER) {
-    sqlite3_result_error(ctx, "Usage: to_ftrace(id)", -1);
-    return;
+    return base::ErrStatus("Usage: to_ftrace(id)");
   }
   uint32_t row = static_cast<uint32_t>(sqlite3_value_int64(argv[0]));
 
-  auto str = serializer_.SerializeToString(row);
+  auto str = context->serializer.SerializeToString(row);
   if (str.get() == nullptr) {
-    base::StackString<128> err("to_ftrace: Cannot serialize row id %u", row);
-    sqlite3_result_error(ctx, err.c_str(), -1);
-    return;
+    return base::ErrStatus("to_ftrace: Cannot serialize row id %u", row);
   }
 
-  sqlite3_result_text(ctx, str.release(), -1, str.get_deleter());
+  out = SqlValue::String(str.release());
+  destructors.string_destructor = str.get_deleter();
+  return base::OkStatus();
 }
 
 SystraceSerializer::SystraceSerializer(TraceProcessorContext* context)
diff --git a/src/trace_processor/sqlite/sqlite_raw_table.h b/src/trace_processor/prelude/functions/to_ftrace.h
similarity index 65%
rename from src/trace_processor/sqlite/sqlite_raw_table.h
rename to src/trace_processor/prelude/functions/to_ftrace.h
index dcb5c46..c32ed79 100644
--- a/src/trace_processor/sqlite/sqlite_raw_table.h
+++ b/src/trace_processor/prelude/functions/to_ftrace.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,16 +14,14 @@
  * limitations under the License.
  */
 
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_SQLITE_RAW_TABLE_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_SQLITE_RAW_TABLE_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_TO_FTRACE_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_TO_FTRACE_H_
 
-#include "perfetto/base/logging.h"
 #include "perfetto/ext/base/flat_hash_map.h"
 #include "perfetto/ext/base/string_writer.h"
-#include "src/trace_processor/sqlite/db_sqlite_table.h"
+#include "src/trace_processor/prelude/functions/register_function.h"
 #include "src/trace_processor/storage/trace_storage.h"
 #include "src/trace_processor/types/trace_processor_context.h"
-#include "src/trace_processor/types/variadic.h"
 
 namespace perfetto {
 namespace trace_processor {
@@ -47,25 +45,20 @@
   TraceProcessorContext* context_ = nullptr;
 };
 
-class SqliteRawTable : public DbSqliteTable {
- public:
+struct ToFtrace : public SqlFunction {
   struct Context {
-    QueryCache* cache;
-    TraceProcessorContext* context;
+    const TraceStorage* storage;
+    SystraceSerializer serializer;
   };
 
-  SqliteRawTable(sqlite3*, Context);
-  ~SqliteRawTable() override;
-
-  static void RegisterTable(sqlite3* db, QueryCache*, TraceProcessorContext*);
-
- private:
-  void ToSystrace(sqlite3_context* ctx, int argc, sqlite3_value** argv);
-
-  SystraceSerializer serializer_;
+  static base::Status Run(Context*,
+                          size_t argc,
+                          sqlite3_value** argv,
+                          SqlValue& out,
+                          Destructors& destructors);
 };
 
 }  // namespace trace_processor
 }  // namespace perfetto
 
-#endif  // SRC_TRACE_PROCESSOR_SQLITE_SQLITE_RAW_TABLE_H_
+#endif  // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_TO_FTRACE_H_
diff --git a/src/trace_processor/prelude/functions/utils.h b/src/trace_processor/prelude/functions/utils.h
index c4c5392..82b293f 100644
--- a/src/trace_processor/prelude/functions/utils.h
+++ b/src/trace_processor/prelude/functions/utils.h
@@ -294,89 +294,6 @@
   PERFETTO_FATAL("For GCC");
 }
 
-struct AbsTimeStr : public SqlFunction {
-  using Context = ClockTracker;
-  static base::Status Run(ClockTracker* tracker,
-                          size_t argc,
-                          sqlite3_value** argv,
-                          SqlValue& out,
-                          Destructors& destructors);
-};
-
-base::Status AbsTimeStr::Run(ClockTracker* tracker,
-                             size_t argc,
-                             sqlite3_value** argv,
-                             SqlValue& out,
-                             Destructors& destructors) {
-  if (argc != 1) {
-    return base::ErrStatus("ABS_TIME_STR: 1 arg required");
-  }
-
-  // If the timestamp is null, just return null as the result.
-  if (sqlite3_value_type(argv[0]) == SQLITE_NULL) {
-    return base::OkStatus();
-  }
-  if (sqlite3_value_type(argv[0]) != SQLITE_INTEGER) {
-    return base::ErrStatus("ABS_TIME_STR: first argument should be timestamp");
-  }
-
-  int64_t ts = sqlite3_value_int64(argv[0]);
-  base::StatusOr<std::string> iso8601 = tracker->FromTraceTimeAsISO8601(ts);
-  if (!iso8601.ok()) {
-    // We are returning an OkStatus, because one bad timestamp shouldn't stop
-    // the query.
-    return base::OkStatus();
-  }
-
-  std::unique_ptr<char, base::FreeDeleter> s(
-      static_cast<char*>(malloc(iso8601->size() + 1)));
-  memcpy(s.get(), iso8601->c_str(), iso8601->size() + 1);
-
-  destructors.string_destructor = free;
-  out = SqlValue::String(s.release());
-  return base::OkStatus();
-}
-
-struct ToMonotonic : public SqlFunction {
-  using Context = ClockTracker;
-  static base::Status Run(ClockTracker* tracker,
-                          size_t argc,
-                          sqlite3_value** argv,
-                          SqlValue& out,
-                          Destructors& destructors);
-};
-
-base::Status ToMonotonic::Run(ClockTracker* tracker,
-                              size_t argc,
-                              sqlite3_value** argv,
-                              SqlValue& out,
-                              Destructors&) {
-  if (argc != 1) {
-    return base::ErrStatus("TO_MONOTONIC: 1 arg required");
-  }
-
-  // If the timestamp is null, just return null as the result.
-  if (sqlite3_value_type(argv[0]) == SQLITE_NULL) {
-    return base::OkStatus();
-  }
-  if (sqlite3_value_type(argv[0]) != SQLITE_INTEGER) {
-    return base::ErrStatus("TO_MONOTONIC: first argument should be timestamp");
-  }
-
-  int64_t ts = sqlite3_value_int64(argv[0]);
-  base::StatusOr<int64_t> monotonic =
-      tracker->FromTraceTime(protos::pbzero::BUILTIN_CLOCK_MONOTONIC, ts);
-
-  if (!monotonic.ok()) {
-    // We are returning an OkStatus, because one bad timestamp shouldn't stop
-    // the query.
-    return base::OkStatus();
-  }
-
-  out = SqlValue::Long(*monotonic);
-  return base::OkStatus();
-}
-
 struct SourceGeq : public SqlFunction {
   static base::Status Run(void*,
                           size_t,
diff --git a/src/trace_processor/prelude/operators/span_join_operator.cc b/src/trace_processor/prelude/operators/span_join_operator.cc
index 7d4ccb8..54e8999 100644
--- a/src/trace_processor/prelude/operators/span_join_operator.cc
+++ b/src/trace_processor/prelude/operators/span_join_operator.cc
@@ -24,6 +24,7 @@
 #include <utility>
 
 #include "perfetto/base/logging.h"
+#include "perfetto/base/status.h"
 #include "perfetto/ext/base/string_splitter.h"
 #include "perfetto/ext/base/string_utils.h"
 #include "perfetto/ext/base/string_view.h"
@@ -110,17 +111,14 @@
 
 void SpanJoinOperatorTable::RegisterTable(sqlite3* db,
                                           const TraceStorage* storage) {
-  SqliteTable::Register<SpanJoinOperatorTable>(db, storage, "span_join",
-                                               /* read_write */ false,
-                                               /* requires_args */ true);
+  RegistrationFlags flags;
+  flags.type = RegistrationFlags::kExplicitCreateStateless;
 
+  SqliteTable::Register<SpanJoinOperatorTable>(db, storage, "span_join", flags);
   SqliteTable::Register<SpanJoinOperatorTable>(db, storage, "span_left_join",
-                                               /* read_write */ false,
-                                               /* requires_args */ true);
-
+                                               flags);
   SqliteTable::Register<SpanJoinOperatorTable>(db, storage, "span_outer_join",
-                                               /* read_write */ false,
-                                               /* requires_args */ true);
+                                               flags);
 }
 
 util::Status SpanJoinOperatorTable::Init(int argc,
@@ -411,9 +409,9 @@
       t2_(table, &table->t2_defn_, db),
       table_(table) {}
 
-base::Status SpanJoinOperatorTable::Cursor::FilterInner(
-    const QueryConstraints& qc,
-    sqlite3_value** argv) {
+base::Status SpanJoinOperatorTable::Cursor::Filter(const QueryConstraints& qc,
+                                                   sqlite3_value** argv,
+                                                   FilterHistory) {
   PERFETTO_TP_TRACE(metatrace::Category::QUERY, "SPAN_JOIN_XFILTER");
 
   bool t1_partitioned_mixed =
@@ -435,7 +433,7 @@
   return FindOverlappingSpan();
 }
 
-base::Status SpanJoinOperatorTable::Cursor::NextInner() {
+base::Status SpanJoinOperatorTable::Cursor::Next() {
   RETURN_IF_ERROR(next_query_->Next());
   return FindOverlappingSpan();
 }
@@ -556,11 +554,12 @@
   return t1_less ? &t1_ : &t2_;
 }
 
-int SpanJoinOperatorTable::Cursor::Eof() {
+bool SpanJoinOperatorTable::Cursor::Eof() {
   return t1_.IsEof() || t2_.IsEof();
 }
 
-int SpanJoinOperatorTable::Cursor::Column(sqlite3_context* context, int N) {
+base::Status SpanJoinOperatorTable::Cursor::Column(sqlite3_context* context,
+                                                   int N) {
   PERFETTO_DCHECK(t1_.IsReal() || t2_.IsReal());
 
   switch (N) {
@@ -598,7 +597,7 @@
         t2_.ReportSqliteResult(context, locator.col_index);
     }
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
 SpanJoinOperatorTable::Query::Query(SpanJoinOperatorTable* table,
diff --git a/src/trace_processor/prelude/operators/span_join_operator.h b/src/trace_processor/prelude/operators/span_join_operator.h
index f150a75..e92aac2 100644
--- a/src/trace_processor/prelude/operators/span_join_operator.h
+++ b/src/trace_processor/prelude/operators/span_join_operator.h
@@ -321,27 +321,12 @@
     Cursor(SpanJoinOperatorTable*, sqlite3* db);
     ~Cursor() override = default;
 
-    int Filter(const QueryConstraints& qc,
-               sqlite3_value** argv,
-               FilterHistory) override {
-      base::Status status = FilterInner(qc, argv);
-      if (!status.ok()) {
-        table_->SetErrorMessage(sqlite3_mprintf("%s", status.c_message()));
-        return SQLITE_ERROR;
-      }
-      return SQLITE_OK;
-    }
-    int Next() override {
-      base::Status status = NextInner();
-      if (!status.ok()) {
-        table_->SetErrorMessage(sqlite3_mprintf("%s", status.c_message()));
-        return SQLITE_ERROR;
-      }
-      return SQLITE_OK;
-    }
-
-    int Column(sqlite3_context* context, int N) override;
-    int Eof() override;
+    base::Status Filter(const QueryConstraints& qc,
+                        sqlite3_value** argv,
+                        FilterHistory) override;
+    base::Status Next() override;
+    base::Status Column(sqlite3_context* context, int N) override;
+    bool Eof() override;
 
    private:
     Cursor(Cursor&) = delete;
@@ -351,11 +336,7 @@
     Cursor& operator=(Cursor&&) = default;
 
     bool IsOverlappingSpan();
-
-    base::Status NextInner();
-    base::Status FilterInner(const QueryConstraints& qc, sqlite3_value** argv);
     util::Status FindOverlappingSpan();
-
     Query* FindEarliestFinishQuery();
 
     Query t1_;
diff --git a/src/trace_processor/prelude/operators/window_operator.cc b/src/trace_processor/prelude/operators/window_operator.cc
index b308c53..ddaff51 100644
--- a/src/trace_processor/prelude/operators/window_operator.cc
+++ b/src/trace_processor/prelude/operators/window_operator.cc
@@ -16,6 +16,7 @@
 
 #include "src/trace_processor/prelude/operators/window_operator.h"
 
+#include "perfetto/base/status.h"
 #include "src/trace_processor/sqlite/sqlite_utils.h"
 
 namespace perfetto {
@@ -29,7 +30,11 @@
 
 void WindowOperatorTable::RegisterTable(sqlite3* db,
                                         const TraceStorage* storage) {
-  SqliteTable::Register<WindowOperatorTable>(db, storage, "window", true);
+  RegistrationFlags flags;
+  flags.writable = true;
+  flags.type = RegistrationFlags::kEponymous;
+
+  SqliteTable::Register<WindowOperatorTable>(db, storage, "window", flags);
 }
 
 base::Status WindowOperatorTable::Init(int,
@@ -65,46 +70,46 @@
   return SQLITE_OK;
 }
 
-int WindowOperatorTable::ModifyConstraints(QueryConstraints* qc) {
+base::Status WindowOperatorTable::ModifyConstraints(QueryConstraints* qc) {
   // Remove ordering on timestamp if it is the only ordering as we are already
   // sorted on TS. This makes span joining significantly faster.
   const auto& ob = qc->order_by();
   if (ob.size() == 1 && ob[0].iColumn == Column::kTs && !ob[0].desc) {
     qc->mutable_order_by()->clear();
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int WindowOperatorTable::Update(int argc,
-                                sqlite3_value** argv,
-                                sqlite3_int64*) {
+base::Status WindowOperatorTable::Update(int argc,
+                                         sqlite3_value** argv,
+                                         sqlite3_int64*) {
   // We only support updates to ts and dur. Disallow deletes (argc == 1) and
   // inserts (argv[0] == null).
-  if (argc < 2 || sqlite3_value_type(argv[0]) == SQLITE_NULL)
-    return SQLITE_READONLY;
+  if (argc < 2 || sqlite3_value_type(argv[0]) == SQLITE_NULL) {
+    return base::ErrStatus(
+        "Invalid number/value of arguments when updating window table");
+  }
 
   int64_t new_quantum = sqlite3_value_int64(argv[3]);
   int64_t new_start = sqlite3_value_int64(argv[4]);
   int64_t new_dur = sqlite3_value_int64(argv[5]);
   if (new_dur == 0) {
-    auto* err = sqlite3_mprintf("Cannot set duration of window table to zero.");
-    SetErrorMessage(err);
-    return SQLITE_ERROR;
+    return base::ErrStatus("Cannot set duration of window table to zero.");
   }
 
   quantum_ = new_quantum;
   window_start_ = new_start;
   window_dur_ = new_dur;
 
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
 WindowOperatorTable::Cursor::Cursor(WindowOperatorTable* table)
     : SqliteTable::Cursor(table), table_(table) {}
 
-int WindowOperatorTable::Cursor::Filter(const QueryConstraints& qc,
-                                        sqlite3_value** argv,
-                                        FilterHistory) {
+base::Status WindowOperatorTable::Cursor::Filter(const QueryConstraints& qc,
+                                                 sqlite3_value** argv,
+                                                 FilterHistory) {
   *this = Cursor(table_);
   window_start_ = table_->window_start_;
   window_end_ = table_->window_start_ + table_->window_dur_;
@@ -123,10 +128,11 @@
   } else {
     filter_type_ = FilterType::kReturnAll;
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int WindowOperatorTable::Cursor::Column(sqlite3_context* context, int N) {
+base::Status WindowOperatorTable::Cursor::Column(sqlite3_context* context,
+                                                 int N) {
   switch (N) {
     case Column::kQuantum: {
       sqlite3_result_int64(context,
@@ -163,10 +169,10 @@
       break;
     }
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int WindowOperatorTable::Cursor::Next() {
+base::Status WindowOperatorTable::Cursor::Next() {
   switch (filter_type_) {
     case FilterType::kReturnFirst:
       current_ts_ = window_end_;
@@ -177,10 +183,10 @@
       break;
   }
   row_id_++;
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int WindowOperatorTable::Cursor::Eof() {
+bool WindowOperatorTable::Cursor::Eof() {
   return current_ts_ >= window_end_;
 }
 
diff --git a/src/trace_processor/prelude/operators/window_operator.h b/src/trace_processor/prelude/operators/window_operator.h
index d10b81b..c29fa4f 100644
--- a/src/trace_processor/prelude/operators/window_operator.h
+++ b/src/trace_processor/prelude/operators/window_operator.h
@@ -20,6 +20,7 @@
 #include <limits>
 #include <memory>
 
+#include "perfetto/base/status.h"
 #include "src/trace_processor/sqlite/sqlite_table.h"
 
 namespace perfetto {
@@ -43,12 +44,12 @@
     explicit Cursor(WindowOperatorTable*);
 
     // Implementation of SqliteTable::Cursor.
-    int Filter(const QueryConstraints& qc,
-               sqlite3_value**,
-               FilterHistory) override;
-    int Next() override;
-    int Eof() override;
-    int Column(sqlite3_context*, int N) override;
+    base::Status Filter(const QueryConstraints& qc,
+                        sqlite3_value**,
+                        FilterHistory) override;
+    base::Status Next() override;
+    bool Eof() override;
+    base::Status Column(sqlite3_context*, int N) override;
 
    private:
     // Defines the data to be generated by the table.
@@ -80,8 +81,8 @@
   base::Status Init(int, const char* const*, Schema* schema) override;
   std::unique_ptr<SqliteTable::Cursor> CreateCursor() override;
   int BestIndex(const QueryConstraints&, BestIndexInfo*) override;
-  int ModifyConstraints(QueryConstraints* qc) override;
-  int Update(int, sqlite3_value**, sqlite3_int64*) override;
+  base::Status ModifyConstraints(QueryConstraints* qc) override;
+  base::Status Update(int, sqlite3_value**, sqlite3_int64*) override;
 
  private:
   int64_t quantum_ = 0;
diff --git a/src/trace_processor/prelude/table_functions/BUILD.gn b/src/trace_processor/prelude/table_functions/BUILD.gn
index 4f5ced3..1125c22 100644
--- a/src/trace_processor/prelude/table_functions/BUILD.gn
+++ b/src/trace_processor/prelude/table_functions/BUILD.gn
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 import("../../../../gn/perfetto.gni")
+import("../../../../gn/perfetto_tp_tables.gni")
 
 assert(enable_perfetto_trace_processor_sqlite)
 
@@ -44,6 +45,7 @@
     "view.h",
   ]
   deps = [
+    ":tables",
     "../../../../gn:default_deps",
     "../../../../gn:sqlite",
     "../../../base",
@@ -59,6 +61,11 @@
   ]
 }
 
+perfetto_tp_tables("tables") {
+  sources = [ "tables.py" ]
+  deps = [ "../../tables:tables_python" ]
+}
+
 source_set("unittests") {
   testonly = true
   sources = [
@@ -71,6 +78,7 @@
   ]
   deps = [
     ":table_functions",
+    ":tables",
     "../../../../gn:default_deps",
     "../../../../gn:gtest_and_gmock",
     "../../containers",
diff --git a/src/trace_processor/prelude/table_functions/ancestor.cc b/src/trace_processor/prelude/table_functions/ancestor.cc
index c1656d9..9089b82 100644
--- a/src/trace_processor/prelude/table_functions/ancestor.cc
+++ b/src/trace_processor/prelude/table_functions/ancestor.cc
@@ -19,6 +19,7 @@
 #include <memory>
 #include <set>
 
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
 #include "src/trace_processor/sqlite/sqlite_utils.h"
 #include "src/trace_processor/types/trace_processor_context.h"
 #include "src/trace_processor/util/status_macros.h"
diff --git a/src/trace_processor/prelude/table_functions/ancestor.h b/src/trace_processor/prelude/table_functions/ancestor.h
index c625f16..755a482 100644
--- a/src/trace_processor/prelude/table_functions/ancestor.h
+++ b/src/trace_processor/prelude/table_functions/ancestor.h
@@ -16,40 +16,14 @@
 
 #ifndef SRC_TRACE_PROCESSOR_PRELUDE_TABLE_FUNCTIONS_ANCESTOR_H_
 #define SRC_TRACE_PROCESSOR_PRELUDE_TABLE_FUNCTIONS_ANCESTOR_H_
+
 #include <optional>
 
 #include "src/trace_processor/prelude/table_functions/table_function.h"
 #include "src/trace_processor/storage/trace_storage.h"
-#include "src/trace_processor/tables/profiler_tables.h"
-#include "src/trace_processor/tables/slice_tables.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace tables {
-
-#define PERFETTO_TP_ANCESTOR_SLICE_TABLE_DEF(NAME, PARENT, C) \
-  NAME(AncestorSliceTable, "ancestor_slice")                  \
-  PARENT(PERFETTO_TP_SLICE_TABLE_DEF, C)                      \
-  C(tables::SliceTable::Id, start_id, Column::Flag::kHidden)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_ANCESTOR_SLICE_TABLE_DEF);
-
-#define PERFETTO_TP_ANCESTOR_STACK_PROFILE_CALLSITE_TABLE_DEF(NAME, PARENT, C) \
-  NAME(AncestorStackProfileCallsiteTable,                                      \
-       "experimental_ancestor_stack_profile_callsite")                         \
-  PARENT(PERFETTO_TP_STACK_PROFILE_CALLSITE_DEF, C)                            \
-  C(tables::StackProfileCallsiteTable::Id, start_id, Column::Flag::kHidden)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_ANCESTOR_STACK_PROFILE_CALLSITE_TABLE_DEF);
-
-#define PERFETTO_TP_ANCESTOR_SLICE_BY_STACK_TABLE_DEF(NAME, PARENT, C) \
-  NAME(AncestorSliceByStackTable, "ancestor_slice_by_stack")           \
-  PARENT(PERFETTO_TP_SLICE_TABLE_DEF, C)                               \
-  C(int64_t, start_stack_id, Column::Flag::kHidden)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_ANCESTOR_SLICE_BY_STACK_TABLE_DEF);
-
-}  // namespace tables
 
 class TraceProcessorContext;
 
diff --git a/src/trace_processor/prelude/table_functions/ancestor_unittest.cc b/src/trace_processor/prelude/table_functions/ancestor_unittest.cc
index 08fdad4..afc2d33 100644
--- a/src/trace_processor/prelude/table_functions/ancestor_unittest.cc
+++ b/src/trace_processor/prelude/table_functions/ancestor_unittest.cc
@@ -16,6 +16,7 @@
 
 #include "src/trace_processor/prelude/table_functions/ancestor.h"
 
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
diff --git a/src/trace_processor/prelude/table_functions/connected_flow.h b/src/trace_processor/prelude/table_functions/connected_flow.h
index c05e25e..3ef3fc3 100644
--- a/src/trace_processor/prelude/table_functions/connected_flow.h
+++ b/src/trace_processor/prelude/table_functions/connected_flow.h
@@ -18,24 +18,14 @@
 #define SRC_TRACE_PROCESSOR_PRELUDE_TABLE_FUNCTIONS_CONNECTED_FLOW_H_
 
 #include "src/trace_processor/prelude/table_functions/table_function.h"
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
 #include "src/trace_processor/storage/trace_storage.h"
-#include "src/trace_processor/tables/flow_tables.h"
 
 #include <queue>
 #include <set>
 
 namespace perfetto {
 namespace trace_processor {
-namespace tables {
-
-#define PERFETTO_TP_CONNECTED_FLOW_TABLE_DEF(NAME, PARENT, C) \
-  NAME(ConnectedFlowTable, "not_exposed_to_sql")              \
-  PARENT(PERFETTO_TP_FLOW_TABLE_DEF, C)                       \
-  C(uint32_t, start_id, Column::Flag::kHidden)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_CONNECTED_FLOW_TABLE_DEF);
-
-}  // namespace tables
 
 class TraceProcessorContext;
 
diff --git a/src/trace_processor/prelude/table_functions/descendant.cc b/src/trace_processor/prelude/table_functions/descendant.cc
index 75cb8c9..382edf2 100644
--- a/src/trace_processor/prelude/table_functions/descendant.cc
+++ b/src/trace_processor/prelude/table_functions/descendant.cc
@@ -19,6 +19,7 @@
 #include <memory>
 #include <set>
 
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
 #include "src/trace_processor/sqlite/sqlite_utils.h"
 #include "src/trace_processor/types/trace_processor_context.h"
 #include "src/trace_processor/util/status_macros.h"
diff --git a/src/trace_processor/prelude/table_functions/descendant.h b/src/trace_processor/prelude/table_functions/descendant.h
index 8e93811..bffd9b5 100644
--- a/src/trace_processor/prelude/table_functions/descendant.h
+++ b/src/trace_processor/prelude/table_functions/descendant.h
@@ -24,23 +24,6 @@
 
 namespace perfetto {
 namespace trace_processor {
-namespace tables {
-
-#define PERFETTO_TP_DESCENDANT_SLICE_TABLE_DEF(NAME, PARENT, C) \
-  NAME(DescendantSliceTable, "descendant_slice")                \
-  PARENT(PERFETTO_TP_SLICE_TABLE_DEF, C)                        \
-  C(uint32_t, start_id, Column::Flag::kHidden)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_DESCENDANT_SLICE_TABLE_DEF);
-
-#define PERFETTO_TP_DESCENDANT_SLICE_BY_STACK_TABLE_DEF(NAME, PARENT, C) \
-  NAME(DescendantSliceByStackTable, "descendant_slice_by_stack")         \
-  PARENT(PERFETTO_TP_SLICE_TABLE_DEF, C)                                 \
-  C(int64_t, start_stack_id, Column::Flag::kHidden)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_DESCENDANT_SLICE_BY_STACK_TABLE_DEF);
-
-}  // namespace tables
 
 class TraceProcessorContext;
 
diff --git a/src/trace_processor/prelude/table_functions/descendant_unittest.cc b/src/trace_processor/prelude/table_functions/descendant_unittest.cc
index f1ef1ca..67399d1 100644
--- a/src/trace_processor/prelude/table_functions/descendant_unittest.cc
+++ b/src/trace_processor/prelude/table_functions/descendant_unittest.cc
@@ -16,6 +16,7 @@
 
 #include "src/trace_processor/prelude/table_functions/descendant.h"
 
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
diff --git a/src/trace_processor/prelude/table_functions/experimental_annotated_stack.cc b/src/trace_processor/prelude/table_functions/experimental_annotated_stack.cc
index 8198376..09363f2 100644
--- a/src/trace_processor/prelude/table_functions/experimental_annotated_stack.cc
+++ b/src/trace_processor/prelude/table_functions/experimental_annotated_stack.cc
@@ -19,24 +19,15 @@
 #include <optional>
 
 #include "perfetto/ext/base/string_utils.h"
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
 #include "src/trace_processor/sqlite/sqlite_utils.h"
 #include "src/trace_processor/storage/trace_storage.h"
-#include "src/trace_processor/tables/profiler_tables.h"
 #include "src/trace_processor/types/trace_processor_context.h"
 
 namespace perfetto {
 namespace trace_processor {
 namespace tables {
 
-#define PERFETTO_TP_ANNOTATED_CALLSTACK_TABLE_DEF(NAME, PARENT, C) \
-  NAME(ExperimentalAnnotatedCallstackTable,                        \
-       "experimental_annotated_callstack")                         \
-  PARENT(PERFETTO_TP_STACK_PROFILE_CALLSITE_DEF, C)                \
-  C(StringId, annotation)                                          \
-  C(tables::StackProfileCallsiteTable::Id, start_id, Column::Flag::kHidden)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_ANNOTATED_CALLSTACK_TABLE_DEF);
-
 ExperimentalAnnotatedCallstackTable::~ExperimentalAnnotatedCallstackTable() =
     default;
 
diff --git a/src/trace_processor/prelude/table_functions/experimental_counter_dur.cc b/src/trace_processor/prelude/table_functions/experimental_counter_dur.cc
index 3513c89..a7d9814 100644
--- a/src/trace_processor/prelude/table_functions/experimental_counter_dur.cc
+++ b/src/trace_processor/prelude/table_functions/experimental_counter_dur.cc
@@ -16,20 +16,12 @@
 
 #include "src/trace_processor/prelude/table_functions/experimental_counter_dur.h"
 
-#include "src/trace_processor/tables/counter_tables.h"
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
 
 namespace perfetto {
 namespace trace_processor {
 namespace tables {
 
-#define PERFETTO_TP_COUNTER_DUR_TABLE_DEF(NAME, PARENT, C)      \
-  NAME(ExperimentalCounterDurTable, "experimental_counter_dur") \
-  PARENT(PERFETTO_TP_COUNTER_TABLE_DEF, C)                      \
-  C(int64_t, dur)                                               \
-  C(double, delta)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_COUNTER_DUR_TABLE_DEF);
-
 ExperimentalCounterDurTable::~ExperimentalCounterDurTable() = default;
 
 }  // namespace tables
diff --git a/src/trace_processor/prelude/table_functions/experimental_sched_upid.cc b/src/trace_processor/prelude/table_functions/experimental_sched_upid.cc
index 45a76ea..ba3a0c6 100644
--- a/src/trace_processor/prelude/table_functions/experimental_sched_upid.cc
+++ b/src/trace_processor/prelude/table_functions/experimental_sched_upid.cc
@@ -16,17 +16,14 @@
 
 #include "src/trace_processor/prelude/table_functions/experimental_sched_upid.h"
 
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
+
 namespace perfetto {
 namespace trace_processor {
 namespace tables {
-#define PERFETTO_TP_SCHED_UPID_TABLE_DEF(NAME, PARENT, C)     \
-  NAME(ExperimentalSchedUpidTable, "experimental_sched_upid") \
-  PARENT(PERFETTO_TP_SCHED_SLICE_TABLE_DEF, C)                \
-  C(std::optional<UniquePid>, upid)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_SCHED_UPID_TABLE_DEF);
 
 ExperimentalSchedUpidTable::~ExperimentalSchedUpidTable() = default;
+
 }  // namespace tables
 
 ExperimentalSchedUpid::ExperimentalSchedUpid(
diff --git a/src/trace_processor/prelude/table_functions/experimental_slice_layout.cc b/src/trace_processor/prelude/table_functions/experimental_slice_layout.cc
index e544dbb..d6276dc 100644
--- a/src/trace_processor/prelude/table_functions/experimental_slice_layout.cc
+++ b/src/trace_processor/prelude/table_functions/experimental_slice_layout.cc
@@ -20,11 +20,13 @@
 
 #include "perfetto/ext/base/string_splitter.h"
 #include "perfetto/ext/base/string_utils.h"
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
 #include "src/trace_processor/sqlite/sqlite_utils.h"
 
 namespace perfetto {
 namespace trace_processor {
 namespace tables {
+
 ExperimentalSliceLayoutTable::~ExperimentalSliceLayoutTable() = default;
 }
 
diff --git a/src/trace_processor/prelude/table_functions/experimental_slice_layout.h b/src/trace_processor/prelude/table_functions/experimental_slice_layout.h
index 19af803..3aa61bb 100644
--- a/src/trace_processor/prelude/table_functions/experimental_slice_layout.h
+++ b/src/trace_processor/prelude/table_functions/experimental_slice_layout.h
@@ -25,18 +25,6 @@
 namespace perfetto {
 namespace trace_processor {
 
-namespace tables {
-
-#define PERFETTO_TP_SLICE_LAYOUT_TABLE_DEF(NAME, PARENT, C)       \
-  NAME(ExperimentalSliceLayoutTable, "experimental_slice_layout") \
-  PARENT(PERFETTO_TP_SLICE_TABLE_DEF, C)                          \
-  C(uint32_t, layout_depth)                                       \
-  C(StringPool::Id, filter_track_ids, Column::kHidden)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_SLICE_LAYOUT_TABLE_DEF);
-
-}  // namespace tables
-
 class ExperimentalSliceLayout : public TableFunction {
  public:
   ExperimentalSliceLayout(StringPool* string_pool,
diff --git a/src/trace_processor/prelude/table_functions/experimental_slice_layout_unittest.cc b/src/trace_processor/prelude/table_functions/experimental_slice_layout_unittest.cc
index 43c986d..164dfbb 100644
--- a/src/trace_processor/prelude/table_functions/experimental_slice_layout_unittest.cc
+++ b/src/trace_processor/prelude/table_functions/experimental_slice_layout_unittest.cc
@@ -19,6 +19,7 @@
 #include <algorithm>
 
 #include "src/trace_processor/containers/bit_vector.h"
+#include "src/trace_processor/prelude/table_functions/tables_py.h"
 #include "test/gtest_and_gmock.h"
 
 namespace perfetto {
diff --git a/src/trace_processor/prelude/table_functions/tables.py b/src/trace_processor/prelude/table_functions/tables.py
new file mode 100644
index 0000000..4ffc526
--- /dev/null
+++ b/src/trace_processor/prelude/table_functions/tables.py
@@ -0,0 +1,166 @@
+# Copyright (C) 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Contains tables for finding ancestor events."""
+
+from python.generators.trace_processor_table.public import Column as C
+from python.generators.trace_processor_table.public import ColumnFlag
+from python.generators.trace_processor_table.public import CppDouble
+from python.generators.trace_processor_table.public import CppInt64
+from python.generators.trace_processor_table.public import CppOptional
+from python.generators.trace_processor_table.public import CppString
+from python.generators.trace_processor_table.public import CppTableId
+from python.generators.trace_processor_table.public import CppUint32
+from python.generators.trace_processor_table.public import Table
+
+from src.trace_processor.tables.counter_tables import COUNTER_TABLE
+from src.trace_processor.tables.flow_tables import FLOW_TABLE
+from src.trace_processor.tables.metadata_tables import PROCESS_TABLE
+from src.trace_processor.tables.profiler_tables import STACK_PROFILE_CALLSITE_TABLE
+from src.trace_processor.tables.slice_tables import SLICE_TABLE
+from src.trace_processor.tables.slice_tables import SCHED_SLICE_TABLE
+
+ANCESTOR_SLICE_TABLE = Table(
+    python_module=__file__,
+    class_name="AncestorSliceTable",
+    sql_name="ancestor_slice",
+    columns=[
+        C("start_id", CppTableId(SLICE_TABLE), flags=ColumnFlag.HIDDEN),
+    ],
+    parent=SLICE_TABLE)
+
+ANCESTOR_SLICE_BY_STACK_TABLE = Table(
+    python_module=__file__,
+    class_name="AncestorSliceByStackTable",
+    sql_name="ancestor_slice_by_stack",
+    columns=[
+        C("start_stack_id", CppInt64(), flags=ColumnFlag.HIDDEN),
+    ],
+    parent=SLICE_TABLE)
+
+ANCESTOR_STACK_PROFILE_CALLSITE_TABLE = Table(
+    python_module=__file__,
+    class_name="AncestorStackProfileCallsiteTable",
+    sql_name="experimental_ancestor_stack_profile_callsite",
+    columns=[
+        C("start_id",
+          CppTableId(STACK_PROFILE_CALLSITE_TABLE),
+          flags=ColumnFlag.HIDDEN),
+    ],
+    parent=STACK_PROFILE_CALLSITE_TABLE)
+
+CONNECTED_FLOW_TABLE = Table(
+    python_module=__file__,
+    class_name="ConnectedFlowTable",
+    sql_name="not_exposed_to_sql",
+    columns=[
+        C("start_id", CppTableId(SLICE_TABLE), flags=ColumnFlag.HIDDEN),
+    ],
+    parent=FLOW_TABLE)
+
+DESCENDANT_SLICE_TABLE = Table(
+    python_module=__file__,
+    class_name="DescendantSliceTable",
+    sql_name="descendant_slice",
+    columns=[
+        C("start_id", CppTableId(SLICE_TABLE), flags=ColumnFlag.HIDDEN),
+    ],
+    parent=SLICE_TABLE)
+
+DESCENDANT_SLICE_BY_STACK_TABLE = Table(
+    python_module=__file__,
+    class_name="DescendantSliceByStackTable",
+    sql_name="descendant_slice_by_stack",
+    columns=[
+        C("start_stack_id", CppInt64(), flags=ColumnFlag.HIDDEN),
+    ],
+    parent=SLICE_TABLE)
+
+EXPERIMENTAL_ANNOTATED_CALLSTACK_TABLE = Table(
+    python_module=__file__,
+    class_name="ExperimentalAnnotatedCallstackTable",
+    sql_name="experimental_annotated_callstack",
+    columns=[
+        C("annotation", CppString()),
+        C("start_id",
+          CppTableId(STACK_PROFILE_CALLSITE_TABLE),
+          flags=ColumnFlag.HIDDEN),
+    ],
+    parent=STACK_PROFILE_CALLSITE_TABLE)
+
+EXPERIMENTAL_ANNOTATED_CALLSTACK_TABLE = Table(
+    python_module=__file__,
+    class_name="ExperimentalAnnotatedCallstackTable",
+    sql_name="experimental_annotated_callstack",
+    columns=[
+        C("annotation", CppString()),
+        C("start_id",
+          CppTableId(STACK_PROFILE_CALLSITE_TABLE),
+          flags=ColumnFlag.HIDDEN),
+    ],
+    parent=STACK_PROFILE_CALLSITE_TABLE)
+
+EXPERIMENTAL_ANNOTATED_CALLSTACK_TABLE = Table(
+    python_module=__file__,
+    class_name="ExperimentalAnnotatedCallstackTable",
+    sql_name="experimental_annotated_callstack",
+    columns=[
+        C("annotation", CppString()),
+        C("start_id",
+          CppTableId(STACK_PROFILE_CALLSITE_TABLE),
+          flags=ColumnFlag.HIDDEN),
+    ],
+    parent=STACK_PROFILE_CALLSITE_TABLE)
+
+EXPERIMENTAL_COUNTER_DUR_TABLE = Table(
+    python_module=__file__,
+    class_name="ExperimentalCounterDurTable",
+    sql_name="experimental_counter_dur",
+    columns=[
+        C("dur", CppInt64()),
+        C("delta", CppDouble()),
+    ],
+    parent=COUNTER_TABLE)
+
+EXPERIMENTAL_SCHED_UPID_TABLE = Table(
+    python_module=__file__,
+    class_name="ExperimentalSchedUpidTable",
+    sql_name="experimental_sched_upid",
+    columns=[
+        C("upid", CppOptional(CppTableId(PROCESS_TABLE))),
+    ],
+    parent=SCHED_SLICE_TABLE)
+
+EXPERIMENTAL_SLICE_LAYOUT_TABLE = Table(
+    python_module=__file__,
+    class_name="ExperimentalSliceLayoutTable",
+    sql_name="experimental_slice_layout",
+    columns=[
+        C("layout_depth", CppUint32()),
+        C("filter_track_ids", CppString(), flags=ColumnFlag.HIDDEN),
+    ],
+    parent=SLICE_TABLE)
+
+# Keep this list sorted.
+ALL_TABLES = [
+    ANCESTOR_SLICE_BY_STACK_TABLE,
+    ANCESTOR_SLICE_TABLE,
+    ANCESTOR_STACK_PROFILE_CALLSITE_TABLE,
+    CONNECTED_FLOW_TABLE,
+    DESCENDANT_SLICE_BY_STACK_TABLE,
+    DESCENDANT_SLICE_TABLE,
+    EXPERIMENTAL_ANNOTATED_CALLSTACK_TABLE,
+    EXPERIMENTAL_COUNTER_DUR_TABLE,
+    EXPERIMENTAL_SCHED_UPID_TABLE,
+    EXPERIMENTAL_SLICE_LAYOUT_TABLE,
+]
diff --git a/src/trace_processor/prelude/tables_views/BUILD.gn b/src/trace_processor/prelude/tables_views/BUILD.gn
new file mode 100644
index 0000000..110d0b9
--- /dev/null
+++ b/src/trace_processor/prelude/tables_views/BUILD.gn
@@ -0,0 +1,31 @@
+# Copyright (C) 2022 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("../../../../gn/perfetto.gni")
+import("../../../../gn/perfetto_sql.gni")
+
+assert(enable_perfetto_trace_processor_sqlite)
+
+perfetto_amalgamated_sql_header("tables_views") {
+  deps = [ ":sources" ]
+  generated_header = "tables_views.h"
+  namespace = "prelude::tables_views"
+}
+
+perfetto_sql_source_set("sources") {
+  sources = [
+    "tables.sql",
+    "views.sql",
+  ]
+}
diff --git a/src/trace_processor/prelude/tables_views/tables.sql b/src/trace_processor/prelude/tables_views/tables.sql
new file mode 100644
index 0000000..1b7d016
--- /dev/null
+++ b/src/trace_processor/prelude/tables_views/tables.sql
@@ -0,0 +1,23 @@
+CREATE TABLE perfetto_tables(name STRING);
+
+CREATE TABLE trace_bounds AS
+SELECT 0 AS start_ts, 0 AS end_ts;
+
+CREATE TABLE power_profile(
+  device STRING,
+  cpu INT,
+  cluster INT,
+  freq INT,
+  power DOUBLE,
+  UNIQUE(device, cpu, cluster, freq)
+);
+
+CREATE TABLE trace_metrics(name STRING);
+
+CREATE TABLE debug_slices(
+  id BIGINT,
+  name STRING,
+  ts BIGINT,
+  dur BIGINT,
+  depth BIGINT
+);
\ No newline at end of file
diff --git a/src/trace_processor/prelude/tables_views/views.sql b/src/trace_processor/prelude/tables_views/views.sql
new file mode 100644
index 0000000..6962bae
--- /dev/null
+++ b/src/trace_processor/prelude/tables_views/views.sql
@@ -0,0 +1,55 @@
+CREATE VIEW counters AS 
+SELECT *
+FROM counter v 
+JOIN counter_track t ON v.track_id = t.id 
+ORDER BY ts;
+
+CREATE VIEW slice AS 
+SELECT
+  *, 
+  category AS cat, 
+  id AS slice_id 
+FROM internal_slice;
+
+CREATE VIEW instant AS 
+SELECT ts, track_id, name, arg_set_id 
+FROM slice 
+WHERE dur = 0;
+
+CREATE VIEW sched AS 
+SELECT 
+  *,
+  ts + dur as ts_end
+FROM sched_slice;
+
+CREATE VIEW slices AS 
+SELECT * FROM slice;
+
+CREATE VIEW thread AS 
+SELECT 
+  id as utid,
+  *
+FROM internal_thread;
+
+CREATE VIEW process AS 
+SELECT 
+  id as upid,
+  * 
+FROM internal_process;
+
+-- This should be kept in sync with GlobalArgsTracker::AddArgSet.
+CREATE VIEW args AS 
+SELECT 
+  *,
+  CASE value_type
+    WHEN 'int' THEN CAST(int_value AS text)
+    WHEN 'uint' THEN CAST(int_value AS text)
+    WHEN 'string' THEN string_value
+    WHEN 'real' THEN CAST(real_value AS text)
+    WHEN 'pointer' THEN printf('0x%x', int_value)
+    WHEN 'bool' THEN (
+      CASE WHEN int_value <> 0 THEN 'true'
+      ELSE 'false' END)
+    WHEN 'json' THEN string_value
+  ELSE NULL END AS display_value
+FROM internal_args;
diff --git a/src/trace_processor/read_trace_integrationtest.cc b/src/trace_processor/read_trace_integrationtest.cc
index 439f1fa..818eb6d 100644
--- a/src/trace_processor/read_trace_integrationtest.cc
+++ b/src/trace_processor/read_trace_integrationtest.cc
@@ -46,7 +46,23 @@
   return raw_trace;
 }
 
-TEST(ReadTraceIntegrationTest, CompressedTrace) {
+bool ZlibSupported() {
+#if PERFETTO_BUILDFLAG(PERFETTO_ZLIB)
+  return true;
+#else
+  return false;
+#endif
+}
+
+class ReadTraceIntegrationTest : public testing::Test {
+  void SetUp() override {
+    if (!ZlibSupported()) {
+      GTEST_SKIP() << "Gzip not enabled";
+    }
+  }
+};
+
+TEST_F(ReadTraceIntegrationTest, CompressedTrace) {
   base::ScopedFstream f = OpenTestTrace("test/data/compressed.pb");
   std::vector<uint8_t> raw_trace = ReadAllData(f);
 
@@ -68,7 +84,7 @@
   ASSERT_EQ(packet_count, 2412u);
 }
 
-TEST(ReadTraceIntegrationTest, NonProtobufShouldNotDecompress) {
+TEST_F(ReadTraceIntegrationTest, NonProtobufShouldNotDecompress) {
   base::ScopedFstream f = OpenTestTrace("test/data/unsorted_trace.json");
   std::vector<uint8_t> raw_trace = ReadAllData(f);
 
@@ -78,7 +94,7 @@
   ASSERT_FALSE(status.ok());
 }
 
-TEST(ReadTraceIntegrationTest, OuterGzipDecompressTrace) {
+TEST_F(ReadTraceIntegrationTest, OuterGzipDecompressTrace) {
   base::ScopedFstream f =
       OpenTestTrace("test/data/example_android_trace_30s.pb.gz");
   std::vector<uint8_t> raw_compressed_trace = ReadAllData(f);
@@ -96,7 +112,7 @@
   ASSERT_EQ(decompressed, raw_trace);
 }
 
-TEST(ReadTraceIntegrationTest, DoubleGzipDecompressTrace) {
+TEST_F(ReadTraceIntegrationTest, DoubleGzipDecompressTrace) {
   base::ScopedFstream f = OpenTestTrace("test/data/compressed.pb.gz");
   std::vector<uint8_t> raw_compressed_trace = ReadAllData(f);
 
diff --git a/src/trace_processor/sqlite/BUILD.gn b/src/trace_processor/sqlite/BUILD.gn
index 21ed49a..25024b1 100644
--- a/src/trace_processor/sqlite/BUILD.gn
+++ b/src/trace_processor/sqlite/BUILD.gn
@@ -23,8 +23,8 @@
     "query_cache.h",
     "sql_stats_table.cc",
     "sql_stats_table.h",
-    "sqlite_raw_table.cc",
-    "sqlite_raw_table.h",
+    "sqlite_engine.cc",
+    "sqlite_engine.h",
     "sqlite_utils.cc",
     "sqlite_utils.h",
     "stats_table.cc",
diff --git a/src/trace_processor/sqlite/db_sqlite_table.cc b/src/trace_processor/sqlite/db_sqlite_table.cc
index a97ec8f..8f2d066 100644
--- a/src/trace_processor/sqlite/db_sqlite_table.cc
+++ b/src/trace_processor/sqlite/db_sqlite_table.cc
@@ -16,6 +16,7 @@
 
 #include "src/trace_processor/sqlite/db_sqlite_table.h"
 
+#include "perfetto/base/status.h"
 #include "perfetto/ext/base/small_vector.h"
 #include "perfetto/ext/base/string_writer.h"
 #include "src/trace_processor/containers/bit_vector.h"
@@ -139,7 +140,8 @@
                                   const Table* table,
                                   const std::string& name) {
   Context context{cache, TableComputation::kStatic, table, nullptr};
-  SqliteTable::Register<DbSqliteTable, Context>(db, std::move(context), name);
+  SqliteTable::Register<DbSqliteTable, Context>(db, std::move(context), name,
+                                                RegistrationFlags{});
 }
 
 void DbSqliteTable::RegisterTable(sqlite3* db,
@@ -149,13 +151,14 @@
   // on hidden columns) passed to it in order to make the query valid.
   base::Status status = generator->ValidateConstraints(
       QueryConstraints(std::numeric_limits<uint64_t>::max()));
-  bool requires_args = !status.ok();
 
   std::string table_name = generator->TableName();
   Context context{cache, TableComputation::kDynamic, nullptr,
                   std::move(generator)};
-  SqliteTable::Register<DbSqliteTable, Context>(
-      db, std::move(context), table_name, false, requires_args);
+  RegistrationFlags flags;
+  flags.requires_hidden_constraints = !status.ok();
+  SqliteTable::Register<DbSqliteTable, Context>(db, std::move(context),
+                                                table_name, flags);
 }
 
 base::Status DbSqliteTable::Init(int, const char* const*, Schema* schema) {
@@ -232,9 +235,9 @@
   info->sqlite_omit_order_by = true;
 }
 
-int DbSqliteTable::ModifyConstraints(QueryConstraints* qc) {
+base::Status DbSqliteTable::ModifyConstraints(QueryConstraints* qc) {
   ModifyConstraints(schema_, qc);
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
 void DbSqliteTable::ModifyConstraints(const Table::Schema& schema,
@@ -453,9 +456,9 @@
       });
 }
 
-int DbSqliteTable::Cursor::Filter(const QueryConstraints& qc,
-                                  sqlite3_value** argv,
-                                  FilterHistory history) {
+base::Status DbSqliteTable::Cursor::Filter(const QueryConstraints& qc,
+                                           sqlite3_value** argv,
+                                           FilterHistory history) {
   // Clear out the iterator before filtering to ensure the destructor is run
   // before the table's destructor.
   iterator_ = std::nullopt;
@@ -511,10 +514,8 @@
           constraints_, orders_, cols_used_bv, computed_table);
 
       if (!status.ok()) {
-        auto* sqlite_err = sqlite3_mprintf(
-            "%s: %s", db_sqlite_table_->name().c_str(), status.c_message());
-        db_sqlite_table_->SetErrorMessage(sqlite_err);
-        return SQLITE_CONSTRAINT;
+        return base::ErrStatus("%s: %s", db_sqlite_table_->name().c_str(),
+                               status.c_message());
       }
       PERFETTO_DCHECK(computed_table);
       dynamic_table_ = std::move(computed_table);
@@ -631,25 +632,24 @@
 
     eof_ = !*iterator_;
   }
-
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int DbSqliteTable::Cursor::Next() {
+base::Status DbSqliteTable::Cursor::Next() {
   if (mode_ == Mode::kSingleRow) {
     eof_ = true;
   } else {
     iterator_->Next();
     eof_ = !*iterator_;
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int DbSqliteTable::Cursor::Eof() {
+bool DbSqliteTable::Cursor::Eof() {
   return eof_;
 }
 
-int DbSqliteTable::Cursor::Column(sqlite3_context* ctx, int raw_col) {
+base::Status DbSqliteTable::Cursor::Column(sqlite3_context* ctx, int raw_col) {
   uint32_t column = static_cast<uint32_t>(raw_col);
   SqlValue value = mode_ == Mode::kSingleRow
                        ? SourceTable()->GetColumn(column).Get(*single_row_)
@@ -663,7 +663,7 @@
   // SQLite no longer cares about the bytes pointer.
   sqlite_utils::ReportSqlValue(ctx, value, sqlite_utils::kSqliteStatic,
                                sqlite_utils::kSqliteStatic);
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
 }  // namespace trace_processor
diff --git a/src/trace_processor/sqlite/db_sqlite_table.h b/src/trace_processor/sqlite/db_sqlite_table.h
index 6a2282d..337385e 100644
--- a/src/trace_processor/sqlite/db_sqlite_table.h
+++ b/src/trace_processor/sqlite/db_sqlite_table.h
@@ -17,6 +17,7 @@
 #ifndef SRC_TRACE_PROCESSOR_SQLITE_DB_SQLITE_TABLE_H_
 #define SRC_TRACE_PROCESSOR_SQLITE_DB_SQLITE_TABLE_H_
 
+#include "perfetto/base/status.h"
 #include "src/trace_processor/containers/bit_vector.h"
 #include "src/trace_processor/db/table.h"
 #include "src/trace_processor/prelude/table_functions/table_function.h"
@@ -46,12 +47,12 @@
     Cursor& operator=(Cursor&&) = default;
 
     // Implementation of SqliteTable::Cursor.
-    int Filter(const QueryConstraints& qc,
-               sqlite3_value** argv,
-               FilterHistory) override;
-    int Next() override;
-    int Eof() override;
-    int Column(sqlite3_context*, int N) override;
+    base::Status Filter(const QueryConstraints& qc,
+                        sqlite3_value** argv,
+                        FilterHistory) override;
+    base::Status Next() override;
+    bool Eof() override;
+    base::Status Column(sqlite3_context*, int N) override;
 
    private:
     enum class Mode {
@@ -136,7 +137,7 @@
                     const char* const*,
                     SqliteTable::Schema*) override final;
   std::unique_ptr<SqliteTable::Cursor> CreateCursor() override;
-  int ModifyConstraints(QueryConstraints*) override final;
+  base::Status ModifyConstraints(QueryConstraints*) override final;
   int BestIndex(const QueryConstraints&, BestIndexInfo*) override final;
 
   // These static functions are useful to allow other callers to make use
diff --git a/src/trace_processor/sqlite/sql_stats_table.cc b/src/trace_processor/sqlite/sql_stats_table.cc
index aafc93f..ad41857 100644
--- a/src/trace_processor/sqlite/sql_stats_table.cc
+++ b/src/trace_processor/sqlite/sql_stats_table.cc
@@ -22,6 +22,7 @@
 #include <bitset>
 #include <numeric>
 
+#include "perfetto/base/status.h"
 #include "src/trace_processor/sqlite/sqlite_utils.h"
 #include "src/trace_processor/storage/trace_storage.h"
 
@@ -32,7 +33,8 @@
     : storage_(storage) {}
 
 void SqlStatsTable::RegisterTable(sqlite3* db, const TraceStorage* storage) {
-  SqliteTable::Register<SqlStatsTable>(db, storage, "sqlstats");
+  SqliteTable::Register<SqlStatsTable>(db, storage, "sqlstats",
+                                       RegistrationFlags{});
 }
 
 base::Status SqlStatsTable::Init(int, const char* const*, Schema* schema) {
@@ -63,24 +65,24 @@
 
 SqlStatsTable::Cursor::~Cursor() = default;
 
-int SqlStatsTable::Cursor::Filter(const QueryConstraints&,
-                                  sqlite3_value**,
-                                  FilterHistory) {
+base::Status SqlStatsTable::Cursor::Filter(const QueryConstraints&,
+                                           sqlite3_value**,
+                                           FilterHistory) {
   *this = Cursor(table_);
   num_rows_ = storage_->sql_stats().size();
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int SqlStatsTable::Cursor::Next() {
+base::Status SqlStatsTable::Cursor::Next() {
   row_++;
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int SqlStatsTable::Cursor::Eof() {
+bool SqlStatsTable::Cursor::Eof() {
   return row_ >= num_rows_;
 }
 
-int SqlStatsTable::Cursor::Column(sqlite3_context* context, int col) {
+base::Status SqlStatsTable::Cursor::Column(sqlite3_context* context, int col) {
   const TraceStorage::SqlStats& stats = storage_->sql_stats();
   switch (col) {
     case Column::kQuery:
@@ -97,7 +99,7 @@
       sqlite3_result_int64(context, stats.times_ended()[row_]);
       break;
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
 }  // namespace trace_processor
diff --git a/src/trace_processor/sqlite/sql_stats_table.h b/src/trace_processor/sqlite/sql_stats_table.h
index df8d9f5..ad43234 100644
--- a/src/trace_processor/sqlite/sql_stats_table.h
+++ b/src/trace_processor/sqlite/sql_stats_table.h
@@ -20,6 +20,7 @@
 #include <limits>
 #include <memory>
 
+#include "perfetto/base/status.h"
 #include "src/trace_processor/sqlite/sqlite_table.h"
 
 namespace perfetto {
@@ -42,16 +43,16 @@
   // Implementation of the SQLite cursor interface.
   class Cursor : public SqliteTable::Cursor {
    public:
-    Cursor(SqlStatsTable* storage);
+    explicit Cursor(SqlStatsTable* storage);
     ~Cursor() override;
 
     // Implementation of SqliteTable::Cursor.
-    int Filter(const QueryConstraints&,
-               sqlite3_value**,
-               FilterHistory) override;
-    int Next() override;
-    int Eof() override;
-    int Column(sqlite3_context*, int N) override;
+    base::Status Filter(const QueryConstraints&,
+                        sqlite3_value**,
+                        FilterHistory) override;
+    base::Status Next() override;
+    bool Eof() override;
+    base::Status Column(sqlite3_context*, int N) override;
 
    private:
     Cursor(Cursor&) = delete;
diff --git a/src/trace_processor/sqlite/sqlite_engine.cc b/src/trace_processor/sqlite/sqlite_engine.cc
new file mode 100644
index 0000000..429318a
--- /dev/null
+++ b/src/trace_processor/sqlite/sqlite_engine.cc
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/trace_processor/sqlite/sqlite_engine.h"
+#include "src/trace_processor/sqlite/db_sqlite_table.h"
+#include "src/trace_processor/sqlite/query_cache.h"
+
+// In Android and Chromium tree builds, we don't have the percentile module.
+// Just don't include it.
+#if PERFETTO_BUILDFLAG(PERFETTO_TP_PERCENTILE)
+// defined in sqlite_src/ext/misc/percentile.c
+extern "C" int sqlite3_percentile_init(sqlite3* db,
+                                       char** error,
+                                       const sqlite3_api_routines* api);
+#endif  // PERFETTO_BUILDFLAG(PERFETTO_TP_PERCENTILE)
+
+namespace perfetto {
+namespace trace_processor {
+namespace {
+
+void EnsureSqliteInitialized() {
+  // sqlite3_initialize isn't actually thread-safe despite being documented
+  // as such; we need to make sure multiple TraceProcessorImpl instances don't
+  // call it concurrently and only gets called once per process, instead.
+  static bool init_once = [] { return sqlite3_initialize() == SQLITE_OK; }();
+  PERFETTO_CHECK(init_once);
+}
+
+void InitializeSqlite(sqlite3* db) {
+  char* error = nullptr;
+  sqlite3_exec(db, "PRAGMA temp_store=2", nullptr, nullptr, &error);
+  if (error) {
+    PERFETTO_FATAL("Error setting pragma temp_store: %s", error);
+  }
+// In Android tree builds, we don't have the percentile module.
+// Just don't include it.
+#if PERFETTO_BUILDFLAG(PERFETTO_TP_PERCENTILE)
+  sqlite3_percentile_init(db, &error, nullptr);
+  if (error) {
+    PERFETTO_ELOG("Error initializing: %s", error);
+    sqlite3_free(error);
+  }
+#endif
+}
+
+}  // namespace
+
+SqliteEngine::SqliteEngine() : query_cache_(new QueryCache()) {
+  sqlite3* db = nullptr;
+  EnsureSqliteInitialized();
+  PERFETTO_CHECK(sqlite3_open(":memory:", &db) == SQLITE_OK);
+  InitializeSqlite(db);
+  db_.reset(std::move(db));
+}
+
+void SqliteEngine::RegisterTable(const Table& table, const std::string& name) {
+  DbSqliteTable::RegisterTable(*db_, query_cache_.get(), &table, name);
+}
+
+void SqliteEngine::RegisterTableFunction(std::unique_ptr<TableFunction> fn) {
+  DbSqliteTable::RegisterTable(*db_, query_cache_.get(), std::move(fn));
+}
+
+}  // namespace trace_processor
+}  // namespace perfetto
diff --git a/src/trace_processor/sqlite/sqlite_engine.h b/src/trace_processor/sqlite/sqlite_engine.h
new file mode 100644
index 0000000..f1ebdd3
--- /dev/null
+++ b/src/trace_processor/sqlite/sqlite_engine.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_TRACE_PROCESSOR_SQLITE_SQLITE_ENGINE_H_
+#define SRC_TRACE_PROCESSOR_SQLITE_SQLITE_ENGINE_H_
+
+#include <sqlite3.h>
+
+#include "src/trace_processor/db/table.h"
+#include "src/trace_processor/prelude/table_functions/table_function.h"
+#include "src/trace_processor/sqlite/query_cache.h"
+#include "src/trace_processor/sqlite/scoped_db.h"
+
+namespace perfetto {
+namespace trace_processor {
+
+// Wrapper class around SQLite C API.
+//
+// The goal of this class is to provide a one-stop-shop mechanism to use SQLite.
+// Benefits of this include:
+// 1) It allows us to add code which intercepts registration of functions
+//    and tables and keeps track of this for later lookup.
+// 2) Allows easily auditing the SQLite APIs we use making it easy to determine
+//    what functionality we rely on.
+class SqliteEngine {
+ public:
+  SqliteEngine();
+
+  // Registers a trace processor C++ table with SQLite with an SQL name of
+  // |name|.
+  void RegisterTable(const Table& table, const std::string& name);
+
+  // Registers a trace processor C++ function with SQLite.
+  void RegisterTableFunction(std::unique_ptr<TableFunction> fn);
+
+  sqlite3* db() const { return db_.get(); }
+
+ private:
+  // Keep this first: we need this to be destroyed after we clean up
+  // everything else.
+  ScopedDb db_;
+  std::unique_ptr<QueryCache> query_cache_;
+};
+
+}  // namespace trace_processor
+}  // namespace perfetto
+
+#endif  // SRC_TRACE_PROCESSOR_SQLITE_SQLITE_ENGINE_H_
diff --git a/src/trace_processor/sqlite/sqlite_table.cc b/src/trace_processor/sqlite/sqlite_table.cc
index a0c5ce9..343ae04 100644
--- a/src/trace_processor/sqlite/sqlite_table.cc
+++ b/src/trace_processor/sqlite/sqlite_table.cc
@@ -22,6 +22,7 @@
 #include <map>
 
 #include "perfetto/base/logging.h"
+#include "perfetto/base/status.h"
 #include "src/trace_processor/tp_metatrace.h"
 
 namespace perfetto {
@@ -175,7 +176,7 @@
     qc.AddOrderBy(column, desc);
   }
 
-  int ret = ModifyConstraints(&qc);
+  int ret = SetStatusAndReturn(ModifyConstraints(&qc));
   if (ret != SQLITE_OK)
     return ret;
 
@@ -235,16 +236,16 @@
   return SQLITE_OK;
 }
 
-int SqliteTable::ModifyConstraints(QueryConstraints*) {
-  return SQLITE_OK;
+base::Status SqliteTable::ModifyConstraints(QueryConstraints*) {
+  return base::OkStatus();
 }
 
 int SqliteTable::FindFunction(const char*, FindFunctionFn*, void**) {
   return 0;
 }
 
-int SqliteTable::Update(int, sqlite3_value**, sqlite3_int64*) {
-  return SQLITE_READONLY;
+base::Status SqliteTable::Update(int, sqlite3_value**, sqlite3_int64*) {
+  return base::OkStatus();
 }
 
 bool SqliteTable::ReadConstraints(int idxNum, const char* idxStr, int argc) {
@@ -281,10 +282,6 @@
 }
 SqliteTable::Cursor::~Cursor() = default;
 
-int SqliteTable::Cursor::RowId(sqlite3_int64*) {
-  return SQLITE_ERROR;
-}
-
 SqliteTable::Column::Column(size_t index,
                             std::string name,
                             SqlValue::Type type,
diff --git a/src/trace_processor/sqlite/sqlite_table.h b/src/trace_processor/sqlite/sqlite_table.h
index de94669..2d2599b 100644
--- a/src/trace_processor/sqlite/sqlite_table.h
+++ b/src/trace_processor/sqlite/sqlite_table.h
@@ -103,22 +103,19 @@
     // Methods to be implemented by derived table classes.
 
     // Called to intialise the cursor with the constraints of the query.
-    virtual int Filter(const QueryConstraints& qc,
-                       sqlite3_value**,
-                       FilterHistory) = 0;
+    virtual base::Status Filter(const QueryConstraints& qc,
+                                sqlite3_value**,
+                                FilterHistory) = 0;
 
     // Called to forward the cursor to the next row in the table.
-    virtual int Next() = 0;
+    virtual base::Status Next() = 0;
 
     // Called to check if the cursor has reached eof. Column will be called iff
     // this method returns true.
-    virtual int Eof() = 0;
+    virtual bool Eof() = 0;
 
     // Used to extract the value from the column at index |N|.
-    virtual int Column(sqlite3_context* context, int N) = 0;
-
-    // Optional methods to implement.
-    virtual int RowId(sqlite3_int64*);
+    virtual base::Status Column(sqlite3_context* context, int N) = 0;
 
    protected:
     Cursor(Cursor&) = delete;
@@ -130,6 +127,10 @@
    private:
     friend class SqliteTable;
 
+    int SetStatusAndReturn(base::Status status) {
+      return table_->SetStatusAndReturn(status);
+    }
+
     SqliteTable* table_ = nullptr;
   };
 
@@ -185,31 +186,54 @@
     int64_t estimated_rows = 0;
   };
 
-  template <typename Context>
-  struct TableDescriptor {
-    SqliteTable::Factory<Context> factory;
-    Context context;
-    sqlite3_module module = {};
+  struct RegistrationFlags {
+    // Specifies whether the table can also be written to.
+    bool writable = false;
+
+    enum TableType {
+      // A table which automatically exists in the main schema and cannot be
+      // created with CREATE VIRTUAL TABLE.
+      // Note: the name value here matches the naming in the vtable docs of
+      // SQLite.
+      kEponymousOnly,
+
+      // A table which automatically exists in the main schema and can also be
+      // created with CREATE VIRTUAL TABLE.
+      // Note: the name value here matches the naming in the vtable docs of
+      // SQLite.
+      kEponymous,
+
+      // A table which must be explicitly created using a CREATE VIRTUAL TABLE
+      // statement (i.e. does exist automatically) but does not have any
+      // backing state beyond the arguments passed to it.
+      kExplicitCreateStateless,
+    };
+    TableType type = TableType::kEponymousOnly;
+
+    // Whether the table requires some number of hidden constraints to be passed
+    // to be able to the queried (i.e. a SELECT * FROM table would not work).
+    bool requires_hidden_constraints = false;
   };
 
   SqliteTable();
 
   // Called by derived classes to register themselves with the SQLite db.
-  // |read_write| specifies whether the table can also be written to.
-  // |requires_args| should be true if the table requires arguments in order to
-  // be instantiated.
   // Note: this function is inlined here because we use the TTable template to
   // devirtualise the function calls.
   template <typename TTable, typename Context = const TraceStorage*>
   static void Register(sqlite3* db,
                        Context ctx,
                        const std::string& module_name,
-                       bool read_write = false,
-                       bool requires_args = false) {
+                       RegistrationFlags flags) {
     using TCursor = typename TTable::Cursor;
 
-    std::unique_ptr<TableDescriptor<Context>> desc(
-        new TableDescriptor<Context>());
+    struct TableDescriptor {
+      SqliteTable::Factory<Context> factory;
+      Context context;
+      sqlite3_module module = {};
+    };
+
+    std::unique_ptr<TableDescriptor> desc(new TableDescriptor());
     desc->context = std::move(ctx);
     desc->factory = GetFactory<TTable, Context>();
     sqlite3_module* module = &desc->module;
@@ -218,7 +242,7 @@
     auto create_fn = [](sqlite3* xdb, void* arg, int argc,
                         const char* const* argv, sqlite3_vtab** tab,
                         char** pzErr) {
-      auto* xdesc = static_cast<TableDescriptor<Context>*>(arg);
+      auto* xdesc = static_cast<TableDescriptor*>(arg);
       auto table = xdesc->factory(xdb, std::move(xdesc->context));
 
       // SQLite guarantees that argv[0] will be the "module" name: this is the
@@ -256,12 +280,25 @@
       return SQLITE_OK;
     };
 
-    module->xCreate = create_fn;
+    switch (flags.type) {
+      case RegistrationFlags::kEponymousOnly:
+        module->xCreate = nullptr;
+        break;
+      case RegistrationFlags::kEponymous:
+        module->xCreate = create_fn;
+        break;
+      case RegistrationFlags::kExplicitCreateStateless:
+        // TODO(lalitm): this is not accurate as we're basically creating an
+        // eponymous table. Change this to be a different function once we can
+        // do so easily.
+        module->xCreate = create_fn;
+        break;
+    }
     module->xConnect = create_fn;
     module->xDisconnect = destroy_fn;
     module->xDestroy = destroy_fn;
     module->xOpen = [](sqlite3_vtab* t, sqlite3_vtab_cursor** c) {
-      return static_cast<TTable*>(t)->OpenInternal(c);
+      return static_cast<SqliteTable*>(t)->OpenInternal(c);
     };
     module->xClose = [](sqlite3_vtab_cursor* c) {
       delete static_cast<TCursor*>(c);
@@ -272,24 +309,28 @@
     };
     module->xFilter = [](sqlite3_vtab_cursor* vc, int i, const char* s, int a,
                          sqlite3_value** v) {
-      auto* c = static_cast<Cursor*>(vc);
-      bool is_cached = c->table_->ReadConstraints(i, s, a);
+      bool is_cached =
+          static_cast<Cursor*>(vc)->table_->ReadConstraints(i, s, a);
 
       auto history = is_cached ? Cursor::FilterHistory::kSame
                                : Cursor::FilterHistory::kDifferent;
-      return static_cast<TCursor*>(c)->Filter(c->table_->qc_cache_, v, history);
+      auto* cursor = static_cast<TCursor*>(vc);
+      return cursor->SetStatusAndReturn(cursor->Filter(
+          static_cast<Cursor*>(vc)->table_->qc_cache_, v, history));
     };
     module->xNext = [](sqlite3_vtab_cursor* c) {
-      return static_cast<TCursor*>(c)->Next();
+      auto* cursor = static_cast<TCursor*>(c);
+      return cursor->SetStatusAndReturn(cursor->Next());
     };
     module->xEof = [](sqlite3_vtab_cursor* c) {
-      return static_cast<TCursor*>(c)->Eof();
+      return static_cast<int>(static_cast<TCursor*>(c)->Eof());
     };
     module->xColumn = [](sqlite3_vtab_cursor* c, sqlite3_context* a, int b) {
-      return static_cast<TCursor*>(c)->Column(a, b);
+      auto* cursor = static_cast<TCursor*>(c);
+      return cursor->SetStatusAndReturn(cursor->Column(a, b));
     };
-    module->xRowid = [](sqlite3_vtab_cursor* c, sqlite3_int64* r) {
-      return static_cast<TCursor*>(c)->RowId(r);
+    module->xRowid = [](sqlite3_vtab_cursor*, sqlite3_int64*) {
+      return SQLITE_ERROR;
     };
     module->xFindFunction =
         [](sqlite3_vtab* t, int, const char* name,
@@ -297,23 +338,26 @@
           return static_cast<TTable*>(t)->FindFunction(name, fn, args);
         };
 
-    if (read_write) {
+    if (flags.writable) {
       module->xUpdate = [](sqlite3_vtab* t, int a, sqlite3_value** v,
                            sqlite3_int64* r) {
-        return static_cast<TTable*>(t)->Update(a, v, r);
+        auto* table = static_cast<TTable*>(t);
+        return table->SetStatusAndReturn(table->Update(a, v, r));
       };
     }
 
     int res = sqlite3_create_module_v2(
         db, module_name.c_str(), module, desc.release(),
-        [](void* arg) { delete static_cast<TableDescriptor<Context>*>(arg); });
+        [](void* arg) { delete static_cast<TableDescriptor*>(arg); });
     PERFETTO_CHECK(res == SQLITE_OK);
 
     // Register virtual tables into an internal 'perfetto_tables' table. This is
     // used for iterating through all the tables during a database export. Note
-    // that virtual tables requiring arguments aren't registered because they
-    // can't be automatically instantiated for exporting.
-    if (!requires_args) {
+    // that virtual tables which requires explicit CREATE statements or require
+    // hidden constraints cannot be inserted.
+    bool explicit_create =
+        flags.type == RegistrationFlags::kExplicitCreateStateless;
+    if (!explicit_create && !flags.requires_hidden_constraints) {
       char* insert_sql =
           sqlite3_mprintf("INSERT INTO perfetto_tables(name) VALUES('%q')",
                           module_name.c_str());
@@ -334,16 +378,11 @@
 
   // Optional metods to implement.
   using FindFunctionFn = void (*)(sqlite3_context*, int, sqlite3_value**);
-  virtual int ModifyConstraints(QueryConstraints* qc);
+  virtual base::Status ModifyConstraints(QueryConstraints* qc);
   virtual int FindFunction(const char* name, FindFunctionFn* fn, void** args);
 
   // At registration time, the function should also pass true for |read_write|.
-  virtual int Update(int, sqlite3_value**, sqlite3_int64*);
-
-  void SetErrorMessage(char* error) {
-    sqlite3_free(zErrMsg);
-    zErrMsg = error;
-  }
+  virtual base::Status Update(int, sqlite3_value**, sqlite3_int64*);
 
   const Schema& schema() const { return schema_; }
   const std::string& module_name() const { return module_name_; }
@@ -363,6 +402,15 @@
   int OpenInternal(sqlite3_vtab_cursor**);
   int BestIndexInternal(sqlite3_index_info*);
 
+  int SetStatusAndReturn(base::Status status) {
+    if (!status.ok()) {
+      sqlite3_free(zErrMsg);
+      zErrMsg = sqlite3_mprintf("%s", status.c_message());
+      return SQLITE_ERROR;
+    }
+    return SQLITE_OK;
+  }
+
   SqliteTable(const SqliteTable&) = delete;
   SqliteTable& operator=(const SqliteTable&) = delete;
 
diff --git a/src/trace_processor/sqlite/stats_table.cc b/src/trace_processor/sqlite/stats_table.cc
index e4b7787..c9b2ea8 100644
--- a/src/trace_processor/sqlite/stats_table.cc
+++ b/src/trace_processor/sqlite/stats_table.cc
@@ -16,6 +16,7 @@
 
 #include "src/trace_processor/sqlite/stats_table.h"
 
+#include "perfetto/base/status.h"
 #include "src/trace_processor/sqlite/sqlite_utils.h"
 
 namespace perfetto {
@@ -25,7 +26,7 @@
     : storage_(storage) {}
 
 void StatsTable::RegisterTable(sqlite3* db, const TraceStorage* storage) {
-  SqliteTable::Register<StatsTable>(db, storage, "stats");
+  SqliteTable::Register<StatsTable>(db, storage, "stats", RegistrationFlags{});
 }
 
 util::Status StatsTable::Init(int, const char* const*, Schema* schema) {
@@ -57,14 +58,14 @@
 StatsTable::Cursor::Cursor(StatsTable* table)
     : SqliteTable::Cursor(table), table_(table), storage_(table->storage_) {}
 
-int StatsTable::Cursor::Filter(const QueryConstraints&,
-                               sqlite3_value**,
-                               FilterHistory) {
+base::Status StatsTable::Cursor::Filter(const QueryConstraints&,
+                                        sqlite3_value**,
+                                        FilterHistory) {
   *this = Cursor(table_);
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int StatsTable::Cursor::Column(sqlite3_context* ctx, int N) {
+base::Status StatsTable::Cursor::Column(sqlite3_context* ctx, int N) {
   const auto kSqliteStatic = sqlite_utils::kSqliteStatic;
   switch (N) {
     case Column::kName:
@@ -114,16 +115,16 @@
       PERFETTO_FATAL("Unknown column %d", N);
       break;
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int StatsTable::Cursor::Next() {
+base::Status StatsTable::Cursor::Next() {
   static_assert(stats::kTypes[0] == stats::kSingle,
                 "the first stats entry cannot be indexed");
   const auto* cur_entry = &storage_->stats()[key_];
   if (stats::kTypes[key_] == stats::kIndexed) {
     if (++index_ != cur_entry->indexed_values.end()) {
-      return SQLITE_OK;
+      return base::OkStatus();
     }
   }
   while (++key_ < stats::kNumKeys) {
@@ -134,10 +135,10 @@
       break;
     }
   }
-  return SQLITE_OK;
+  return base::OkStatus();
 }
 
-int StatsTable::Cursor::Eof() {
+bool StatsTable::Cursor::Eof() {
   return key_ >= stats::kNumKeys;
 }
 
diff --git a/src/trace_processor/sqlite/stats_table.h b/src/trace_processor/sqlite/stats_table.h
index 3213a2a..648299f 100644
--- a/src/trace_processor/sqlite/stats_table.h
+++ b/src/trace_processor/sqlite/stats_table.h
@@ -35,15 +35,15 @@
   enum Column { kName = 0, kIndex, kSeverity, kSource, kValue, kDescription };
   class Cursor : public SqliteTable::Cursor {
    public:
-    Cursor(StatsTable*);
+    explicit Cursor(StatsTable*);
 
     // Implementation of SqliteTable::Cursor.
-    int Filter(const QueryConstraints&,
-               sqlite3_value**,
-               FilterHistory) override;
-    int Next() override;
-    int Eof() override;
-    int Column(sqlite3_context*, int N) override;
+    base::Status Filter(const QueryConstraints&,
+                        sqlite3_value**,
+                        FilterHistory) override;
+    base::Status Next() override;
+    bool Eof() override;
+    base::Status Column(sqlite3_context*, int N) override;
 
    private:
     Cursor(Cursor&) = delete;
diff --git a/src/trace_processor/stdlib/android/monitor_contention.sql b/src/trace_processor/stdlib/android/monitor_contention.sql
index 1acab4c..c1de58f 100644
--- a/src/trace_processor/stdlib/android/monitor_contention.sql
+++ b/src/trace_processor/stdlib/android/monitor_contention.sql
@@ -27,6 +27,19 @@
   '
 );
 
+-- Extracts the blocking thread tid from a slice name
+--
+-- @arg slice_name STRING   Name of slice
+-- @ret INT                 Blocking thread tid
+SELECT
+  CREATE_FUNCTION(
+    'ANDROID_EXTRACT_ANDROID_MONITOR_CONTENTION_BLOCKING_TID(slice_name STRING)',
+    'INT',
+    '
+    SELECT CAST(STR_SPLIT(STR_SPLIT($slice_name, " (", 1), ")", 0) AS INT)
+  '
+);
+
 -- Extracts the blocking method from a slice name
 --
 -- @arg slice_name STRING   Name of slice
@@ -171,6 +184,7 @@
   thread.name AS blocked_thread_name,
   blocking_thread.utid AS blocking_utid,
   ANDROID_EXTRACT_ANDROID_MONITOR_CONTENTION_BLOCKING_THREAD(slice.name) AS blocking_thread_name,
+  ANDROID_EXTRACT_ANDROID_MONITOR_CONTENTION_BLOCKING_TID(slice.name) AS blocking_tid,
   thread.upid AS upid,
   process.name AS process_name,
   slice.id,
@@ -193,7 +207,7 @@
 LEFT JOIN ANCESTOR_SLICE(slice.id) binder_reply ON binder_reply.name = 'binder reply'
 LEFT JOIN thread_track binder_reply_thread_track ON binder_reply.track_id = binder_reply_thread_track.id
 LEFT JOIN thread binder_reply_thread ON binder_reply_thread_track.utid = binder_reply_thread.utid
-JOIN thread blocking_thread ON blocking_thread.name = blocking_thread_name AND blocking_thread.upid = thread.upid
+JOIN thread blocking_thread ON blocking_thread.tid = blocking_tid AND blocking_thread.upid = thread.upid
 WHERE slice.name LIKE 'monitor contention%'
   AND slice.dur != -1
   AND internal_broken_android_monitor_contention.id IS NULL
diff --git a/src/trace_processor/stdlib/common/BUILD.gn b/src/trace_processor/stdlib/common/BUILD.gn
index 8147bcf..38088fc 100644
--- a/src/trace_processor/stdlib/common/BUILD.gn
+++ b/src/trace_processor/stdlib/common/BUILD.gn
@@ -17,6 +17,7 @@
 perfetto_sql_source_set("common") {
   sources = [
     "counters.sql",
+    "cpus.sql",
     "metadata.sql",
     "percentiles.sql",
     "slices.sql",
diff --git a/src/trace_processor/stdlib/common/cpus.sql b/src/trace_processor/stdlib/common/cpus.sql
new file mode 100644
index 0000000..3caec3f
--- /dev/null
+++ b/src/trace_processor/stdlib/common/cpus.sql
@@ -0,0 +1,60 @@
+--
+-- Copyright 2023 The Android Open Source Project
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+--     https://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+
+CREATE TABLE internal_cpu_sizes AS
+SELECT 0 AS n, 'little' AS size
+UNION
+SELECT 1 AS n, 'big' AS size
+UNION
+SELECT 2 AS n, 'huge' AS size;
+
+CREATE TABLE internal_ranked_cpus AS
+SELECT
+ (DENSE_RANK() OVER win) - 1 AS n,
+ cpu
+FROM (
+  SELECT
+    track.cpu AS cpu,
+    MAX(counter.value) AS maxfreq
+  FROM counter
+  JOIN cpu_counter_track AS track
+  ON (counter.track_id = track.id)
+  WHERE track.name = "cpufreq"
+  GROUP BY track.cpu
+)
+WINDOW win AS (ORDER BY maxfreq);
+
+-- Guess size of CPU.
+-- On some multicore devices the cores are heterogeneous and divided
+-- into two or more 'sizes'. In a typical case a device might have 8
+-- cores of which 4 are 'little' (low power & low performance) and 4
+-- are 'big' (high power & high performance). This functions attempts
+-- to map a given CPU index onto the relevant descriptor. For
+-- homogeneous systems this returns NULL.
+--
+-- @arg cpu_index INT   Index of the CPU whose size we will guess.
+-- @ret STRING          A descriptive size ('little', 'big', 'huge', etc) or NULL if we have insufficient information.
+SELECT CREATE_FUNCTION(
+  'GUESS_CPU_SIZE(cpu_index INT)',
+  'STRING',
+  '
+  SELECT
+    IIF((SELECT COUNT(DISTINCT n) FROM internal_ranked_cpus) >= 2, size, null) as size
+  FROM internal_ranked_cpus
+  LEFT JOIN internal_cpu_sizes USING(n)
+  WHERE cpu = $cpu_index;
+  '
+);
diff --git a/src/trace_processor/storage/trace_storage.h b/src/trace_processor/storage/trace_storage.h
index 4fe2071..66fc940 100644
--- a/src/trace_processor/storage/trace_storage.h
+++ b/src/trace_processor/storage/trace_storage.h
@@ -513,6 +513,13 @@
   const tables::RawTable& raw_table() const { return raw_table_; }
   tables::RawTable* mutable_raw_table() { return &raw_table_; }
 
+  const tables::FtraceEventTable& ftrace_event_table() const {
+    return ftrace_event_table_;
+  }
+  tables::FtraceEventTable* mutable_ftrace_event_table() {
+    return &ftrace_event_table_;
+  }
+
   const tables::CpuTable& cpu_table() const { return cpu_table_; }
   tables::CpuTable* mutable_cpu_table() { return &cpu_table_; }
 
@@ -895,11 +902,8 @@
 
   SqlStats sql_stats_;
 
-  // Raw events are every ftrace event in the trace. The raw event includes
-  // the timestamp and the pid. The args for the raw event will be in the
-  // args table. This table can be used to generate a text version of the
-  // trace.
   tables::RawTable raw_table_{&string_pool_};
+  tables::FtraceEventTable ftrace_event_table_{&string_pool_, &raw_table_};
 
   tables::CpuTable cpu_table_{&string_pool_};
 
diff --git a/src/trace_processor/tables/BUILD.gn b/src/trace_processor/tables/BUILD.gn
index 83145a4..9ec397f 100644
--- a/src/trace_processor/tables/BUILD.gn
+++ b/src/trace_processor/tables/BUILD.gn
@@ -32,12 +32,7 @@
 
 source_set("tables") {
   sources = [
-    "counter_tables.h",
-    "flow_tables.h",
-    "macros.h",
     "macros_internal.h",
-    "profiler_tables.h",
-    "slice_tables.h",
     "table_destructors.cc",
   ]
   deps = [
@@ -54,10 +49,7 @@
 
 source_set("unittests") {
   testonly = true
-  sources = [
-    "macros_unittest.cc",
-    "py_tables_unittest.cc",
-  ]
+  sources = [ "py_tables_unittest.cc" ]
   deps = [
     ":py_tables_unittest",
     ":tables",
@@ -71,10 +63,13 @@
   source_set("benchmarks") {
     testonly = true
     deps = [
-      ":tables",
+      ":py_tables_benchmark",
       "../../../gn:benchmark",
       "../../../gn:default_deps",
     ]
-    sources = [ "macros_benchmark.cc" ]
+    sources = [ "py_tables_benchmark.cc" ]
+  }
+  perfetto_tp_tables("py_tables_benchmark") {
+    sources = [ "py_tables_benchmark.py" ]
   }
 }
diff --git a/src/trace_processor/tables/android_tables.py b/src/trace_processor/tables/android_tables.py
index b77afcb..03dff07 100644
--- a/src/trace_processor/tables/android_tables.py
+++ b/src/trace_processor/tables/android_tables.py
@@ -28,6 +28,7 @@
 from src.trace_processor.tables.metadata_tables import THREAD_TABLE
 
 ANDROID_LOG_TABLE = Table(
+    python_module=__file__,
     class_name="AndroidLogTable",
     sql_name="android_logs",
     columns=[
@@ -54,6 +55,7 @@
         }))
 
 ANDROID_GAME_INTERVENTION_LIST_TABLE = Table(
+    python_module=__file__,
     class_name='AndroidGameInterventionListTable',
     sql_name='android_game_intervention_list',
     columns=[
@@ -126,6 +128,7 @@
         }))
 
 ANDROID_DUMPSTATE_TABLE = Table(
+    python_module=__file__,
     class_name='AndroidDumpstateTable',
     sql_name='android_dumpstate',
     columns=[
diff --git a/src/trace_processor/tables/counter_tables.h b/src/trace_processor/tables/counter_tables.h
deleted file mode 100644
index 69668b2..0000000
--- a/src/trace_processor/tables/counter_tables.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SRC_TRACE_PROCESSOR_TABLES_COUNTER_TABLES_H_
-#define SRC_TRACE_PROCESSOR_TABLES_COUNTER_TABLES_H_
-
-#include "src/trace_processor/tables/macros.h"
-#include "src/trace_processor/tables/track_tables_py.h"
-
-namespace perfetto {
-namespace trace_processor {
-namespace tables {
-
-// @tablegroup Events
-// @param arg_set_id {@joinable args.arg_set_id}
-#define PERFETTO_TP_COUNTER_TABLE_DEF(NAME, PARENT, C) \
-  NAME(CounterTable, "counter")                        \
-  PERFETTO_TP_ROOT_TABLE(PARENT, C)                    \
-  C(int64_t, ts, Column::Flag::kSorted)                \
-  C(CounterTrackTable::Id, track_id)                   \
-  C(double, value)                                     \
-  C(std::optional<uint32_t>, arg_set_id)
-
-}  // namespace tables
-}  // namespace trace_processor
-}  // namespace perfetto
-
-#endif  // SRC_TRACE_PROCESSOR_TABLES_COUNTER_TABLES_H_
diff --git a/src/trace_processor/tables/counter_tables.py b/src/trace_processor/tables/counter_tables.py
index 1dd6495..e882452 100644
--- a/src/trace_processor/tables/counter_tables.py
+++ b/src/trace_processor/tables/counter_tables.py
@@ -26,6 +26,7 @@
 from src.trace_processor.tables.track_tables import COUNTER_TRACK_TABLE
 
 COUNTER_TABLE = Table(
+    python_module=__file__,
     class_name='CounterTable',
     sql_name='counter',
     columns=[
diff --git a/src/trace_processor/tables/flow_tables.h b/src/trace_processor/tables/flow_tables.h
deleted file mode 100644
index a00ee89..0000000
--- a/src/trace_processor/tables/flow_tables.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SRC_TRACE_PROCESSOR_TABLES_FLOW_TABLES_H_
-#define SRC_TRACE_PROCESSOR_TABLES_FLOW_TABLES_H_
-
-#include "src/trace_processor/tables/macros.h"
-#include "src/trace_processor/tables/slice_tables.h"
-
-namespace perfetto {
-namespace trace_processor {
-namespace tables {
-
-// @param arg_set_id {@joinable args.arg_set_id}
-#define PERFETTO_TP_FLOW_TABLE_DEF(NAME, PARENT, C) \
-  NAME(FlowTable, "flow")                           \
-  PERFETTO_TP_ROOT_TABLE(PARENT, C)                 \
-  C(SliceTable::Id, slice_out)                      \
-  C(SliceTable::Id, slice_in)                       \
-  C(uint32_t, arg_set_id)
-
-}  // namespace tables
-}  // namespace trace_processor
-}  // namespace perfetto
-
-#endif  // SRC_TRACE_PROCESSOR_TABLES_FLOW_TABLES_H_
diff --git a/src/trace_processor/tables/flow_tables.py b/src/trace_processor/tables/flow_tables.py
index 0491a31..df0ae4c 100644
--- a/src/trace_processor/tables/flow_tables.py
+++ b/src/trace_processor/tables/flow_tables.py
@@ -22,6 +22,7 @@
 from src.trace_processor.tables.slice_tables import SLICE_TABLE
 
 FLOW_TABLE = Table(
+    python_module=__file__,
     class_name='FlowTable',
     sql_name='flow',
     columns=[
diff --git a/src/trace_processor/tables/macros.h b/src/trace_processor/tables/macros.h
deleted file mode 100644
index a085066..0000000
--- a/src/trace_processor/tables/macros.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SRC_TRACE_PROCESSOR_TABLES_MACROS_H_
-#define SRC_TRACE_PROCESSOR_TABLES_MACROS_H_
-
-#include "src/trace_processor/tables/macros_internal.h"
-
-namespace perfetto {
-namespace trace_processor {
-
-// Usage of the below macros
-// These macros have two different invocation patterns depending on whether you
-// are defining a root table or a derived table (see below for definitions and
-// examples). If you're not sure which one you need, you probably want a derived
-// table.
-//
-// Root tables
-// Root tables act as the ultimate parent of a heirarcy of tables. All rows of
-// child tables will be some subset of rows in the parent. Real world examples
-// of root tables include EventTable and TrackTable.
-//
-// All root tables implicitly contain an 'id' column which contains the row
-// index for each row in the table.
-//
-// Suppose we want to define EventTable with columns 'ts' and 'arg_set_id'.
-//
-// Then we would invoke the macro as follows:
-// #define PERFETTO_TP_EVENT_TABLE_DEF(NAME, PARENT, C)
-//   NAME(EventTable, "event")
-//   PERFETTO_TP_ROOT_TABLE(PARENT, C)
-//   C(int64_t, ts, Column::kSorted)
-//   C(uint32_t, arg_set_id)
-// PERFETTO_TP_TABLE(PERFETTO_TP_EVENT_TABLE_DEF);
-//
-// Note the call to PERFETTO_TP_ROOT_TABLE; this macro (defined below) should
-// be called by root tables passing the PARENT and C and allows for correct type
-// checking of root tables.
-//
-// Derived tables
-// Suppose we want to derive a table called SliceTable which inherits all
-// columns from EventTable (with EventTable's definition macro being
-// PERFETTO_TP_EVENT_TABLE_DEF) and columns 'dur' and 'depth'.
-//
-// Then, we would invoke the macro as follows:
-// #define PERFETTO_TP_SLICE_TABLE_DEF(NAME, PARENT, C)
-//   NAME(SliceTable, "slice")
-//   PARENT(PERFETTO_TP_EVENT_TABLE_DEF, C)
-//   C(int64_t, dur)
-//   C(uint8_t, depth)
-// PERFETTO_TP_TABLE(PERFETTO_TP_SLICE_TABLE_DEF);
-
-// Macro definition using when defining a new root table.
-//
-// This macro should be called by passing PARENT and C in root tables; this
-// allows for correct type-checking of columns.
-//
-// See the top of the file for how this should be used.
-#define PERFETTO_TP_ROOT_TABLE(PARENT, C) \
-  PARENT(PERFETTO_TP_ROOT_TABLE_PARENT_DEF, C)
-
-// The macro used to define storage backed tables.
-// See the top of the file for how this should be used.
-//
-// This macro takes one argument: the full definition of the table; the
-// definition is a function macro taking three arguments:
-// 1. NAME, a function macro taking two argument: the name of the new class
-//    being defined and the name of the table when exposed to SQLite.
-// 2. PARENT, a function macro taking two arguments: a) the definition of
-//    the parent table if this table
-//    is a root table b) C, the third parameter of the macro definition (see
-//    below). For root tables, PARENT and C are passsed to
-//    PERFETTO_TP_ROOT_TABLE instead of PARENT called directly.
-// 3. C, a function macro taking two or three parameters:
-//      a) the type of a column
-//      b) the name of a column
-//      c) (optional) the flags of the column (see Column::Flag
-//         for details).
-//    This macro should be invoked as many times as there are columns in the
-//    table with the information about them.
-#define PERFETTO_TP_TABLE(DEF)                                   \
-  PERFETTO_TP_TABLE_INTERNAL(                                    \
-      PERFETTO_TP_TABLE_NAME(DEF), PERFETTO_TP_TABLE_CLASS(DEF), \
-      PERFETTO_TP_TABLE_CLASS(PERFETTO_TP_PARENT_DEF(DEF)), DEF)
-
-}  // namespace trace_processor
-}  // namespace perfetto
-
-#endif  // SRC_TRACE_PROCESSOR_TABLES_MACROS_H_
diff --git a/src/trace_processor/tables/macros_internal.h b/src/trace_processor/tables/macros_internal.h
index 059e7b7..b2f1f15 100644
--- a/src/trace_processor/tables/macros_internal.h
+++ b/src/trace_processor/tables/macros_internal.h
@@ -57,30 +57,6 @@
   explicit RootParentTable(std::nullptr_t);
 };
 
-// IdHelper is used to figure out the Id type for a table.
-//
-// We do this using templates with the following algorithm:
-// 1. If the parent class is anything but RootParentTable, the Id of the
-//    table is the same as the Id of the parent.
-// 2. If the parent class is RootParentTable (i.e. the table is a root
-//    table), then the Id is the one defined in the table itself.
-// The net result of this is that all tables in the hierarchy get the
-// same type of Id - the one defined in the root table of that hierarchy.
-//
-// Reasoning: We do this because using uint32_t is very overloaded and
-// having a wrapper type for ids is very helpful to avoid confusion with
-// row indices (especially because ids and row indices often appear in
-// similar places in the codebase - that is at insertion in parsers and
-// in trackers).
-template <typename ParentClass, typename Class>
-struct IdHelper {
-  using Id = typename ParentClass::Id;
-};
-template <typename Class>
-struct IdHelper<RootParentTable, Class> {
-  using Id = typename Class::DefinedId;
-};
-
 // The parent class for all macro generated tables.
 // This class is used to extract common code from the macro tables to reduce
 // code size.
@@ -284,665 +260,6 @@
 };
 
 }  // namespace macros_internal
-
-// Ignore GCC warning about a missing argument for a variadic macro parameter.
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC system_header
-#endif
-
-// Basic helper macros.
-#define PERFETTO_TP_NOOP(...)
-
-// Gets the class name from a table definition.
-#define PERFETTO_TP_EXTRACT_TABLE_CLASS(class_name, ...) class_name
-#define PERFETTO_TP_TABLE_CLASS(DEF) \
-  DEF(PERFETTO_TP_EXTRACT_TABLE_CLASS, PERFETTO_TP_NOOP, PERFETTO_TP_NOOP)
-
-// Gets the table name from the table definition.
-#define PERFETTO_TP_EXTRACT_TABLE_NAME(_, table_name) table_name
-#define PERFETTO_TP_TABLE_NAME(DEF) \
-  DEF(PERFETTO_TP_EXTRACT_TABLE_NAME, PERFETTO_TP_NOOP, PERFETTO_TP_NOOP)
-
-// Gets the parent definition from a table definition.
-#define PERFETTO_TP_EXTRACT_PARENT_DEF(PARENT_DEF, _) PARENT_DEF
-#define PERFETTO_TP_PARENT_DEF(DEF) \
-  DEF(PERFETTO_TP_NOOP, PERFETTO_TP_EXTRACT_PARENT_DEF, PERFETTO_TP_NOOP)
-
-// Invokes FN on each column in the definition of the table. We define a
-// recursive macro as we need to walk up the hierarchy until we hit the root.
-// Currently, we hardcode 5 levels but this can be increased as necessary.
-#define PERFETTO_TP_ALL_COLUMNS_0(DEF, arg) \
-  static_assert(false, "Macro recursion depth exceeded");
-#define PERFETTO_TP_ALL_COLUMNS_1(DEF, arg) \
-  DEF(PERFETTO_TP_NOOP, PERFETTO_TP_ALL_COLUMNS_0, arg)
-#define PERFETTO_TP_ALL_COLUMNS_2(DEF, arg) \
-  DEF(PERFETTO_TP_NOOP, PERFETTO_TP_ALL_COLUMNS_1, arg)
-#define PERFETTO_TP_ALL_COLUMNS_3(DEF, arg) \
-  DEF(PERFETTO_TP_NOOP, PERFETTO_TP_ALL_COLUMNS_2, arg)
-#define PERFETTO_TP_ALL_COLUMNS_4(DEF, arg) \
-  DEF(PERFETTO_TP_NOOP, PERFETTO_TP_ALL_COLUMNS_3, arg)
-#define PERFETTO_TP_ALL_COLUMNS(DEF, arg) \
-  DEF(PERFETTO_TP_NOOP, PERFETTO_TP_ALL_COLUMNS_4, arg)
-
-// Invokes FN on each column in the table definition.
-#define PERFETTO_TP_TABLE_COLUMNS(DEF, FN) \
-  DEF(PERFETTO_TP_NOOP, PERFETTO_TP_NOOP, FN)
-
-// Invokes FN on each column in every ancestor of the table.
-#define PERFETTO_TP_PARENT_COLUMNS(DEF, FN) \
-  PERFETTO_TP_ALL_COLUMNS(PERFETTO_TP_PARENT_DEF(DEF), FN)
-
-// Basic macros for extracting column info from a schema.
-#define PERFETTO_TP_NAME_COMMA(type, name, ...) name,
-#define PERFETTO_TP_TYPE_NAME_COMMA(type, name, ...) type name,
-
-// Constructor parameters of Table::Row.
-// We name this name_c to avoid a clash with the field names of
-// Table::Row.
-#define PERFETTO_TP_ROW_CONSTRUCTOR(type, name, ...) type name##_c = {},
-
-// Constructor parameters for parent of Row.
-#define PERFETTO_TP_PARENT_ROW_CONSTRUCTOR(type, name, ...) name##_c,
-
-// Initializes the members of Table::Row.
-#define PERFETTO_TP_ROW_INITIALIZER(type, name, ...) name = name##_c;
-
-// Defines the variable in Table::Row.
-#define PERFETTO_TP_ROW_DEFINITION(type, name, ...) type name = {};
-
-// Used to generate an equality implementation on Table::Row.
-#define PERFETTO_TP_ROW_EQUALS(type, name, ...) \
-  TypedColumn<type>::Equals(other.name, name)&&
-
-// Defines the parent row field in Insert.
-#define PERFETTO_TP_PARENT_ROW_INSERT(type, name, ...) row.name,
-
-// Defines the member variable in the Table.
-#define PERFETTO_TP_TABLE_MEMBER(type, name, ...) \
-  ColumnStorage<TypedColumn<type>::stored_type> name##_;
-
-#define PERFETTO_TP_COLUMN_FLAG_HAS_FLAG_COL(type, name, flags)               \
-  static constexpr uint32_t name##_flags() {                                  \
-    return static_cast<uint32_t>(flags) | TypedColumn<type>::default_flags(); \
-  }
-
-#define PERFETTO_TP_COLUMN_FLAG_NO_FLAG_COL(type, name) \
-  static constexpr uint32_t name##_flags() {            \
-    return TypedColumn<type>::default_flags();          \
-  }
-
-#define PERFETTO_TP_PARENT_COLUMN_FLAG_HAS_FLAG_COL(type, name, flags) \
-  static constexpr uint32_t name##_flags() {                           \
-    return (static_cast<uint32_t>(flags) |                             \
-            TypedColumn<type>::default_flags()) &                      \
-           ~Column::kNoCrossTableInheritFlags;                         \
-  }
-
-#define PERFETTO_TP_PARENT_COLUMN_FLAG_NO_FLAG_COL(type, name) \
-  static constexpr uint32_t name##_flags() {                   \
-    return TypedColumn<type>::default_flags() &                \
-           ~Column::kNoCrossTableInheritFlags;                 \
-  }
-
-#define PERFETTO_TP_COLUMN_FLAG_CHOOSER(type, name, maybe_flags, fn, ...) fn
-
-// MSVC has slightly different rules about __VA_ARGS__ expansion. This makes it
-// behave similarly to GCC/Clang.
-// See https://stackoverflow.com/q/5134523/14028266 .
-#define PERFETTO_TP_EXPAND_VA_ARGS(x) x
-
-#define PERFETTO_TP_COLUMN_FLAG(...)                          \
-  PERFETTO_TP_EXPAND_VA_ARGS(PERFETTO_TP_COLUMN_FLAG_CHOOSER( \
-      __VA_ARGS__, PERFETTO_TP_COLUMN_FLAG_HAS_FLAG_COL,      \
-      PERFETTO_TP_COLUMN_FLAG_NO_FLAG_COL)(__VA_ARGS__))
-
-#define PERFETTO_TP_PARENT_COLUMN_FLAG(...)                     \
-  PERFETTO_TP_EXPAND_VA_ARGS(PERFETTO_TP_COLUMN_FLAG_CHOOSER(   \
-      __VA_ARGS__, PERFETTO_TP_PARENT_COLUMN_FLAG_HAS_FLAG_COL, \
-      PERFETTO_TP_PARENT_COLUMN_FLAG_NO_FLAG_COL)(__VA_ARGS__))
-
-// Creates the sparse vector with the given flags.
-#define PERFETTO_TP_TABLE_CONSTRUCTOR_SV(type, name, ...)        \
-  name##_(ColumnStorage<TypedColumn<type>::stored_type>::Create< \
-          (name##_flags() & Column::Flag::kDense) != 0>()),
-
-// Invokes the chosen column constructor by passing the given args.
-#define PERFETTO_TP_TABLE_CONSTRUCTOR_COLUMN(type, name, ...)   \
-  columns_.emplace_back(#name, &name##_, name##_flags(), this,  \
-                        static_cast<uint32_t>(columns_.size()), \
-                        static_cast<uint32_t>(overlays_.size()) - 1);
-
-// Inserts the value into the corresponding column.
-#define PERFETTO_TP_COLUMN_APPEND(type, name, ...) \
-  mutable_##name()->Append(std::move(row.name));
-
-// Creates a schema entry for the corresponding column.
-#define PERFETTO_TP_COLUMN_SCHEMA(type, name, ...)               \
-  schema.columns.emplace_back(Table::Schema::Column{             \
-      #name, TypedColumn<type>::SqlValueType(), false,           \
-      static_cast<bool>(name##_flags() & Column::Flag::kSorted), \
-      static_cast<bool>(name##_flags() & Column::Flag::kHidden), \
-      static_cast<bool>(name##_flags() & Column::Flag::kSetId)});
-
-// Defines the immutable accessor for a column.
-#define PERFETTO_TP_TABLE_COL_GETTER(type, name, ...)                          \
-  const TypedColumn<type>& name() const {                                      \
-    return static_cast<const TypedColumn<type>&>(columns_[ColumnIndex::name]); \
-  }
-
-// Defines the accessors for a column.
-#define PERFETTO_TP_TABLE_MUTABLE_COL_GETTER(type, name, ...)             \
-  TypedColumn<type>* mutable_##name() {                                   \
-    return static_cast<TypedColumn<type>*>(&columns_[ColumnIndex::name]); \
-  }
-
-// Defines the accessors for a column.
-#define PERFETTO_TP_TABLE_STATIC_ASSERT_FLAG(type, name, ...)                \
-  static_assert(Column::IsFlagsAndTypeValid<TypedColumn<type>::stored_type>( \
-                    name##_flags()),                                         \
-                "Column type and flag combination is not valid");
-
-// Defines the parameter for the |ExtendParent| function.
-#define PERFETTO_TP_TABLE_EXTEND_PARAM(type, name, ...) \
-  ColumnStorage<TypedColumn<type>::stored_type> name,
-
-// Defines the parameter passing for the |ExtendParent| function.
-#define PERFETTO_TP_TABLE_EXTEND_PARAM_PASSING(type, name, ...) std::move(name),
-
-// Sets the table nullable vector to the parameter passed in the
-// |SelectAndExtendParent| function.
-#define PERFETTO_TP_TABLE_EXTEND_SET_NV(type, name, ...) \
-  PERFETTO_DCHECK(name.size() == parent_overlay.size()); \
-  name##_ = std::move(name);
-
-// Definition used as the parent of root tables.
-#define PERFETTO_TP_ROOT_TABLE_PARENT_DEF(NAME, PARENT, C) \
-  NAME(macros_internal::RootParentTable, "root")
-
-// Defines the getter for the column value in the RowReference.
-#define PERFETTO_TP_TABLE_CONST_ROW_REF_GETTER(type, name, ...) \
-  type name() const { return table_->name()[row_number_]; }
-
-// Defines the accessor for the column value in the RowReference.
-#define PERFETTO_TP_TABLE_ROW_REF_SETTER(type, name, ...)          \
-  void set_##name(TypedColumn<type>::non_optional_type v) const {  \
-    return mutable_table()->mutable_##name()->Set(row_number_, v); \
-  }
-
-// Defines the getter for the column value in the ConstIterator.
-#define PERFETTO_TP_TABLE_CONST_IT_GETTER(type, name, ...)  \
-  type name() const {                                       \
-    const auto& col = table_->name();                       \
-    return col.GetAtIdx(its_[col.overlay_index()].index()); \
-  }
-
-// Defines the setter for the column value in the Iterator.
-#define PERFETTO_TP_TABLE_IT_SETTER(type, name, ...)        \
-  void set_##name(TypedColumn<type>::non_optional_type v) { \
-    auto* col = mutable_table_->mutable_##name();           \
-    col->SetAtIdx(its_[col->overlay_index()].index(), v);   \
-  }
-
-// Defines the column index constexpr declaration.
-#define PERFETTO_TP_COLUMN_INDEX(type, name, ...) \
-  static constexpr uint32_t name = static_cast<uint32_t>(ColumnIndexEnum::name);
-
-// Defines an alias for column type for each column.
-#define PERFETTO_TP_COLUMN_TYPE_USING(type, name, ...) \
-  using name = TypedColumn<type>;
-
-// Calls ShrinkToFit on each column.
-#define PERFETTO_TP_COLUMN_SHRINK_TO_FIT(type, name, ...) name##_.ShrinkToFit();
-
-// For more general documentation, see PERFETTO_TP_TABLE in macros.h.
-#define PERFETTO_TP_TABLE_INTERNAL(table_name, class_name, parent_class_name, \
-                                   DEF)                                       \
-  class class_name : public macros_internal::MacroTable {                     \
-   public:                                                                    \
-    /* Forward declaration to allow free usage below. */                      \
-    class ConstRowReference;                                                  \
-    class RowReference;                                                       \
-    class RowNumber;                                                          \
-    class ConstIterator;                                                      \
-                                                                              \
-   private:                                                                   \
-    /*                                                                        \
-     * Allows IdHelper to access DefinedId for root tables.                   \
-     * Needs to be defined here to allow the public using declaration of Id   \
-     * below to work correctly.                                               \
-     */                                                                       \
-    friend struct macros_internal::IdHelper<parent_class_name, class_name>;   \
-                                                                              \
-    /* Whether or not this is a root table */                                 \
-    static constexpr bool kIsRootTable =                                      \
-        std::is_same<parent_class_name,                                       \
-                     macros_internal::RootParentTable>::value;                \
-                                                                              \
-    /* Aliases to reduce clutter in class defintions below. */                \
-    using AbstractRowNumber = macros_internal::                               \
-        AbstractRowNumber<class_name, ConstRowReference, RowReference>;       \
-    using AbstractConstRowReference =                                         \
-        macros_internal::AbstractConstRowReference<class_name, RowNumber>;    \
-    using AbstractConstIterator =                                             \
-        macros_internal::AbstractConstIterator<ConstIterator,                 \
-                                               class_name,                    \
-                                               RowNumber,                     \
-                                               ConstRowReference>;            \
-                                                                              \
-    enum class ColumnIndexEnum {                                              \
-      id,                                                                     \
-      type, /* Expands to col1, col2, ... */                                  \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_NAME_COMMA) kNumCols           \
-    };                                                                        \
-                                                                              \
-    /*                                                                        \
-     * Defines a new id type for a hierarchy of tables.                       \
-     * We define it here as we need this type to be visible for the public    \
-     * using declaration of Id below.                                         \
-     * Note: This type will only used if this table is a root table.          \
-     */                                                                       \
-    struct DefinedId : public BaseId {                                        \
-      DefinedId() = default;                                                  \
-      explicit constexpr DefinedId(uint32_t v) : BaseId(v) {}                 \
-    };                                                                        \
-    static_assert(std::is_trivially_destructible<DefinedId>::value,           \
-                  "Inheritance used without trivial destruction");            \
-                                                                              \
-    static constexpr uint32_t id_flags() { return Column::kIdFlags; }         \
-    static constexpr uint32_t type_flags() { return Column::kNoFlag; }        \
-    PERFETTO_TP_PARENT_COLUMNS(DEF, PERFETTO_TP_PARENT_COLUMN_FLAG)           \
-    PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_COLUMN_FLAG)                   \
-                                                                              \
-   public:                                                                    \
-    /*                                                                        \
-     * This defines the type of the id to be the type of the root             \
-     * table of the hierarchy - see IdHelper for more details.                \
-     */                                                                       \
-    using Id = macros_internal::IdHelper<parent_class_name, class_name>::Id;  \
-                                                                              \
-    struct ColumnIndex {                                                      \
-      static constexpr uint32_t id =                                          \
-          static_cast<uint32_t>(ColumnIndexEnum::id);                         \
-      static constexpr uint32_t type =                                        \
-          static_cast<uint32_t>(ColumnIndexEnum::type);                       \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_COLUMN_INDEX)                  \
-    };                                                                        \
-                                                                              \
-    struct ColumnType {                                                       \
-      using id = IdColumn<Id>;                                                \
-      using type = TypedColumn<StringPool::Id>;                               \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_COLUMN_TYPE_USING)             \
-    };                                                                        \
-                                                                              \
-    struct Row : parent_class_name::Row {                                     \
-      /*                                                                      \
-       * Expands to Row(col_type1 col1_c, std::optional<col_type2> col2_c,    \
-       * ...)                                                                 \
-       */                                                                     \
-      Row(PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_ROW_CONSTRUCTOR)           \
-              std::nullptr_t = nullptr)                                       \
-          : parent_class_name::Row(PERFETTO_TP_PARENT_COLUMNS(                \
-                DEF,                                                          \
-                PERFETTO_TP_PARENT_ROW_CONSTRUCTOR) nullptr) {                \
-        type_ = table_name;                                                   \
-                                                                              \
-        /*                                                                    \
-         * Expands to                                                         \
-         * col1 = col1_c;                                                     \
-         * ...                                                                \
-         */                                                                   \
-        PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_ROW_INITIALIZER)           \
-      }                                                                       \
-                                                                              \
-      bool operator==(const class_name::Row& other) const {                   \
-        return PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_ROW_EQUALS) true;     \
-      }                                                                       \
-                                                                              \
-      /*                                                                      \
-       * Expands to                                                           \
-       * col_type1 col1 = {};                                                 \
-       * ...                                                                  \
-       */                                                                     \
-      PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_ROW_DEFINITION)              \
-    };                                                                        \
-    static_assert(std::is_trivially_destructible<Row>::value,                 \
-                  "Inheritance used without trivial destruction");            \
-                                                                              \
-    /*                                                                        \
-     * Reference to a row which exists in the table.                          \
-     *                                                                        \
-     * Allows caller code to store and instances of this object without       \
-     * having to interact with row numbers.                                   \
-     */                                                                       \
-    class ConstRowReference : public AbstractConstRowReference {              \
-     public:                                                                  \
-      ConstRowReference(const class_name* table, uint32_t row_number)         \
-          : AbstractConstRowReference(table, row_number) {}                   \
-                                                                              \
-      PERFETTO_TP_TABLE_CONST_ROW_REF_GETTER(Id, id)                          \
-      PERFETTO_TP_TABLE_CONST_ROW_REF_GETTER(StringPool::Id, type)            \
-                                                                              \
-      /*                                                                      \
-       * Expands to                                                           \
-       * col1_type col1() const { return table_->col1()[row_]; }              \
-       * ...                                                                  \
-       */                                                                     \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_TABLE_CONST_ROW_REF_GETTER)    \
-    };                                                                        \
-    static_assert(std::is_trivially_destructible<ConstRowReference>::value,   \
-                  "Inheritance used without trivial destruction");            \
-                                                                              \
-    /*                                                                        \
-     * Reference to a row which exists in the table.                          \
-     *                                                                        \
-     * Allows caller code to store and instances of this object without       \
-     * having to interact with row numbers.                                   \
-     */                                                                       \
-    class RowReference : public ConstRowReference {                           \
-     public:                                                                  \
-      RowReference(class_name* table, uint32_t row_number)                    \
-          : ConstRowReference(table, row_number) {}                           \
-                                                                              \
-      /*                                                                      \
-       * Expands to                                                           \
-       * void set_col1(col1_type v) { table_->mutable_col1()->Set(row, v); }  \
-       * ...                                                                  \
-       */                                                                     \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_TABLE_ROW_REF_SETTER)          \
-                                                                              \
-     private:                                                                 \
-      class_name* mutable_table() const {                                     \
-        return const_cast<class_name*>(table_);                               \
-      }                                                                       \
-    };                                                                        \
-    static_assert(std::is_trivially_destructible<RowReference>::value,        \
-                  "Inheritance used without trivial destruction");            \
-                                                                              \
-    /*                                                                        \
-     * Strongly typed wrapper around the row index. Prefer storing this over  \
-     * storing RowReference to reduce memory usage                            \
-     */                                                                       \
-    class RowNumber : public AbstractRowNumber {                              \
-     public:                                                                  \
-      explicit RowNumber(uint32_t row_number)                                 \
-          : AbstractRowNumber(row_number) {}                                  \
-    };                                                                        \
-    static_assert(std::is_trivially_destructible<RowNumber>::value,           \
-                  "Inheritance used without trivial destruction");            \
-                                                                              \
-    /* Return value of Insert giving access to id and row number */           \
-    struct IdAndRow {                                                         \
-      Id id;                                                                  \
-      uint32_t row;                                                           \
-      RowReference row_reference;                                             \
-      RowNumber row_number;                                                   \
-    };                                                                        \
-                                                                              \
-    /*                                                                        \
-     * Strongly typed const iterator for this macro table.                    \
-     *                                                                        \
-     * Allows efficient retrieval of values from this table without having to \
-     * deal with row numbers, ColumnStorageOverlays or indices.               \
-     */                                                                       \
-    class ConstIterator : public AbstractConstIterator {                      \
-     public:                                                                  \
-      PERFETTO_TP_TABLE_CONST_IT_GETTER(Id, id)                               \
-      PERFETTO_TP_TABLE_CONST_IT_GETTER(StringPool::Id, type)                 \
-                                                                              \
-      /*                                                                      \
-       * Expands to                                                           \
-       * col1_type col1() const { return table_->col1().GetAtIdx(i); }        \
-       * ...                                                                  \
-       */                                                                     \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_TABLE_CONST_IT_GETTER)         \
-                                                                              \
-     protected:                                                               \
-      /*                                                                      \
-       * Must not be public to avoid buggy code because of inheritance        \
-       * without virtual destructor.                                          \
-       */                                                                     \
-      explicit ConstIterator(const class_name* table,                         \
-                             std::vector<ColumnStorageOverlay> overlays)      \
-          : AbstractConstIterator(table, std::move(overlays)) {}              \
-                                                                              \
-      uint32_t CurrentRowNumber() const {                                     \
-        /*                                                                    \
-         * Because the last ColumnStorageOverlay belongs to this table it     \
-         * will be dense (i.e. every row in the table will be part of this    \
-         * ColumnStorageOverlay + will be represented with a range). This     \
-         * means that the index() of the last ColumnStorageOverlay iterator   \
-         * is precisely the row number in table!                              \
-         */                                                                   \
-        return its_.back().index();                                           \
-      }                                                                       \
-                                                                              \
-     private:                                                                 \
-      friend class class_name;                                                \
-      friend class AbstractConstIterator;                                     \
-    };                                                                        \
-                                                                              \
-    /*                                                                        \
-     * Strongly typed iterator for this macro table.                          \
-     *                                                                        \
-     * Enhances ConstIterator by also allowing values in the table to be set  \
-     * as well as retrieved.                                                  \
-     */                                                                       \
-    class Iterator : public ConstIterator {                                   \
-     public:                                                                  \
-      /*                                                                      \
-       * Expands to                                                           \
-       * void set_col1(col1_type v) { table_->mut_col1()->SetAtIdx(i, v); }   \
-       * ...                                                                  \
-       */                                                                     \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_TABLE_IT_SETTER)               \
-                                                                              \
-      /*                                                                      \
-       * Returns a RowReference to the current row.                           \
-       */                                                                     \
-      RowReference row_reference() const {                                    \
-        return RowReference(mutable_table_, CurrentRowNumber());              \
-      }                                                                       \
-                                                                              \
-     private:                                                                 \
-      friend class class_name;                                                \
-                                                                              \
-      /*                                                                      \
-       * Must not be public to avoid buggy code because of inheritance        \
-       * without virtual destructor.                                          \
-       */                                                                     \
-      explicit Iterator(class_name* table,                                    \
-                        std::vector<ColumnStorageOverlay> overlays)           \
-          : ConstIterator(table, std::move(overlays)),                        \
-            mutable_table_(table) {}                                          \
-                                                                              \
-      class_name* mutable_table_ = nullptr;                                   \
-    };                                                                        \
-                                                                              \
-    class_name(StringPool* pool, parent_class_name* parent)                   \
-        : macros_internal::MacroTable(pool, parent),                          \
-          PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_TABLE_CONSTRUCTOR_SV)    \
-              parent_(parent) {                                               \
-      PERFETTO_CHECK(kIsRootTable == (parent == nullptr));                    \
-                                                                              \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_TABLE_STATIC_ASSERT_FLAG)      \
-                                                                              \
-      /*                                                                      \
-       * Expands to                                                           \
-       * columns_.emplace_back("col1", col1_, Column::kNoFlag, this,          \
-       *                       static_cast<uint32_t>(columns_.size()),        \
-       *                       static_cast<uint32_t>(overlays_.size()) - 1);  \
-       * ...                                                                  \
-       */                                                                     \
-      PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_TABLE_CONSTRUCTOR_COLUMN);   \
-    }                                                                         \
-    ~class_name() override;                                                   \
-                                                                              \
-    IdAndRow Insert(const Row& row) {                                         \
-      PERFETTO_DCHECK(allow_inserts_);                                        \
-                                                                              \
-      Id id;                                                                  \
-      uint32_t row_number = row_count();                                      \
-      if (kIsRootTable) {                                                     \
-        id = Id{row_number};                                                  \
-        type_.Append(string_pool_->InternString(row.type()));                 \
-      } else {                                                                \
-        PERFETTO_DCHECK(parent_);                                             \
-        id = Id{parent_->Insert(row).id};                                     \
-        UpdateOverlaysAfterParentInsert();                                    \
-      }                                                                       \
-                                                                              \
-      /*                                                                      \
-       * Expands to                                                           \
-       * col1_.Append(row.col1);                                              \
-       * ...                                                                  \
-       */                                                                     \
-      PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_COLUMN_APPEND);              \
-                                                                              \
-      UpdateSelfOverlayAfterInsert();                                         \
-      return {id, row_number, RowReference(this, row_number),                 \
-              RowNumber(row_number)};                                         \
-    }                                                                         \
-                                                                              \
-    static Table::Schema ComputeStaticSchema() {                              \
-      Table::Schema schema;                                                   \
-      schema.columns.emplace_back(Table::Schema::Column{                      \
-          "id", SqlValue::Type::kLong, true, true, false, false});            \
-      schema.columns.emplace_back(Table::Schema::Column{                      \
-          "type", SqlValue::Type::kString, false, false, false, false});      \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_COLUMN_SCHEMA);                \
-      return schema;                                                          \
-    }                                                                         \
-                                                                              \
-    void ShrinkToFit() {                                                      \
-      type_.ShrinkToFit();                                                    \
-      PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_COLUMN_SHRINK_TO_FIT);       \
-    }                                                                         \
-                                                                              \
-    /* Iterates the table. */                                                 \
-    ConstIterator IterateRows() const {                                       \
-      return ConstIterator(this, CopyOverlays());                             \
-    }                                                                         \
-                                                                              \
-    /* Iterates the table. */                                                 \
-    Iterator IterateRows() { return Iterator(this, CopyOverlays()); }         \
-                                                                              \
-    /* Filters the Table using the specified filter constraints. */           \
-    ConstIterator FilterToIterator(                                           \
-        const std::vector<Constraint>& cs,                                    \
-        RowMap::OptimizeFor opt = RowMap::OptimizeFor::kMemory) const {       \
-      return ConstIterator(this, FilterAndApplyToOverlays(cs, opt));          \
-    }                                                                         \
-                                                                              \
-    /* Filters the Table using the specified filter constraints. */           \
-    Iterator FilterToIterator(                                                \
-        const std::vector<Constraint>& cs,                                    \
-        RowMap::OptimizeFor opt = RowMap::OptimizeFor::kMemory) {             \
-      return Iterator(this, FilterAndApplyToOverlays(cs, opt));               \
-    }                                                                         \
-                                                                              \
-    /* Returns a ConstRowReference to the row pointed to by |find_id|. */     \
-    std::optional<ConstRowReference> FindById(Id find_id) const {             \
-      std::optional<uint32_t> row = id().IndexOf(find_id);                    \
-      if (!row)                                                               \
-        return std::nullopt;                                                  \
-      return ConstRowReference(this, *row);                                   \
-    }                                                                         \
-                                                                              \
-    /* Returns a RowReference to the row pointed to by |find_id|. */          \
-    std::optional<RowReference> FindById(Id find_id) {                        \
-      std::optional<uint32_t> row = id().IndexOf(find_id);                    \
-      if (!row)                                                               \
-        return std::nullopt;                                                  \
-      return RowReference(this, *row);                                        \
-    }                                                                         \
-                                                                              \
-    const IdColumn<Id>& id() const {                                          \
-      return static_cast<const IdColumn<Id>&>(                                \
-          columns_[static_cast<uint32_t>(ColumnIndex::id)]);                  \
-    }                                                                         \
-    PERFETTO_TP_TABLE_COL_GETTER(StringPool::Id, type)                        \
-                                                                              \
-    /* Returns the name of the table */                                       \
-    static constexpr const char* Name() { return table_name; }                \
-                                                                              \
-    /*                                                                        \
-     * Creates a filled instance of this class by selecting all rows in       \
-     * parent and filling the table columns with the provided vectors.        \
-     */                                                                       \
-    static std::unique_ptr<Table> ExtendParent(                               \
-        const parent_class_name& parent,                                      \
-        PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_TABLE_EXTEND_PARAM)        \
-            std::nullptr_t = nullptr) {                                       \
-      return std::unique_ptr<Table>(new class_name(                           \
-          parent.string_pool(), parent, RowMap(0, parent.row_count()),        \
-          PERFETTO_TP_TABLE_COLUMNS(                                          \
-              DEF, PERFETTO_TP_TABLE_EXTEND_PARAM_PASSING) nullptr));         \
-    }                                                                         \
-                                                                              \
-    /*                                                                        \
-     * Creates a filled instance of this class by first selecting all rows in \
-     * parent given by |rows| and filling the table columns with the provided \
-     * vectors.                                                               \
-     */                                                                       \
-    static std::unique_ptr<Table> SelectAndExtendParent(                      \
-        const parent_class_name& parent,                                      \
-        std::vector<parent_class_name::RowNumber> parent_row_overlay,         \
-        PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_TABLE_EXTEND_PARAM)        \
-            std::nullptr_t = nullptr) {                                       \
-      std::vector<uint32_t> prs_untyped(parent_row_overlay.size());           \
-      for (uint32_t i = 0; i < parent_row_overlay.size(); ++i) {              \
-        prs_untyped[i] = parent_row_overlay[i].row_number();                  \
-      }                                                                       \
-      return std::unique_ptr<Table>(new class_name(                           \
-          parent.string_pool(), parent, RowMap(std::move(prs_untyped)),       \
-          PERFETTO_TP_TABLE_COLUMNS(                                          \
-              DEF, PERFETTO_TP_TABLE_EXTEND_PARAM_PASSING) nullptr));         \
-    }                                                                         \
-                                                                              \
-    /*                                                                        \
-     * Expands to                                                             \
-     * const TypedColumn<col1_type>& col1() { return col1_; }                 \
-     * ...                                                                    \
-     */                                                                       \
-    PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_TABLE_COL_GETTER)                \
-                                                                              \
-    /*                                                                        \
-     * Expands to                                                             \
-     * TypedColumn<col1_type>* mutable_col1() { return &col1_; }              \
-     * ...                                                                    \
-     */                                                                       \
-    PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_TABLE_MUTABLE_COL_GETTER)        \
-                                                                              \
-   private:                                                                   \
-    class_name(StringPool* pool,                                              \
-               const parent_class_name& parent,                               \
-               RowMap parent_overlay,                                         \
-               PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_TABLE_EXTEND_PARAM) \
-                   std::nullptr_t = nullptr)                                  \
-        : macros_internal::MacroTable(pool, parent, parent_overlay) {         \
-      PERFETTO_TP_ALL_COLUMNS(DEF, PERFETTO_TP_TABLE_STATIC_ASSERT_FLAG)      \
-      PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_TABLE_EXTEND_SET_NV)         \
-                                                                              \
-      /*                                                                      \
-       * Expands to                                                           \
-       * columns_.emplace_back("col1", col1_, Column::kNoFlag, this,          \
-       *                       static_cast<uint32_t>(columns_.size()),        \
-       *                       static_cast<uint32_t>(overlays_.size()) - 1);  \
-       * ...                                                                  \
-       */                                                                     \
-      PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_TABLE_CONSTRUCTOR_COLUMN);   \
-    }                                                                         \
-                                                                              \
-    /*                                                                        \
-     * Expands to                                                             \
-     * NullableVector<col1_type> col1_;                                       \
-     * ...                                                                    \
-     */                                                                       \
-    PERFETTO_TP_TABLE_COLUMNS(DEF, PERFETTO_TP_TABLE_MEMBER)                  \
-                                                                              \
-    parent_class_name* parent_ = nullptr;                                     \
-  }
-
 }  // namespace trace_processor
 }  // namespace perfetto
 
diff --git a/src/trace_processor/tables/memory_tables.py b/src/trace_processor/tables/memory_tables.py
index 65263f8..f270aa7 100644
--- a/src/trace_processor/tables/memory_tables.py
+++ b/src/trace_processor/tables/memory_tables.py
@@ -26,6 +26,7 @@
 from src.trace_processor.tables.track_tables import TRACK_TABLE
 
 MEMORY_SNAPSHOT_TABLE = Table(
+    python_module=__file__,
     class_name='MemorySnapshotTable',
     sql_name='memory_snapshot',
     columns=[
@@ -43,6 +44,7 @@
         }))
 
 PROCESS_MEMORY_SNAPSHOT_TABLE = Table(
+    python_module=__file__,
     class_name='ProcessMemorySnapshotTable',
     sql_name='process_memory_snapshot',
     columns=[
@@ -58,6 +60,7 @@
         }))
 
 MEMORY_SNAPSHOT_NODE_TABLE = Table(
+    python_module=__file__,
     class_name='MemorySnapshotNodeTable',
     sql_name='memory_snapshot_node',
     columns=[
@@ -81,6 +84,7 @@
         }))
 
 MEMORY_SNAPSHOT_EDGE_TABLE = Table(
+    python_module=__file__,
     class_name='MemorySnapshotEdgeTable',
     sql_name='memory_snapshot_edge',
     columns=[
diff --git a/src/trace_processor/tables/metadata_tables.py b/src/trace_processor/tables/metadata_tables.py
index 621f3fc..0219aa9 100644
--- a/src/trace_processor/tables/metadata_tables.py
+++ b/src/trace_processor/tables/metadata_tables.py
@@ -29,6 +29,7 @@
 from python.generators.trace_processor_table.public import WrappingSqlView
 
 PROCESS_TABLE = Table(
+    python_module=__file__,
     class_name='ProcessTable',
     sql_name='internal_process',
     columns=[
@@ -100,6 +101,7 @@
         }))
 
 THREAD_TABLE = Table(
+    python_module=__file__,
     class_name='ThreadTable',
     sql_name='internal_thread',
     columns=[
@@ -159,27 +161,59 @@
         }))
 
 RAW_TABLE = Table(
+    python_module=__file__,
     class_name='RawTable',
     sql_name='raw',
     columns=[
         C('ts', CppInt64(), flags=ColumnFlag.SORTED),
         C('name', CppString()),
         C('cpu', CppUint32()),
-        C('utid', CppUint32()),
+        C('utid', CppTableId(THREAD_TABLE)),
         C('arg_set_id', CppUint32()),
     ],
     tabledoc=TableDoc(
-        doc='''''',
+        doc='''
+          Contains 'raw' events from the trace for some types of events. This
+          table only exists for debugging purposes and should not be relied on
+          in production usecases (i.e. metrics, standard library etc).
+        ''',
         group='Misc',
         columns={
-            'arg_set_id': '''''',
-            'ts': '''''',
-            'name': '''''',
-            'cpu': '''''',
-            'utid': ''''''
+            'arg_set_id':
+                ColumnDoc(
+                    'The set of key/value pairs associated with this event.',
+                    joinable='args.arg_set_id'),
+            'ts':
+                'The timestamp of this event.',
+            'name':
+                '''
+                  The name of the event. For ftrace events, this will be the
+                  ftrace event name.
+                ''',
+            'cpu':
+                'The CPU this event was emitted on.',
+            'utid':
+                'The thread this event was emitted on.'
         }))
 
+FTRACE_EVENT_TABLE = Table(
+    python_module=__file__,
+    class_name='FtraceEventTable',
+    sql_name='ftrace_event',
+    parent=RAW_TABLE,
+    columns=[],
+    tabledoc=TableDoc(
+        doc='''
+      Contains all the ftrace events in the trace. This table exists only for
+      debugging purposes and should not be relied on in production usecases
+      (i.e. metrics, standard library etc). Note also that this table might
+      be empty if raw ftrace parsing has been disabled.
+    ''',
+        group='Misc',
+        columns={}))
+
 ARG_TABLE = Table(
+    python_module=__file__,
     class_name='ArgTable',
     sql_name='internal_args',
     columns=[
@@ -206,6 +240,7 @@
         }))
 
 METADATA_TABLE = Table(
+    python_module=__file__,
     class_name='MetadataTable',
     sql_name='metadata',
     columns=[
@@ -225,6 +260,7 @@
         }))
 
 FILEDESCRIPTOR_TABLE = Table(
+    python_module=__file__,
     class_name='FiledescriptorTable',
     sql_name='filedescriptor',
     columns=[
@@ -261,6 +297,7 @@
         }))
 
 EXP_MISSING_CHROME_PROC_TABLE = Table(
+    python_module=__file__,
     class_name='ExpMissingChromeProcTable',
     sql_name='experimental_missing_chrome_processes',
     columns=[
@@ -278,6 +315,7 @@
         }))
 
 CPU_TABLE = Table(
+    python_module=__file__,
     class_name='CpuTable',
     sql_name='cpu',
     columns=[
@@ -298,6 +336,7 @@
         }))
 
 CPU_FREQ_TABLE = Table(
+    python_module=__file__,
     class_name='CpuFreqTable',
     sql_name='cpu_freq',
     columns=[
@@ -311,6 +350,7 @@
         }))
 
 CLOCK_SNAPSHOT_TABLE = Table(
+    python_module=__file__,
     class_name='ClockSnapshotTable',
     sql_name='clock_snapshot',
     columns=[
@@ -344,7 +384,15 @@
 
 # Keep this list sorted.
 ALL_TABLES = [
-    ARG_TABLE, CLOCK_SNAPSHOT_TABLE, CPU_FREQ_TABLE, CPU_TABLE,
-    EXP_MISSING_CHROME_PROC_TABLE, FILEDESCRIPTOR_TABLE, METADATA_TABLE,
-    PROCESS_TABLE, RAW_TABLE, THREAD_TABLE
+    ARG_TABLE,
+    CLOCK_SNAPSHOT_TABLE,
+    CPU_FREQ_TABLE,
+    CPU_TABLE,
+    EXP_MISSING_CHROME_PROC_TABLE,
+    FILEDESCRIPTOR_TABLE,
+    METADATA_TABLE,
+    PROCESS_TABLE,
+    RAW_TABLE,
+    THREAD_TABLE,
+    FTRACE_EVENT_TABLE,
 ]
diff --git a/src/trace_processor/tables/profiler_tables.h b/src/trace_processor/tables/profiler_tables.h
deleted file mode 100644
index f0e84b2..0000000
--- a/src/trace_processor/tables/profiler_tables.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SRC_TRACE_PROCESSOR_TABLES_PROFILER_TABLES_H_
-#define SRC_TRACE_PROCESSOR_TABLES_PROFILER_TABLES_H_
-
-#include "src/trace_processor/tables/macros.h"
-#include "src/trace_processor/tables/track_tables_py.h"
-
-namespace perfetto {
-namespace trace_processor {
-namespace tables {
-
-// A callsite. This is a list of frames that were on the stack.
-// This is generated by the stack profilers: heapprofd and traced_perf.
-// @param depth distance from the bottom-most frame of the callstack.
-// @param parent_id parent frame on the callstack. NULL for the bottom-most.
-// @param frame_id frame at this position in the callstack.
-// @tablegroup Callstack profilers
-#define PERFETTO_TP_STACK_PROFILE_CALLSITE_DEF(NAME, PARENT, C) \
-  NAME(StackProfileCallsiteTable, "stack_profile_callsite")     \
-  PERFETTO_TP_ROOT_TABLE(PARENT, C)                             \
-  C(uint32_t, depth)                                            \
-  C(std::optional<StackProfileCallsiteTable::Id>, parent_id)    \
-  C(StackProfileFrameTable::Id, frame_id)
-
-}  // namespace tables
-}  // namespace trace_processor
-}  // namespace perfetto
-
-#endif  // SRC_TRACE_PROCESSOR_TABLES_PROFILER_TABLES_H_
diff --git a/src/trace_processor/tables/profiler_tables.py b/src/trace_processor/tables/profiler_tables.py
index d428009..c712adf 100644
--- a/src/trace_processor/tables/profiler_tables.py
+++ b/src/trace_processor/tables/profiler_tables.py
@@ -28,6 +28,7 @@
 from src.trace_processor.tables.track_tables import TRACK_TABLE
 
 PROFILER_SMAPS_TABLE = Table(
+    python_module=__file__,
     class_name='ProfilerSmapsTable',
     sql_name='profiler_smaps',
     columns=[
@@ -94,6 +95,7 @@
         }))
 
 PACKAGE_LIST_TABLE = Table(
+    python_module=__file__,
     class_name='PackageListTable',
     sql_name='package_list',
     columns=[
@@ -123,6 +125,7 @@
         }))
 
 STACK_PROFILE_MAPPING_TABLE = Table(
+    python_module=__file__,
     class_name='StackProfileMappingTable',
     sql_name='stack_profile_mapping',
     columns=[
@@ -151,6 +154,7 @@
         }))
 
 STACK_PROFILE_FRAME_TABLE = Table(
+    python_module=__file__,
     class_name='StackProfileFrameTable',
     sql_name='stack_profile_frame',
     columns=[
@@ -181,6 +185,7 @@
         }))
 
 STACK_PROFILE_CALLSITE_TABLE = Table(
+    python_module=__file__,
     class_name='StackProfileCallsiteTable',
     sql_name='stack_profile_callsite',
     columns=[
@@ -204,6 +209,7 @@
         }))
 
 STACK_SAMPLE_TABLE = Table(
+    python_module=__file__,
     class_name='StackSampleTable',
     sql_name='stack_sample',
     columns=[
@@ -221,6 +227,7 @@
         }))
 
 CPU_PROFILE_STACK_SAMPLE_TABLE = Table(
+    python_module=__file__,
     class_name='CpuProfileStackSampleTable',
     sql_name='cpu_profile_stack_sample',
     columns=[
@@ -239,6 +246,7 @@
         }))
 
 PERF_SAMPLE_TABLE = Table(
+    python_module=__file__,
     class_name='PerfSampleTable',
     sql_name='perf_sample',
     columns=[
@@ -278,6 +286,7 @@
         }))
 
 SYMBOL_TABLE = Table(
+    python_module=__file__,
     class_name='SymbolTable',
     sql_name='stack_profile_symbol',
     columns=[
@@ -323,6 +332,7 @@
         }))
 
 HEAP_PROFILE_ALLOCATION_TABLE = Table(
+    python_module=__file__,
     class_name='HeapProfileAllocationTable',
     sql_name='heap_profile_allocation',
     columns=[
@@ -367,6 +377,7 @@
         }))
 
 EXPERIMENTAL_FLAMEGRAPH_NODES_TABLE = Table(
+    python_module=__file__,
     class_name='ExperimentalFlamegraphNodesTable',
     sql_name='experimental_flamegraph_nodes',
     columns=[
@@ -421,6 +432,7 @@
         }))
 
 HEAP_GRAPH_CLASS_TABLE = Table(
+    python_module=__file__,
     class_name='HeapGraphClassTable',
     sql_name='heap_graph_class',
     columns=[
@@ -455,6 +467,7 @@
         }))
 
 HEAP_GRAPH_OBJECT_TABLE = Table(
+    python_module=__file__,
     class_name='HeapGraphObjectTable',
     sql_name='heap_graph_object',
     columns=[
@@ -500,6 +513,7 @@
         }))
 
 HEAP_GRAPH_REFERENCE_TABLE = Table(
+    python_module=__file__,
     class_name='HeapGraphReferenceTable',
     sql_name='heap_graph_reference',
     columns=[
@@ -537,6 +551,7 @@
         }))
 
 VULKAN_MEMORY_ALLOCATIONS_TABLE = Table(
+    python_module=__file__,
     class_name='VulkanMemoryAllocationsTable',
     sql_name='vulkan_memory_allocations',
     columns=[
@@ -576,6 +591,7 @@
         }))
 
 GPU_COUNTER_GROUP_TABLE = Table(
+    python_module=__file__,
     class_name='GpuCounterGroupTable',
     sql_name='gpu_counter_group',
     columns=[
diff --git a/src/trace_processor/tables/macros_benchmark.cc b/src/trace_processor/tables/py_tables_benchmark.cc
similarity index 89%
rename from src/trace_processor/tables/macros_benchmark.cc
rename to src/trace_processor/tables/py_tables_benchmark.cc
index c946696..45a96e8 100644
--- a/src/trace_processor/tables/macros_benchmark.cc
+++ b/src/trace_processor/tables/py_tables_benchmark.cc
@@ -16,35 +16,16 @@
 
 #include <benchmark/benchmark.h>
 
-#include "src/trace_processor/tables/macros.h"
+#include "src/trace_processor/tables/py_tables_benchmark_py.h"
 
 namespace perfetto {
 namespace trace_processor {
-namespace {
-
-#define PERFETTO_TP_ROOT_TEST_TABLE(NAME, PARENT, C) \
-  NAME(RootTestTable, "root_table")                  \
-  PERFETTO_TP_ROOT_TABLE(PARENT, C)                  \
-  C(uint32_t, root_sorted, Column::Flag::kSorted)    \
-  C(uint32_t, root_non_null)                         \
-  C(uint32_t, root_non_null_2)                       \
-  C(std::optional<uint32_t>, root_nullable)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_ROOT_TEST_TABLE);
-
-#define PERFETTO_TP_CHILD_TABLE(NAME, PARENT, C)   \
-  NAME(ChildTestTable, "child_table")              \
-  PARENT(PERFETTO_TP_ROOT_TEST_TABLE, C)           \
-  C(uint32_t, child_sorted, Column::Flag::kSorted) \
-  C(uint32_t, child_non_null)                      \
-  C(std::optional<uint32_t>, child_nullable)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_CHILD_TABLE);
+namespace tables {
 
 RootTestTable::~RootTestTable() = default;
 ChildTestTable::~ChildTestTable() = default;
 
-}  // namespace
+}  // namespace tables
 }  // namespace trace_processor
 }  // namespace perfetto
 
@@ -74,16 +55,16 @@
 
 }  // namespace
 
-using perfetto::trace_processor::ChildTestTable;
-using perfetto::trace_processor::RootTestTable;
 using perfetto::trace_processor::RowMap;
 using perfetto::trace_processor::SqlValue;
 using perfetto::trace_processor::StringPool;
 using perfetto::trace_processor::Table;
+using perfetto::trace_processor::tables::ChildTestTable;
+using perfetto::trace_processor::tables::RootTestTable;
 
 static void BM_TableInsert(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   for (auto _ : state) {
     benchmark::DoNotOptimize(root.Insert({}));
@@ -93,7 +74,7 @@
 
 static void BM_TableIteratorChild(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -116,7 +97,7 @@
 
 static void BM_TableFilterAndSortRoot(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
   uint32_t partitions = 8;
@@ -140,7 +121,7 @@
 
 static void BM_TableFilterRootId(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
   for (uint32_t i = 0; i < size; ++i)
@@ -154,7 +135,7 @@
 
 static void BM_TableFilterRootIdAndOther(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
 
@@ -173,7 +154,7 @@
 
 static void BM_TableFilterChildId(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -190,7 +171,7 @@
 
 static void BM_TableFilterChildIdAndSortedInRoot(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -213,7 +194,7 @@
 
 static void BM_TableFilterRootNonNullEqMatchMany(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
   uint32_t partitions = size / 1024;
@@ -232,7 +213,7 @@
 
 static void BM_TableFilterRootMultipleNonNull(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
   uint32_t partitions = size / 512;
@@ -254,7 +235,7 @@
 
 static void BM_TableFilterRootNullableEqMatchMany(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
   uint32_t partitions = size / 512;
@@ -277,7 +258,7 @@
 
 static void BM_TableFilterChildNonNullEqMatchMany(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -299,7 +280,7 @@
 
 static void BM_TableFilterChildNullableEqMatchMany(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -325,7 +306,7 @@
 static void BM_TableFilterChildNonNullEqMatchManyInParent(
     benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -349,7 +330,7 @@
 static void BM_TableFilterChildNullableEqMatchManyInParent(
     benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -372,7 +353,7 @@
 
 static void BM_TableFilterParentSortedEq(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
 
@@ -390,7 +371,7 @@
 
 static void BM_TableFilterParentSortedAndOther(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
 
@@ -415,7 +396,7 @@
 
 static void BM_TableFilterChildSortedEq(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -435,7 +416,7 @@
 
 static void BM_TableFilterChildSortedEqInParent(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -458,7 +439,7 @@
 
 static void BM_TableSortRootNonNull(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
 
@@ -479,7 +460,7 @@
 
 static void BM_TableSortRootNullable(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
 
@@ -501,7 +482,7 @@
 
 static void BM_TableSortChildNonNullInParent(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
@@ -529,7 +510,7 @@
 
 static void BM_TableSortChildNullableInParent(benchmark::State& state) {
   StringPool pool;
-  RootTestTable root(&pool, nullptr);
+  RootTestTable root(&pool);
   ChildTestTable child(&pool, &root);
 
   uint32_t size = static_cast<uint32_t>(state.range(0));
diff --git a/src/trace_processor/tables/py_tables_benchmark.py b/src/trace_processor/tables/py_tables_benchmark.py
new file mode 100644
index 0000000..8a2c1f9
--- /dev/null
+++ b/src/trace_processor/tables/py_tables_benchmark.py
@@ -0,0 +1,48 @@
+# Copyright (C) 2022 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Contains tables for unittesting."""
+
+from python.generators.trace_processor_table.public import Column as C
+from python.generators.trace_processor_table.public import ColumnFlag
+from python.generators.trace_processor_table.public import Table
+from python.generators.trace_processor_table.public import CppOptional
+from python.generators.trace_processor_table.public import CppUint32
+
+ROOT_TABLE = Table(
+    python_module=__file__,
+    class_name="RootTestTable",
+    sql_name="root_table",
+    columns=[
+        C("root_sorted", CppUint32(), flags=ColumnFlag.SORTED),
+        C("root_non_null", CppUint32()),
+        C("root_non_null_2", CppUint32()),
+        C("root_nullable", CppOptional(CppUint32())),
+    ])
+
+CHILD_TABLE = Table(
+    python_module=__file__,
+    class_name="ChildTestTable",
+    sql_name="child_table",
+    parent=ROOT_TABLE,
+    columns=[
+        C("child_sorted", CppUint32(), flags=ColumnFlag.SORTED),
+        C("child_non_null", CppUint32()),
+        C("child_nullable", CppOptional(CppUint32())),
+    ])
+
+# Keep this list sorted.
+ALL_TABLES = [
+    ROOT_TABLE,
+    CHILD_TABLE,
+]
diff --git a/src/trace_processor/tables/py_tables_unittest.cc b/src/trace_processor/tables/py_tables_unittest.cc
index 71b5f39..36facd6 100644
--- a/src/trace_processor/tables/py_tables_unittest.cc
+++ b/src/trace_processor/tables/py_tables_unittest.cc
@@ -15,6 +15,7 @@
  */
 
 #include "src/trace_processor/db/column.h"
+#include "src/trace_processor/db/column_storage.h"
 #include "src/trace_processor/tables/py_tables_unittest_py.h"
 
 #include "test/gtest_and_gmock.h"
@@ -24,6 +25,7 @@
 namespace tables {
 
 TestEventTable::~TestEventTable() = default;
+TestEventChildTable::~TestEventChildTable() = default;
 TestSliceTable::~TestSliceTable() = default;
 TestArgsTable::~TestArgsTable() = default;
 
@@ -34,6 +36,7 @@
   StringPool pool_;
 
   TestEventTable event_{&pool_};
+  TestEventChildTable event_child_{&pool_, &event_};
   TestSliceTable slice_{&pool_, &event_};
   TestArgsTable args_{&pool_};
 };
@@ -163,6 +166,150 @@
   ASSERT_EQ(slice_.dur()[1], 20);
 }
 
+TEST_F(PyTablesUnittest, Extend) {
+  event_.Insert(TestEventTable::Row(50, 0));
+  event_.Insert(TestEventTable::Row(100, 1));
+  event_.Insert(TestEventTable::Row(150, 2));
+
+  ColumnStorage<int64_t> dur;
+  dur.Append(512);
+  dur.Append(1024);
+  dur.Append(2048);
+
+  auto slice_ext = TestSliceTable::ExtendParent(event_, std::move(dur));
+  ASSERT_EQ(slice_ext->row_count(), 3u);
+  ASSERT_EQ(
+      slice_ext->columns()[TestSliceTable::ColumnIndex::ts].Get(0).AsLong(),
+      50);
+  ASSERT_EQ(
+      slice_ext->columns()[TestSliceTable::ColumnIndex::dur].Get(0).AsLong(),
+      512);
+  ASSERT_EQ(
+      slice_ext->columns()[TestSliceTable::ColumnIndex::ts].Get(1).AsLong(),
+      100);
+  ASSERT_EQ(
+      slice_ext->columns()[TestSliceTable::ColumnIndex::dur].Get(1).AsLong(),
+      1024);
+  ASSERT_EQ(
+      slice_ext->columns()[TestSliceTable::ColumnIndex::ts].Get(2).AsLong(),
+      150);
+  ASSERT_EQ(
+      slice_ext->columns()[TestSliceTable::ColumnIndex::dur].Get(2).AsLong(),
+      2048);
+}
+
+TEST_F(PyTablesUnittest, SelectAndExtend) {
+  event_.Insert(TestEventTable::Row(50, 0));
+  event_.Insert(TestEventTable::Row(100, 1));
+  event_.Insert(TestEventTable::Row(150, 2));
+
+  std::vector<TestEventTable::RowNumber> rows;
+  rows.emplace_back(TestEventTable::RowNumber(1));
+  ColumnStorage<int64_t> dur;
+  dur.Append(1024);
+
+  auto slice_ext = TestSliceTable::SelectAndExtendParent(
+      event_, std::move(rows), std::move(dur));
+  ASSERT_EQ(slice_ext->row_count(), 1u);
+  ASSERT_EQ(
+      slice_ext->columns()[TestSliceTable::ColumnIndex::ts].Get(0).AsLong(),
+      100);
+  ASSERT_EQ(
+      slice_ext->columns()[TestSliceTable::ColumnIndex::dur].Get(0).AsLong(),
+      1024);
+}
+
+TEST_F(PyTablesUnittest, SetIdColumns) {
+  StringPool pool;
+  TestArgsTable table{&pool};
+
+  table.Insert(TestArgsTable::Row(0, 100));
+  table.Insert(TestArgsTable::Row(0, 200));
+  table.Insert(TestArgsTable::Row(2, 200));
+  table.Insert(TestArgsTable::Row(3, 300));
+  table.Insert(TestArgsTable::Row(4, 200));
+  table.Insert(TestArgsTable::Row(4, 500));
+  table.Insert(TestArgsTable::Row(4, 900));
+  table.Insert(TestArgsTable::Row(4, 200));
+  table.Insert(TestArgsTable::Row(8, 400));
+
+  ASSERT_EQ(table.row_count(), 9u);
+  ASSERT_TRUE(table.arg_set_id().IsSetId());
+
+  // Verify that not-present ids are not returned.
+  {
+    static constexpr uint32_t kFilterArgSetId = 1;
+    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
+    ASSERT_EQ(res.row_count(), 0u);
+  }
+  {
+    static constexpr uint32_t kFilterArgSetId = 9;
+    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
+    ASSERT_EQ(res.row_count(), 0u);
+  }
+
+  // Verify that kSetId flag is correctly removed after filtering/sorting.
+  {
+    static constexpr uint32_t kFilterArgSetId = 3;
+    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
+    ASSERT_EQ(res.row_count(), 1u);
+    ASSERT_FALSE(res.GetColumnByName("arg_set_id")->IsSetId());
+  }
+  {
+    auto res = table.Sort({table.type().descending()});
+    ASSERT_FALSE(res.GetColumnByName("arg_set_id")->IsSetId());
+  }
+
+  uint32_t arg_set_id_col_idx =
+      static_cast<uint32_t>(TestArgsTable::ColumnIndex::arg_set_id);
+
+  // Verify that filtering equality for real arg set ids works as expected.
+  {
+    static constexpr uint32_t kFilterArgSetId = 4;
+    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
+    ASSERT_EQ(res.row_count(), 4u);
+    for (auto it = res.IterateRows(); it; it.Next()) {
+      uint32_t arg_set_id =
+          static_cast<uint32_t>(it.Get(arg_set_id_col_idx).AsLong());
+      ASSERT_EQ(arg_set_id, kFilterArgSetId);
+    }
+  }
+  {
+    static constexpr uint32_t kFilterArgSetId = 0;
+    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
+    ASSERT_EQ(res.row_count(), 2u);
+    for (auto it = res.IterateRows(); it; it.Next()) {
+      uint32_t arg_set_id =
+          static_cast<uint32_t>(it.Get(arg_set_id_col_idx).AsLong());
+      ASSERT_EQ(arg_set_id, kFilterArgSetId);
+    }
+  }
+  {
+    static constexpr uint32_t kFilterArgSetId = 8;
+    auto res = table.Filter({table.arg_set_id().eq(kFilterArgSetId)});
+    ASSERT_EQ(res.row_count(), 1u);
+    for (auto it = res.IterateRows(); it; it.Next()) {
+      uint32_t arg_set_id =
+          static_cast<uint32_t>(it.Get(arg_set_id_col_idx).AsLong());
+      ASSERT_EQ(arg_set_id, kFilterArgSetId);
+    }
+  }
+
+  // Verify that filtering equality for arg set ids after filtering another
+  // column works.
+  {
+    static constexpr uint32_t kFilterArgSetId = 4;
+    auto res = table.Filter(
+        {table.int_value().eq(200), table.arg_set_id().eq(kFilterArgSetId)});
+    ASSERT_EQ(res.row_count(), 2u);
+    for (auto it = res.IterateRows(); it; it.Next()) {
+      uint32_t arg_set_id =
+          static_cast<uint32_t>(it.Get(arg_set_id_col_idx).AsLong());
+      ASSERT_EQ(arg_set_id, kFilterArgSetId);
+    }
+  }
+}
+
 }  // namespace
 }  // namespace tables
 }  // namespace trace_processor
diff --git a/src/trace_processor/tables/py_tables_unittest.py b/src/trace_processor/tables/py_tables_unittest.py
index 24cb17c..8acc688 100644
--- a/src/trace_processor/tables/py_tables_unittest.py
+++ b/src/trace_processor/tables/py_tables_unittest.py
@@ -17,40 +17,48 @@
 from python.generators.trace_processor_table.public import ColumnFlag
 from python.generators.trace_processor_table.public import CppInt64
 from python.generators.trace_processor_table.public import Table
-from python.generators.trace_processor_table.public import TableDoc
 from python.generators.trace_processor_table.public import CppUint32
 
 EVENT_TABLE = Table(
+    python_module=__file__,
     class_name="TestEventTable",
     sql_name="event",
     columns=[
         C("ts", CppInt64(), flags=ColumnFlag.SORTED),
         C("arg_set_id", CppUint32()),
-    ],
-    tabledoc=TableDoc(doc='', group='', columns={}))
+    ])
+
+EVENT_CHILD_TABLE = Table(
+    python_module=__file__,
+    class_name="TestEventChildTable",
+    sql_name="event",
+    parent=EVENT_TABLE,
+    columns=[])
 
 SLICE_TABLE = Table(
+    python_module=__file__,
     class_name="TestSliceTable",
     sql_name="slice",
     parent=EVENT_TABLE,
     columns=[
         C("dur", CppInt64()),
-    ],
-    tabledoc=TableDoc(doc='', group='', columns={}))
+    ])
 
 ARGS_TABLE = Table(
+    python_module=__file__,
     class_name="TestArgsTable",
     sql_name="args",
     columns=[
         C("arg_set_id",
           CppUint32(),
           flags=ColumnFlag.SET_ID | ColumnFlag.SORTED),
-    ],
-    tabledoc=TableDoc(doc='', group='', columns={}))
+        C("int_value", CppInt64()),
+    ])
 
 # Keep this list sorted.
 ALL_TABLES = [
     ARGS_TABLE,
     EVENT_TABLE,
+    EVENT_CHILD_TABLE,
     SLICE_TABLE,
 ]
diff --git a/src/trace_processor/tables/slice_tables.h b/src/trace_processor/tables/slice_tables.h
deleted file mode 100644
index e33ae19..0000000
--- a/src/trace_processor/tables/slice_tables.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SRC_TRACE_PROCESSOR_TABLES_SLICE_TABLES_H_
-#define SRC_TRACE_PROCESSOR_TABLES_SLICE_TABLES_H_
-
-#include "src/trace_processor/tables/macros.h"
-#include "src/trace_processor/tables/track_tables_py.h"
-
-namespace perfetto {
-namespace trace_processor {
-namespace tables {
-
-#define PERFETTO_TP_SLICE_TABLE_DEF(NAME, PARENT, C)  \
-  NAME(SliceTable, "internal_slice")                  \
-  PERFETTO_TP_ROOT_TABLE(PARENT, C)                   \
-  C(int64_t, ts, Column::Flag::kSorted)               \
-  C(int64_t, dur)                                     \
-  C(TrackTable::Id, track_id)                         \
-  C(std::optional<StringPool::Id>, category)          \
-  C(std::optional<StringPool::Id>, name)              \
-  C(uint32_t, depth)                                  \
-  C(int64_t, stack_id)                                \
-  C(int64_t, parent_stack_id)                         \
-  C(std::optional<SliceTable::Id>, parent_id)         \
-  C(uint32_t, arg_set_id)                             \
-  C(std::optional<int64_t>, thread_ts)                \
-  C(std::optional<int64_t>, thread_dur)               \
-  C(std::optional<int64_t>, thread_instruction_count) \
-  C(std::optional<int64_t>, thread_instruction_delta)
-
-#define PERFETTO_TP_SCHED_SLICE_TABLE_DEF(NAME, PARENT, C) \
-  NAME(SchedSliceTable, "sched_slice")                     \
-  PERFETTO_TP_ROOT_TABLE(PARENT, C)                        \
-  C(int64_t, ts, Column::Flag::kSorted)                    \
-  C(int64_t, dur)                                          \
-  C(uint32_t, cpu)                                         \
-  C(uint32_t, utid)                                        \
-  C(StringPool::Id, end_state)                             \
-  C(int32_t, priority)
-
-}  // namespace tables
-}  // namespace trace_processor
-}  // namespace perfetto
-
-#endif  // SRC_TRACE_PROCESSOR_TABLES_SLICE_TABLES_H_
diff --git a/src/trace_processor/tables/slice_tables.py b/src/trace_processor/tables/slice_tables.py
index 50b8c3e..22bd9b3 100644
--- a/src/trace_processor/tables/slice_tables.py
+++ b/src/trace_processor/tables/slice_tables.py
@@ -29,6 +29,7 @@
 from src.trace_processor.tables.track_tables import TRACK_TABLE
 
 SLICE_TABLE = Table(
+    python_module=__file__,
     class_name='SliceTable',
     sql_name='internal_slice',
     columns=[
@@ -69,6 +70,7 @@
         }))
 
 SCHED_SLICE_TABLE = Table(
+    python_module=__file__,
     class_name='SchedSliceTable',
     sql_name='sched_slice',
     columns=[
@@ -108,6 +110,7 @@
         }))
 
 THREAD_STATE_TABLE = Table(
+    python_module=__file__,
     class_name='ThreadStateTable',
     sql_name='thread_state',
     columns=[
@@ -135,6 +138,7 @@
         }))
 
 GPU_SLICE_TABLE = Table(
+    python_module=__file__,
     class_name='GpuSliceTable',
     sql_name='gpu_slice',
     columns=[
@@ -169,6 +173,7 @@
         }))
 
 GRAPHICS_FRAME_SLICE_TABLE = Table(
+    python_module=__file__,
     class_name='GraphicsFrameSliceTable',
     sql_name='frame_slice',
     columns=[
@@ -191,6 +196,7 @@
         }))
 
 EXPECTED_FRAME_TIMELINE_SLICE_TABLE = Table(
+    python_module=__file__,
     class_name='ExpectedFrameTimelineSliceTable',
     sql_name='expected_frame_timeline_slice',
     columns=[
@@ -211,6 +217,7 @@
         }))
 
 ACTUAL_FRAME_TIMELINE_SLICE_TABLE = Table(
+    python_module=__file__,
     class_name='ActualFrameTimelineSliceTable',
     sql_name='actual_frame_timeline_slice',
     columns=[
@@ -243,6 +250,7 @@
         }))
 
 EXPERIMENTAL_FLAT_SLICE_TABLE = Table(
+    python_module=__file__,
     class_name='ExperimentalFlatSliceTable',
     sql_name='experimental_flat_slice',
     columns=[
diff --git a/src/trace_processor/tables/table_destructors.cc b/src/trace_processor/tables/table_destructors.cc
index 5025ab3..3dcf113 100644
--- a/src/trace_processor/tables/table_destructors.cc
+++ b/src/trace_processor/tables/table_destructors.cc
@@ -42,6 +42,7 @@
 
 // metadata_tables_py.h
 RawTable::~RawTable() = default;
+FtraceEventTable::~FtraceEventTable() = default;
 ArgTable::~ArgTable() = default;
 ExpMissingChromeProcTable::~ExpMissingChromeProcTable() = default;
 MetadataTable::~MetadataTable() = default;
diff --git a/src/trace_processor/tables/trace_proto_tables.h b/src/trace_processor/tables/trace_proto_tables.h
deleted file mode 100644
index aa57b59..0000000
--- a/src/trace_processor/tables/trace_proto_tables.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SRC_TRACE_PROCESSOR_TABLES_TRACE_PROTO_TABLES_H_
-#define SRC_TRACE_PROCESSOR_TABLES_TRACE_PROTO_TABLES_H_
-
-#include "src/trace_processor/tables/macros.h"
-
-namespace perfetto {
-namespace trace_processor {
-namespace tables {
-
-// Experimental table, subject to arbitrary breaking changes.
-#define PERFETTO_TP_EXPERIMENTAL_PROTO_PATH_TABLE_DEF(NAME, PARENT, C) \
-  NAME(ExperimentalProtoPathTable, "experimental_proto_path")          \
-  PERFETTO_TP_ROOT_TABLE(PARENT, C)                                    \
-  C(std::optional<ExperimentalProtoPathTable::Id>, parent_id)          \
-  C(StringPool::Id, field_type)                                        \
-  C(std::optional<StringPool::Id>, field_name)                         \
-  C(std::optional<uint32_t>, arg_set_id)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_EXPERIMENTAL_PROTO_PATH_TABLE_DEF);
-
-#define PERFETTO_TP_EXPERIMENTAL_PROTO_CONTENT_TABLE_DEF(NAME, PARENT, C) \
-  NAME(ExperimentalProtoContentTable, "experimental_proto_content")       \
-  PERFETTO_TP_ROOT_TABLE(PARENT, C)                                       \
-  C(StringPool::Id, path)                                                 \
-  C(ExperimentalProtoPathTable::Id, path_id)                              \
-  C(int64_t, total_size)                                                  \
-  C(int64_t, size)                                                        \
-  C(int64_t, count)
-
-PERFETTO_TP_TABLE(PERFETTO_TP_EXPERIMENTAL_PROTO_CONTENT_TABLE_DEF);
-
-}  // namespace tables
-}  // namespace trace_processor
-}  // namespace perfetto
-
-#endif  // SRC_TRACE_PROCESSOR_TABLES_TRACE_PROTO_TABLES_H_
diff --git a/src/trace_processor/tables/trace_proto_tables.py b/src/trace_processor/tables/trace_proto_tables.py
index f6f5f9d..e9c9754 100644
--- a/src/trace_processor/tables/trace_proto_tables.py
+++ b/src/trace_processor/tables/trace_proto_tables.py
@@ -24,6 +24,7 @@
 from python.generators.trace_processor_table.public import CppUint32
 
 EXPERIMENTAL_PROTO_PATH_TABLE = Table(
+    python_module=__file__,
     class_name='ExperimentalProtoPathTable',
     sql_name='experimental_proto_path',
     columns=[
@@ -45,6 +46,7 @@
         }))
 
 EXPERIMENTAL_PROTO_CONTENT_TABLE = Table(
+    python_module=__file__,
     class_name='ExperimentalProtoContentTable',
     sql_name='experimental_proto_content',
     columns=[
diff --git a/src/trace_processor/tables/track_tables.py b/src/trace_processor/tables/track_tables.py
index bb5a0df..3cbce76 100644
--- a/src/trace_processor/tables/track_tables.py
+++ b/src/trace_processor/tables/track_tables.py
@@ -25,6 +25,7 @@
 from python.generators.trace_processor_table.public import CppUint32
 
 TRACK_TABLE = Table(
+    python_module=__file__,
     class_name="TrackTable",
     sql_name="track",
     columns=[
@@ -62,6 +63,7 @@
         }))
 
 PROCESS_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name="ProcessTrackTable",
     sql_name="process_track",
     columns=[
@@ -81,6 +83,7 @@
         }))
 
 THREAD_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='ThreadTrackTable',
     sql_name='thread_track',
     columns=[
@@ -101,6 +104,7 @@
         }))
 
 CPU_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='CpuTrackTable',
     sql_name='cpu_track',
     columns=[
@@ -113,6 +117,7 @@
         columns={'cpu': 'The CPU associated with this track'}))
 
 GPU_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='GpuTrackTable',
     sql_name='gpu_track',
     columns=[
@@ -134,6 +139,7 @@
         }))
 
 COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='CounterTrackTable',
     sql_name='counter_track',
     columns=[
@@ -156,6 +162,7 @@
         }))
 
 THREAD_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='ThreadCounterTrackTable',
     sql_name='thread_counter_track',
     columns=[
@@ -174,6 +181,7 @@
         }))
 
 PROCESS_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='ProcessCounterTrackTable',
     sql_name='process_counter_track',
     columns=[
@@ -193,6 +201,7 @@
         }))
 
 CPU_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='CpuCounterTrackTable',
     sql_name='cpu_counter_track',
     columns=[
@@ -205,6 +214,7 @@
         columns={'cpu': 'The CPU this track is associated with'}))
 
 IRQ_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='IrqCounterTrackTable',
     sql_name='irq_counter_track',
     columns=[
@@ -217,6 +227,7 @@
         columns={'irq': 'The identifier for the hardirq.'}))
 
 SOFTIRQ_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='SoftirqCounterTrackTable',
     sql_name='softirq_counter_track',
     columns=[
@@ -229,6 +240,7 @@
         columns={'softirq': 'The identifier for the softirq.'}))
 
 GPU_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='GpuCounterTrackTable',
     sql_name='gpu_counter_track',
     columns=[
@@ -241,6 +253,7 @@
         columns={'gpu_id': 'The identifier for the GPU.'}))
 
 PERF_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='PerfCounterTrackTable',
     sql_name='perf_counter_track',
     columns=[
@@ -265,6 +278,7 @@
         }))
 
 ENERGY_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='EnergyCounterTrackTable',
     sql_name='energy_counter_track',
     columns=[
@@ -286,6 +300,7 @@
         }))
 
 UID_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='UidCounterTrackTable',
     sql_name='uid_counter_track',
     columns=[
@@ -298,6 +313,7 @@
         columns={'uid': 'uid of process for which breakdowns are emitted'}))
 
 ENERGY_PER_UID_COUNTER_TRACK_TABLE = Table(
+    python_module=__file__,
     class_name='EnergyPerUidCounterTrackTable',
     sql_name='energy_per_uid_counter_track',
     columns=[
diff --git a/src/trace_processor/trace_processor_context.cc b/src/trace_processor/trace_processor_context.cc
index b407e19..34da487 100644
--- a/src/trace_processor/trace_processor_context.cc
+++ b/src/trace_processor/trace_processor_context.cc
@@ -21,6 +21,7 @@
 #include "src/trace_processor/importers/common/args_translation_table.h"
 #include "src/trace_processor/importers/common/async_track_set_tracker.h"
 #include "src/trace_processor/importers/common/chunked_trace_reader.h"
+#include "src/trace_processor/importers/common/clock_converter.h"
 #include "src/trace_processor/importers/common/clock_tracker.h"
 #include "src/trace_processor/importers/common/deobfuscation_mapping_table.h"
 #include "src/trace_processor/importers/common/event_tracker.h"
diff --git a/src/trace_processor/trace_processor_impl.cc b/src/trace_processor/trace_processor_impl.cc
index 742d7a2..5e10fc1 100644
--- a/src/trace_processor/trace_processor_impl.cc
+++ b/src/trace_processor/trace_processor_impl.cc
@@ -32,6 +32,7 @@
 #include "perfetto/ext/base/string_utils.h"
 #include "perfetto/trace_processor/basic_types.h"
 #include "src/trace_processor/importers/android_bugreport/android_bugreport_parser.h"
+#include "src/trace_processor/importers/common/clock_converter.h"
 #include "src/trace_processor/importers/common/clock_tracker.h"
 #include "src/trace_processor/importers/common/metadata_tracker.h"
 #include "src/trace_processor/importers/ftrace/sched_event_tracker.h"
@@ -46,6 +47,7 @@
 #include "src/trace_processor/importers/proto/content_analyzer.h"
 #include "src/trace_processor/importers/systrace/systrace_trace_parser.h"
 #include "src/trace_processor/iterator_impl.h"
+#include "src/trace_processor/prelude/functions/clock_functions.h"
 #include "src/trace_processor/prelude/functions/create_function.h"
 #include "src/trace_processor/prelude/functions/create_view_function.h"
 #include "src/trace_processor/prelude/functions/import.h"
@@ -54,6 +56,7 @@
 #include "src/trace_processor/prelude/functions/register_function.h"
 #include "src/trace_processor/prelude/functions/sqlite3_str_split.h"
 #include "src/trace_processor/prelude/functions/stack_functions.h"
+#include "src/trace_processor/prelude/functions/to_ftrace.h"
 #include "src/trace_processor/prelude/functions/utils.h"
 #include "src/trace_processor/prelude/functions/window_functions.h"
 #include "src/trace_processor/prelude/operators/span_join_operator.h"
@@ -69,9 +72,9 @@
 #include "src/trace_processor/prelude/table_functions/experimental_slice_layout.h"
 #include "src/trace_processor/prelude/table_functions/table_function.h"
 #include "src/trace_processor/prelude/table_functions/view.h"
+#include "src/trace_processor/prelude/tables_views/tables_views.h"
 #include "src/trace_processor/sqlite/scoped_db.h"
 #include "src/trace_processor/sqlite/sql_stats_table.h"
-#include "src/trace_processor/sqlite/sqlite_raw_table.h"
 #include "src/trace_processor/sqlite/sqlite_table.h"
 #include "src/trace_processor/sqlite/sqlite_utils.h"
 #include "src/trace_processor/sqlite/stats_table.h"
@@ -88,20 +91,12 @@
 #include "protos/perfetto/trace/trace_packet.pbzero.h"
 
 #include "src/trace_processor/metrics/all_chrome_metrics.descriptor.h"
+#include "src/trace_processor/metrics/all_webview_metrics.descriptor.h"
 #include "src/trace_processor/metrics/metrics.descriptor.h"
 #include "src/trace_processor/metrics/metrics.h"
 #include "src/trace_processor/metrics/sql/amalgamated_sql_metrics.h"
 #include "src/trace_processor/stdlib/amalgamated_stdlib.h"
 
-// In Android and Chromium tree builds, we don't have the percentile module.
-// Just don't include it.
-#if PERFETTO_BUILDFLAG(PERFETTO_TP_PERCENTILE)
-// defined in sqlite_src/ext/misc/percentile.c
-extern "C" int sqlite3_percentile_init(sqlite3* db,
-                                       char** error,
-                                       const sqlite3_api_routines* api);
-#endif  // PERFETTO_BUILDFLAG(PERFETTO_TP_PERCENTILE)
-
 namespace perfetto {
 namespace trace_processor {
 namespace {
@@ -122,24 +117,6 @@
     PERFETTO_ELOG("%s", status.c_message());
 }
 
-void InitializeSqlite(sqlite3* db) {
-  char* error = nullptr;
-  sqlite3_exec(db, "PRAGMA temp_store=2", nullptr, nullptr, &error);
-  if (error) {
-    PERFETTO_FATAL("Error setting pragma temp_store: %s", error);
-  }
-  sqlite3_str_split_init(db);
-// In Android tree builds, we don't have the percentile module.
-// Just don't include it.
-#if PERFETTO_BUILDFLAG(PERFETTO_TP_PERCENTILE)
-  sqlite3_percentile_init(db, &error, nullptr);
-  if (error) {
-    PERFETTO_ELOG("Error initializing: %s", error);
-    sqlite3_free(error);
-  }
-#endif
-}
-
 void BuildBoundsTable(sqlite3* db, std::pair<int64_t, int64_t> bounds) {
   char* error = nullptr;
   sqlite3_exec(db, "DELETE FROM trace_bounds", nullptr, nullptr, &error);
@@ -149,167 +126,16 @@
     return;
   }
 
-  char* insert_sql = sqlite3_mprintf("INSERT INTO trace_bounds VALUES(%" PRId64
-                                     ", %" PRId64 ")",
-                                     bounds.first, bounds.second);
-
-  sqlite3_exec(db, insert_sql, nullptr, nullptr, &error);
-  sqlite3_free(insert_sql);
+  base::StackString<1024> sql("INSERT INTO trace_bounds VALUES(%" PRId64
+                              ", %" PRId64 ")",
+                              bounds.first, bounds.second);
+  sqlite3_exec(db, sql.c_str(), nullptr, nullptr, &error);
   if (error) {
     PERFETTO_ELOG("Error inserting bounds table: %s", error);
     sqlite3_free(error);
   }
 }
 
-void CreateBuiltinTables(sqlite3* db) {
-  char* error = nullptr;
-  sqlite3_exec(db, "CREATE TABLE perfetto_tables(name STRING)", nullptr,
-               nullptr, &error);
-  if (error) {
-    PERFETTO_ELOG("Error initializing: %s", error);
-    sqlite3_free(error);
-  }
-  sqlite3_exec(db, "CREATE TABLE trace_bounds(start_ts BIGINT, end_ts BIGINT)",
-               nullptr, nullptr, &error);
-  if (error) {
-    PERFETTO_ELOG("Error initializing: %s", error);
-    sqlite3_free(error);
-  }
-  // Ensure that the entries in power_profile are unique to prevent duplicates
-  // when the power_profile is augmented with additional profiles.
-  sqlite3_exec(db,
-               "CREATE TABLE power_profile("
-               "device STRING, cpu INT, cluster INT, freq INT, power DOUBLE,"
-               "UNIQUE(device, cpu, cluster, freq));",
-               nullptr, nullptr, &error);
-  if (error) {
-    PERFETTO_ELOG("Error initializing: %s", error);
-    sqlite3_free(error);
-  }
-  sqlite3_exec(db, "CREATE TABLE trace_metrics(name STRING)", nullptr, nullptr,
-               &error);
-  if (error) {
-    PERFETTO_ELOG("Error initializing: %s", error);
-    sqlite3_free(error);
-  }
-  // This is a table intended to be used for metric debugging/developing. Data
-  // in the table is shown specially in the UI, and users can insert rows into
-  // this table to draw more things.
-  sqlite3_exec(db,
-               "CREATE TABLE debug_slices (id BIGINT, name STRING, ts BIGINT,"
-               "dur BIGINT, depth BIGINT)",
-               nullptr, nullptr, &error);
-  if (error) {
-    PERFETTO_ELOG("Error initializing: %s", error);
-    sqlite3_free(error);
-  }
-
-  // Initialize the bounds table with some data so even before parsing any data,
-  // we still have a valid table.
-  BuildBoundsTable(db, std::make_pair(0, 0));
-}
-
-void MaybeRegisterError(char* error) {
-  if (error) {
-    PERFETTO_ELOG("Error initializing: %s", error);
-    sqlite3_free(error);
-  }
-}
-
-void CreateBuiltinViews(sqlite3* db) {
-  char* error = nullptr;
-  sqlite3_exec(db,
-               "CREATE VIEW counters AS "
-               "SELECT * "
-               "FROM counter v "
-               "JOIN counter_track t "
-               "ON v.track_id = t.id "
-               "ORDER BY ts;",
-               nullptr, nullptr, &error);
-  MaybeRegisterError(error);
-
-  sqlite3_exec(db,
-               "CREATE VIEW slice AS "
-               "SELECT "
-               "  *, "
-               "  category AS cat, "
-               "  id AS slice_id "
-               "FROM internal_slice;",
-               nullptr, nullptr, &error);
-  MaybeRegisterError(error);
-
-  sqlite3_exec(db,
-               "CREATE VIEW instant AS "
-               "SELECT "
-               "ts, track_id, name, arg_set_id "
-               "FROM slice "
-               "WHERE dur = 0;",
-               nullptr, nullptr, &error);
-  MaybeRegisterError(error);
-
-  sqlite3_exec(db,
-               "CREATE VIEW sched AS "
-               "SELECT "
-               "*, "
-               "ts + dur as ts_end "
-               "FROM sched_slice;",
-               nullptr, nullptr, &error);
-  MaybeRegisterError(error);
-
-  sqlite3_exec(db,
-               "CREATE VIEW slices AS "
-               "SELECT * FROM slice;",
-               nullptr, nullptr, &error);
-  MaybeRegisterError(error);
-
-  sqlite3_exec(db,
-               "CREATE VIEW thread AS "
-               "SELECT "
-               "id as utid, "
-               "* "
-               "FROM internal_thread;",
-               nullptr, nullptr, &error);
-  MaybeRegisterError(error);
-
-  sqlite3_exec(db,
-               "CREATE VIEW process AS "
-               "SELECT "
-               "id as upid, "
-               "* "
-               "FROM internal_process;",
-               nullptr, nullptr, &error);
-  MaybeRegisterError(error);
-
-  // This should be kept in sync with GlobalArgsTracker::AddArgSet.
-  sqlite3_exec(db,
-               "CREATE VIEW args AS "
-               "SELECT "
-               "*, "
-               "CASE value_type "
-               "  WHEN 'int' THEN CAST(int_value AS text) "
-               "  WHEN 'uint' THEN CAST(int_value AS text) "
-               "  WHEN 'string' THEN string_value "
-               "  WHEN 'real' THEN CAST(real_value AS text) "
-               "  WHEN 'pointer' THEN printf('0x%x', int_value) "
-               "  WHEN 'bool' THEN ( "
-               "    CASE WHEN int_value <> 0 THEN 'true' "
-               "    ELSE 'false' END) "
-               "  WHEN 'json' THEN string_value "
-               "ELSE NULL END AS display_value "
-               "FROM internal_args;",
-               nullptr, nullptr, &error);
-  MaybeRegisterError(error);
-
-  sqlite3_exec(db,
-               "CREATE VIEW ftrace_event AS "
-               "SELECT * FROM raw "
-               "WHERE "
-               "  name NOT LIKE 'chrome_event.%' AND"
-               "  name NOT LIKE 'track_event.%'",
-               nullptr, nullptr, &error);
-  MaybeRegisterError(error);
-}
-
 struct ValueAtMaxTsContext {
   bool initialized;
   int value_type;
@@ -426,6 +252,8 @@
                          skip_prefixes);
   tp->ExtendMetricsProto(kAllChromeMetricsDescriptor.data(),
                          kAllChromeMetricsDescriptor.size(), skip_prefixes);
+  tp->ExtendMetricsProto(kAllWebviewMetricsDescriptor.data(),
+                         kAllWebviewMetricsDescriptor.size(), skip_prefixes);
 
   // TODO(lalitm): remove this special casing and change
   // SanitizeMetricMountPaths if/when we move all protos for builtin metrics to
@@ -458,14 +286,6 @@
   }
 }
 
-void EnsureSqliteInitialized() {
-  // sqlite3_initialize isn't actually thread-safe despite being documented
-  // as such; we need to make sure multiple TraceProcessorImpl instances don't
-  // call it concurrently and only gets called once per process, instead.
-  static bool init_once = [] { return sqlite3_initialize() == SQLITE_OK; }();
-  PERFETTO_CHECK(init_once);
-}
-
 void InsertIntoTraceMetricsTable(sqlite3* db, const std::string& metric_name) {
   char* insert_sql = sqlite3_mprintf(
       "INSERT INTO trace_metrics(name) VALUES('%q')", metric_name.c_str());
@@ -648,6 +468,17 @@
   return modules;
 }
 
+void InitializePreludeTablesViews(sqlite3* db) {
+  for (const auto& file_to_sql : prelude::tables_views::kFileToSql) {
+    char* errmsg_raw = nullptr;
+    int err = sqlite3_exec(db, file_to_sql.sql, nullptr, nullptr, &errmsg_raw);
+    ScopedSqliteString errmsg(errmsg_raw);
+    if (err != SQLITE_OK) {
+      PERFETTO_FATAL("Failed to initialize prelude %s", errmsg_raw);
+    }
+  }
+}
+
 }  // namespace
 
 template <typename View>
@@ -680,61 +511,60 @@
     context_.content_analyzer.reset(new ProtoContentAnalyzer(&context_));
   }
 
+  sqlite3_str_split_init(engine_.db());
   RegisterAdditionalModules(&context_);
-
-  sqlite3* db = nullptr;
-  EnsureSqliteInitialized();
-  PERFETTO_CHECK(sqlite3_open(":memory:", &db) == SQLITE_OK);
-  InitializeSqlite(db);
-  CreateBuiltinTables(db);
-  CreateBuiltinViews(db);
-  db_.reset(std::move(db));
+  InitializePreludeTablesViews(engine_.db());
 
   // New style function registration.
   if (cfg.enable_dev_features) {
-    RegisterDevFunctions(db);
+    RegisterDevFunctions(engine_.db());
   }
-  RegisterFunction<Glob>(db, "glob", 2);
-  RegisterFunction<Hash>(db, "HASH", -1);
-  RegisterFunction<Base64Encode>(db, "BASE64_ENCODE", 1);
-  RegisterFunction<Demangle>(db, "DEMANGLE", 1);
-  RegisterFunction<SourceGeq>(db, "SOURCE_GEQ", -1);
-  RegisterFunction<ExportJson>(db, "EXPORT_JSON", 1, context_.storage.get(),
-                               false);
-  RegisterFunction<ExtractArg>(db, "EXTRACT_ARG", 2, context_.storage.get());
-  RegisterFunction<AbsTimeStr>(db, "ABS_TIME_STR", 1,
-                               context_.clock_tracker.get());
-  RegisterFunction<ToMonotonic>(db, "TO_MONOTONIC", 1,
-                                context_.clock_tracker.get());
+  RegisterFunction<Glob>(engine_.db(), "glob", 2);
+  RegisterFunction<Hash>(engine_.db(), "HASH", -1);
+  RegisterFunction<Base64Encode>(engine_.db(), "BASE64_ENCODE", 1);
+  RegisterFunction<Demangle>(engine_.db(), "DEMANGLE", 1);
+  RegisterFunction<SourceGeq>(engine_.db(), "SOURCE_GEQ", -1);
+  RegisterFunction<ExportJson>(engine_.db(), "EXPORT_JSON", 1,
+                               context_.storage.get(), false);
+  RegisterFunction<ExtractArg>(engine_.db(), "EXTRACT_ARG", 2,
+                               context_.storage.get());
+  RegisterFunction<AbsTimeStr>(engine_.db(), "ABS_TIME_STR", 1,
+                               context_.clock_converter.get());
+  RegisterFunction<ToMonotonic>(engine_.db(), "TO_MONOTONIC", 1,
+                                context_.clock_converter.get());
   RegisterFunction<CreateFunction>(
-      db, "CREATE_FUNCTION", 3,
+      engine_.db(), "CREATE_FUNCTION", 3,
       std::unique_ptr<CreateFunction::Context>(
-          new CreateFunction::Context{db_.get(), &create_function_state_}));
+          new CreateFunction::Context{engine_.db(), &create_function_state_}));
   RegisterFunction<CreateViewFunction>(
-      db, "CREATE_VIEW_FUNCTION", 3,
+      engine_.db(), "CREATE_VIEW_FUNCTION", 3,
       std::unique_ptr<CreateViewFunction::Context>(
-          new CreateViewFunction::Context{db_.get()}));
-  RegisterFunction<Import>(db, "IMPORT", 1,
+          new CreateViewFunction::Context{engine_.db()}));
+  RegisterFunction<Import>(engine_.db(), "IMPORT", 1,
                            std::unique_ptr<Import::Context>(new Import::Context{
-                               db_.get(), this, &sql_modules_}));
+                               engine_.db(), this, &sql_modules_}));
+  RegisterFunction<ToFtrace>(
+      engine_.db(), "TO_FTRACE", 1,
+      std::unique_ptr<ToFtrace::Context>(new ToFtrace::Context{
+          context_.storage.get(), SystraceSerializer(&context_)}));
 
   // Old style function registration.
   // TODO(lalitm): migrate this over to using RegisterFunction once aggregate
   // functions are supported.
-  RegisterLastNonNullFunction(db);
-  RegisterValueAtMaxTsFunction(db);
+  RegisterLastNonNullFunction(engine_.db());
+  RegisterValueAtMaxTsFunction(engine_.db());
   {
-    base::Status status = RegisterStackFunctions(db, &context_);
+    base::Status status = RegisterStackFunctions(engine_.db(), &context_);
     if (!status.ok())
       PERFETTO_ELOG("%s", status.c_message());
   }
   {
-    base::Status status = PprofFunctions::Register(db, &context_);
+    base::Status status = PprofFunctions::Register(engine_.db(), &context_);
     if (!status.ok())
       PERFETTO_ELOG("%s", status.c_message());
   }
   {
-    base::Status status = LayoutFunctions::Register(db, &context_);
+    base::Status status = LayoutFunctions::Register(engine_.db(), &context_);
     if (!status.ok())
       PERFETTO_ELOG("%s", status.c_message());
   }
@@ -747,23 +577,18 @@
       PERFETTO_ELOG("%s", status.c_message());
   }
 
-  SetupMetrics(this, *db_, &sql_metrics_, cfg.skip_builtin_metric_paths);
-
-  // Setup the query cache.
-  query_cache_.reset(new QueryCache());
+  SetupMetrics(this, engine_.db(), &sql_metrics_,
+               cfg.skip_builtin_metric_paths);
 
   const TraceStorage* storage = context_.storage.get();
 
-  SqlStatsTable::RegisterTable(*db_, storage);
-  StatsTable::RegisterTable(*db_, storage);
+  SqlStatsTable::RegisterTable(engine_.db(), storage);
+  StatsTable::RegisterTable(engine_.db(), storage);
 
   // Operator tables.
-  SpanJoinOperatorTable::RegisterTable(*db_, storage);
-  WindowOperatorTable::RegisterTable(*db_, storage);
-  CreateViewFunction::RegisterTable(*db_);
-
-  // New style tables but with some custom logic.
-  SqliteRawTable::RegisterTable(*db_, query_cache_.get(), &context_);
+  SpanJoinOperatorTable::RegisterTable(engine_.db(), storage);
+  WindowOperatorTable::RegisterTable(engine_.db(), storage);
+  CreateViewFunction::RegisterTable(engine_.db());
 
   // Tables dynamically generated at query time.
   RegisterTableFunction(std::unique_ptr<ExperimentalFlamegraph>(
@@ -805,6 +630,8 @@
   // (O(rows in sched/slice/counter)), then consider calling ShrinkToFit on
   // that table in TraceStorage::ShrinkToFitTables.
   RegisterDbTable(storage->arg_table());
+  RegisterDbTable(storage->raw_table());
+  RegisterDbTable(storage->ftrace_event_table());
   RegisterDbTable(storage->thread_table());
   RegisterDbTable(storage->process_table());
   RegisterDbTable(storage->filedescriptor_table());
@@ -906,7 +733,7 @@
       context_.storage->InternString(TraceTypeToString(context_.trace_type));
   context_.metadata_tracker->SetMetadata(metadata::trace_type,
                                          Variadic::String(trace_type_id));
-  BuildBoundsTable(*db_, context_.storage->GetTraceTimestampBoundsNs());
+  BuildBoundsTable(engine_.db(), context_.storage->GetTraceTimestampBoundsNs());
 }
 
 void TraceProcessorImpl::NotifyEndOfFile() {
@@ -944,7 +771,7 @@
   // TraceProcessorStorageImpl::NotifyEndOfFile, this will be counted in
   // trace bounds: this is important for parsers like ninja which wait until
   // the end to flush all their data.
-  BuildBoundsTable(*db_, context_.storage->GetTraceTimestampBoundsNs());
+  BuildBoundsTable(engine_.db(), context_.storage->GetTraceTimestampBoundsNs());
 
   TraceProcessorStorageImpl::DestroyContext();
 }
@@ -991,19 +818,20 @@
   ScopedStmt stmt;
   IteratorImpl::StmtMetadata metadata;
   base::Status status =
-      PrepareAndStepUntilLastValidStmt(*db_, sql, &stmt, &metadata);
+      PrepareAndStepUntilLastValidStmt(engine_.db(), sql, &stmt, &metadata);
   PERFETTO_DCHECK((status.ok() && stmt) || (!status.ok() && !stmt));
 
-  std::unique_ptr<IteratorImpl> impl(new IteratorImpl(
-      this, *db_, status, std::move(stmt), std::move(metadata), sql_stats_row));
+  std::unique_ptr<IteratorImpl> impl(
+      new IteratorImpl(this, engine_.db(), status, std::move(stmt),
+                       std::move(metadata), sql_stats_row));
   return Iterator(std::move(impl));
 }
 
 void TraceProcessorImpl::InterruptQuery() {
-  if (!db_)
+  if (!engine_.db())
     return;
   query_interrupted_.store(true);
-  sqlite3_interrupt(db_.get());
+  sqlite3_interrupt(engine_.db());
 }
 
 bool TraceProcessorImpl::IsRootMetricField(const std::string& metric_name) {
@@ -1095,7 +923,7 @@
           prev_path.c_str(), path.c_str(), metric.proto_field_name->c_str());
     }
 
-    InsertIntoTraceMetricsTable(*db_, no_ext_name);
+    InsertIntoTraceMetricsTable(engine_.db(), no_ext_name);
   }
 
   sql_metrics_.emplace_back(metric);
@@ -1123,7 +951,7 @@
     auto fn_name = desc.full_name().substr(desc.package_name().size() + 1);
     std::replace(fn_name.begin(), fn_name.end(), '.', '_');
     RegisterFunction<metrics::BuildProto>(
-        db_.get(), fn_name.c_str(), -1,
+        engine_.db(), fn_name.c_str(), -1,
         std::unique_ptr<metrics::BuildProto::Context>(
             new metrics::BuildProto::Context{this, &pool_, i}));
   }
diff --git a/src/trace_processor/trace_processor_impl.h b/src/trace_processor/trace_processor_impl.h
index 37e7a2c..88b4b6e 100644
--- a/src/trace_processor/trace_processor_impl.h
+++ b/src/trace_processor/trace_processor_impl.h
@@ -36,6 +36,7 @@
 #include "src/trace_processor/sqlite/db_sqlite_table.h"
 #include "src/trace_processor/sqlite/query_cache.h"
 #include "src/trace_processor/sqlite/scoped_db.h"
+#include "src/trace_processor/sqlite/sqlite_engine.h"
 #include "src/trace_processor/trace_processor_storage_impl.h"
 #include "src/trace_processor/util/sql_modules.h"
 
@@ -107,13 +108,11 @@
 
   template <typename Table>
   void RegisterDbTable(const Table& table) {
-    DbSqliteTable::RegisterTable(*db_, query_cache_.get(), &table,
-                                 Table::Name());
+    engine_.RegisterTable(table, Table::Name());
   }
 
-  void RegisterTableFunction(std::unique_ptr<TableFunction> generator) {
-    DbSqliteTable::RegisterTable(*db_, query_cache_.get(),
-                                 std::move(generator));
+  void RegisterTableFunction(std::unique_ptr<TableFunction> fn) {
+    engine_.RegisterTableFunction(std::move(fn));
   }
 
   template <typename View>
@@ -121,16 +120,12 @@
 
   bool IsRootMetricField(const std::string& metric_name);
 
-  // Keep this first: we need this to be destroyed after we clean up
-  // everything else.
-  ScopedDb db_;
+  SqliteEngine engine_;
 
   // State necessary for CREATE_FUNCTION invocations. We store this here as we
   // need to finalize any prepared statements *before* we destroy the database.
   CreateFunction::State create_function_state_;
 
-  std::unique_ptr<QueryCache> query_cache_;
-
   DescriptorPool pool_;
 
   // Map from module name to module contents. Used for IMPORT function.
diff --git a/src/trace_processor/trace_processor_shell.cc b/src/trace_processor/trace_processor_shell.cc
index 1b02b27..da08183 100644
--- a/src/trace_processor/trace_processor_shell.cc
+++ b/src/trace_processor/trace_processor_shell.cc
@@ -49,6 +49,7 @@
 #include "perfetto/trace_processor/read_trace.h"
 #include "perfetto/trace_processor/trace_processor.h"
 #include "src/trace_processor/metrics/all_chrome_metrics.descriptor.h"
+#include "src/trace_processor/metrics/all_webview_metrics.descriptor.h"
 #include "src/trace_processor/metrics/metrics.descriptor.h"
 #include "src/trace_processor/metrics/metrics.h"
 #include "src/trace_processor/read_trace_internal.h"
@@ -1327,6 +1328,9 @@
   ExtendPoolWithBinaryDescriptor(pool, kAllChromeMetricsDescriptor.data(),
                                  kAllChromeMetricsDescriptor.size(),
                                  skip_prefixes);
+  ExtendPoolWithBinaryDescriptor(pool, kAllWebviewMetricsDescriptor.data(),
+                                 kAllWebviewMetricsDescriptor.size(),
+                                 skip_prefixes);
   return base::OkStatus();
 }
 
diff --git a/src/trace_processor/trace_processor_storage_impl.cc b/src/trace_processor/trace_processor_storage_impl.cc
index 75031f8..7b79bff 100644
--- a/src/trace_processor/trace_processor_storage_impl.cc
+++ b/src/trace_processor/trace_processor_storage_impl.cc
@@ -22,6 +22,7 @@
 #include "src/trace_processor/importers/common/args_tracker.h"
 #include "src/trace_processor/importers/common/args_translation_table.h"
 #include "src/trace_processor/importers/common/async_track_set_tracker.h"
+#include "src/trace_processor/importers/common/clock_converter.h"
 #include "src/trace_processor/importers/common/clock_tracker.h"
 #include "src/trace_processor/importers/common/event_tracker.h"
 #include "src/trace_processor/importers/common/flow_tracker.h"
@@ -61,6 +62,7 @@
   context_.event_tracker.reset(new EventTracker(&context_));
   context_.process_tracker.reset(new ProcessTracker(&context_));
   context_.clock_tracker.reset(new ClockTracker(&context_));
+  context_.clock_converter.reset(new ClockConverter(&context_));
   context_.heap_profile_tracker.reset(new HeapProfileTracker(&context_));
   context_.perf_sample_tracker.reset(new PerfSampleTracker(&context_));
   context_.global_stack_profile_tracker.reset(new GlobalStackProfileTracker());
@@ -149,7 +151,7 @@
   TraceProcessorContext context;
   context.storage = std::move(context_.storage);
   context.heap_graph_tracker = std::move(context_.heap_graph_tracker);
-  context.clock_tracker = std::move(context_.clock_tracker);
+  context.clock_converter = std::move(context_.clock_converter);
   // "to_ftrace" textual converter of the "raw" table requires remembering the
   // kernel version (inside system_info_tracker) to know how to textualise
   // sched_switch.prev_state bitflags.
diff --git a/src/trace_processor/types/BUILD.gn b/src/trace_processor/types/BUILD.gn
index ba26e24..0605ea1 100644
--- a/src/trace_processor/types/BUILD.gn
+++ b/src/trace_processor/types/BUILD.gn
@@ -23,7 +23,6 @@
     "task_state.h",
     "tcp_state.h",
     "trace_processor_context.h",
-    "variadic.cc",
     "variadic.h",
     "version_number.h",
   ]
diff --git a/src/trace_processor/types/trace_processor_context.h b/src/trace_processor/types/trace_processor_context.h
index 12aa16b..de942da 100644
--- a/src/trace_processor/types/trace_processor_context.h
+++ b/src/trace_processor/types/trace_processor_context.h
@@ -44,6 +44,7 @@
 class AndroidProbesTracker;
 class ChunkedTraceReader;
 class ClockTracker;
+class ClockConverter;
 class DeobfuscationMappingTable;
 class EventTracker;
 class ForwardingTraceParser;
@@ -97,6 +98,7 @@
   std::unique_ptr<ProcessTracker> process_tracker;
   std::unique_ptr<EventTracker> event_tracker;
   std::unique_ptr<ClockTracker> clock_tracker;
+  std::unique_ptr<ClockConverter> clock_converter;
   std::unique_ptr<HeapProfileTracker> heap_profile_tracker;
   std::unique_ptr<PerfSampleTracker> perf_sample_tracker;
   std::unique_ptr<GlobalStackProfileTracker> global_stack_profile_tracker;
diff --git a/src/trace_processor/util/descriptors.cc b/src/trace_processor/util/descriptors.cc
index 98029da..c47d4bc 100644
--- a/src/trace_processor/util/descriptors.cc
+++ b/src/trace_processor/util/descriptors.cc
@@ -40,10 +40,12 @@
       f_decoder.has_type()
           ? static_cast<uint32_t>(f_decoder.type())
           : static_cast<uint32_t>(FieldDescriptorProto::TYPE_MESSAGE);
+  protos::pbzero::FieldOptions::Decoder opt(f_decoder.options());
   return FieldDescriptor(
       base::StringView(f_decoder.name()).ToStdString(),
       static_cast<uint32_t>(f_decoder.number()), type, std::move(type_name),
-      f_decoder.label() == FieldDescriptorProto::LABEL_REPEATED, is_extension);
+      f_decoder.label() == FieldDescriptorProto::LABEL_REPEATED, opt.packed(),
+      is_extension);
 }
 
 std::optional<uint32_t> DescriptorPool::ResolveShortType(
@@ -328,12 +330,14 @@
                                  uint32_t type,
                                  std::string raw_type_name,
                                  bool is_repeated,
+                                 bool is_packed,
                                  bool is_extension)
     : name_(std::move(name)),
       number_(number),
       type_(type),
       raw_type_name_(std::move(raw_type_name)),
       is_repeated_(is_repeated),
+      is_packed_(is_packed),
       is_extension_(is_extension) {}
 
 }  // namespace trace_processor
diff --git a/src/trace_processor/util/descriptors.h b/src/trace_processor/util/descriptors.h
index 33dbcf0..f876a09 100644
--- a/src/trace_processor/util/descriptors.h
+++ b/src/trace_processor/util/descriptors.h
@@ -41,6 +41,7 @@
                   uint32_t type,
                   std::string raw_type_name,
                   bool is_repeated,
+                  bool is_packed,
                   bool is_extension = false);
 
   const std::string& name() const { return name_; }
@@ -49,6 +50,7 @@
   const std::string& raw_type_name() const { return raw_type_name_; }
   const std::string& resolved_type_name() const { return resolved_type_name_; }
   bool is_repeated() const { return is_repeated_; }
+  bool is_packed() const { return is_packed_; }
   bool is_extension() const { return is_extension_; }
 
   void set_resolved_type_name(const std::string& resolved_type_name) {
@@ -62,6 +64,7 @@
   std::string raw_type_name_;
   std::string resolved_type_name_;
   bool is_repeated_;
+  bool is_packed_;
   bool is_extension_;
 };
 
diff --git a/src/trace_processor/util/proto_to_args_parser.cc b/src/trace_processor/util/proto_to_args_parser.cc
index 61a8d78..8d6e76f 100644
--- a/src/trace_processor/util/proto_to_args_parser.cc
+++ b/src/trace_processor/util/proto_to_args_parser.cc
@@ -16,6 +16,11 @@
 
 #include "src/trace_processor/util/proto_to_args_parser.h"
 
+#include <stdint.h>
+
+#include "perfetto/base/status.h"
+#include "perfetto/protozero/proto_decoder.h"
+#include "perfetto/protozero/proto_utils.h"
 #include "protos/perfetto/common/descriptor.pbzero.h"
 #include "src/trace_processor/util/descriptors.h"
 #include "src/trace_processor/util/status_macros.h"
@@ -26,6 +31,9 @@
 
 namespace {
 
+template <protozero::proto_utils::ProtoWireType wire_type, typename cpp_type>
+using PRFI = protozero::PackedRepeatedFieldIterator<wire_type, cpp_type>;
+
 void AppendProtoType(std::string& target, const std::string& value) {
   if (!target.empty())
     target += '.';
@@ -106,9 +114,7 @@
   auto& descriptor = pool_.descriptors()[*idx];
 
   std::unordered_map<size_t, int> repeated_field_index;
-
   bool empty_message = true;
-
   protozero::ProtoDecoder decoder(cb);
   for (protozero::Field f = decoder.ReadField(); f.valid();
        f = decoder.ReadField()) {
@@ -133,6 +139,14 @@
       // reflected.
       continue;
     }
+
+    // Packed fields need to be handled specially because
+    if (field->is_packed()) {
+      RETURN_IF_ERROR(ParsePackedField(*field, repeated_field_index, f,
+                                       delegate, unknown_extensions));
+      continue;
+    }
+
     RETURN_IF_ERROR(ParseField(*field, repeated_field_index[f.id()], f,
                                delegate, unknown_extensions));
     if (field->is_repeated()) {
@@ -185,10 +199,68 @@
                                 field_descriptor.resolved_type_name(), nullptr,
                                 delegate, unknown_extensions);
   }
-
   return ParseSimpleField(field_descriptor, field, delegate);
 }
 
+base::Status ProtoToArgsParser::ParsePackedField(
+    const FieldDescriptor& field_descriptor,
+    std::unordered_map<size_t, int>& repeated_field_index,
+    protozero::Field field,
+    Delegate& delegate,
+    int* unknown_extensions) {
+  using FieldDescriptorProto = protos::pbzero::FieldDescriptorProto;
+  using PWT = protozero::proto_utils::ProtoWireType;
+
+  if (!field_descriptor.is_repeated()) {
+    return base::ErrStatus("Packed field %s must be repeated",
+                           field_descriptor.name().c_str());
+  }
+  if (field.type() != PWT::kLengthDelimited) {
+    return base::ErrStatus(
+        "Packed field %s must have a length delimited wire type",
+        field_descriptor.name().c_str());
+  }
+
+  auto parse = [&](uint64_t new_value, PWT wire_type) {
+    protozero::Field f;
+    f.initialize(field.id(), static_cast<uint8_t>(wire_type), new_value, 0);
+    return ParseField(field_descriptor, repeated_field_index[field.id()]++, f,
+                      delegate, unknown_extensions);
+  };
+
+  const uint8_t* data = field.as_bytes().data;
+  size_t size = field.as_bytes().size;
+  bool perr = false;
+  switch (field_descriptor.type()) {
+    case FieldDescriptorProto::TYPE_INT32:
+    case FieldDescriptorProto::TYPE_INT64:
+    case FieldDescriptorProto::TYPE_UINT32:
+    case FieldDescriptorProto::TYPE_UINT64:
+    case FieldDescriptorProto::TYPE_ENUM:
+      for (PRFI<PWT::kVarInt, uint64_t> it(data, size, &perr); it; ++it) {
+        parse(*it, PWT::kVarInt);
+      }
+      break;
+    case FieldDescriptorProto::TYPE_FIXED32:
+    case FieldDescriptorProto::TYPE_SFIXED32:
+    case FieldDescriptorProto::TYPE_FLOAT:
+      for (PRFI<PWT::kFixed32, uint32_t> it(data, size, &perr); it; ++it) {
+        parse(*it, PWT::kFixed32);
+      }
+      break;
+    case FieldDescriptorProto::TYPE_FIXED64:
+    case FieldDescriptorProto::TYPE_SFIXED64:
+    case FieldDescriptorProto::TYPE_DOUBLE:
+      for (PRFI<PWT::kFixed64, uint64_t> it(data, size, &perr); it; ++it) {
+        parse(*it, PWT::kFixed64);
+      }
+      break;
+    default:
+      return base::ErrStatus("Unsupported packed repeated field");
+  }
+  return base::OkStatus();
+}
+
 void ProtoToArgsParser::AddParsingOverrideForField(
     const std::string& field,
     ParsingOverrideForField func) {
diff --git a/src/trace_processor/util/proto_to_args_parser.h b/src/trace_processor/util/proto_to_args_parser.h
index be359cd..95ee1a0 100644
--- a/src/trace_processor/util/proto_to_args_parser.h
+++ b/src/trace_processor/util/proto_to_args_parser.h
@@ -249,6 +249,13 @@
                           Delegate& delegate,
                           int* unknown_extensions);
 
+  base::Status ParsePackedField(
+      const FieldDescriptor& field_descriptor,
+      std::unordered_map<size_t, int>& repeated_field_index,
+      protozero::Field field,
+      Delegate& delegate,
+      int* unknown_extensions);
+
   std::optional<base::Status> MaybeApplyOverrideForField(
       const protozero::Field&,
       Delegate& delegate);
diff --git a/src/trace_processor/util/proto_to_args_parser_unittest.cc b/src/trace_processor/util/proto_to_args_parser_unittest.cc
index 16120fc..b72fff0 100644
--- a/src/trace_processor/util/proto_to_args_parser_unittest.cc
+++ b/src/trace_processor/util/proto_to_args_parser_unittest.cc
@@ -17,6 +17,7 @@
 #include "src/trace_processor/util/proto_to_args_parser.h"
 
 #include "perfetto/ext/base/string_view.h"
+#include "perfetto/protozero/packed_repeated_fields.h"
 #include "perfetto/protozero/scattered_heap_buffer.h"
 #include "perfetto/trace_processor/trace_blob.h"
 #include "perfetto/trace_processor/trace_blob_view.h"
@@ -27,6 +28,8 @@
 #include "src/trace_processor/util/interned_message_view.h"
 #include "test/gtest_and_gmock.h"
 
+#include <cstdint>
+#include <limits>
 #include <sstream>
 
 namespace perfetto {
@@ -52,6 +55,15 @@
         new InternedMessageView(std::move(data)));
   }
 
+  template <typename T, typename... Ts>
+  void CreatedPackedVarint(protozero::PackedVarInt& var, T p, Ts... ps) {
+    var.Reset();
+    std::array<T, sizeof...(ps) + 1> list = {p, ps...};
+    for (T v : list) {
+      var.Append(v);
+    }
+  }
+
  private:
   using Key = ProtoToArgsParser::Key;
 
@@ -528,6 +540,119 @@
                           "field_fixed64 field_fixed64 9223372036854775808"));
 }
 
+TEST_F(ProtoToArgsParserTest, PackedFields) {
+  using namespace protozero::test::protos::pbzero;
+  protozero::HeapBuffered<PackedRepeatedFields> msg{kChunkSize, kChunkSize};
+
+  protozero::PackedVarInt varint;
+  CreatedPackedVarint(varint, 0, std::numeric_limits<int32_t>::min(),
+                      std::numeric_limits<int32_t>::max());
+  msg->set_field_int32(varint);
+
+  CreatedPackedVarint(varint, 0ll, std::numeric_limits<int64_t>::min(),
+                      std::numeric_limits<int64_t>::max());
+  msg->set_field_int64(varint);
+
+  CreatedPackedVarint(varint, 0u, std::numeric_limits<uint32_t>::min(),
+                      std::numeric_limits<uint32_t>::max());
+  msg->set_field_uint32(varint);
+
+  CreatedPackedVarint(varint, 0ull, std::numeric_limits<uint64_t>::min(),
+                      std::numeric_limits<uint64_t>::max());
+  msg->set_field_uint64(varint);
+
+  CreatedPackedVarint(varint, BigEnum::BEGIN, BigEnum::END);
+  msg->set_big_enum(varint);
+
+  protozero::PackedFixedSizeInt<uint32_t> fixed32;
+  fixed32.Append(0);
+  fixed32.Append(std::numeric_limits<uint32_t>::min());
+  fixed32.Append(std::numeric_limits<uint32_t>::max());
+  msg->set_field_fixed32(fixed32);
+
+  protozero::PackedFixedSizeInt<int32_t> sfixed32;
+  sfixed32.Append(0);
+  sfixed32.Append(std::numeric_limits<int32_t>::min());
+  sfixed32.Append(std::numeric_limits<int32_t>::max());
+  msg->set_field_sfixed32(sfixed32);
+
+  protozero::PackedFixedSizeInt<float> pfloat;
+  pfloat.Append(0);
+  pfloat.Append(-4839.349f);
+  pfloat.Append(std::numeric_limits<float>::min());
+  pfloat.Append(std::numeric_limits<float>::max());
+  msg->set_field_float(pfloat);
+
+  protozero::PackedFixedSizeInt<uint64_t> fixed64;
+  fixed64.Append(0);
+  fixed64.Append(std::numeric_limits<uint64_t>::min());
+  fixed64.Append(std::numeric_limits<uint64_t>::max());
+  msg->set_field_fixed64(fixed64);
+
+  protozero::PackedFixedSizeInt<int64_t> sfixed64;
+  sfixed64.Append(0);
+  sfixed64.Append(std::numeric_limits<int64_t>::min());
+  sfixed64.Append(std::numeric_limits<int64_t>::max());
+  msg->set_field_sfixed64(sfixed64);
+
+  protozero::PackedFixedSizeInt<double> pdouble;
+  pdouble.Append(0);
+  pdouble.Append(-48948908.349);
+  pdouble.Append(std::numeric_limits<double>::min());
+  pdouble.Append(std::numeric_limits<double>::max());
+  msg->set_field_double(pdouble);
+
+  auto binary_proto = msg.SerializeAsArray();
+
+  DescriptorPool pool;
+  auto status = pool.AddFromFileDescriptorSet(kTestMessagesDescriptor.data(),
+                                              kTestMessagesDescriptor.size());
+  ProtoToArgsParser parser(pool);
+  ASSERT_TRUE(status.ok()) << "Failed to parse kTestMessagesDescriptor: "
+                           << status.message();
+
+  status = parser.ParseMessage(
+      protozero::ConstBytes{binary_proto.data(), binary_proto.size()},
+      ".protozero.test.protos.PackedRepeatedFields", nullptr, *this);
+
+  EXPECT_TRUE(status.ok()) << "ParseMessage failed with error: "
+                           << status.message();
+
+  EXPECT_THAT(
+      args(),
+      testing::ElementsAre(
+          "field_int32 field_int32[0] 0",
+          "field_int32 field_int32[1] -2147483648",
+          "field_int32 field_int32[2] 2147483647",
+          "field_int64 field_int64[0] 0",
+          "field_int64 field_int64[1] -9223372036854775808",
+          "field_int64 field_int64[2] 9223372036854775807",
+          "field_uint32 field_uint32[0] 0", "field_uint32 field_uint32[1] 0",
+          "field_uint32 field_uint32[2] 4294967295",
+          "field_uint64 field_uint64[0] 0", "field_uint64 field_uint64[1] 0",
+          "field_uint64 field_uint64[2] 18446744073709551615",
+          "big_enum big_enum[0] BEGIN", "big_enum big_enum[1] END",
+          "field_fixed32 field_fixed32[0] 0",
+          "field_fixed32 field_fixed32[1] 0",
+          "field_fixed32 field_fixed32[2] 4294967295",
+          "field_sfixed32 field_sfixed32[0] 0",
+          "field_sfixed32 field_sfixed32[1] -2147483648",
+          "field_sfixed32 field_sfixed32[2] 2147483647",
+          "field_float field_float[0] 0", "field_float field_float[1] -4839.35",
+          "field_float field_float[2] 1.17549e-38",
+          "field_float field_float[3] 3.40282e+38",
+          "field_fixed64 field_fixed64[0] 0",
+          "field_fixed64 field_fixed64[1] 0",
+          "field_fixed64 field_fixed64[2] 18446744073709551615",
+          "field_sfixed64 field_sfixed64[0] 0",
+          "field_sfixed64 field_sfixed64[1] -9223372036854775808",
+          "field_sfixed64 field_sfixed64[2] 9223372036854775807",
+          "field_double field_double[0] 0",
+          "field_double field_double[1] -4.89489e+07",
+          "field_double field_double[2] 2.22507e-308",
+          "field_double field_double[3] 1.79769e+308"));
+}
+
 }  // namespace
 }  // namespace util
 }  // namespace trace_processor
diff --git a/src/trace_processor/util/status_macros.h b/src/trace_processor/util/status_macros.h
index 50e2bb4..2acb799 100644
--- a/src/trace_processor/util/status_macros.h
+++ b/src/trace_processor/util/status_macros.h
@@ -23,7 +23,7 @@
 // error status, returns the status from the current function.
 #define RETURN_IF_ERROR(expr)                           \
   do {                                                  \
-    util::Status status_macro_internal_status = (expr); \
+    base::Status status_macro_internal_status = (expr); \
     if (!status_macro_internal_status.ok())             \
       return status_macro_internal_status;              \
   } while (0)
diff --git a/src/trace_processor/views/BUILD.gn b/src/trace_processor/views/BUILD.gn
index 7cd5408..604a4bb 100644
--- a/src/trace_processor/views/BUILD.gn
+++ b/src/trace_processor/views/BUILD.gn
@@ -12,6 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import("../../../gn/perfetto_tp_tables.gni")
 import("../../../gn/test.gni")
 
 source_set("views") {
@@ -28,10 +29,15 @@
   ]
 }
 
+perfetto_tp_tables("macros_unittest") {
+  sources = [ "macros_unittest.py" ]
+}
+
 source_set("unittests") {
   testonly = true
   sources = [ "macros_unittest.cc" ]
   deps = [
+    ":macros_unittest",
     ":views",
     "../../../gn:default_deps",
     "../../../gn:gtest_and_gmock",
diff --git a/src/trace_processor/views/macros_internal.h b/src/trace_processor/views/macros_internal.h
index 69f4f90..ca16137 100644
--- a/src/trace_processor/views/macros_internal.h
+++ b/src/trace_processor/views/macros_internal.h
@@ -16,8 +16,6 @@
 
 #include "src/trace_processor/db/view.h"
 
-#include "src/trace_processor/tables/macros_internal.h"
-
 #ifndef SRC_TRACE_PROCESSOR_VIEWS_MACROS_INTERNAL_H_
 #define SRC_TRACE_PROCESSOR_VIEWS_MACROS_INTERNAL_H_
 
@@ -73,6 +71,15 @@
 #pragma GCC system_header
 #endif
 
+// Basic helper macros.
+#define PERFETTO_TP_NOOP(...)
+
+// Invokes FN on each column in the definition of the table. We define a
+// recursive macro as we need to walk up the hierarchy until we hit the root.
+// Currently, we hardcode 5 levels but this can be increased as necessary.
+#define PERFETTO_TP_ALL_COLUMNS(DEF, arg) \
+  DEF(PERFETTO_TP_NOOP, PERFETTO_TP_NOOP, arg)
+
 // Invokes a View column function using data from a table column definition.
 #define PERFETTO_TP_VIEW_INVOKE_VIEW_COL_FN_FROM_TABLE(FN, col_name) \
   FN(col_name, from_table, col_name)
diff --git a/src/trace_processor/views/macros_unittest.cc b/src/trace_processor/views/macros_unittest.cc
index 89c7734..dc4d697 100644
--- a/src/trace_processor/views/macros_unittest.cc
+++ b/src/trace_processor/views/macros_unittest.cc
@@ -16,38 +16,30 @@
 
 #include "src/trace_processor/views/macros.h"
 
+#include "src/trace_processor/views/macros_unittest_py.h"
 #include "test/gtest_and_gmock.h"
 
-#include "src/trace_processor/tables/macros.h"
-
 namespace perfetto {
 namespace trace_processor {
-namespace {
-
-#define PERFETTO_TP_TEST_THREAD_TABLE_DEF(NAME, PARENT, C) \
-  NAME(TestThreadTable, "thread")                          \
-  PARENT(PERFETTO_TP_ROOT_TABLE_PARENT_DEF, C)             \
-  C(StringPool::Id, name)                                  \
-  C(int64_t, start_ts, Column::Flag::kSorted)
-PERFETTO_TP_TABLE(PERFETTO_TP_TEST_THREAD_TABLE_DEF);
+namespace tables {
 
 #define PERFETTO_TP_TEST_EVENT_TABLE_DEF(NAME, PARENT, C) \
-  NAME(TestEventTable, "event")                           \
-  PARENT(PERFETTO_TP_ROOT_TABLE_PARENT_DEF, C)            \
+  NAME(MacrosEventTable, "event")                         \
   C(int64_t, ts, Column::Flag::kSorted)                   \
-  C(TestThreadTable::Id, thread_id)
-PERFETTO_TP_TABLE(PERFETTO_TP_TEST_EVENT_TABLE_DEF);
+  C(MacrosThreadTable::Id, thread_id)
 
-TestEventTable::~TestEventTable() = default;
-TestThreadTable::~TestThreadTable() = default;
+MacrosEventTable::~MacrosEventTable() = default;
+MacrosThreadTable::~MacrosThreadTable() = default;
+
+namespace {
 
 #define PERFETTO_TP_EVENT_VIEW_DEF(NAME, FROM, JOIN, COL, FCOL)             \
   NAME(TestEventView, "event_view")                                         \
   PERFETTO_TP_VIEW_EXPORT_FROM_COLS(PERFETTO_TP_TEST_EVENT_TABLE_DEF, FCOL) \
   COL(thread_name, thread, name)                                            \
   COL(thread_start_ts, thread, start_ts)                                    \
-  FROM(TestEventTable, event)                                               \
-  JOIN(TestThreadTable, thread, id, event, thread_id, View::kIdAlwaysPresent)
+  FROM(MacrosEventTable, event)                                             \
+  JOIN(MacrosThreadTable, thread, id, event, thread_id, View::kIdAlwaysPresent)
 PERFETTO_TP_DECLARE_VIEW(PERFETTO_TP_EVENT_VIEW_DEF);
 PERFETTO_TP_DEFINE_VIEW(TestEventView);
 
@@ -72,8 +64,8 @@
 }
 
 TEST(ViewMacrosUnittest, Schema) {
-  TestThreadTable thread{nullptr, nullptr};
-  TestEventTable event{nullptr, nullptr};
+  MacrosThreadTable thread{nullptr};
+  MacrosEventTable event{nullptr};
 
   TestEventView view{&event, &thread};
   auto schema = view.schema();
@@ -98,5 +90,6 @@
 }
 
 }  // namespace
+}  // namespace tables
 }  // namespace trace_processor
 }  // namespace perfetto
diff --git a/src/trace_processor/views/macros_unittest.py b/src/trace_processor/views/macros_unittest.py
new file mode 100644
index 0000000..96606e0
--- /dev/null
+++ b/src/trace_processor/views/macros_unittest.py
@@ -0,0 +1,45 @@
+# Copyright (C) 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Contains tables for unittesting."""
+
+from python.generators.trace_processor_table.public import Column as C
+from python.generators.trace_processor_table.public import ColumnFlag
+from python.generators.trace_processor_table.public import CppInt64
+from python.generators.trace_processor_table.public import Table
+from python.generators.trace_processor_table.public import CppString
+from python.generators.trace_processor_table.public import CppTableId
+
+MACROS_THREAD_TABLE = Table(
+    python_module=__file__,
+    class_name="MacrosThreadTable",
+    sql_name="thread",
+    columns=[
+        C("name", CppString()),
+        C("start_ts", CppInt64(), flags=ColumnFlag.SORTED),
+    ])
+
+MACROS_EVENT_TABLE = Table(
+    python_module=__file__,
+    class_name="MacrosEventTable",
+    sql_name="event",
+    columns=[
+        C("ts", CppInt64(), flags=ColumnFlag.SORTED),
+        C("thread_id", CppTableId(MACROS_THREAD_TABLE)),
+    ])
+
+# Keep this list sorted.
+ALL_TABLES = [
+    MACROS_THREAD_TABLE,
+    MACROS_EVENT_TABLE,
+]
diff --git a/src/trace_processor/views/slice_views.h b/src/trace_processor/views/slice_views.h
index 287fd02..53dd896 100644
--- a/src/trace_processor/views/slice_views.h
+++ b/src/trace_processor/views/slice_views.h
@@ -19,7 +19,6 @@
 
 #include "src/trace_processor/db/view.h"
 #include "src/trace_processor/tables/metadata_tables_py.h"
-#include "src/trace_processor/tables/slice_tables.h"
 #include "src/trace_processor/tables/slice_tables_py.h"
 #include "src/trace_processor/tables/track_tables_py.h"
 #include "src/trace_processor/views/macros.h"
@@ -28,6 +27,23 @@
 namespace trace_processor {
 namespace views {
 
+#define PERFETTO_TP_SLICE_TABLE_DEF(NAME, PARENT, C)  \
+  NAME(SliceTable, "internal_slice")                  \
+  C(int64_t, ts, Column::Flag::kSorted)               \
+  C(int64_t, dur)                                     \
+  C(TrackTable::Id, track_id)                         \
+  C(std::optional<StringPool::Id>, category)          \
+  C(std::optional<StringPool::Id>, name)              \
+  C(uint32_t, depth)                                  \
+  C(int64_t, stack_id)                                \
+  C(int64_t, parent_stack_id)                         \
+  C(std::optional<SliceTable::Id>, parent_id)         \
+  C(uint32_t, arg_set_id)                             \
+  C(std::optional<int64_t>, thread_ts)                \
+  C(std::optional<int64_t>, thread_dur)               \
+  C(std::optional<int64_t>, thread_instruction_count) \
+  C(std::optional<int64_t>, thread_instruction_delta)
+
 // TODO(lalitm): add support in document generator for views.
 #define PERFETTO_TP_THREAD_SLICE_VIEW_DEF(NAME, FROM, JOIN, COL, FCOL)      \
   NAME(ThreadSliceView, "exp_thread_slice")                                 \
diff --git a/src/traceconv/trace_to_systrace.cc b/src/traceconv/trace_to_systrace.cc
index 6b2f380..e3494e8 100644
--- a/src/traceconv/trace_to_systrace.cc
+++ b/src/traceconv/trace_to_systrace.cc
@@ -33,9 +33,6 @@
 #include "perfetto/trace_processor/trace_processor.h"
 #include "src/traceconv/utils.h"
 
-#define FILTER_RAW_EVENTS \
-  " where not (name like \"chrome_event.%\" or name like \"track_event.%\")"
-
 namespace perfetto {
 namespace trace_to_text {
 
@@ -168,8 +165,7 @@
                      Keep truncate_keep) {
   using trace_processor::Iterator;
 
-  static const char kRawEventsCountSql[] =
-      "select count(1) from raw" FILTER_RAW_EVENTS;
+  static const char kRawEventsCountSql[] = "select count(1) from ftrace_event";
   uint32_t raw_events = 0;
   auto e_callback = [&raw_events](Iterator* it, base::StringWriter*) {
     raw_events = static_cast<uint32_t>(it->Get(0).long_value);
@@ -235,7 +231,7 @@
   const uint32_t max_ftrace_events = (140 * 1024 * 1024) / 130;
 
   static const char kRawEventsQuery[] =
-      "select to_ftrace(id) from raw" FILTER_RAW_EVENTS;
+      "select to_ftrace(id) from ftrace_event";
 
   // 1. Write the appropriate header for the file type.
   if (wrapped_in_json) {
diff --git a/src/traced/probes/ftrace/event_info.cc b/src/traced/probes/ftrace/event_info.cc
index eda87d7..f17f6b6 100644
--- a/src/traced/probes/ftrace/event_info.cc
+++ b/src/traced/probes/ftrace/event_info.cc
@@ -6653,6 +6653,38 @@
        kUnsetFtraceId,
        475,
        kUnsetSize},
+      {"mali_CSF_INTERRUPT_START",
+       "mali",
+       {
+           {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+            "kctx_tgid", 1, ProtoSchemaType::kInt32,
+            TranslationStrategy::kInvalidTranslationStrategy},
+           {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+            "kctx_id", 2, ProtoSchemaType::kUint32,
+            TranslationStrategy::kInvalidTranslationStrategy},
+           {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+            "info_val", 3, ProtoSchemaType::kUint64,
+            TranslationStrategy::kInvalidTranslationStrategy},
+       },
+       kUnsetFtraceId,
+       482,
+       kUnsetSize},
+      {"mali_CSF_INTERRUPT_END",
+       "mali",
+       {
+           {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+            "kctx_tgid", 1, ProtoSchemaType::kInt32,
+            TranslationStrategy::kInvalidTranslationStrategy},
+           {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+            "kctx_id", 2, ProtoSchemaType::kUint32,
+            TranslationStrategy::kInvalidTranslationStrategy},
+           {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+            "info_val", 3, ProtoSchemaType::kUint64,
+            TranslationStrategy::kInvalidTranslationStrategy},
+       },
+       kUnsetFtraceId,
+       483,
+       kUnsetSize},
       {"mdp_cmd_kickoff",
        "mdss",
        {
@@ -8192,6 +8224,16 @@
        kUnsetFtraceId,
        359,
        kUnsetSize},
+      {"suspend_resume_minimal",
+       "synthetic",
+       {
+           {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+            "start", 1, ProtoSchemaType::kUint32,
+            TranslationStrategy::kInvalidTranslationStrategy},
+       },
+       kUnsetFtraceId,
+       481,
+       kUnsetSize},
       {"0",
        "systrace",
        {
diff --git a/src/traced/probes/ftrace/test/data/synthetic/events/mali/mali_CSF_INTERRUPT_END/format b/src/traced/probes/ftrace/test/data/synthetic/events/mali/mali_CSF_INTERRUPT_END/format
new file mode 100644
index 0000000..277128b
--- /dev/null
+++ b/src/traced/probes/ftrace/test/data/synthetic/events/mali/mali_CSF_INTERRUPT_END/format
@@ -0,0 +1,13 @@
+name: mali_CSF_INTERRUPT_END
+ID: 1679
+format:
+	field:unsigned short common_type;	offset:0;	size:2;	signed:0;
+	field:unsigned char common_flags;	offset:2;	size:1;	signed:0;
+	field:unsigned char common_preempt_count;	offset:3;	size:1;	signed:0;
+	field:int common_pid;	offset:4;	size:4;	signed:1;
+
+	field:pid_t kctx_tgid;	offset:8;	size:4;	signed:1;
+	field:u32 kctx_id;	offset:12;	size:4;	signed:0;
+	field:u64 info_val;	offset:16;	size:8;	signed:0;
+
+print fmt: "kctx=%d_%u info=0x%llx", REC->kctx_tgid, REC->kctx_id, REC->info_val
diff --git a/src/traced/probes/ftrace/test/data/synthetic/events/mali/mali_CSF_INTERRUPT_START/format b/src/traced/probes/ftrace/test/data/synthetic/events/mali/mali_CSF_INTERRUPT_START/format
new file mode 100644
index 0000000..0c9e0db
--- /dev/null
+++ b/src/traced/probes/ftrace/test/data/synthetic/events/mali/mali_CSF_INTERRUPT_START/format
@@ -0,0 +1,13 @@
+name: mali_CSF_INTERRUPT_START
+ID: 1678
+format:
+	field:unsigned short common_type;	offset:0;	size:2;	signed:0;
+	field:unsigned char common_flags;	offset:2;	size:1;	signed:0;
+	field:unsigned char common_preempt_count;	offset:3;	size:1;	signed:0;
+	field:int common_pid;	offset:4;	size:4;	signed:1;
+
+	field:pid_t kctx_tgid;	offset:8;	size:4;	signed:1;
+	field:u32 kctx_id;	offset:12;	size:4;	signed:0;
+	field:u64 info_val;	offset:16;	size:8;	signed:0;
+
+print fmt: "kctx=%d_%u info=0x%llx", REC->kctx_tgid, REC->kctx_id, REC->info_val
diff --git a/src/traced/probes/ftrace/test/data/synthetic/events/synthetic/suspend_resume_minimal/format b/src/traced/probes/ftrace/test/data/synthetic/events/synthetic/suspend_resume_minimal/format
new file mode 100644
index 0000000..157721d
--- /dev/null
+++ b/src/traced/probes/ftrace/test/data/synthetic/events/synthetic/suspend_resume_minimal/format
@@ -0,0 +1,11 @@
+name: suspend_resume_minimal
+ID: 1734
+format:
+	field:unsigned short common_type;	offset:0;	size:2;	signed:0;
+	field:unsigned char common_flags;	offset:2;	size:1;	signed:0;
+	field:unsigned char common_preempt_count;	offset:3;	size:1;	signed:0;
+	field:int common_pid;	offset:4;	size:4;	signed:1;
+
+	field:bool start;	offset:8;	size:1;	signed:1;
+
+print fmt: "start=%d", REC->start
diff --git a/src/traced/probes/statsd_client/statsd_binder_data_source.cc b/src/traced/probes/statsd_client/statsd_binder_data_source.cc
index 0d35540..627d4bc 100644
--- a/src/traced/probes/statsd_client/statsd_binder_data_source.cc
+++ b/src/traced/probes/statsd_client/statsd_binder_data_source.cc
@@ -202,7 +202,7 @@
 
 // static
 const ProbesDataSource::Descriptor StatsdBinderDataSource::descriptor = {
-    /*name*/ "android.statsd",
+    /*name*/ "android.statsd_binder",
     /*flags*/ Descriptor::kFlagsNone,
     /*fill_descriptor_func*/ nullptr,
 };
diff --git a/src/tracing/core/BUILD.gn b/src/tracing/core/BUILD.gn
index 6371094..ea1cb90 100644
--- a/src/tracing/core/BUILD.gn
+++ b/src/tracing/core/BUILD.gn
@@ -30,6 +30,7 @@
     "../../base",
   ]
   sources = [
+    "histogram.h",
     "id_allocator.cc",
     "id_allocator.h",
     "null_trace_writer.cc",
@@ -99,6 +100,7 @@
     "../test:test_support",
   ]
   sources = [
+    "histogram_unittest.cc",
     "id_allocator_unittest.cc",
     "null_trace_writer_unittest.cc",
     "packet_stream_validator_unittest.cc",
diff --git a/src/tracing/core/histogram.h b/src/tracing/core/histogram.h
new file mode 100644
index 0000000..61b3c72
--- /dev/null
+++ b/src/tracing/core/histogram.h
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SRC_TRACING_CORE_HISTOGRAM_H_
+#define SRC_TRACING_CORE_HISTOGRAM_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include <limits>
+
+#include "perfetto/base/logging.h"
+
+namespace perfetto {
+
+using HistValue = int64_t;
+
+// Usage:
+// Histogram<10, 100, 1000> h;  // A histogram with 3 + 1 (overflow) bucket.
+// h.Add(value);
+// h.GetBucketSum(0);  // Returns SUM(x) for 0 < x <= 10
+// h.GetBucketSum(1);  // Returns SUM(x) for 10 < x <= 100
+// h.GetBucketSum(2);  // Returns SUM(x) for 100 < x <= 1000
+// h.GetBucketSum(3);  // Returns SUM(x) for x > 1000
+// Likewise h.GetBucketCount(x) returns the COUNT(x).
+template <HistValue... thresholds>
+class Histogram {
+ public:
+  // 1+ is for the overflow bucket (anything > the last threshold).
+  static constexpr size_t kNumBuckets = 1 + sizeof...(thresholds);
+
+  void Add(HistValue value) {
+    size_t bucket = BucketForValue(value);
+    bucket_sum_[bucket] += value;
+    ++bucket_count_[bucket];
+  }
+
+  static constexpr size_t num_buckets() { return kNumBuckets; }
+
+  HistValue GetBucketThres(size_t n) const {
+    PERFETTO_DCHECK(n < kNumBuckets);
+    return bucket_thres_[n];
+  }
+
+  uint64_t GetBucketCount(size_t n) const {
+    PERFETTO_DCHECK(n < kNumBuckets);
+    return bucket_count_[n];
+  }
+
+  HistValue GetBucketSum(size_t n) const {
+    PERFETTO_DCHECK(n < kNumBuckets);
+    return bucket_sum_[n];
+  }
+
+  void Merge(const Histogram& other) {
+    for (size_t i = 0; i < kNumBuckets; ++i) {
+      bucket_sum_[i] += other.bucket_sum_[i];
+      bucket_count_[i] += other.bucket_count_[i];
+    }
+  }
+
+ private:
+  static size_t BucketForValue(HistValue value) {
+    for (size_t i = 0; i < kNumBuckets - 1; i++) {
+      if (value <= bucket_thres_[i])
+        return i;
+    }
+    return kNumBuckets - 1;
+  }
+
+  static constexpr HistValue bucket_thres_[kNumBuckets]{
+      thresholds..., std::numeric_limits<HistValue>::max()};
+
+  HistValue bucket_sum_[kNumBuckets]{};
+  uint64_t bucket_count_[kNumBuckets]{};
+};
+
+}  // namespace perfetto
+
+#endif  // SRC_TRACING_CORE_HISTOGRAM_H_
diff --git a/src/tracing/core/histogram_unittest.cc b/src/tracing/core/histogram_unittest.cc
new file mode 100644
index 0000000..5ab43d0
--- /dev/null
+++ b/src/tracing/core/histogram_unittest.cc
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/tracing/core/histogram.h"
+
+#include <random>
+#include "test/gtest_and_gmock.h"
+
+namespace perfetto {
+namespace {
+
+TEST(HistogramTest, SingleBucket) {
+  Histogram<8> h;
+  h.Add(0);
+  h.Add(1);
+  h.Add(8);
+  h.Add(10);
+  EXPECT_EQ(h.GetBucketCount(0), 3u);
+  EXPECT_EQ(h.GetBucketSum(0), 9);
+
+  EXPECT_EQ(h.GetBucketCount(1), 1u);
+  EXPECT_EQ(h.GetBucketSum(1), 10);
+}
+
+TEST(HistogramTest, ThreeBuckets) {
+  Histogram<8, 16, 32> h;
+  EXPECT_EQ(h.GetBucketThres(0), 8);
+  EXPECT_EQ(h.GetBucketThres(1), 16);
+  EXPECT_EQ(h.GetBucketThres(2), 32);
+  for (size_t i = 0; i < h.num_buckets(); i++) {
+    EXPECT_EQ(h.GetBucketCount(i), 0u);
+    EXPECT_EQ(h.GetBucketSum(i), 0);
+  }
+
+  h.Add(4);
+  h.Add(8);
+  h.Add(15);
+  EXPECT_EQ(h.GetBucketCount(0), 2u);
+  EXPECT_EQ(h.GetBucketSum(0), 4 + 8);
+
+  EXPECT_EQ(h.GetBucketCount(1), 1u);
+  EXPECT_EQ(h.GetBucketSum(1), 15);
+
+  EXPECT_EQ(h.GetBucketCount(2), 0u);
+  EXPECT_EQ(h.GetBucketSum(2), 0);
+
+  h.Add(17);
+  h.Add(31);
+  h.Add(32);
+  EXPECT_EQ(h.GetBucketCount(2), 3u);
+  EXPECT_EQ(h.GetBucketSum(2), 17 + 31 + 32);
+
+  h.Add(1000);
+  EXPECT_EQ(h.GetBucketCount(3), 1u);
+  EXPECT_EQ(h.GetBucketSum(3), 1000);
+}
+
+TEST(HistogramTest, Merge) {
+  Histogram<8, 16, 32> h, h2;
+  h.Add(4);
+  h.Add(15);
+  h.Add(90);
+
+  h2.Add(5);
+  h2.Add(30);
+  h2.Add(91);
+
+  h.Merge(h2);
+  EXPECT_EQ(h.GetBucketCount(0), 2u);
+  EXPECT_EQ(h.GetBucketSum(0), 4 + 5);
+
+  EXPECT_EQ(h.GetBucketCount(1), 1u);
+  EXPECT_EQ(h.GetBucketSum(1), 15);
+
+  EXPECT_EQ(h.GetBucketCount(2), 1u);
+  EXPECT_EQ(h.GetBucketSum(2), 30);
+
+  EXPECT_EQ(h.GetBucketCount(3), 2u);
+  EXPECT_EQ(h.GetBucketSum(3), 90 + 91);
+}
+
+TEST(HistogramTest, CopyAndMoveOperators) {
+  using HistType = Histogram<8, 16, 32>;
+  HistType h1;
+  h1.Add(1);
+  h1.Add(15);
+  h1.Add(30);
+  h1.Add(31);
+  h1.Add(99);
+
+  auto check_validity = [](const HistType& h) {
+    ASSERT_EQ(h.GetBucketSum(0), 1);
+    ASSERT_EQ(h.GetBucketCount(0), 1u);
+    ASSERT_EQ(h.GetBucketSum(1), 15);
+    ASSERT_EQ(h.GetBucketCount(1), 1u);
+    ASSERT_EQ(h.GetBucketSum(2), 30 + 31);
+    ASSERT_EQ(h.GetBucketCount(2), 2u);
+    ASSERT_EQ(h.GetBucketSum(3), 99);
+    ASSERT_EQ(h.GetBucketCount(3), 1u);
+  };
+  check_validity(h1);
+
+  HistType h2(h1);
+  check_validity(h2);
+  check_validity(h1);
+
+  HistType h3 = h2;
+  check_validity(h3);
+  check_validity(h2);
+
+  HistType h4(std::move(h3));
+  check_validity(h4);
+
+  HistType h5;
+  h5 = std::move(h4);
+  check_validity(h5);
+}
+
+TEST(HistogramTest, Rand) {
+  std::minstd_rand0 rnd_engine(0);
+  Histogram<10, 100, 1000> h;
+
+  int64_t expected_sum = 0;
+  const uint64_t expected_count = 1000;
+  for (uint64_t i = 0; i < expected_count; i++) {
+    auto value = static_cast<int32_t>(rnd_engine());
+    expected_sum += value;
+    h.Add(value);
+  }
+
+  int64_t actual_sum = 0;
+  uint64_t actual_count = 0;
+  for (size_t i = 0; i < h.num_buckets(); i++) {
+    actual_count += h.GetBucketCount(i);
+    actual_sum += h.GetBucketSum(i);
+  }
+
+  EXPECT_EQ(expected_count, actual_count);
+  EXPECT_EQ(expected_sum, actual_sum);
+}
+
+}  // namespace
+}  // namespace perfetto
diff --git a/src/tracing/core/metatrace_writer.cc b/src/tracing/core/metatrace_writer.cc
index c270632..8d121a6 100644
--- a/src/tracing/core/metatrace_writer.cc
+++ b/src/tracing/core/metatrace_writer.cc
@@ -26,11 +26,6 @@
 
 namespace perfetto {
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-// static
-constexpr char MetatraceWriter::kDataSourceName[];
-#endif
-
 MetatraceWriter::MetatraceWriter() : weak_ptr_factory_(this) {}
 
 MetatraceWriter::~MetatraceWriter() {
diff --git a/src/tracing/core/shared_memory_abi.cc b/src/tracing/core/shared_memory_abi.cc
index 0c4694b..a9098dc 100644
--- a/src/tracing/core/shared_memory_abi.cc
+++ b/src/tracing/core/shared_memory_abi.cc
@@ -69,16 +69,6 @@
 
 }  // namespace
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-// static
-constexpr uint32_t SharedMemoryABI::kNumChunksForLayout[];
-constexpr const char* SharedMemoryABI::kChunkStateStr[];
-constexpr const size_t SharedMemoryABI::kInvalidPageIdx;
-constexpr const size_t SharedMemoryABI::kMinPageSize;
-constexpr const size_t SharedMemoryABI::kMaxPageSize;
-constexpr const size_t SharedMemoryABI::kPacketSizeDropPacket;
-#endif
-
 SharedMemoryABI::SharedMemoryABI() = default;
 
 SharedMemoryABI::SharedMemoryABI(uint8_t* start,
diff --git a/src/tracing/core/shared_memory_arbiter_impl.cc b/src/tracing/core/shared_memory_arbiter_impl.cc
index f1b830a..61b3974 100644
--- a/src/tracing/core/shared_memory_arbiter_impl.cc
+++ b/src/tracing/core/shared_memory_arbiter_impl.cc
@@ -52,11 +52,6 @@
 SharedMemoryABI::PageLayout SharedMemoryArbiterImpl::default_page_layout =
     SharedMemoryABI::PageLayout::kPageDiv1;
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-// static
-constexpr BufferID SharedMemoryArbiterImpl::kInvalidBufferId;
-#endif
-
 // static
 std::unique_ptr<SharedMemoryArbiter> SharedMemoryArbiter::CreateInstance(
     SharedMemory* shared_memory,
diff --git a/src/tracing/core/shared_memory_arbiter_impl.h b/src/tracing/core/shared_memory_arbiter_impl.h
index 7a20a99..29637d4 100644
--- a/src/tracing/core/shared_memory_arbiter_impl.h
+++ b/src/tracing/core/shared_memory_arbiter_impl.h
@@ -147,6 +147,10 @@
     default_page_layout = l;
   }
 
+  static SharedMemoryABI::PageLayout default_page_layout_for_testing() {
+    return default_page_layout;
+  }
+
   // SharedMemoryArbiter implementation.
   // See include/perfetto/tracing/core/shared_memory_arbiter.h for comments.
   std::unique_ptr<TraceWriter> CreateTraceWriter(
diff --git a/src/tracing/core/shared_memory_arbiter_impl_unittest.cc b/src/tracing/core/shared_memory_arbiter_impl_unittest.cc
index 5bd2183..6b9443b 100644
--- a/src/tracing/core/shared_memory_arbiter_impl_unittest.cc
+++ b/src/tracing/core/shared_memory_arbiter_impl_unittest.cc
@@ -45,6 +45,8 @@
 class SharedMemoryArbiterImplTest : public AlignedBufferTest {
  public:
   void SetUp() override {
+    default_layout_ =
+        SharedMemoryArbiterImpl::default_page_layout_for_testing();
     AlignedBufferTest::SetUp();
     task_runner_.reset(new base::TestTaskRunner());
     arbiter_.reset(new SharedMemoryArbiterImpl(buf(), buf_size(), page_size(),
@@ -57,12 +59,14 @@
   void TearDown() override {
     arbiter_.reset();
     task_runner_.reset();
+    SharedMemoryArbiterImpl::set_default_layout_for_testing(default_layout_);
   }
 
   std::unique_ptr<base::TestTaskRunner> task_runner_;
   std::unique_ptr<SharedMemoryArbiterImpl> arbiter_;
   NiceMock<MockProducerEndpoint> mock_producer_endpoint_;
   std::function<void(const std::vector<uint32_t>&)> on_pages_complete_;
+  SharedMemoryABI::PageLayout default_layout_;
 };
 
 size_t const kPageSizes[] = {4096, 65536};
diff --git a/src/tracing/core/trace_buffer.cc b/src/tracing/core/trace_buffer.cc
index 90820a0..baa6a34 100644
--- a/src/tracing/core/trace_buffer.cc
+++ b/src/tracing/core/trace_buffer.cc
@@ -42,9 +42,6 @@
     SharedMemoryABI::ChunkHeader::kChunkNeedsPatching;
 }  // namespace.
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-constexpr size_t TraceBuffer::ChunkRecord::kMaxSize;
-#endif
 const size_t TraceBuffer::InlineChunkHeaderSize = sizeof(ChunkRecord);
 
 // static
@@ -106,7 +103,7 @@
   // up in a fragmented state where size_to_end() < sizeof(ChunkRecord).
   const size_t record_size =
       base::AlignUp<sizeof(ChunkRecord)>(size + sizeof(ChunkRecord));
-  TRACE_BUFFER_DLOG("CopyChunk @ %lu, size=%zu", wptr_ - begin(), record_size);
+  TRACE_BUFFER_DLOG("CopyChunk @ %" PRIdPTR ", size=%zu", wptr_ - begin(), record_size);
   if (PERFETTO_UNLIKELY(record_size > max_chunk_size_)) {
     stats_.set_abi_violations(stats_.abi_violations() + 1);
     PERFETTO_DCHECK(suppress_client_dchecks_for_testing_);
@@ -199,7 +196,7 @@
     }
 
     uint8_t* wptr = reinterpret_cast<uint8_t*>(prev);
-    TRACE_BUFFER_DLOG("  overriding chunk @ %lu, size=%zu", wptr - begin(),
+    TRACE_BUFFER_DLOG("  overriding chunk @ %" PRIdPTR ", size=%zu", wptr - begin(),
                       record_size);
 
     // Update chunk meta data stored in the index, as it may have changed.
@@ -208,7 +205,7 @@
     record_meta->set_complete(chunk_complete);
 
     // Override the ChunkRecord contents at the original |wptr|.
-    TRACE_BUFFER_DLOG("  copying @ [%lu - %lu] %zu", wptr - begin(),
+    TRACE_BUFFER_DLOG("  copying @ [%" PRIdPTR " - %" PRIdPTR "] %zu", wptr - begin(),
                       uintptr_t(wptr - begin()) + record_size, record_size);
     WriteChunkRecord(wptr, record, src, size);
     TRACE_BUFFER_DLOG("Chunk raw: %s",
@@ -268,7 +265,7 @@
       key, ChunkMeta(chunk_off, num_fragments, chunk_complete, chunk_flags,
                      producer_uid_trusted, producer_pid_trusted));
   PERFETTO_DCHECK(it_and_inserted.second);
-  TRACE_BUFFER_DLOG("  copying @ [%lu - %lu] %zu", wptr_ - begin(),
+  TRACE_BUFFER_DLOG("  copying @ [%" PRIdPTR " - %" PRIdPTR "] %zu", wptr_ - begin(),
                     uintptr_t(wptr_ - begin()) + record_size, record_size);
   WriteChunkRecord(wptr_, record, src, size);
   TRACE_BUFFER_DLOG("Chunk raw: %s", base::HexDump(wptr_, record_size).c_str());
@@ -358,7 +355,7 @@
         will_remove = true;
       }
       TRACE_BUFFER_DLOG(
-          "  del index {%" PRIu32 ",%" PRIu32 ",%u} @ [%lu - %lu] %d",
+          "  del index {%" PRIu32 ",%" PRIu32 ",%u} @ [%" PRIdPTR " - %" PRIdPTR "] %d",
           key.producer_id, key.writer_id, key.chunk_id,
           next_chunk_ptr - begin(), next_chunk_ptr - begin() + next_chunk.size,
           will_remove);
@@ -392,7 +389,7 @@
   PERFETTO_DCHECK(size >= sizeof(ChunkRecord) && size <= ChunkRecord::kMaxSize);
   ChunkRecord record(size);
   record.is_padding = 1;
-  TRACE_BUFFER_DLOG("AddPaddingRecord @ [%lu - %lu] %zu", wptr_ - begin(),
+  TRACE_BUFFER_DLOG("AddPaddingRecord @ [%" PRIdPTR " - %" PRIdPTR "] %zu", wptr_ - begin(),
                     uintptr_t(wptr_ - begin()) + size, size);
   WriteChunkRecord(wptr_, record, nullptr, size - sizeof(ChunkRecord));
   stats_.set_padding_bytes_written(stats_.padding_bytes_written() + size);
@@ -584,6 +581,8 @@
 
     const ProducerID trusted_producer_id = read_iter_.producer_id();
     const WriterID writer_id = read_iter_.writer_id();
+    const ProducerAndWriterID producer_and_writer_id =
+        MkProducerAndWriterID(trusted_producer_id, writer_id);
     const uid_t trusted_uid = chunk_meta->trusted_uid;
     const pid_t trusted_pid = chunk_meta->trusted_pid;
 
@@ -648,7 +647,7 @@
         // iteration. This happens by virtue of ReadNextPacketInChunk()
         // incrementing the |num_fragments_read| and marking the fragment as
         // read even if we didn't really.
-        ReadNextPacketInChunk(chunk_meta, nullptr);
+        ReadNextPacketInChunk(producer_and_writer_id, chunk_meta, nullptr);
         chunk_meta->set_last_read_packet_skipped(true);
         previous_packet_dropped = true;
         continue;
@@ -656,7 +655,8 @@
 
       if (action == kReadOnePacket) {
         // The easy peasy case B.
-        ReadPacketResult result = ReadNextPacketInChunk(chunk_meta, packet);
+        ReadPacketResult result =
+            ReadNextPacketInChunk(producer_and_writer_id, chunk_meta, packet);
 
         if (PERFETTO_LIKELY(result == ReadPacketResult::kSucceeded)) {
           *sequence_properties = {trusted_producer_id, trusted_uid, trusted_pid,
@@ -777,8 +777,10 @@
         // In the unlikely case of a corrupted packet (corrupted or empty
         // fragment), invalidate the all stitching and move on to the next chunk
         // in the same sequence, if any.
-        packet_corruption |= ReadNextPacketInChunk(&*read_iter_, packet) ==
-                             ReadPacketResult::kFailedInvalidPacket;
+        auto pw_id = MkProducerAndWriterID(it.producer_id(), it.writer_id());
+        packet_corruption |=
+            ReadNextPacketInChunk(pw_id, &*read_iter_, packet) ==
+            ReadPacketResult::kFailedInvalidPacket;
       }
       if (read_iter_.cur == it.cur)
         break;
@@ -798,6 +800,7 @@
 }
 
 TraceBuffer::ReadPacketResult TraceBuffer::ReadNextPacketInChunk(
+    ProducerAndWriterID producer_and_writer_id,
     ChunkMeta* const chunk_meta,
     TracePacket* packet) {
   PERFETTO_DCHECK(chunk_meta->num_fragments_read < chunk_meta->num_fragments);
@@ -867,6 +870,8 @@
                         chunk_meta->is_complete())) {
     stats_.set_chunks_read(stats_.chunks_read() + 1);
     stats_.set_bytes_read(stats_.bytes_read() + chunk_record->size);
+    auto* writer_stats = writer_stats_.Insert(producer_and_writer_id, {}).first;
+    writer_stats->used_chunk_hist.Add(chunk_meta->cur_fragment_offset);
   } else {
     // We have at least one more packet to parse. It should be within the chunk.
     if (chunk_meta->cur_fragment_offset + sizeof(ChunkRecord) >=
diff --git a/src/tracing/core/trace_buffer.h b/src/tracing/core/trace_buffer.h
index b3ea608..f6994ba 100644
--- a/src/tracing/core/trace_buffer.h
+++ b/src/tracing/core/trace_buffer.h
@@ -26,12 +26,14 @@
 #include <tuple>
 
 #include "perfetto/base/logging.h"
+#include "perfetto/ext/base/flat_hash_map.h"
 #include "perfetto/ext/base/paged_memory.h"
 #include "perfetto/ext/base/thread_annotations.h"
 #include "perfetto/ext/base/utils.h"
 #include "perfetto/ext/tracing/core/basic_types.h"
 #include "perfetto/ext/tracing/core/slice.h"
 #include "perfetto/ext/tracing/core/trace_stats.h"
+#include "src/tracing/core/histogram.h"
 
 namespace perfetto {
 
@@ -162,6 +164,18 @@
     WriterID writer_id;
   };
 
+  // Holds the "used chunk" stats for each <Producer, Writer> tuple.
+  struct WriterStats {
+    Histogram<8, 32, 128, 512, 1024, 2048, 4096, 8192, 12288, 16384>
+        used_chunk_hist;
+  };
+
+  using WriterStatsMap = base::FlatHashMap<ProducerAndWriterID,
+                                           WriterStats,
+                                           std::hash<ProducerAndWriterID>,
+                                           base::QuadraticProbe,
+                                           /*AppendOnly=*/true>;
+
   // Can return nullptr if the memory allocation fails.
   static std::unique_ptr<TraceBuffer> Create(size_t size_in_bytes,
                                              OverwritePolicy = kOverwrite);
@@ -267,6 +281,7 @@
   // TraceBuffer will CHECK().
   std::unique_ptr<TraceBuffer> CloneReadOnly() const;
 
+  const WriterStatsMap& writer_stats() const { return writer_stats_; }
   const TraceStats::BufferStats& stats() const { return stats_; }
   size_t size() const { return size_; }
 
@@ -581,7 +596,9 @@
   // TracePacket can be nullptr, in which case the read state is still advanced.
   // When TracePacket is not nullptr, ProducerID must also be not null and will
   // be updated with the ProducerID that originally wrote the chunk.
-  ReadPacketResult ReadNextPacketInChunk(ChunkMeta*, TracePacket*);
+  ReadPacketResult ReadNextPacketInChunk(ProducerAndWriterID,
+                                         ChunkMeta*,
+                                         TracePacket*);
 
   void DcheckIsAlignedAndWithinBounds(const uint8_t* ptr) const {
     PERFETTO_DCHECK(ptr >= begin() && ptr <= end() - sizeof(ChunkRecord));
@@ -689,6 +706,9 @@
   // Statistics about buffer usage.
   TraceStats::BufferStats stats_;
 
+  // Per-{Producer, Writer} statistics.
+  WriterStatsMap writer_stats_;
+
 #if PERFETTO_DCHECK_IS_ON()
   bool changed_since_last_read_ = false;
 #endif
diff --git a/src/tracing/core/trace_writer_impl_unittest.cc b/src/tracing/core/trace_writer_impl_unittest.cc
index 80f0f35..cd0032c 100644
--- a/src/tracing/core/trace_writer_impl_unittest.cc
+++ b/src/tracing/core/trace_writer_impl_unittest.cc
@@ -64,6 +64,8 @@
     }
   };
   void SetUp() override {
+    default_layout_ =
+        SharedMemoryArbiterImpl::default_page_layout_for_testing();
     SharedMemoryArbiterImpl::set_default_layout_for_testing(
         SharedMemoryABI::PageLayout::kPageDiv4);
     AlignedBufferTest::SetUp();
@@ -86,6 +88,7 @@
   void TearDown() override {
     arbiter_.reset();
     task_runner_.reset();
+    SharedMemoryArbiterImpl::set_default_layout_for_testing(default_layout_);
   }
 
   std::vector<uint8_t> CopyPayloadAndApplyPatches(
@@ -175,6 +178,7 @@
     return packets;
   }
 
+  SharedMemoryABI::PageLayout default_layout_;
   CommitDataRequest last_commit_;
   ProducerEndpoint::CommitDataCallback last_commit_callback_;
   std::map<PatchKey, std::vector<CommitDataRequest::ChunkToPatch::Patch>>
diff --git a/src/tracing/core/tracing_service_impl.cc b/src/tracing/core/tracing_service_impl.cc
index 8299500..7a15a0a 100644
--- a/src/tracing/core/tracing_service_impl.cc
+++ b/src/tracing/core/tracing_service_impl.cc
@@ -301,13 +301,6 @@
 
 }  // namespace
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-// These constants instead are defined in the header because are used by tests.
-constexpr size_t TracingServiceImpl::kMaxShmSize;
-constexpr uint32_t TracingServiceImpl::kDataSourceStopTimeoutMs;
-constexpr uint8_t TracingServiceImpl::kSyncMarker[];
-#endif
-
 // static
 std::unique_ptr<TracingService> TracingService::CreateInstance(
     std::unique_ptr<SharedMemory::Factory> shm_factory,
@@ -3276,6 +3269,53 @@
     }
     *trace_stats.add_buffer_stats() = buf->stats();
   }  // for (buf in session).
+
+  if (!tracing_session->config.builtin_data_sources()
+           .disable_chunk_usage_histograms()) {
+    // Emit chunk usage stats broken down by sequence ID (i.e. by trace-writer).
+    // Writer stats are updated by each TraceBuffer object at ReadBuffers time,
+    // and there can be >1 buffer per session. However, we want to report only
+    // one histogram per writer. A trace writer never writes to more than one
+    // buffer (it's technically allowed but doesn't happen in the current impl
+    // of the tracing SDK). Per-buffer breakdowns would be completely useless.
+    TraceBuffer::WriterStatsMap merged_stats;
+
+    // First merge all the per-buffer histograms into one-per-writer.
+    for (const BufferID buf_id : tracing_session->buffers_index) {
+      const TraceBuffer* buf = GetBufferByID(buf_id);
+      if (!buf)
+        continue;
+      for (auto it = buf->writer_stats().GetIterator(); it; ++it) {
+        auto& hist = merged_stats.Insert(it.key(), {}).first->used_chunk_hist;
+        hist.Merge(it.value().used_chunk_hist);
+      }
+    }
+
+    // Serialize the merged per-writer histogram into the stats proto.
+    bool has_written_bucket_definition = false;
+    for (auto it = merged_stats.GetIterator(); it; ++it) {
+      const auto& hist = it.value().used_chunk_hist;
+      ProducerID p;
+      WriterID w;
+      GetProducerAndWriterID(it.key(), &p, &w);
+      if (!has_written_bucket_definition) {
+        // Serialize one-off the histogram bucket definition, which is the same
+        // for all entries in the map.
+        has_written_bucket_definition = true;
+        // The -1 in the for loop below is to skip the implicit overflow bucket.
+        for (size_t i = 0; i < hist.num_buckets() - 1; ++i) {
+          trace_stats.add_chunk_payload_histogram_def(hist.GetBucketThres(i));
+        }
+      }
+      auto* wri_stats = trace_stats.add_writer_stats();
+      wri_stats->set_sequence_id(tracing_session->GetPacketSequenceID(p, w));
+      for (size_t i = 0; i < hist.num_buckets(); ++i) {
+        wri_stats->add_chunk_payload_histogram_counts(hist.GetBucketCount(i));
+        wri_stats->add_chunk_payload_histogram_sum(hist.GetBucketSum(i));
+      }
+    }  // for (writer in merged_stats.GetIterator())
+  }    // if (!disable_chunk_usage_histograms)
+
   return trace_stats;
 }
 
diff --git a/src/tracing/core/tracing_service_impl_unittest.cc b/src/tracing/core/tracing_service_impl_unittest.cc
index b66e502..6542723 100644
--- a/src/tracing/core/tracing_service_impl_unittest.cc
+++ b/src/tracing/core/tracing_service_impl_unittest.cc
@@ -3157,6 +3157,99 @@
   consumer->WaitForTracingDisabled();
 }
 
+TEST_F(TracingServiceImplTest, TraceWriterStats) {
+  std::unique_ptr<MockConsumer> consumer = CreateMockConsumer();
+  consumer->Connect(svc.get());
+
+  std::unique_ptr<MockProducer> producer = CreateMockProducer();
+  producer->Connect(svc.get(), "mock_producer");
+  producer->RegisterDataSource("data_source");
+
+  TraceConfig trace_config;
+  trace_config.add_buffers()->set_size_kb(512);
+  auto* ds_config = trace_config.add_data_sources()->mutable_config();
+  ds_config->set_name("data_source");
+
+  consumer->EnableTracing(trace_config);
+  producer->WaitForTracingSetup();
+  producer->WaitForDataSourceSetup("data_source");
+  producer->WaitForDataSourceStart("data_source");
+
+  const std::string payload_128(128 - 32, 'a');
+  const std::string payload_512(512 - 32, 'b');
+  const std::string payload_1k(1024 - 32, 'c');
+  const std::string payload_2k(2048 - 32, 'd');
+
+  auto writer1 = producer->CreateTraceWriter("data_source");
+  auto writer2 = producer->CreateTraceWriter("data_source");
+
+  // Flush after each packet to create chunks that match packets.
+  writer1->NewTracePacket()->set_for_testing()->set_str(payload_128);
+  writer1->Flush();
+
+  writer1->NewTracePacket()->set_for_testing()->set_str(payload_1k);
+  writer1->Flush();
+
+  writer2->NewTracePacket()->set_for_testing()->set_str(payload_512);
+  writer2->Flush();
+
+  writer2->NewTracePacket()->set_for_testing()->set_str(payload_2k);
+  writer2->Flush();
+
+  writer2->NewTracePacket()->set_for_testing()->set_str(payload_2k);
+  writer2->Flush();
+
+  auto flush_request = consumer->Flush();
+  producer->WaitForFlush({writer1.get(), writer2.get()});
+  ASSERT_TRUE(flush_request.WaitForReply());
+
+  writer1.reset();
+  writer2.reset();
+
+  consumer->DisableTracing();
+  producer->WaitForDataSourceStop("data_source");
+  consumer->WaitForTracingDisabled();
+
+  auto packets = consumer->ReadBuffers();
+  EXPECT_THAT(
+      packets,
+      Contains(Property(&protos::gen::TracePacket::has_trace_stats, Eq(true))));
+  for (const auto& packet : packets) {
+    if (!packet.has_trace_stats())
+      continue;
+
+    EXPECT_GT(packet.trace_stats().writer_stats().size(), 0u);
+    for (const auto& wri : packet.trace_stats().writer_stats()) {
+      for (size_t i = 0; i < wri.chunk_payload_histogram_counts().size() - 1;
+           i++) {
+        PERFETTO_DLOG("Seq=%" PRIu64 ", %" PRIu64 " : %" PRIu64,
+                      wri.sequence_id(),
+                      packet.trace_stats().chunk_payload_histogram_def()[i],
+                      wri.chunk_payload_histogram_counts()[i]);
+      }
+
+      switch (wri.sequence_id()) {
+        case 1:  // Ignore service-generated packets.
+          continue;
+        case 2:  // writer1
+          EXPECT_THAT(wri.chunk_payload_histogram_counts(),
+                      ElementsAreArray({0 /*8*/, 0 /*32*/, 1 /*128*/, 0 /*512*/,
+                                        1 /*1K*/, 0 /*2K*/, 0 /*4K*/, 0 /*8K*/,
+                                        0 /*12K*/, 0 /*16K*/, 0 /*>16K*/}));
+          continue;
+        case 3:  // writer2
+          EXPECT_THAT(wri.chunk_payload_histogram_counts(),
+                      ElementsAreArray({0 /*8*/, 0 /*32*/, 0 /*128*/, 1 /*512*/,
+                                        0 /*1K*/, 2 /*2K*/, 0 /*4K*/, 0 /*8K*/,
+                                        0 /*12K*/, 0 /*16K*/, 0 /*>16K*/}));
+          continue;
+        default:
+          ASSERT_TRUE(false) << "Unexpected sequence " << wri.sequence_id();
+      }
+    }
+  }
+}
+
 TEST_F(TracingServiceImplTest, ObserveEventsDataSourceInstances) {
   std::unique_ptr<MockConsumer> consumer = CreateMockConsumer();
   consumer->Connect(svc.get());
diff --git a/src/tracing/core/virtual_destructors.cc b/src/tracing/core/virtual_destructors.cc
index 5b7534f..f98d6ff 100644
--- a/src/tracing/core/virtual_destructors.cc
+++ b/src/tracing/core/virtual_destructors.cc
@@ -40,9 +40,4 @@
 void ConsumerEndpoint::CloneSession(TracingSessionID) {}
 void Consumer::OnSessionCloned(bool, const std::string&) {}
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-constexpr size_t TracingService::kDefaultShmSize;
-constexpr size_t TracingService::kDefaultShmPageSize;
-#endif
-
 }  // namespace perfetto
diff --git a/src/tracing/data_source.cc b/src/tracing/data_source.cc
index 902c803..1fffc22 100644
--- a/src/tracing/data_source.cc
+++ b/src/tracing/data_source.cc
@@ -20,12 +20,14 @@
 namespace perfetto {
 
 DataSourceBase::StopArgs::~StopArgs() = default;
+DataSourceBase::FlushArgs::~FlushArgs() = default;
 DataSourceBase::~DataSourceBase() = default;
 void DataSourceBase::OnSetup(const SetupArgs&) {}
 void DataSourceBase::OnStart(const StartArgs&) {}
 void DataSourceBase::OnStop(const StopArgs&) {}
 void DataSourceBase::WillClearIncrementalState(
     const ClearIncrementalStateArgs&) {}
+void DataSourceBase::OnFlush(const FlushArgs&) {}
 
 namespace internal {
 
diff --git a/src/tracing/internal/tracing_muxer_impl.cc b/src/tracing/internal/tracing_muxer_impl.cc
index 4133efb..181237f 100644
--- a/src/tracing/internal/tracing_muxer_impl.cc
+++ b/src/tracing/internal/tracing_muxer_impl.cc
@@ -19,6 +19,7 @@
 #include <algorithm>
 #include <atomic>
 #include <mutex>
+#include <optional>
 #include <vector>
 
 #include "perfetto/base/build_config.h"
@@ -125,6 +126,17 @@
   mutable std::function<void()> async_stop_closure;
 };
 
+class FlushArgsImpl : public DataSourceBase::FlushArgs {
+ public:
+  std::function<void()> HandleFlushAsynchronously() const override {
+    auto closure = std::move(async_flush_closure);
+    async_flush_closure = std::function<void()>();
+    return closure;
+  }
+
+  mutable std::function<void()> async_flush_closure;
+};
+
 uint64_t ComputeConfigHash(const DataSourceConfig& config) {
   base::Hasher hasher;
   std::string config_bytes = config.SerializeAsString();
@@ -318,12 +330,27 @@
   muxer_->StopDataSource_AsyncBegin(backend_id_, id);
 }
 
-void TracingMuxerImpl::ProducerImpl::Flush(FlushRequestID flush_id,
-                                           const DataSourceInstanceID*,
-                                           size_t) {
-  // Flush is not plumbed for now, we just ack straight away.
+void TracingMuxerImpl::ProducerImpl::Flush(
+    FlushRequestID flush_id,
+    const DataSourceInstanceID* instances,
+    size_t instance_count) {
   PERFETTO_DCHECK_THREAD(thread_checker_);
-  service_->NotifyFlushComplete(flush_id);
+  bool all_handled = true;
+  if (muxer_) {
+    for (size_t i = 0; i < instance_count; i++) {
+      DataSourceInstanceID ds_id = instances[i];
+      bool handled =
+          muxer_->FlushDataSource_AsyncBegin(backend_id_, ds_id, flush_id);
+      if (!handled) {
+        pending_flushes_[flush_id].insert(ds_id);
+        all_handled = false;
+      }
+    }
+  }
+
+  if (all_handled) {
+    service_->NotifyFlushComplete(flush_id);
+  }
 }
 
 void TracingMuxerImpl::ProducerImpl::ClearIncrementalState(
@@ -370,6 +397,37 @@
   }
 }
 
+void TracingMuxerImpl::ProducerImpl::NotifyFlushForDataSourceDone(
+    DataSourceInstanceID ds_id,
+    FlushRequestID flush_id) {
+  if (!connected_) {
+    return;
+  }
+
+  {
+    auto it = pending_flushes_.find(flush_id);
+    if (it == pending_flushes_.end()) {
+      return;
+    }
+    std::set<DataSourceInstanceID>& ds_ids = it->second;
+    ds_ids.erase(ds_id);
+  }
+
+  std::optional<DataSourceInstanceID> biggest_flush_id;
+  for (auto it = pending_flushes_.begin(); it != pending_flushes_.end();) {
+    if (it->second.empty()) {
+      biggest_flush_id = it->first;
+      it = pending_flushes_.erase(it);
+    } else {
+      break;
+    }
+  }
+
+  if (biggest_flush_id) {
+    service_->NotifyFlushComplete(*biggest_flush_id);
+  }
+}
+
 // ----- End of TracingMuxerImpl::ProducerImpl methods.
 
 // ----- Begin of TracingMuxerImpl::ConsumerImpl
@@ -1610,6 +1668,82 @@
       1, std::memory_order_relaxed);
 }
 
+bool TracingMuxerImpl::FlushDataSource_AsyncBegin(
+    TracingBackendId backend_id,
+    DataSourceInstanceID instance_id,
+    FlushRequestID flush_id) {
+  PERFETTO_DLOG("Flushing data source %" PRIu64, instance_id);
+  auto ds = FindDataSource(backend_id, instance_id);
+  if (!ds) {
+    PERFETTO_ELOG("Could not find data source to flush");
+    return true;
+  }
+
+  uint32_t backend_connection_id = ds.internal_state->backend_connection_id;
+
+  FlushArgsImpl flush_args;
+  flush_args.internal_instance_index = ds.instance_idx;
+  flush_args.async_flush_closure = [this, backend_id, backend_connection_id,
+                                    instance_id, ds, flush_id] {
+    // TracingMuxerImpl is long lived, capturing |this| is okay.
+    // The notification closure can be moved out of the StopArgs by the
+    // embedder to handle stop asynchronously. The embedder might then
+    // call the closure on a different thread than the current one, hence
+    // this nested PostTask().
+    task_runner_->PostTask(
+        [this, backend_id, backend_connection_id, instance_id, ds, flush_id] {
+          FlushDataSource_AsyncEnd(backend_id, backend_connection_id,
+                                   instance_id, ds, flush_id);
+        });
+  };
+  {
+    std::unique_lock<std::recursive_mutex> lock;
+    if (ds.requires_callbacks_under_lock)
+      lock = std::unique_lock<std::recursive_mutex>(ds.internal_state->lock);
+    ds.internal_state->data_source->OnFlush(flush_args);
+  }
+
+  // |async_flush_closure| is moved out of |flush_args| if the producer
+  // requested to handle the flush asynchronously.
+  bool handled = static_cast<bool>(flush_args.async_flush_closure);
+  return handled;
+}
+
+void TracingMuxerImpl::FlushDataSource_AsyncEnd(
+    TracingBackendId backend_id,
+    uint32_t backend_connection_id,
+    DataSourceInstanceID instance_id,
+    const FindDataSourceRes& ds,
+    FlushRequestID flush_id) {
+  PERFETTO_DLOG("Ending async flush of data source %" PRIu64, instance_id);
+  PERFETTO_DCHECK_THREAD(thread_checker_);
+
+  // Check that the data source instance is still active and was not modified
+  // while it was being flushed.
+  if (!ds.static_state->TryGet(ds.instance_idx) ||
+      ds.internal_state->backend_id != backend_id ||
+      ds.internal_state->backend_connection_id != backend_connection_id ||
+      ds.internal_state->data_source_instance_id != instance_id) {
+    PERFETTO_ELOG("Async flush of data source %" PRIu64
+                  " failed. This might be due to the data source being stopped "
+                  "in the meantime",
+                  instance_id);
+    return;
+  }
+
+  // |producer_backends_| is append-only, Backend instances are always valid.
+  PERFETTO_CHECK(backend_id < producer_backends_.size());
+  RegisteredProducerBackend& backend = *FindProducerBackendById(backend_id);
+
+  ProducerImpl* producer = backend.producer.get();
+  if (!producer)
+    return;
+
+  if (producer->connected_) {
+    producer->NotifyFlushForDataSourceDone(instance_id, flush_id);
+  }
+}
+
 void TracingMuxerImpl::SyncProducersForTesting() {
   std::mutex mutex;
   std::condition_variable cv;
diff --git a/src/tracing/internal/tracing_muxer_impl.h b/src/tracing/internal/tracing_muxer_impl.h
index c8d0970..4c87bb9 100644
--- a/src/tracing/internal/tracing_muxer_impl.h
+++ b/src/tracing/internal/tracing_muxer_impl.h
@@ -27,6 +27,7 @@
 #include <list>
 #include <map>
 #include <memory>
+#include <set>
 #include <utility>
 #include <vector>
 
@@ -232,6 +233,7 @@
 
     bool SweepDeadServices();
     void SendOnConnectTriggers();
+    void NotifyFlushForDataSourceDone(DataSourceInstanceID, FlushRequestID);
 
     PERFETTO_THREAD_CHECKER(thread_checker_)
     TracingMuxerImpl* muxer_;
@@ -261,6 +263,8 @@
     // expiration).
     std::list<std::pair<std::string, base::TimeMillis>> on_connect_triggers_;
 
+    std::map<FlushRequestID, std::set<DataSourceInstanceID>> pending_flushes_;
+
     // The currently active service endpoint is maintained as an atomic shared
     // pointer so it won't get deleted from underneath threads that are creating
     // trace writers. At any given time one endpoint can be shared (and thus
@@ -507,6 +511,14 @@
                                uint32_t backend_connection_id,
                                DataSourceInstanceID,
                                const FindDataSourceRes&);
+  bool FlushDataSource_AsyncBegin(TracingBackendId,
+                                  DataSourceInstanceID,
+                                  FlushRequestID);
+  void FlushDataSource_AsyncEnd(TracingBackendId,
+                                uint32_t backend_connection_id,
+                                DataSourceInstanceID,
+                                const FindDataSourceRes&,
+                                FlushRequestID);
   void AbortStartupTracingSession(TracingSessionGlobalID, BackendType);
   // When ResetForTesting() is executed, `cb` will be called on the calling
   // thread and on the muxer thread.
diff --git a/src/tracing/internal/tracing_muxer_impl_integrationtest.cc b/src/tracing/internal/tracing_muxer_impl_integrationtest.cc
index 5711d73..bc28cde 100644
--- a/src/tracing/internal/tracing_muxer_impl_integrationtest.cc
+++ b/src/tracing/internal/tracing_muxer_impl_integrationtest.cc
@@ -25,6 +25,12 @@
 
 class TracingMuxerImplIntegrationTest : public testing::Test {
  protected:
+  void SetUp() override {
+#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
+    GTEST_SKIP() << "Unix sockets not supported on windows";
+#endif
+  }
+
   // Sets the environment variable `name` to `value`. Restores it to the
   // previous value when the test finishes.
   void SetEnvVar(const char* name, const char* value) {
@@ -38,7 +44,7 @@
     base::SetEnv(name, value);
   }
 
-  ~TracingMuxerImplIntegrationTest() {
+  ~TracingMuxerImplIntegrationTest() override {
     perfetto::Tracing::ResetForTesting();
     while (!prev_state_.empty()) {
       const EnvVar& var = prev_state_.top();
diff --git a/src/tracing/test/aligned_buffer_test.cc b/src/tracing/test/aligned_buffer_test.cc
index 082e130..fc9b8bc 100644
--- a/src/tracing/test/aligned_buffer_test.cc
+++ b/src/tracing/test/aligned_buffer_test.cc
@@ -20,11 +20,6 @@
 
 namespace perfetto {
 
-#if !PERFETTO_IS_AT_LEAST_CPP17()
-// static
-constexpr size_t AlignedBufferTest::kNumPages;
-#endif
-
 void AlignedBufferTest::SetUp() {
   page_size_ = GetParam();
   buf_.reset(new TestSharedMemory(page_size_ * kNumPages));
diff --git a/src/tracing/test/api_integrationtest.cc b/src/tracing/test/api_integrationtest.cc
index 946e1cc..0755e02 100644
--- a/src/tracing/test/api_integrationtest.cc
+++ b/src/tracing/test/api_integrationtest.cc
@@ -275,12 +275,16 @@
   WaitableTestEvent on_setup;
   WaitableTestEvent on_start;
   WaitableTestEvent on_stop;
+  WaitableTestEvent on_flush;
   MockDataSource* instance;
   perfetto::DataSourceConfig config;
   bool handle_stop_asynchronously = false;
+  bool handle_flush_asynchronously = false;
   std::function<void()> on_start_callback;
   std::function<void()> on_stop_callback;
+  std::function<void()> on_flush_callback;
   std::function<void()> async_stop_closure;
+  std::function<void()> async_flush_closure;
 };
 
 class MockDataSource : public perfetto::DataSource<MockDataSource> {
@@ -288,6 +292,7 @@
   void OnSetup(const SetupArgs&) override;
   void OnStart(const StartArgs&) override;
   void OnStop(const StopArgs&) override;
+  void OnFlush(const FlushArgs&) override;
   TestDataSourceHandle* handle_ = nullptr;
 };
 
@@ -940,6 +945,15 @@
   handle_->on_stop.Notify();
 }
 
+void MockDataSource::OnFlush(const FlushArgs& args) {
+  EXPECT_NE(handle_, nullptr);
+  if (handle_->handle_flush_asynchronously)
+    handle_->async_flush_closure = args.HandleFlushAsynchronously();
+  if (handle_->on_flush_callback)
+    handle_->on_flush_callback();
+  handle_->on_flush.Notify();
+}
+
 // -------------
 // Test fixtures
 // -------------
@@ -3504,6 +3518,21 @@
   EXPECT_EQ("B:foo.Event8(new_arg1=(int)5)", slices[7]);
 }
 
+TEST_P(PerfettoApiTest, TrackEventLegacyNullStringInArgs) {
+  auto* tracing_session = NewTraceWithCategories({"foo"});
+  tracing_session->get()->StartBlocking();
+
+  const char* null_str = nullptr;
+
+  TRACE_EVENT1("foo", "Event1", "arg1", null_str);
+  TRACE_EVENT1("foo", "Event2", "arg1", TRACE_STR_COPY(null_str));
+
+  auto slices = StopSessionAndReadSlicesFromTrace(tracing_session);
+  ASSERT_EQ(2u, slices.size());
+  EXPECT_EQ("B:foo.Event1(arg1=(string)NULL)", slices[0]);
+  EXPECT_EQ("B:foo.Event2(arg1=(string)NULL)", slices[1]);
+}
+
 TEST_P(PerfettoApiTest, FilterDynamicEventName) {
   for (auto filter_dynamic_names : {false, true}) {
     // Create a new trace session.
@@ -4170,6 +4199,112 @@
       ClearDataSourceTlsStateOnReset<TestIncrementalDataSource>();
 }
 
+TEST_P(PerfettoApiTest, OnFlush) {
+  auto* data_source = &data_sources_["my_data_source"];
+
+  // Setup the trace config.
+  perfetto::TraceConfig cfg;
+  cfg.add_buffers()->set_size_kb(1024);
+  auto* ds_cfg = cfg.add_data_sources()->mutable_config();
+  ds_cfg->set_name("my_data_source");
+
+  // Create a new trace session.
+  auto* tracing_session = NewTrace(cfg);
+
+  tracing_session->get()->StartBlocking();
+
+  WaitableTestEvent producer_on_flush;
+  WaitableTestEvent consumer_flush_done;
+
+  data_source->on_flush_callback = [&] {
+    EXPECT_FALSE(consumer_flush_done.notified());
+    producer_on_flush.Notify();
+    MockDataSource::Trace([](MockDataSource::TraceContext ctx) {
+      ctx.NewTracePacket()->set_for_testing()->set_str("on-flush");
+      ctx.Flush();
+    });
+  };
+
+  tracing_session->get()->Flush([&](bool success) {
+    EXPECT_TRUE(success);
+    EXPECT_TRUE(producer_on_flush.notified());
+    consumer_flush_done.Notify();
+  });
+
+  producer_on_flush.Wait();
+  consumer_flush_done.Wait();
+
+  tracing_session->get()->StopBlocking();
+
+  data_source->on_stop.Wait();
+
+  std::vector<char> raw_trace = tracing_session->get()->ReadTraceBlocking();
+  ASSERT_GE(raw_trace.size(), 0u);
+
+  perfetto::protos::gen::Trace trace;
+  ASSERT_TRUE(trace.ParseFromArray(raw_trace.data(), raw_trace.size()));
+  EXPECT_THAT(
+      trace.packet(),
+      Contains(Property(
+          &perfetto::protos::gen::TracePacket::for_testing,
+          Property(&perfetto::protos::gen::TestEvent::str, "on-flush"))));
+}
+
+TEST_P(PerfettoApiTest, OnFlushAsync) {
+  auto* data_source = &data_sources_["my_data_source"];
+
+  // Setup the trace config.
+  perfetto::TraceConfig cfg;
+  cfg.add_buffers()->set_size_kb(1024);
+  auto* ds_cfg = cfg.add_data_sources()->mutable_config();
+  ds_cfg->set_name("my_data_source");
+
+  // Create a new trace session.
+  auto* tracing_session = NewTrace(cfg);
+
+  tracing_session->get()->StartBlocking();
+
+  WaitableTestEvent consumer_flush_done;
+
+  data_source->handle_flush_asynchronously = true;
+  data_source->on_flush_callback = [&] {
+    EXPECT_FALSE(consumer_flush_done.notified());
+  };
+
+  tracing_session->get()->Flush([&](bool success) {
+    EXPECT_TRUE(success);
+    consumer_flush_done.Notify();
+  });
+
+  data_source->on_flush.Wait();
+  perfetto::test::SyncProducers();
+  EXPECT_FALSE(consumer_flush_done.notified());
+
+  // Finish the flush asynchronously
+  MockDataSource::Trace([](MockDataSource::TraceContext ctx) {
+    ctx.NewTracePacket()->set_for_testing()->set_str("on-flush");
+    ctx.Flush();
+  });
+  data_source->async_flush_closure();
+
+  consumer_flush_done.Wait();
+
+  tracing_session->get()->StopBlocking();
+
+  data_source->on_stop.Wait();
+
+  std::vector<char> raw_trace = tracing_session->get()->ReadTraceBlocking();
+  ASSERT_GE(raw_trace.size(), 0u);
+
+  perfetto::protos::gen::Trace trace;
+  ASSERT_TRUE(trace.ParseFromArray(raw_trace.data(), raw_trace.size()));
+  EXPECT_THAT(
+      trace.packet(),
+      Contains(Property(
+          &perfetto::protos::gen::TracePacket::for_testing,
+          Property(&perfetto::protos::gen::TestEvent::str, "on-flush"))));
+}
+
 // Regression test for b/139110180. Checks that GetDataSourceLocked() can be
 // called from OnStart() and OnStop() callbacks without deadlocking.
 TEST_P(PerfettoApiTest, GetDataSourceLockedFromCallbacks) {
diff --git a/src/tracing/test/tracing_integration_test.cc b/src/tracing/test/tracing_integration_test.cc
index 676f7dd..05fa126 100644
--- a/src/tracing/test/tracing_integration_test.cc
+++ b/src/tracing/test/tracing_integration_test.cc
@@ -16,6 +16,7 @@
 
 #include <cinttypes>
 
+#include "perfetto/ext/base/file_utils.h"
 #include "perfetto/ext/base/string_utils.h"
 #include "perfetto/ext/base/temp_file.h"
 #include "perfetto/ext/tracing/core/consumer.h"
@@ -445,11 +446,10 @@
 
   // Check that |tmp_file| contains a valid trace.proto message.
   ASSERT_EQ(0, lseek(tmp_file.fd(), 0, SEEK_SET));
-  char tmp_buf[1024];
-  ssize_t rsize = read(tmp_file.fd(), tmp_buf, sizeof(tmp_buf));
-  ASSERT_GT(rsize, 0);
+  std::string trace_contents;
+  ASSERT_TRUE(base::ReadFileDescriptor(tmp_file.fd(), &trace_contents));
   protos::gen::Trace tmp_trace;
-  ASSERT_TRUE(tmp_trace.ParseFromArray(tmp_buf, static_cast<size_t>(rsize)));
+  ASSERT_TRUE(tmp_trace.ParseFromString(trace_contents));
   size_t num_test_packet = 0;
   size_t num_clock_snapshot_packet = 0;
   size_t num_system_info_packet = 0;
diff --git a/test/configs/statsd.cfg b/test/configs/statsd.cfg
index a384b57..10d5b0d 100644
--- a/test/configs/statsd.cfg
+++ b/test/configs/statsd.cfg
@@ -5,7 +5,7 @@
 
 data_sources {
   config {
-    name: "android.statsd"
+    name: "android.statsd_binder"
     target_buffer: 0
     statsd_tracing_config {
       push_atom_id: ATOM_FLASHLIGHT_STATE_CHANGED
diff --git a/test/data/android_monitor_contention_trace.atr.sha256 b/test/data/android_monitor_contention_trace.atr.sha256
index 2da9281..496b259 100644
--- a/test/data/android_monitor_contention_trace.atr.sha256
+++ b/test/data/android_monitor_contention_trace.atr.sha256
@@ -1 +1 @@
-a4875e605e01aef63fa596bab52140b4c888651a18c52848eb37669a815245a8
\ No newline at end of file
+ae61181ded60bf214859c2072b90dca49226338901d368e6aea329681bff30db
\ No newline at end of file
diff --git a/test/data/fuchsia_events_and_args.fxt.sha256 b/test/data/fuchsia_events_and_args.fxt.sha256
new file mode 100644
index 0000000..cf71b67
--- /dev/null
+++ b/test/data/fuchsia_events_and_args.fxt.sha256
@@ -0,0 +1 @@
+1597b8fd935caedb1e319e423cff4dbfba68327cad6ec21f985c0378c2c76b20
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-android_trace_30s_expand_camera.png.sha256 b/test/data/ui-screenshots/ui-android_trace_30s_expand_camera.png.sha256
index 62feb86..b78630c 100644
--- a/test/data/ui-screenshots/ui-android_trace_30s_expand_camera.png.sha256
+++ b/test/data/ui-screenshots/ui-android_trace_30s_expand_camera.png.sha256
@@ -1 +1 @@
-826cb6e532e4d342e02b6022917423bb481a3b8764bb697706ca890d0ad847c3
\ No newline at end of file
+59f5feeab8b216aab64795b4fb620d9386d45769e46cd3b7df12e0b8c85dca9a
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-android_trace_30s_load.png.sha256 b/test/data/ui-screenshots/ui-android_trace_30s_load.png.sha256
index de95b69..39ac1e4 100644
--- a/test/data/ui-screenshots/ui-android_trace_30s_load.png.sha256
+++ b/test/data/ui-screenshots/ui-android_trace_30s_load.png.sha256
@@ -1 +1 @@
-a56f7bcdebf30ae7da87417e1951867446ae7bd337e450d52ffa45d5d4c2ab65
\ No newline at end of file
+f146aec8fe3dff85764c2760a8726e38f085006c1a217aca89b0a847390684cf
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-chrome_missing_track_names_load.png.sha256 b/test/data/ui-screenshots/ui-chrome_missing_track_names_load.png.sha256
index d34a6fd..cf2b69d 100644
--- a/test/data/ui-screenshots/ui-chrome_missing_track_names_load.png.sha256
+++ b/test/data/ui-screenshots/ui-chrome_missing_track_names_load.png.sha256
@@ -1 +1 @@
-e97284d62ddefdbd091e5e820881e81d5ad95a22edcf50d83cacc06b7b9bedde
\ No newline at end of file
+a238887636bc86b86e179fc5bc11024cd2b5151797365146b4f94c6de6994280
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-chrome_rendering_desktop_expand_browser_proc.png.sha256 b/test/data/ui-screenshots/ui-chrome_rendering_desktop_expand_browser_proc.png.sha256
index 5780168..29aeeb0 100644
--- a/test/data/ui-screenshots/ui-chrome_rendering_desktop_expand_browser_proc.png.sha256
+++ b/test/data/ui-screenshots/ui-chrome_rendering_desktop_expand_browser_proc.png.sha256
@@ -1 +1 @@
-eb2d68c1fab251b50184431abb3a10b420f95e5eca2dc341028feb4a3ea03d40
\ No newline at end of file
+40026a723cf944adb25668cc6618513271aff14cd7271804b4e208bf6a9817d8
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-chrome_rendering_desktop_load.png.sha256 b/test/data/ui-screenshots/ui-chrome_rendering_desktop_load.png.sha256
index 73891dc..4af29fe 100644
--- a/test/data/ui-screenshots/ui-chrome_rendering_desktop_load.png.sha256
+++ b/test/data/ui-screenshots/ui-chrome_rendering_desktop_load.png.sha256
@@ -1 +1 @@
-fd17d4de0cae0cfbaaed535519b333d7ee13cac65ad14144e68335c8ca521216
\ No newline at end of file
+81154f3a88aee01576eba17432269818f1431166cb6071256ee1c35e14851271
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256 b/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256
index ca4c662..2a17dfb 100644
--- a/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256
+++ b/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256
@@ -1 +1 @@
-9c416089e3ae480d5f2f2807d0607949903dc83a01da998c5930c49f66c92859
\ No newline at end of file
+3ae58540e40e9597d92aa15735e253d14ed9fc87753e543695226fce51481004
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-modal_dialog_dismiss_1.png.sha256 b/test/data/ui-screenshots/ui-modal_dialog_dismiss_1.png.sha256
index 69e55e1..bf8f89b 100644
--- a/test/data/ui-screenshots/ui-modal_dialog_dismiss_1.png.sha256
+++ b/test/data/ui-screenshots/ui-modal_dialog_dismiss_1.png.sha256
@@ -1 +1 @@
-e7dc92a76eec326637bebaa176482197c621f48bc066fc761d0b1d19513c8c21
\ No newline at end of file
+db689629c3ba9a51e74d48edd3e801bf062dd985ed5210e5a9b4f1bce50f29a7
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-modal_dialog_dismiss_2.png.sha256 b/test/data/ui-screenshots/ui-modal_dialog_dismiss_2.png.sha256
index 48395a1..6c30778 100644
--- a/test/data/ui-screenshots/ui-modal_dialog_dismiss_2.png.sha256
+++ b/test/data/ui-screenshots/ui-modal_dialog_dismiss_2.png.sha256
@@ -1 +1 @@
-36628de5b3af4cb6de10e6b4f1860ea8534b8b0db37ee994fddc94947947cb6e
\ No newline at end of file
+eae8d6c700a16b5062736c54e4fe0ffab569ffd839715138e74cd257fdb014fa
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-modal_dialog_show_dialog_1.png.sha256 b/test/data/ui-screenshots/ui-modal_dialog_show_dialog_1.png.sha256
index 623260e..5117a65 100644
--- a/test/data/ui-screenshots/ui-modal_dialog_show_dialog_1.png.sha256
+++ b/test/data/ui-screenshots/ui-modal_dialog_show_dialog_1.png.sha256
@@ -1 +1 @@
-b51e0a5035eab217bc4339800e8a6c4025bfc7d5240844c152fbc867b28f75ba
\ No newline at end of file
+5767e81834101bf14dcd1917544f1605b8dbb8aa747a7eefd1c52f4db891575f
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-modal_dialog_show_dialog_2.png.sha256 b/test/data/ui-screenshots/ui-modal_dialog_show_dialog_2.png.sha256
index 679bd39..ff3aafa 100644
--- a/test/data/ui-screenshots/ui-modal_dialog_show_dialog_2.png.sha256
+++ b/test/data/ui-screenshots/ui-modal_dialog_show_dialog_2.png.sha256
@@ -1 +1 @@
-99d3e463fe3812942825829a388bb2d5b11d73010c3213b11d09884dfc1663b5
\ No newline at end of file
+ab1a1b7c948e008fa5d44a4471dc24977f3ab2d592c1ceeaa0ab4afac5bb2336
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-modal_dialog_switch_page_no_dialog.png.sha256 b/test/data/ui-screenshots/ui-modal_dialog_switch_page_no_dialog.png.sha256
index e84c777..f4e56d2 100644
--- a/test/data/ui-screenshots/ui-modal_dialog_switch_page_no_dialog.png.sha256
+++ b/test/data/ui-screenshots/ui-modal_dialog_switch_page_no_dialog.png.sha256
@@ -1 +1 @@
-c5c11d6515e27365eeaf50602243d918cc688ee18d1390649c786b28225e1d81
\ No newline at end of file
+d7c89c766d8db408de06f79654e2f81d8c761c08c4451991447807468df0f3d5
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_navigate_navigate_back_and_forward.png.sha256 b/test/data/ui-screenshots/ui-routing_navigate_navigate_back_and_forward.png.sha256
index 849be2d..46f0129 100644
--- a/test/data/ui-screenshots/ui-routing_navigate_navigate_back_and_forward.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_navigate_navigate_back_and_forward.png.sha256
@@ -1 +1 @@
-4b07a28b92a72568615003beb4eb086adc9be581a27baa2ea593c5e88802647b
\ No newline at end of file
+e596f8037a578f1e58a33bbe08f5d5621b1d37e55456409e5f8799a6897eedb9
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_navigate_open_trace_from_url.png.sha256 b/test/data/ui-screenshots/ui-routing_navigate_open_trace_from_url.png.sha256
index eb26087..23be44d 100644
--- a/test/data/ui-screenshots/ui-routing_navigate_open_trace_from_url.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_navigate_open_trace_from_url.png.sha256
@@ -1 +1 @@
-9bac90702af629b8ecec00b99d86704f188b332695dea2eaf49d79aba3fc8670
\ No newline at end of file
+b938d4dfcc109165feaedb9421276a355d03a383a0d21ab91ff72409b18a3ab5
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_open_invalid_trace_from_blank_page.png.sha256 b/test/data/ui-screenshots/ui-routing_open_invalid_trace_from_blank_page.png.sha256
index b3581ce..d26043d 100644
--- a/test/data/ui-screenshots/ui-routing_open_invalid_trace_from_blank_page.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_open_invalid_trace_from_blank_page.png.sha256
@@ -1 +1 @@
-f64d01ccda59ec74395e00267d7adbf179f5dd962affeeef639ae583756bc65b
\ No newline at end of file
+ef5dfa6588634af3b6ac4950d751f7f8b73eeaae7f74c9e45d65ede4134451fe
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_open_trace_and_go_back_to_landing_page.png.sha256 b/test/data/ui-screenshots/ui-routing_open_trace_and_go_back_to_landing_page.png.sha256
index 2afc1a3..0abbaa7 100644
--- a/test/data/ui-screenshots/ui-routing_open_trace_and_go_back_to_landing_page.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_open_trace_and_go_back_to_landing_page.png.sha256
@@ -1 +1 @@
-04e0762424dae233fb13d5cfff51a2d3075ad62220538010d0ab376fc79022a9
\ No newline at end of file
+d62fb2e2f4067552d4f9d4170b4ffa45c74171b4de750292ded957cb6b12b669
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_access_subpage_then_go_back.png.sha256 b/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_access_subpage_then_go_back.png.sha256
index 4cfdf9f..ad17707 100644
--- a/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_access_subpage_then_go_back.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_access_subpage_then_go_back.png.sha256
@@ -1 +1 @@
-3539c6d2a8ac9d9e15455be491aa171f75f00fdb39e36971b50a060d70732e81
\ No newline at end of file
+a16bc9d707e713ef1ce9110a74790bbbeaf27e1fc7f798152c18e9c81bcedbbf
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_open_first_trace_from_url.png.sha256 b/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_open_first_trace_from_url.png.sha256
index eb26087..23be44d 100644
--- a/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_open_first_trace_from_url.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_open_first_trace_from_url.png.sha256
@@ -1 +1 @@
-9bac90702af629b8ecec00b99d86704f188b332695dea2eaf49d79aba3fc8670
\ No newline at end of file
+b938d4dfcc109165feaedb9421276a355d03a383a0d21ab91ff72409b18a3ab5
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_open_second_trace_from_url.png.sha256 b/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_open_second_trace_from_url.png.sha256
index 4cfdf9f..ad17707 100644
--- a/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_open_second_trace_from_url.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_open_two_traces_then_go_back_open_second_trace_from_url.png.sha256
@@ -1 +1 @@
-3539c6d2a8ac9d9e15455be491aa171f75f00fdb39e36971b50a060d70732e81
\ No newline at end of file
+a16bc9d707e713ef1ce9110a74790bbbeaf27e1fc7f798152c18e9c81bcedbbf
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_start_from_no_trace_go_back_to_first_trace.png.sha256 b/test/data/ui-screenshots/ui-routing_start_from_no_trace_go_back_to_first_trace.png.sha256
index d8da346..796c14f 100644
--- a/test/data/ui-screenshots/ui-routing_start_from_no_trace_go_back_to_first_trace.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_start_from_no_trace_go_back_to_first_trace.png.sha256
@@ -1 +1 @@
-150bfec1eb606a548dc39bbdf081efb82a529b7cc39500605c4e56a5d742fea6
\ No newline at end of file
+7c2317088fd3ada6af276ab517e67163b091f7e9bd98e443794397fe58b61ae3
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_start_from_no_trace_go_to_page_with_no_trace.png.sha256 b/test/data/ui-screenshots/ui-routing_start_from_no_trace_go_to_page_with_no_trace.png.sha256
index a494f13..4324721 100644
--- a/test/data/ui-screenshots/ui-routing_start_from_no_trace_go_to_page_with_no_trace.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_start_from_no_trace_go_to_page_with_no_trace.png.sha256
@@ -1 +1 @@
-8de36401497e509ab127d202b83a056c40c2f5f461254f1ea79fe7a4861b059e
\ No newline at end of file
+9d502e8458f85884c7bf1a6411aa3425c63ccf102e6f537318733704e7a416fb
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_invalid_trace.png.sha256 b/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_invalid_trace.png.sha256
index 6d882f6..060bb57 100644
--- a/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_invalid_trace.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_invalid_trace.png.sha256
@@ -1 +1 @@
-3898ba5cd5fdb63fdef0abced3a1174f5ee864c9b01c7e033e7e2f5e1f0280f2
\ No newline at end of file
+da73a7a9d403491d5de58ae013e8b66337c9bf48422ae2ce212ab91bc33a6d5c
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_second_trace.png.sha256 b/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_second_trace.png.sha256
index eb26087..23be44d 100644
--- a/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_second_trace.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_second_trace.png.sha256
@@ -1 +1 @@
-9bac90702af629b8ecec00b99d86704f188b332695dea2eaf49d79aba3fc8670
\ No newline at end of file
+b938d4dfcc109165feaedb9421276a355d03a383a0d21ab91ff72409b18a3ab5
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_trace_.png.sha256 b/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_trace_.png.sha256
index 4cfdf9f..ad17707 100644
--- a/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_trace_.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_start_from_no_trace_open_trace_.png.sha256
@@ -1 +1 @@
-3539c6d2a8ac9d9e15455be491aa171f75f00fdb39e36971b50a060d70732e81
\ No newline at end of file
+a16bc9d707e713ef1ce9110a74790bbbeaf27e1fc7f798152c18e9c81bcedbbf
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-routing_start_from_no_trace_refresh.png.sha256 b/test/data/ui-screenshots/ui-routing_start_from_no_trace_refresh.png.sha256
index 4cfdf9f..ad17707 100644
--- a/test/data/ui-screenshots/ui-routing_start_from_no_trace_refresh.png.sha256
+++ b/test/data/ui-screenshots/ui-routing_start_from_no_trace_refresh.png.sha256
@@ -1 +1 @@
-3539c6d2a8ac9d9e15455be491aa171f75f00fdb39e36971b50a060d70732e81
\ No newline at end of file
+a16bc9d707e713ef1ce9110a74790bbbeaf27e1fc7f798152c18e9c81bcedbbf
\ No newline at end of file
diff --git a/test/data/webview_jank.pb.sha256 b/test/data/webview_jank.pb.sha256
new file mode 100644
index 0000000..359858d
--- /dev/null
+++ b/test/data/webview_jank.pb.sha256
@@ -0,0 +1 @@
+c9c268e09755625d8b5fad404ccca2e657a8b061417d7e10f03984887e942548
\ No newline at end of file
diff --git a/test/ftrace_integrationtest.cc b/test/ftrace_integrationtest.cc
index 318b308..ae1b104 100644
--- a/test/ftrace_integrationtest.cc
+++ b/test/ftrace_integrationtest.cc
@@ -244,7 +244,7 @@
   helper.WaitForConsumerConnect();
 
   TraceConfig trace_config;
-  trace_config.add_buffers()->set_size_kb(1024);
+  trace_config.add_buffers()->set_size_kb(64);
 
   auto* ds_config = trace_config.add_data_sources()->mutable_config();
   ds_config->set_name("linux.ftrace");
diff --git a/test/trace_processor/diff_tests/android/android_monitor_contention.out b/test/trace_processor/diff_tests/android/android_monitor_contention.out
index fead8d5..02a6412 100644
--- a/test/trace_processor/diff_tests/android/android_monitor_contention.out
+++ b/test/trace_processor/diff_tests/android/android_monitor_contention.out
@@ -1,349 +1,8 @@
 android_monitor_contention {
   node {
-    node_id: 3668
-    ts: 143338147030
-    dur: 40376
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 29739
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10637
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 4648
-    ts: 143374024262
-    dur: 50561
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35887
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14674
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 4650
-    ts: 143374215380
-    dur: 39128
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 27892
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11236
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 4971
-    ts: 143390268000
-    dur: 50641
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35825
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14816
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 4975
-    ts: 143390512389
-    dur: 39894
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 28237
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11657
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 6867
-    ts: 143463394781
-    dur: 7106332
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "RootWindowContainer.java:3548"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 123195
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1578799
-      thread_state_count: 31
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4775909
-      thread_state_count: 35
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 628429
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 6875
-    ts: 143464008929
-    dur: 5024822
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.io"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1758644
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 37646
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 3228532
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 6884
-    ts: 143464297073
-    dur: 6242977
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 46333
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 7014
-    ts: 143468726576
-    dur: 37729
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 7016
-    ts: 143468802279
-    dur: 38774
-    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1485"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 7387
-    ts: 143477492062
-    dur: 18115
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_D"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13201
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4914
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 7391
-    ts: 143477546893
-    dur: 16002
-    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
-    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
-    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
-    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
-    blocking_src: "UidObserverController.java:100"
-    blocked_src: "UidObserverController.java:191"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_D"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11037
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4965
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 7407
-    ts: 143478550108
-    dur: 17484
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_D"
-    blocked_thread_name: "OomAdjuster"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12865
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4619
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 7424
-    ts: 143479806083
-    dur: 18199
+    node_id: 228
+    ts: 1737051099036
+    dur: 48097
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -358,19 +17,19 @@
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 13265
+      thread_state_dur: 34051
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4934
+      thread_state_dur: 14046
       thread_state_count: 1
     }
   }
   node {
-    node_id: 7440
-    ts: 143479869209
-    dur: 14556
+    node_id: 230
+    ts: 1737051866140
+    dur: 45214
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -385,1130 +44,46 @@
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 10304
+      thread_state_dur: 31025
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4252
+      thread_state_dur: 14189
       thread_state_count: 1
     }
   }
   node {
-    node_id: 7583
-    ts: 143483685578
-    dur: 4925701
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
+    node_id: 233
+    ts: 1737052012461
+    dur: 41841
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
     waiter_count: 0
     blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 1761205
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1106110
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 1030024
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1028362
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 7625
-    ts: 143485476470
-    dur: 17473
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 7649
-    ts: 143486820347
-    dur: 1860581
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1095150
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 7744
-    ts: 143488825683
-    dur: 16998
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11979
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5019
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 7763
-    ts: 143488905854
-    dur: 25351
-    blocking_method: "void com.android.server.appop.AppOpsService.updateUidProcState(int, int, int)"
-    blocked_method: "void com.android.server.appop.AppOpsService.notifyOpChangedForAllPkgsInUid(int, int, boolean, com.android.internal.app.IAppOpsCallback)"
-    short_blocking_method: "com.android.server.appop.AppOpsService.updateUidProcState"
-    short_blocked_method: "com.android.server.appop.AppOpsService.notifyOpChangedForAllPkgsInUid"
-    blocking_src: "AppOpsService.java:2106"
-    blocked_src: "AppOpsService.java:2603"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 18791
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6560
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 7947
-    ts: 143491612814
-    dur: 142063
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_E"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 136300
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5763
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 7955
-    ts: 143491788030
-    dur: 59458
-    blocking_method: "int com.android.server.wm.WindowManagerService.addWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, android.view.InsetsVisibilities, android.view.InputChannel, android.view.InsetsState, android.view.InsetsSourceControl[], android.graphics.Rect, float[])"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.addWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:1473"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_E"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11712
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 47746
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 8557
-    ts: 143505625402
-    dur: 16310
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11930
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4380
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 8610
-    ts: 143506771102
-    dur: 1693526
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "WindowManagerService.java:3510"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "binder:642_3"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 143506680694
-    binder_reply_tid: 1559
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 9751
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 812578
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 765940
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 105257
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 8636
-    ts: 143507577006
-    dur: 295968
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 6356
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 8951
-    ts: 143523121774
-    dur: 1425157
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportFocusChanged(android.os.IBinder, android.os.IBinder)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportFocusChanged"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "WindowManagerService.java:5251"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10877
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 50594
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1363686
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 9637
-    ts: 143553216486
-    dur: 17269
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12496
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4773
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 11034
-    ts: 143587584391
-    dur: 103134
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 96632
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6502
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 11051
-    ts: 143588578528
-    dur: 17189
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12266
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4923
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 11054
-    ts: 143588609074
-    dur: 3061
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "void android.os.MessageQueue.removeMessages(android.os.Handler, int, java.lang.Object)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.removeMessages"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:678"
-    waiter_count: 1
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "binder:1743_6"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 3061
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 11627
-    ts: 143613672941
-    dur: 17750
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13358
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4392
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 11630
-    ts: 143613787864
-    dur: 13750
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9893
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3857
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 11653
-    ts: 143614955849
-    dur: 17817
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13138
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4679
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 11730
-    ts: 143615432753
-    dur: 284209
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 277018
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7191
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 11774
-    ts: 143616480197
-    dur: 16568
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "pool-2-thread-1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11888
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4680
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 12501
-    ts: 143628637507
-    dur: 15750
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11504
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4246
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 12504
-    ts: 143628690789
-    dur: 12995
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9216
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3779
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 12507
-    ts: 143628731154
-    dur: 12342
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 8684
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3658
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 13153
-    ts: 143645430878
-    dur: 18342
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13604
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4738
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 13604
-    ts: 143652874136
-    dur: 2020516
-    blocking_method: "boolean android.os.BinderProxy.transactNative(int, android.os.Parcel, android.os.Parcel, int)"
-    blocked_method: "android.content.IContentProvider android.app.ActivityThread.acquireExistingProvider(android.content.Context, java.lang.String, int, boolean)"
-    short_blocking_method: "android.os.BinderProxy.transactNative"
-    short_blocked_method: "android.app.ActivityThread.acquireExistingProvider"
-    blocking_src: "BinderProxy.java:-2"
-    blocked_src: "ActivityThread.java:7159"
-    waiter_count: 0
-    blocking_thread_name: "AsyncTask #1"
-    blocked_thread_name: "DialerExecutors"
-    process_name: "com.android.dialer"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 1611311
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 99821
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 309384
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 13663
-    ts: 143654433688
-    dur: 29837
-    blocking_method: "android.os.Message com.android.internal.os.HandlerCaller.obtainMessageI(int, int)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "com.android.internal.os.HandlerCaller.obtainMessageI"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "HandlerCaller.java:139"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 9215
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 3600
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 17022
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 14905
-    ts: 143668048758
-    dur: 19771
-    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.nativeWake"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:-2"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:2275_2"
-    blocked_thread_name: "d.process.acore"
-    process_name: "android.process.acore"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12844
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6927
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 14910
-    ts: 143668238307
-    dur: 1911886
-    blocking_method: "long android.database.sqlite.SQLiteConnection.nativeOpen(java.lang.String, int, java.lang.String, boolean, boolean, int, int)"
-    blocked_method: "void android.database.sqlite.SQLiteConnectionPool.releaseConnection(android.database.sqlite.SQLiteConnection)"
-    short_blocking_method: "android.database.sqlite.SQLiteConnection.nativeOpen"
-    short_blocked_method: "android.database.sqlite.SQLiteConnectionPool.releaseConnection"
-    blocking_src: "SQLiteConnection.java:-2"
-    blocked_src: "SQLiteConnectionPool.java:409"
-    waiter_count: 0
-    blocking_thread_name: "binder:2275_2"
-    blocked_thread_name: "binder:2275_1"
-    process_name: "android.process.acore"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 143665074457
-    binder_reply_tid: 2295
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 20013
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 98707
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 1793166
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 14941
-    ts: 143670552101
-    dur: 3305336
-    blocking_method: "void android.database.sqlite.SQLiteConnectionPool.releaseConnection(android.database.sqlite.SQLiteConnection)"
-    blocked_method: "void android.database.sqlite.SQLiteConnectionPool.releaseConnection(android.database.sqlite.SQLiteConnection)"
-    short_blocking_method: "android.database.sqlite.SQLiteConnectionPool.releaseConnection"
-    short_blocked_method: "android.database.sqlite.SQLiteConnectionPool.releaseConnection"
-    blocking_src: "SQLiteConnectionPool.java:409"
-    blocked_src: "SQLiteConnectionPool.java:409"
-    waiter_count: 0
-    blocking_thread_name: "binder:2275_2"
-    blocked_thread_name: "binder:2275_1"
-    process_name: "android.process.acore"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 143665074457
-    binder_reply_tid: 2295
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 3161775
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 143561
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 15190
-    ts: 143679983462
-    dur: 531478
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 19888
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 29282
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 341599
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 140709
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 19885
-    ts: 143770170620
-    dur: 9072332
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_D"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 181002
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 65858
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 8825472
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 25643
-    ts: 143830412020
-    dur: 14214872
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:5471"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 11563000
-      thread_state_count: 8
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 544524
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 2039488
-      thread_state_count: 13
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 67860
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 26122
-    ts: 143834504401
-    dur: 9694657
-    blocking_method: "void com.android.server.wm.StartingSurfaceController$StartingSurface.remove(boolean)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.StartingSurfaceController$StartingSurface.remove"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "StartingSurfaceController.java:272"
-    blocked_src: "Session.java:581"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_3"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 26923
-    ts: 143840894687
-    dur: 483448
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 466949
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 16499
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 27170
-    ts: 143842942549
-    dur: 1336209
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.ActivityClientController.activityIdle(android.os.IBinder, android.content.res.Configuration, boolean)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.ActivityClientController.activityIdle"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "ActivityClientController.java:136"
-    waiter_count: 2
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_D"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 27452
-    ts: 143844651555
-    dur: 3365
-    blocking_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:5471"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3365
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 27489
-    ts: 143845706327
-    dur: 83464
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 7644
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 72081
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 3739
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 28186
-    ts: 143852310714
-    dur: 412425
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "binder:642_D"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 132426
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 279999
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 28200
-    ts: 143852576546
-    dur: 243080
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportFocusChanged(android.os.IBinder, android.os.IBinder)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportFocusChanged"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "WindowManagerService.java:5251"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 218084
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 24996
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 28715
-    ts: 143861803730
-    dur: 354225
-    blocking_method: "void com.android.server.inputmethod.InputMethodManagerService.onSessionCreated(com.android.server.inputmethod.IInputMethodInvoker, com.android.internal.view.IInputMethodSession, android.view.InputChannel)"
-    blocked_method: "void com.android.server.inputmethod.InputMethodManagerService.reportFullscreenMode(android.os.IBinder, boolean)"
-    short_blocking_method: "com.android.server.inputmethod.InputMethodManagerService.onSessionCreated"
-    short_blocked_method: "com.android.server.inputmethod.InputMethodManagerService.reportFullscreenMode"
-    blocking_src: "InputMethodManagerService.java:3001"
-    blocked_src: "InputMethodManagerService.java:5891"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "binder:642_1"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 117150
+      thread_state_dur: 26675
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 231021
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 6054
+      thread_state_dur: 15166
       thread_state_count: 1
     }
   }
   node {
-    node_id: 28755
-    ts: 143862815986
-    dur: 15826
+    node_id: 286
+    ts: 1737055789278
+    dur: 40769
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -1516,2985 +91,114 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11440
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4386
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 28766
-    ts: 143862952016
-    dur: 248683
-    blocking_method: "void com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow(android.os.IBinder, android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List, java.util.List)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged"
-    blocking_src: "WindowManagerService.java:7897"
-    blocked_src: "WindowManagerService.java:4583"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_D"
-    blocked_thread_name: "binder:642_3"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 79891
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 6890
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 104348
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 57554
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 28769
-    ts: 143862997423
-    dur: 408802
-    blocking_method: "void com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow(android.os.IBinder, android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "WindowManagerService.java:7897"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_D"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 173823
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 6313
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 20871
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 16750
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 28983
-    ts: 143864645201
-    dur: 297257
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 278715
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 18542
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 29929
-    ts: 143869674025
-    dur: 907067
-    blocking_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "InputMonitor.java:119"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_D"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 639856
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 7704
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 229094
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 30413
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 44128
-    ts: 144006526292
-    dur: 22553
-    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.nativeWake"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:-2"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: ".android.dialer"
-    process_name: "com.android.dialer"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15917
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6636
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 48108
-    ts: 144070552901
-    dur: 40810
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 29585
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11225
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 48117
-    ts: 144070643182
-    dur: 39174
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24349
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14825
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50034
-    ts: 144106866392
-    dur: 48603
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35282
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13321
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50037
-    ts: 144106969547
-    dur: 44476
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 27712
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 16764
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50101
-    ts: 144108904346
-    dur: 683288
-    blocking_method: "void com.android.server.wm.RemoteAnimationController.onAnimationFinished()"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.RemoteAnimationController.onAnimationFinished"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "RemoteAnimationController.java:278"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 93804
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 585467
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 4017
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50106
-    ts: 144109020647
-    dur: 3727361
-    blocking_method: "void com.android.server.wm.WindowManagerService.onAnimationFinished()"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.onAnimationFinished"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "WindowManagerService.java:8496"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 249280
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 250174
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 2664937
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 50137
-    ts: 144110047620
-    dur: 45219
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 32740
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12479
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50166
-    ts: 144111241267
-    dur: 985539
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 907671
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 77868
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50170
-    ts: 144111425774
-    dur: 1259671
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:4573"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_3"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 187585
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 1003580
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 68506
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 50185
-    ts: 144111826656
-    dur: 413311
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:554"
-    waiter_count: 1
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "binder:1743_B"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21437
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50227
-    ts: 144112859338
-    dur: 465550
-    blocking_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List, java.util.List)"
-    short_blocking_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged"
-    blocking_src: "ActivityTaskSupervisor.java:2407"
-    blocked_src: "WindowManagerService.java:4583"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "binder:642_D"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 203917
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 261633
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 50290
-    ts: 144113384410
-    dur: 89493
-    blocking_method: "void com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List, java.util.List)"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "WindowManagerService.java:4583"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_D"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 79494
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 9999
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50294
-    ts: 144113494523
-    dur: 25037
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17920
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7117
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50301
-    ts: 144113629027
-    dur: 22231
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15604
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6627
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50308
-    ts: 144113760954
-    dur: 1381773
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
+    blocking_thread_name: "binder:642_1"
     blocked_thread_name: "batterystats-ha"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 1314821
+      thread_state_dur: 28184
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 66952
+      thread_state_dur: 12585
       thread_state_count: 1
     }
   }
   node {
-    node_id: 50314
-    ts: 144113917393
-    dur: 28027
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 291
+    ts: 1737056375519
+    dur: 37555955
+    blocking_method: "boolean com.android.server.am.ActivityManagerService.forceStopPackageLocked(java.lang.String, int, boolean, boolean, boolean, boolean, boolean, int, java.lang.String)"
+    blocked_method: "boolean com.android.server.am.ActivityManagerService.isUidActive(int, java.lang.String)"
+    short_blocking_method: "com.android.server.am.ActivityManagerService.forceStopPackageLocked"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.isUidActive"
+    blocking_src: "ActivityManagerService.java:4484"
+    blocked_src: "ActivityManagerService.java:7325"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 20018
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8009
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50319
-    ts: 144114261515
-    dur: 27167
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 19332
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7835
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50346
-    ts: 144114876301
-    dur: 6715395
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 6489002
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 87550
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 138843
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50360
-    ts: 144115120415
-    dur: 4930055
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "OomAdjuster"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 4908066
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 21989
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 50952
-    ts: 144125761376
-    dur: 20186
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14623
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5563
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 51278
-    ts: 144134805182
-    dur: 19704
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14252
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5452
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 53053
-    ts: 144203243522
-    dur: 17291
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_D"
-    blocked_thread_name: "OomAdjuster"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13053
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4238
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 53094
-    ts: 144203919876
-    dur: 161192
-    blocking_method: "void com.android.server.power.hint.HintManagerService$NativeWrapper.nativeReportActualWorkDuration(long, long[], long[])"
-    blocked_method: "void com.android.server.power.hint.HintManagerService$UidObserver.lambda$onUidStateChanged$1(int, int)"
-    short_blocking_method: "com.android.server.power.hint.HintManagerService$NativeWrapper.nativeReportActualWorkDuration"
-    short_blocked_method: "com.android.server.power.hint.HintManagerService$UidObserver.lambda$onUidStateChanged$1"
-    blocking_src: "HintManagerService.java:-2"
-    blocked_src: "HintManagerService.java:241"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 129472
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 31720
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 53339
-    ts: 144222356835
-    dur: 23293
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16684
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6609
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 53376
-    ts: 144228177045
-    dur: 36094
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14732
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 21362
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 53380
-    ts: 144228256866
-    dur: 183170
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_3"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 183170
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 53396
-    ts: 144229155187
-    dur: 229685
-    blocking_method: "void com.android.server.wm.Session.setOnBackInvokedCallbackInfo(android.view.IWindow, android.window.OnBackInvokedCallbackInfo)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    short_blocking_method: "com.android.server.wm.Session.setOnBackInvokedCallbackInfo"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    blocking_src: "Session.java:935"
-    blocked_src: "WindowManagerService.java:2050"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_D"
+    blocking_thread_name: "binder:642_1"
     blocked_thread_name: "binder:642_12"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    binder_reply_ts: 144229053358
-    binder_reply_tid: 3032
+    binder_reply_ts: 1737055785896
+    binder_reply_tid: 2720
     thread_states {
       thread_state: "R"
-      thread_state_dur: 12871
+      thread_state_dur: 418000
       thread_state_count: 1
     }
     thread_states {
+      thread_state: "R+"
+      thread_state_dur: 27246345
+      thread_state_count: 103
+    }
+    thread_states {
       thread_state: "Running"
-      thread_state_dur: 154834
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 61980
-      thread_state_count: 1
+      thread_state_dur: 9891610
+      thread_state_count: 103
     }
   }
   node {
-    node_id: 53398
-    ts: 144229593187
-    dur: 54315
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    node_id: 325
+    ts: 1737062755240
+    dur: 40603
+    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocking_method: "android.os.MessageQueue.nativeWake"
     short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
+    blocking_src: "MessageQueue.java:-2"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.display"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "StorageUserConn"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15539
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 38776
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 53415
-    ts: 144230129813
-    dur: 25359
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 327
+    ts: 1737063410007
+    dur: 46114664
+    blocking_method: "void com.android.server.am.ActivityManagerService.forceStopPackage(java.lang.String, int)"
+    blocked_method: "boolean com.android.server.am.ActivityManagerService.unbindService(android.app.IServiceConnection)"
+    short_blocking_method: "com.android.server.am.ActivityManagerService.forceStopPackage"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.unbindService"
+    blocking_src: "ActivityManagerService.java:3992"
+    blocked_src: "ActivityManagerService.java:12719"
     waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 18723
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6636
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 53425
-    ts: 144230608048
-    dur: 3382
-    blocking_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2050"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3382
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 55787
-    ts: 144383769428
-    dur: 127859
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 114768
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13091
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 55826
-    ts: 144385083028
-    dur: 39128
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 28398
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10730
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 55832
-    ts: 144385210904
-    dur: 32138
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 22670
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9468
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 56022
-    ts: 144404070707
-    dur: 50491
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 36482
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14009
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 64192
-    ts: 146502146471
-    dur: 50638
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 37170
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13468
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 64593
-    ts: 146562392540
-    dur: 151879
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 129509
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 22370
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 64595
-    ts: 146562588803
-    dur: 107737
-    blocking_method: "void com.android.server.power.PowerManagerService.releaseWakeLockInternal(android.os.IBinder, int)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.releaseWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1645"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 23038
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 84699
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 65802
-    ts: 146909551905
-    dur: 46299
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "VolumeDialogCon"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 32750
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13549
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 65827
-    ts: 146911664372
-    dur: 9119564
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "RootWindowContainer.java:3548"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "StorageUserConn"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R"
-      thread_state_dur: 913610
-      thread_state_count: 8
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2678343
-      thread_state_count: 8
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4936389
-      thread_state_count: 17
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 591222
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 65830
-    ts: 146911750821
-    dur: 9090810
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 435161
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 65858
-    ts: 146913898644
-    dur: 7856677
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.ActivityClientController.activityTopResumedStateLost()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.ActivityClientController.activityTopResumedStateLost"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "ActivityClientController.java:166"
-    waiter_count: 2
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 146913757413
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1348851
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66046
-    ts: 146923521644
-    dur: 64399
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "OomAdjuster"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 48289
+      thread_state_dur: 1033321
       thread_state_count: 2
     }
     thread_states {
-      thread_state: "Running"
-      thread_state_dur: 16110
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66096
-    ts: 146926725883
-    dur: 27329
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
       thread_state: "R+"
-      thread_state_dur: 19976
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7353
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66099
-    ts: 146926854827
-    dur: 22888
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16218
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6670
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66123
-    ts: 146927735850
-    dur: 1118131
-    blocking_method: "void com.android.server.am.ActivityManagerService.trimApplications(boolean, java.lang.String)"
-    blocked_method: "void com.android.server.am.ActivityManagerService$LocalService.broadcastCloseSystemDialogs(java.lang.String)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.trimApplications"
-    short_blocked_method: "com.android.server.am.ActivityManagerService$LocalService.broadcastCloseSystemDialogs"
-    blocking_src: "ActivityManagerService.java:15822"
-    blocked_src: "ActivityManagerService.java:17191"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 146926915192
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 938332
+      thread_state_dur: 217136
       thread_state_count: 3
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 179799
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 66135
-    ts: 146928973815
-    dur: 20648
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14888
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5760
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66139
-    ts: 146929015904
-    dur: 18945
-    blocking_method: "void com.android.server.am.ActivityManagerService$LocalService.broadcastCloseSystemDialogs(java.lang.String)"
-    blocked_method: "void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService$LocalService.broadcastCloseSystemDialogs"
-    short_blocked_method: "com.android.server.am.BroadcastQueue.processNextBroadcast"
-    blocking_src: "ActivityManagerService.java:17191"
-    blocked_src: "BroadcastQueue.java:1158"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12726
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6219
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66163
-    ts: 146929927761
-    dur: 552968
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 328527
-      thread_state_count: 8
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 224441
-      thread_state_count: 7
-    }
-  }
-  node {
-    node_id: 66181
-    ts: 146930382955
-    dur: 603673
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 458376
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 138833
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 6464
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66213
-    ts: 146931586005
-    dur: 23516
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16727
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6789
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66220
-    ts: 146931722858
-    dur: 22668
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15951
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6717
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66228
-    ts: 146931837757
-    dur: 5178832
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "VolumeDialogCon"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 5172291
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6541
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66831
-    ts: 146937417927
-    dur: 18574
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13367
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5207
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 66926
-    ts: 146939154238
-    dur: 1066795
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 6703
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 403916
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 656176
-      thread_state_count: 6
-    }
-  }
-  node {
-    node_id: 67334
-    ts: 146956411827
-    dur: 17799
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12943
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4856
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 67337
-    ts: 146956475250
-    dur: 13557
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9632
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3925
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 68025
-    ts: 146974659758
-    dur: 3754483
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.finishDrawingWindow(com.android.server.wm.Session, android.view.IWindow, android.view.SurfaceControl$Transaction, int)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.finishDrawingWindow"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "WindowManagerService.java:2743"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_10"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 3686462
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 60600
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 7421
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 68345
-    ts: 146978461550
-    dur: 15844
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11213
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4631
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 68355
-    ts: 146978502078
-    dur: 14660
-    blocking_method: "void com.android.server.wm.WindowManagerService.finishDrawingWindow(com.android.server.wm.Session, android.view.IWindow, android.view.SurfaceControl$Transaction, int)"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.finishDrawingWindow"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "WindowManagerService.java:2743"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10047
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4613
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 68421
-    ts: 146979255086
-    dur: 30179261
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:5471"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 122268
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 253359
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 2531515
-      thread_state_count: 12
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 27272119
-      thread_state_count: 6
-    }
-  }
-  node {
-    node_id: 69053
-    ts: 146986027930
-    dur: 25134270
-    blocking_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    blocked_method: "void com.android.server.wm.ActivityClientController.activityIdle(android.os.IBinder, android.content.res.Configuration, boolean)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    short_blocked_method: "com.android.server.wm.ActivityClientController.activityIdle"
-    blocking_src: "WindowManagerService.java:3511"
-    blocked_src: "ActivityClientController.java:136"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 946523
-      thread_state_count: 8
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 782308
-      thread_state_count: 8
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 8887
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 69099
-    ts: 146987786843
-    dur: 24888520
-    blocking_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    blocked_method: "android.app.ActivityTaskManager$RootTaskInfo com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo"
-    blocking_src: "WindowManagerService.java:3511"
-    blocked_src: "ActivityTaskManagerService.java:1977"
-    waiter_count: 2
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_3"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 146987701011
-    binder_reply_tid: 1559
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1522050
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 69110
-    ts: 146989891841
-    dur: 22911546
-    blocking_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged"
-    blocking_src: "WindowManagerService.java:3511"
-    blocked_src: "WindowManagerService.java:4573"
-    waiter_count: 3
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_10"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1650074
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 69764
-    ts: 147001978181
-    dur: 16821
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12162
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4659
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 69776
-    ts: 147004139374
-    dur: 16447
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "launcher-loader"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12026
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4421
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 70147
-    ts: 147008662176
-    dur: 19565
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 70177
-    ts: 147009620685
-    dur: 17077
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12324
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4753
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 70231
-    ts: 147010971259
-    dur: 17704
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 70234
-    ts: 147011026264
-    dur: 13626
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 70828
-    ts: 147021726760
-    dur: 16010
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "launcher-loader"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11649
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4361
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 71275
-    ts: 147032691173
-    dur: 257695
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportFocusChanged(android.os.IBinder, android.os.IBinder)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportFocusChanged"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "WindowManagerService.java:5251"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 56413
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 195799
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 5483
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 72270
-    ts: 147040431197
-    dur: 1115998
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1085018
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 22383
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 8597
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 72330
-    ts: 147041284210
-    dur: 19222
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.imms"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14112
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5110
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 72351
-    ts: 147041427089
-    dur: 6187574
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:554"
-    waiter_count: 1
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "binder:1977_6"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 6076065
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 72367
-    ts: 147041508170
-    dur: 6129149
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:554"
-    waiter_count: 2
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "binder:1977_1"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 6098721
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 73514
-    ts: 147061857414
-    dur: 17602
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13069
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4533
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 74367
-    ts: 147070502434
-    dur: 18746
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: ".android.dialer"
-    process_name: "com.android.dialer"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13639
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5107
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 78542
-    ts: 147151155108
-    dur: 605963
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_1"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 541697
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 64266
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 79104
-    ts: 147166967410
-    dur: 456167
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_10"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 409375
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 46792
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 83562
-    ts: 147266967116
-    dur: 715734
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_1"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 219973
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 135648
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 347216
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 12897
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91649
-    ts: 147590461622
-    dur: 770175
-    blocking_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "ActivityTaskSupervisor.java:2407"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 212589
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 557586
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91677
-    ts: 147590980906
-    dur: 347694
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 329566
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 18128
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91740
-    ts: 147593526093
-    dur: 2354526
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2335425
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 19101
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91744
-    ts: 147593677668
-    dur: 43244
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 30875
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12369
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91748
-    ts: 147594251514
-    dur: 26488
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 18907
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7581
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91752
-    ts: 147594418047
-    dur: 27182
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 19731
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7451
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91759
-    ts: 147594653049
-    dur: 24702
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17532
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7170
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91780
-    ts: 147595156624
-    dur: 31241
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 22841
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8400
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91786
-    ts: 147595259585
-    dur: 25704
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 18119
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7585
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91790
-    ts: 147595377913
-    dur: 26678
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 18985
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7693
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91792
-    ts: 147595443048
-    dur: 25516
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17981
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7535
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91810
-    ts: 147596109085
-    dur: 27905
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 20265
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7640
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91812
-    ts: 147596262452
-    dur: 26455
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 18826
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7629
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 91818
-    ts: 147596396972
-    dur: 67176
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12088
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 55088
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 96993
-    ts: 148270895206
-    dur: 133303
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 36553
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 96750
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 97298
-    ts: 148290676748
-    dur: 113015
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 23542
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 89473
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 97859
-    ts: 148322236265
-    dur: 50472
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35229
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 15243
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 97861
-    ts: 148322478567
-    dur: 40003
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 28135
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11868
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 98099
-    ts: 148332654236
-    dur: 50768
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 36721
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14047
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 98103
-    ts: 148332756776
-    dur: 623357
-    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1485"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 398856
+      thread_state_dur: 1531423
       thread_state_count: 4
     }
     thread_states {
-      thread_state: "Running"
-      thread_state_dur: 224501
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 98112
-    ts: 148332844388
-    dur: 42689
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 98232
-    ts: 148343651440
-    dur: 9047989
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "RootWindowContainer.java:3548"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 3068625
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 747688
-      thread_state_count: 18
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4755515
-      thread_state_count: 22
-    }
-    thread_states {
       thread_state: "S"
-      thread_state_dur: 476161
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 98257
-    ts: 148344387891
-    dur: 9910586
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1610121
+      thread_state_dur: 12826607
       thread_state_count: 1
     }
   }
   node {
-    node_id: 98542
-    ts: 148363018590
-    dur: 746642
+    node_id: 329
+    ts: 1737063671723
+    dur: 37395
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -4507,26 +211,11 @@
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 68473
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 128208
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 549961
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99049
-    ts: 148371981079
-    dur: 18382
+    node_id: 333
+    ts: 1737064791138
+    dur: 39671
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -4534,53 +223,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "batterystats-ha"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13480
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4902
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99053
-    ts: 148372093729
-    dur: 17062
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 336
+    ts: 1737064905607
+    dur: 36485
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.bg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12232
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4830
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99069
-    ts: 148372532215
-    dur: 207819
+    node_id: 423
+    ts: 1737079706338
+    dur: 422780
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -4588,107 +257,67 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "batterystats-ha"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 196306
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11513
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99080
-    ts: 148373210160
-    dur: 16331
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 450
+    ts: 1737080194439
+    dur: 106755
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11783
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4548
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99088
-    ts: 148373657201
-    dur: 14860
-    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
+    node_id: 536
+    ts: 1737083097868
+    dur: 418004
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.nativeWake"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
     short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:-2"
+    blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "jobscheduler.bg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10462
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4398
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99092
-    ts: 148373720969
-    dur: 13648
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 547
+    ts: 1737083570272
+    dur: 22979
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9747
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3901
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99096
-    ts: 148373790977
-    dur: 14651
+    node_id: 549
+    ts: 1737083661651
+    dur: 70166
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -4696,53 +325,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10229
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4422
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99102
-    ts: 148374048900
-    dur: 16397
-    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.nativeWake"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:-2"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 553
+    ts: 1737083767030
+    dur: 87452
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "bgres-controlle"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11568
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4829
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99106
-    ts: 148374096599
-    dur: 27568
+    node_id: 564
+    ts: 1737084352020
+    dur: 610605
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -4750,53 +359,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "bgres-controlle"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 19348
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8220
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99115
-    ts: 148374254920
-    dur: 16350
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 600
+    ts: 1737085028725
+    dur: 22524
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11954
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4396
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99118
-    ts: 148374350675
-    dur: 13551
+    node_id: 607
+    ts: 1737085172910
+    dur: 177041
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -4804,117 +393,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9467
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4084
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 99290
-    ts: 148377344959
-    dur: 16651
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 613
+    ts: 1737085397198
+    dur: 222027
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12136
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4515
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 99948
-    ts: 148399471733
-    dur: 4285028
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportFocusChanged(android.os.IBinder, android.os.IBinder)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportFocusChanged"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "WindowManagerService.java:5251"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 22885
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 4127524
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 128355
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 6264
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 100462
-    ts: 148411860421
-    dur: 18131
-    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.nativeWake"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:-2"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:3228_1"
-    blocked_thread_name: "m.webview_shell"
-    process_name: "org.chromium.webview_shell"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12716
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5415
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 100465
-    ts: 148411943384
-    dur: 12765
+    node_id: 616
+    ts: 1737085701252
+    dur: 74351
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -4922,80 +427,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:3228_1"
-    blocked_thread_name: "m.webview_shell"
-    process_name: "org.chromium.webview_shell"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9089
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3676
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 100483
-    ts: 148414168341
-    dur: 6159239
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "batterystats-ha"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 6150314
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8925
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 100867
-    ts: 148420508776
-    dur: 15682
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 620
+    ts: 1737085814565
+    dur: 20392
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "batterystats-ha"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11394
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4288
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 100870
-    ts: 148420750303
-    dur: 16644
+    node_id: 622
+    ts: 1737085890068
+    dur: 82270
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -5003,53 +461,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.bg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11873
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4771
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 100933
-    ts: 148421708786
-    dur: 16985
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 626
+    ts: 1737086010699
+    dur: 21428
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "batterystats-ha"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12443
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4542
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 100939
-    ts: 148421830403
-    dur: 2366693
+    node_id: 628
+    ts: 1737086096530
+    dur: 66276
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -5057,53 +495,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.bg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2352695
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13998
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 100951
-    ts: 148424477119
-    dur: 15014
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 632
+    ts: 1737086195810
+    dur: 82235
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.bg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10724
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4290
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 101137
-    ts: 148429612632
-    dur: 17108
+    node_id: 635
+    ts: 1737086457461
+    dur: 221578
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -5111,53 +529,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.bg"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12275
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4833
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 101140
-    ts: 148429744572
-    dur: 15651
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 642
+    ts: 1737086736113
+    dur: 22026
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
     waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "batterystats-ha"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11348
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4303
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 101818
-    ts: 148442036773
-    dur: 15846
+    node_id: 648
+    ts: 1737086937596
+    dur: 101313
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -5165,26 +563,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11459
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4387
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 102191
-    ts: 148453749992
-    dur: 16017
+    node_id: 652
+    ts: 1737087085776
+    dur: 20982
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 658
+    ts: 1737087250329
+    dur: 70570
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -5192,26 +597,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11648
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4369
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 102996
-    ts: 148469704587
-    dur: 3702
+    node_id: 662
+    ts: 1737087359159
+    dur: 21012
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 668
+    ts: 1737087510285
+    dur: 72680
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -5219,21 +631,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "hwuiTask1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 3702
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 103401
-    ts: 148474719868
-    dur: 237870
+    node_id: 672
+    ts: 1737087629336
+    dur: 20625
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 678
+    ts: 1737087776958
+    dur: 77652
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -5241,25 +665,202 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 226837
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11033
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 103405
-    ts: 148474858323
+    node_id: 682
+    ts: 1737087908874
+    dur: 36432
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 691
+    ts: 1737088173007
+    dur: 21327
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 694
+    ts: 1737088232763
+    dur: 19794
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 700
+    ts: 1737088385479
+    dur: 19449
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 704
+    ts: 1737088435540
+    dur: 74457
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 711
+    ts: 1737088642115
+    dur: 19776
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 714
+    ts: 1737088695169
+    dur: 19264
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 721
+    ts: 1737088884385
+    dur: 20125
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 724
+    ts: 1737088938281
+    dur: 19838
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 734
+    ts: 1737089379631
+    dur: 22080
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 737
+    ts: 1737089446994
+    dur: 19502
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 743
+    ts: 1737089611044
     dur: 18225
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
@@ -5268,4330 +869,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13478
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4747
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 103412
-    ts: 148475034765
-    dur: 15206
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10755
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4451
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 104653
-    ts: 148505510308
-    dur: 22156
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16363
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5793
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 104656
-    ts: 148505561828
-    dur: 19289
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12158
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7131
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 104687
-    ts: 148508152778
-    dur: 20591
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15113
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5478
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 104699
-    ts: 148509191549
-    dur: 20057
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14748
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5309
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 104701
-    ts: 148509321101
-    dur: 561136
-    blocking_method: "int com.android.server.am.ActivityManagerService.bindServiceInstance(android.app.IApplicationThread, android.os.IBinder, android.content.Intent, java.lang.String, android.app.IServiceConnection, int, java.lang.String, boolean, int, java.lang.String, java.lang.String, int)"
-    blocked_method: "boolean com.android.server.am.ActivityManagerService$LocalService.isProfileOwner(int)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.bindServiceInstance"
-    short_blocked_method: "com.android.server.am.ActivityManagerService$LocalService.isProfileOwner"
-    blocking_src: "ActivityManagerService.java:12681"
-    blocked_src: "ActivityManagerService.java:17400"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "bgres-controlle"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 548806
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12330
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 104717
-    ts: 148511106286
-    dur: 20332
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14850
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5482
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 104721
-    ts: 148511393397
-    dur: 18905
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13725
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5180
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 106027
-    ts: 148539822526
-    dur: 18545
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13609
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4936
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 106806
-    ts: 148556581863
-    dur: 16420
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12081
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4339
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 107476
-    ts: 148567431305
-    dur: 243187
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "PackageManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 230229
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12958
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 107734
-    ts: 148570493314
-    dur: 148256
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 139962
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8294
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 107912
-    ts: 148572211472
-    dur: 207366
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 198334
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9032
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108008
-    ts: 148573217718
-    dur: 41522
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "PackageManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 10673
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 18644
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12205
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108113
-    ts: 148574232686
-    dur: 58268
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_4"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 16523
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21244
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 20501
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 108213
-    ts: 148576593938
-    dur: 17781
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13269
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4512
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108314
-    ts: 148580182779
-    dur: 17931
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13079
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4852
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108317
-    ts: 148580474077
-    dur: 14981
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10949
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4032
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108322
-    ts: 148580585457
-    dur: 16610
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12478
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4132
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108326
-    ts: 148580690906
-    dur: 15161
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11042
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4119
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108333
-    ts: 148580884051
-    dur: 14722
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10761
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3961
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108341
-    ts: 148581029309
-    dur: 14076
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10216
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3860
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108346
-    ts: 148581206175
-    dur: 3401
-    blocking_method: "void com.android.server.am.ActivityManagerService.attachApplication(android.app.IApplicationThread, long)"
-    blocked_method: "void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.attachApplication"
-    short_blocked_method: "com.android.server.am.BroadcastQueue.processNextBroadcast"
-    blocking_src: "ActivityManagerService.java:5025"
-    blocked_src: "BroadcastQueue.java:1158"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 3401
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108352
-    ts: 148581374206
-    dur: 15644
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11265
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4379
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108364
-    ts: 148581664344
-    dur: 16654
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12103
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4551
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108509
-    ts: 148582841883
-    dur: 16049
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11701
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4348
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108924
-    ts: 148586444882
-    dur: 90996
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 86172
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4824
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108937
-    ts: 148586589698
-    dur: 36063
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 32225
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3838
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108941
-    ts: 148586612804
-    dur: 27073
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:554"
-    waiter_count: 1
-    blocking_thread_name: "binder:1977_6"
-    blocked_thread_name: "RenderThread"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17473
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 108993
-    ts: 148588914018
-    dur: 84303
-    blocking_method: "void com.android.server.am.ActivityManagerService.attachApplication(android.app.IApplicationThread, long)"
-    blocked_method: "void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.attachApplication"
-    short_blocked_method: "com.android.server.am.BroadcastQueue.processNextBroadcast"
-    blocking_src: "ActivityManagerService.java:5025"
-    blocked_src: "BroadcastQueue.java:1158"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 37872
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 41673
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 4758
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 109001
-    ts: 148589189867
-    dur: 17952
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13239
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4713
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 109017
-    ts: 148589657295
-    dur: 16491
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12010
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4481
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 109020
-    ts: 148589722388
-    dur: 14130
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9947
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4183
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 109726
-    ts: 148604565657
-    dur: 4585520
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 4570016
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 15504
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 109761
-    ts: 148606113994
-    dur: 67088
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_4"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 58844
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8244
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 109764
-    ts: 148606211230
-    dur: 17530
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_4"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10296
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7234
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 109801
-    ts: 148606744001
-    dur: 15900
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11722
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4178
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 110377
-    ts: 148619502314
-    dur: 19777
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_4"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14695
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5082
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 110380
-    ts: 148619551472
-    dur: 18020
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_4"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11229
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6791
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 110565
-    ts: 148624614171
-    dur: 17015
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12613
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4402
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 111327
-    ts: 148640050567
-    dur: 16121
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11782
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4339
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 111959
-    ts: 148654218901
-    dur: 17992
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_4"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13101
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4891
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 112141
-    ts: 148658408528
-    dur: 16939
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12429
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4510
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 112672
-    ts: 148669974964
-    dur: 3296
-    blocking_method: "int com.android.server.job.JobSchedulerService.scheduleAsPackage(android.app.job.JobInfo, android.app.job.JobWorkItem, int, java.lang.String, int, java.lang.String)"
-    blocked_method: "void com.android.server.job.controllers.ConnectivityController$UidDefaultNetworkCallback.onBlockedStatusChanged(android.net.Network, int)"
-    short_blocking_method: "com.android.server.job.JobSchedulerService.scheduleAsPackage"
-    short_blocked_method: "com.android.server.job.controllers.ConnectivityController$UidDefaultNetworkCallback.onBlockedStatusChanged"
-    blocking_src: "JobSchedulerService.java:1163"
-    blocked_src: "ConnectivityController.java:1340"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3296
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 112910
-    ts: 148672756644
-    dur: 58623
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 9540
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 28493
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 20590
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 114080
-    ts: 148688128843
-    dur: 15411
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11157
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4254
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 115974
-    ts: 148732382418
-    dur: 33703
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 29460
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4243
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 115976
-    ts: 148732432609
-    dur: 15143
-    blocking_method: "void com.android.server.power.PowerManagerService.releaseWakeLockInternal(android.os.IBinder, int)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.releaseWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1645"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10035
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5108
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 120870
-    ts: 148787668882
-    dur: 2144486
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 245497
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 68056
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1830933
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 121777
-    ts: 148795216166
-    dur: 28095
-    blocking_method: "void com.android.server.am.ActivityManagerService.attachApplication(android.app.IApplicationThread, long)"
-    blocked_method: "void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.attachApplication"
-    short_blocked_method: "com.android.server.am.BroadcastQueue.processNextBroadcast"
-    blocking_src: "ActivityManagerService.java:5025"
-    blocked_src: "BroadcastQueue.java:1158"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13395
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14700
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 127597
-    ts: 148877501041
-    dur: 39499
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 34330
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5169
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 132687
-    ts: 148923511733
-    dur: 18581
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13215
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5366
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 132773
-    ts: 148924756738
-    dur: 16562
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12153
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4409
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 134061
-    ts: 148938710558
-    dur: 16811
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12445
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4366
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 136461
-    ts: 148968698611
-    dur: 16796290
-    blocking_method: "int com.android.server.am.ActivityManagerService.bindServiceInstance(android.app.IApplicationThread, android.os.IBinder, android.content.Intent, java.lang.String, android.app.IServiceConnection, int, java.lang.String, boolean, int, java.lang.String, java.lang.String, int)"
-    blocked_method: "void com.android.server.am.ProcessRecord.setRunningRemoteAnimation(boolean)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.bindServiceInstance"
-    short_blocked_method: "com.android.server.am.ProcessRecord.setRunningRemoteAnimation"
-    blocking_src: "ActivityManagerService.java:12681"
-    blocked_src: "ProcessRecord.java:1362"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 5303961
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10366719
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 622408
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 503202
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 136720
-    ts: 148977364373
-    dur: 13003281
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:2267"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 148977271275
-    binder_reply_tid: 3032
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 9700341
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 437299
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 2865641
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 136733
-    ts: 148977692324
-    dur: 13340862
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService.finishDrawingWindow(com.android.server.wm.Session, android.view.IWindow, android.view.SurfaceControl$Transaction, int)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.finishDrawingWindow"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:2743"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 253296
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 3242496
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 138341
-    ts: 148994475138
-    dur: 314639
-    blocking_method: "boolean com.android.server.am.ActivityManagerService.unbindService(android.app.IServiceConnection)"
-    blocked_method: "void com.android.server.am.ActivityManagerService.serviceDoneExecuting(android.os.IBinder, int, int, int)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.unbindService"
-    short_blocked_method: "com.android.server.am.ActivityManagerService.serviceDoneExecuting"
-    blocking_src: "ActivityManagerService.java:12698"
-    blocked_src: "ActivityManagerService.java:12729"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 208010
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 106629
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 138365
-    ts: 148994852755
-    dur: 14505719
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:5471"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 8209040
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 505076
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 1451043
-      thread_state_count: 11
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 4340560
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 138661
-    ts: 149000610180
-    dur: 7326138
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List, java.util.List)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:4583"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 139327
-    ts: 149006834769
-    dur: 2693242
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.ActivityClientController.activityStopped(android.os.IBinder, android.os.Bundle, android.os.PersistableBundle, java.lang.CharSequence)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.ActivityClientController.activityStopped"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "ActivityClientController.java:201"
-    waiter_count: 2
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 95618
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 63525
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 17520
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 139410
-    ts: 149007955918
-    dur: 426251
-    blocking_method: "void com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List, java.util.List)"
-    blocked_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.reportKeepClearAreasChanged"
-    short_blocked_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    blocking_src: "WindowManagerService.java:4583"
-    blocked_src: "WindowAnimator.java:103"
-    waiter_count: 2
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2552
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 130350
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 293349
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 139486
-    ts: 149009623038
-    dur: 17920
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13301
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4619
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 140537
-    ts: 149022284881
-    dur: 2163572
-    blocking_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    blocked_method: "boolean com.android.server.wm.WindowManagerService$LocalService.isUidFocused(int)"
-    short_blocking_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$LocalService.isUidFocused"
-    blocking_src: "InputMonitor.java:119"
-    blocked_src: "WindowManagerService.java:7959"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 149022048449
-    binder_reply_tid: 3032
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 2031202
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 7152
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 125218
-      thread_state_count: 4
-    }
-  }
-  node {
-    node_id: 140860
-    ts: 149026529940
-    dur: 268955
-    blocking_method: "void com.android.server.inputmethod.InputMethodManagerService.onSessionCreated(com.android.server.inputmethod.IInputMethodInvoker, com.android.internal.view.IInputMethodSession, android.view.InputChannel)"
-    blocked_method: "void com.android.server.inputmethod.InputMethodManagerService.reportFullscreenMode(android.os.IBinder, boolean)"
-    short_blocking_method: "com.android.server.inputmethod.InputMethodManagerService.onSessionCreated"
-    short_blocked_method: "com.android.server.inputmethod.InputMethodManagerService.reportFullscreenMode"
-    blocking_src: "InputMethodManagerService.java:3001"
-    blocked_src: "InputMethodManagerService.java:5891"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 133599
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 135356
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 142166
-    ts: 149051542987
-    dur: 17592
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.imms"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12864
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4728
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 148912
-    ts: 149112531744
-    dur: 18346
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "m.webview_shell"
-    process_name: "org.chromium.webview_shell"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13633
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4713
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155001
-    ts: 149334396283
-    dur: 45844
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 32669
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13175
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155005
-    ts: 149334703513
-    dur: 37715
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 26852
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10863
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155021
-    ts: 149335546663
-    dur: 40445
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 29542
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10903
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155023
-    ts: 149335624488
-    dur: 38671
-    blocking_method: "void com.android.server.power.PowerManagerService.releaseWakeLockInternal(android.os.IBinder, int)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.releaseWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1645"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24907
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13764
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155027
-    ts: 149336019838
-    dur: 36687
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 26097
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10590
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155571
-    ts: 149367215143
-    dur: 44955
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 32605
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12350
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155573
-    ts: 149367586065
-    dur: 44474
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "OomAdjuster"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 32009
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12465
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155741
-    ts: 149375241063
-    dur: 148946
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 148946
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155754
-    ts: 149376378556
-    dur: 212116
-    blocking_method: "void com.android.server.wm.Session.setOnBackInvokedCallbackInfo(android.view.IWindow, android.window.OnBackInvokedCallbackInfo)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    short_blocking_method: "com.android.server.wm.Session.setOnBackInvokedCallbackInfo"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    blocking_src: "Session.java:935"
-    blocked_src: "WindowManagerService.java:2050"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 149376222671
-    binder_reply_tid: 3032
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 124712
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 87404
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 155756
-    ts: 149376765660
-    dur: 47244
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 33127
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14117
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155779
-    ts: 149378135955
-    dur: 84374
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 52303
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 32071
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155781
-    ts: 149378212731
-    dur: 33743
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 23855
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9888
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 155786
-    ts: 149378290459
-    dur: 224450
-    blocking_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2050"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 10525
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13815
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 200110
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 157865
-    ts: 149532418073
-    dur: 34242
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim.lf"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24337
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9905
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 157946
-    ts: 149534311078
-    dur: 264581
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 255455
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9126
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 158142
-    ts: 149552490278
-    dur: 49239
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 36362
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12877
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 158151
-    ts: 149552868196
-    dur: 56239
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 33777
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 22462
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 158154
-    ts: 149553019154
-    dur: 40923
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 28795
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12128
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 158198
-    ts: 149564686622
-    dur: 80157
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24800
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 55357
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168795
-    ts: 150118783443
-    dur: 497345
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 233920
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 263425
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168811
-    ts: 150119583000
-    dur: 28867
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21506
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7361
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168816
-    ts: 150119647797
-    dur: 36177
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 25651
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10526
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168818
-    ts: 150119719262
-    dur: 33568
-    blocking_method: "void com.android.server.am.ActivityManagerService$LocalService.broadcastCloseSystemDialogs(java.lang.String)"
-    blocked_method: "void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService$LocalService.broadcastCloseSystemDialogs"
-    short_blocked_method: "com.android.server.am.BroadcastQueue.processNextBroadcast"
-    blocking_src: "ActivityManagerService.java:17191"
-    blocked_src: "BroadcastQueue.java:1158"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 22345
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11223
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168829
-    ts: 150120273868
-    dur: 27962
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 20276
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7686
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168861
-    ts: 150121468135
-    dur: 28264
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 20496
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7768
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168864
-    ts: 150121579317
-    dur: 37196
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 26645
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10551
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168867
-    ts: 150121667113
-    dur: 294270
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 274581
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 19689
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168869
-    ts: 150121726716
-    dur: 59644
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 50330
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9314
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168873
-    ts: 150121831064
-    dur: 34679
-    blocking_method: "void com.android.server.power.PowerManagerService.userActivityInternal(int, long, int, int, int)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.userActivityInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1897"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 22119
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12560
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168878
-    ts: 150122130435
-    dur: 26898
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 19805
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7093
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168886
-    ts: 150122766315
-    dur: 34522
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24829
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9693
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168913
-    ts: 150124465290
-    dur: 6743237
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "RootWindowContainer.java:3548"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 330200
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 688648
-      thread_state_count: 10
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3963869
-      thread_state_count: 17
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1760520
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 168921
-    ts: 150124962117
-    dur: 5178252
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 595020
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 168934
-    ts: 150126508797
-    dur: 47271
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 168937
-    ts: 150126608057
-    dur: 4219
-    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1485"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 168938
-    ts: 150127033086
-    dur: 27486
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 169639
-    ts: 150137504825
-    dur: 5309922
-    blocking_method: "void com.android.server.am.OomAdjuster.updateOomAdjLocked(java.lang.String)"
-    blocked_method: "void com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated(int, long)"
-    short_blocking_method: "com.android.server.am.OomAdjuster.updateOomAdjLocked"
-    short_blocked_method: "com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated"
-    blocking_src: "OomAdjuster.java:422"
-    blocked_src: "ActivityManagerService.java:16658"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "tworkPolicy.uid"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 2478942
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2081486
-      thread_state_count: 15
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 741034
-      thread_state_count: 17
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 8460
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 169807
-    ts: 150139206944
-    dur: 18023
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13406
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4617
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 169881
-    ts: 150139610465
-    dur: 17292
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12773
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4519
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 169920
-    ts: 150139705890
-    dur: 14166
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10014
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4152
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 170291
-    ts: 150141458379
-    dur: 3048
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
+    blocking_thread_name: "binder:642_1"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
   }
   node {
-    node_id: 170330
-    ts: 150142536872
-    dur: 266173
-    blocking_method: "void com.android.server.am.ActivityManagerService.trimApplications(boolean, java.lang.String)"
-    blocked_method: "void com.android.server.am.ActivityManagerService$LocalService.broadcastCloseSystemDialogs(java.lang.String)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.trimApplications"
-    short_blocked_method: "com.android.server.am.ActivityManagerService$LocalService.broadcastCloseSystemDialogs"
-    blocking_src: "ActivityManagerService.java:15822"
-    blocked_src: "ActivityManagerService.java:17191"
+    node_id: 746
+    ts: 1737089667267
+    dur: 19612
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
     waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 150141316352
-    binder_reply_tid: 3032
-  }
-  node {
-    node_id: 170420
-    ts: 150144400817
-    dur: 16574
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "VolumeDialogCon"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11781
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4793
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 171148
-    ts: 150155195369
-    dur: 1110141
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 73909
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 356521
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 551853
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 127858
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 172488
-    ts: 150188202653
-    dur: 17025
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "m.webview_shell"
-    process_name: "org.chromium.webview_shell"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12474
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4551
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 172565
-    ts: 150190579373
-    dur: 18795084
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:4573"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 125520
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1251064
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 2162473
-      thread_state_count: 11
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 15256027
-      thread_state_count: 6
-    }
-  }
-  node {
-    node_id: 172570
-    ts: 150190784429
-    dur: 19259708
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.ActivityClientController.activityIdle(android.os.IBinder, android.content.res.Configuration, boolean)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.ActivityClientController.activityIdle"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "ActivityClientController.java:136"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 2371972
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 172592
-    ts: 150191918292
-    dur: 18030
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13611
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4419
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 172596
-    ts: 150192124417
-    dur: 15554936
-    blocking_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowManagerService.java:3511"
-    blocked_src: "WindowManagerService.java:5471"
-    waiter_count: 2
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 7188
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 172613
-    ts: 150192692984
-    dur: 15475966
-    blocking_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    blocked_method: "android.app.ActivityTaskManager$RootTaskInfo com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo"
-    blocking_src: "WindowManagerService.java:3511"
-    blocked_src: "ActivityTaskManagerService.java:1977"
-    waiter_count: 3
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_10"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 150192615318
-    binder_reply_tid: 2423
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 496785
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 173378
-    ts: 150210111294
-    dur: 122073
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 106288
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 15785
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 173387
-    ts: 150210179003
-    dur: 1410941
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityIdle(android.os.IBinder, android.content.res.Configuration, boolean)"
-    blocked_method: "int com.android.server.wm.ActivityTaskManagerService.getLastResumedActivityUserId()"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityIdle"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.getLastResumedActivityUserId"
-    blocking_src: "ActivityClientController.java:136"
-    blocked_src: "ActivityTaskManagerService.java:3775"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "binder:642_E"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 150210050524
-    binder_reply_tid: 2421
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 457439
-      thread_state_count: 30
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 346579
-      thread_state_count: 11
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 552794
-      thread_state_count: 42
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 54129
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 173446
-    ts: 150210657925
-    dur: 2642
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 173463
-    ts: 150210831822
-    dur: 2884
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 173474
-    ts: 150210928012
-    dur: 34728
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 174177
-    ts: 150234169667
-    dur: 134199
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "InputDispatcher"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11638
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 117040
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 5521
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 174296
-    ts: 150236127887
-    dur: 22476
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15874
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6602
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 174300
-    ts: 150236176942
-    dur: 648648
-    blocking_method: "void com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow(android.os.IBinder, android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "WindowManagerService.java:7897"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 456724
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 191924
-      thread_state_count: 4
-    }
-  }
-  node {
-    node_id: 174366
-    ts: 150236729052
-    dur: 22221
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 174389
-    ts: 150236800658
-    dur: 976774
-    blocking_method: "void com.android.server.inputmethod.InputMethodManagerService.reportStartInput(android.os.IBinder, android.os.IBinder)"
-    blocked_method: "void com.android.server.inputmethod.InputMethodManagerService$LocalServiceImpl.onImeParentChanged()"
-    short_blocking_method: "com.android.server.inputmethod.InputMethodManagerService.reportStartInput"
-    short_blocked_method: "com.android.server.inputmethod.InputMethodManagerService$LocalServiceImpl.onImeParentChanged"
-    blocking_src: "InputMethodManagerService.java:3358"
-    blocked_src: "InputMethodManagerService.java:5754"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 933245
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 24226
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 174847
-    ts: 150251421950
-    dur: 2334347
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_E"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2301056
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 33291
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 175346
-    ts: 150256102944
-    dur: 27919
-    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.nativeWake"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:-2"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:2147_5"
-    blocked_thread_name: "putmethod.latin"
-    process_name: "com.android.inputmethod.latin"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 19777
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8142
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 177382
-    ts: 150305522496
-    dur: 1516199
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 1437147
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15947
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 63105
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 189826
-    ts: 150655454630
-    dur: 953347
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 927545
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 25802
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 189852
-    ts: 150656532131
-    dur: 36425
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 25999
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10426
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 192624
-    ts: 150786501090
-    dur: 943073
-    blocking_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "ActivityTaskSupervisor.java:2407"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 104087
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 838986
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 192823
-    ts: 150791231170
-    dur: 1936635
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1913261
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 23374
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 192854
-    ts: 150792156622
-    dur: 47548
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 34431
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13117
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 192874
-    ts: 150792890819
-    dur: 46326
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 33179
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13147
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 192878
-    ts: 150793077027
-    dur: 43498
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 30525
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12973
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 192884
-    ts: 150793224836
-    dur: 39012
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "tworkPolicy.uid"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 27337
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11675
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 192886
-    ts: 150793323517
-    dur: 44110
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 31453
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12657
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 192906
-    ts: 150795308980
-    dur: 988640
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 851873
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 136767
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 193198
-    ts: 150805637380
-    dur: 23261
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16730
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6531
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 193212
-    ts: 150805880779
-    dur: 20158
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14266
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5892
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 193214
-    ts: 150805959637
-    dur: 18520
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13057
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5463
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 193246
-    ts: 150806921813
-    dur: 98842
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 98842
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 193489
-    ts: 150817823430
-    dur: 26724
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17160
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9564
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 193494
-    ts: 150817927450
-    dur: 20526
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_3"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14051
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6475
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 193519
-    ts: 150819703131
-    dur: 3538836
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 61240
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2916135
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 145337
-      thread_state_count: 11
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 416124
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 193539
-    ts: 150820775809
-    dur: 2558230
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:554"
-    waiter_count: 1
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 508196
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 196575
-    ts: 151386869138
-    dur: 103171
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 23471
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 79700
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 196926
-    ts: 151405439762
-    dur: 99201
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21112
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 78089
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 197848
-    ts: 151439805208
-    dur: 111598
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24658
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 86940
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 198190
-    ts: 151457105767
-    dur: 38141
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 27158
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10983
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 198211
-    ts: 151458074892
-    dur: 37644
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 26546
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11098
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 198215
-    ts: 151458251739
-    dur: 225629
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 205027
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 20602
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 198224
-    ts: 151458527326
-    dur: 7482333
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "RootWindowContainer.java:3548"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 588342
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2431150
-      thread_state_count: 22
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4309206
-      thread_state_count: 25
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 153635
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 198234
-    ts: 151459673322
-    dur: 35736
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 198238
-    ts: 151459746118
-    dur: 6306978
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 52819
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 198253
-    ts: 151462420773
-    dur: 62775
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_1"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
   }
   node {
-    node_id: 198271
-    ts: 151464056830
-    dur: 23052
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 198276
-    ts: 151464122627
-    dur: 19409
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 198278
-    ts: 151464163468
-    dur: 46645
-    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1485"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 198516
-    ts: 151468681876
-    dur: 23695
+    node_id: 754
+    ts: 1737089904720
+    dur: 18856
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -9600,25 +904,156 @@
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
     blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "OomAdjuster"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 757
+    ts: 1737089952687
+    dur: 18324
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 767
+    ts: 1737090147338
+    dur: 18570
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 778
+    ts: 1737090202518
+    dur: 18886
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 789
+    ts: 1737093129477
+    dur: 22632
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 792
+    ts: 1737093195601
+    dur: 19790
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 799
+    ts: 1737093665987
+    dur: 21548
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 802
+    ts: 1737093725219
+    dur: 20720
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 825
+    ts: 1737095066875
+    dur: 13553568
+    blocking_method: "android.util.Pair com.android.server.am.ProcessList.getNumForegroundServices()"
+    blocked_method: "void com.android.server.am.ActivityManagerService.trimApplications(boolean, java.lang.String)"
+    short_blocking_method: "com.android.server.am.ProcessList.getNumForegroundServices"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.trimApplications"
+    blocking_src: "ProcessList.java:5174"
+    blocked_src: "ActivityManagerService.java:15843"
+    waiter_count: 1
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.display"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17351
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6344
+      thread_state: "R"
+      thread_state_dur: 122815
       thread_state_count: 1
     }
   }
   node {
-    node_id: 198783
-    ts: 151474793583
-    dur: 17763
+    node_id: 914
+    ts: 1737110538163
+    dur: 10093878
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -9627,52 +1062,532 @@
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
     blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 12716
+      thread_state_dur: 10077315
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 5047
+      thread_state_dur: 16563
       thread_state_count: 1
     }
   }
   node {
-    node_id: 198786
-    ts: 151474846989
-    dur: 346947
-    blocking_method: "int com.android.server.wm.WindowManagerService.addWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, android.view.InsetsVisibilities, android.view.InputChannel, android.view.InsetsState, android.view.InsetsSourceControl[], android.graphics.Rect, float[])"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.addWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:1473"
-    blocked_src: "InputMonitor.java:119"
+    node_id: 930
+    ts: 1737120738139
+    dur: 44747
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
     waiter_count: 0
     blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 292902
+      thread_state_dur: 33287
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 54045
+      thread_state_dur: 11460
       thread_state_count: 1
     }
   }
   node {
-    node_id: 198813
-    ts: 151476593804
-    dur: 16507
+    node_id: 933
+    ts: 1737120850459
+    dur: 20602
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12919
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7683
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 947
+    ts: 1737121970382
+    dur: 9553799
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "binder:642_11"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 5225
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 1333143
+      thread_state_count: 31
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 946013
+      thread_state_count: 31
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 7269418
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_parent_id: 956
+    node_id: 949
+    ts: 1737122781871
+    dur: 7301144
+    blocking_method: "void com.android.server.am.AppProfiler.collectPssInBackground()"
+    blocked_method: "void com.android.server.am.ProcessRecord.setPid(int)"
+    short_blocking_method: "com.android.server.am.AppProfiler.collectPssInBackground"
+    short_blocked_method: "com.android.server.am.ProcessRecord.setPid"
+    blocking_src: "AppProfiler.java:514"
+    blocked_src: "ProcessRecord.java:596"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "binder:642_12"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 7143444
+      thread_state_count: 4
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 173469
+      thread_state_count: 2
+    }
+  }
+  node {
+    node_parent_id: 983
+    node_id: 949
+    ts: 1737122781871
+    dur: 7301144
+    blocking_method: "void com.android.server.am.AppProfiler.collectPssInBackground()"
+    blocked_method: "void com.android.server.am.ProcessRecord.setPid(int)"
+    short_blocking_method: "com.android.server.am.AppProfiler.collectPssInBackground"
+    short_blocked_method: "com.android.server.am.ProcessRecord.setPid"
+    blocking_src: "AppProfiler.java:514"
+    blocked_src: "ProcessRecord.java:596"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "binder:642_12"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 7143444
+      thread_state_count: 4
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 173469
+      thread_state_count: 2
+    }
+  }
+  node {
+    node_id: 956
+    ts: 1737123891932
+    dur: 17577143
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "int com.android.server.am.ActivityManagerService.getMemoryTrimLevel()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.getMemoryTrimLevel"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:9183"
+    waiter_count: 1
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 7100855
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 40711
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 2814860
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 983
+    ts: 1737128030991
+    dur: 13677637
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 2
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "binder:642_2"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 3054413
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 994
+    ts: 1737130388552
+    dur: 21356
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 997
+    ts: 1737130453174
+    dur: 19583
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 999
+    ts: 1737130575575
+    dur: 18416
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1002
+    ts: 1737130620879
+    dur: 17882
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1004
+    ts: 1737130679877
+    dur: 18378
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1007
+    ts: 1737130724438
+    dur: 17847
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1009
+    ts: 1737130782643
+    dur: 17093
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1012
+    ts: 1737130824923
+    dur: 17378
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1014
+    ts: 1737130882317
+    dur: 17017
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1017
+    ts: 1737130924318
+    dur: 17952
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1019
+    ts: 1737130982066
+    dur: 17021
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1022
+    ts: 1737131023637
+    dur: 17902
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1024
+    ts: 1737131081147
+    dur: 17016
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1027
+    ts: 1737131123118
+    dur: 17327
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1029
+    ts: 1737131180347
+    dur: 17452
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1032
+    ts: 1737131236193
+    dur: 17929
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1034
+    ts: 1737131293842
+    dur: 16845
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1037
+    ts: 1737131334215
+    dur: 16603
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_12"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1039
+    ts: 1737131797869
+    dur: 46496
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -9681,7 +1596,363 @@
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
     blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 40365
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6131
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1042
+    ts: 1737131917363
+    dur: 17474
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11684
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5790
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1045
+    ts: 1737131968339
+    dur: 17215
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10916
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6299
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1072
+    ts: 1737134918767
+    dur: 201813
+    blocking_method: "android.util.StatsEvent$Buffer android.util.StatsEvent$Buffer.obtain()"
+    blocked_method: "android.util.StatsEvent$Buffer android.util.StatsEvent$Buffer.obtain()"
+    short_blocking_method: "android.util.StatsEvent$Buffer.obtain"
+    short_blocked_method: "android.util.StatsEvent$Buffer.obtain"
+    blocking_src: "StatsEvent.java:853"
+    blocked_src: "StatsEvent.java:853"
+    waiter_count: 0
+    blocking_thread_name: "batterystats-handler"
+    blocked_thread_name: "binder:642_11"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 63142
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 132691
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 5980
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1077
+    ts: 1737137616437
+    dur: 162992
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 149011
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 13981
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1080
+    ts: 1737137827035
+    dur: 20665
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 13308
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7357
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1082
+    ts: 1737137954753
+    dur: 18084
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12019
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6065
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1085
+    ts: 1737137999738
+    dur: 17916
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11563
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6353
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1087
+    ts: 1737138059714
+    dur: 17620
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11752
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5868
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1090
+    ts: 1737138102876
+    dur: 17436
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11337
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6099
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1092
+    ts: 1737138160355
+    dur: 17037
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11194
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5843
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1095
+    ts: 1737138202412
+    dur: 17207
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11068
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6139
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1097
+    ts: 1737138259410
+    dur: 17665
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11743
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5922
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1100
+    ts: 1737138302518
+    dur: 17756
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
@@ -9692,14 +1963,14 @@
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4886
+      thread_state_dur: 6135
       thread_state_count: 1
     }
   }
   node {
-    node_id: 198816
-    ts: 151476697063
-    dur: 14573
+    node_id: 1102
+    ts: 1737138360249
+    dur: 17002
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -9708,25 +1979,52 @@
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
     blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 10195
+      thread_state_dur: 11195
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4378
+      thread_state_dur: 5807
       thread_state_count: 1
     }
   }
   node {
-    node_id: 198820
-    ts: 151476933111
-    dur: 14981
+    node_id: 1105
+    ts: 1737138402108
+    dur: 17640
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11487
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6153
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1107
+    ts: 1737138459376
+    dur: 16904
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -9735,25 +2033,52 @@
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
     blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 10396
+      thread_state_dur: 11194
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4585
+      thread_state_dur: 5710
       thread_state_count: 1
     }
   }
   node {
-    node_id: 198822
-    ts: 151476990110
-    dur: 13959
+    node_id: 1110
+    ts: 1737138508966
+    dur: 17284
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11123
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6161
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1112
+    ts: 1737138566775
+    dur: 17308
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -9762,25 +2087,52 @@
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
     blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 9709
+      thread_state_dur: 11500
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4250
+      thread_state_dur: 5808
       thread_state_count: 1
     }
   }
   node {
-    node_id: 198824
-    ts: 151477141341
-    dur: 14613
+    node_id: 1115
+    ts: 1737138607722
+    dur: 58793
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_11"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 52058
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6735
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1117
+    ts: 1737138706375
+    dur: 16366
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -9789,1369 +2141,130 @@
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
     blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 10316
+      thread_state_dur: 10873
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4297
+      thread_state_dur: 5493
       thread_state_count: 1
     }
   }
   node {
-    node_id: 198827
-    ts: 151477415132
-    dur: 16730
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 1120
+    ts: 1737138746994
+    dur: 16813
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
     blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 12372
+      thread_state_dur: 10941
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4358
+      thread_state_dur: 5872
       thread_state_count: 1
     }
   }
   node {
-    node_id: 198830
-    ts: 151477459451
-    dur: 4545264
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 139073
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 3007782
-      thread_state_count: 11
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 1387364
-      thread_state_count: 12
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 11045
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 198853
-    ts: 151478867939
-    dur: 16370
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 198856
-    ts: 151478902348
-    dur: 3318015
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 336033
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 198860
-    ts: 151479198273
-    dur: 17405
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "tworkPolicy.uid"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 198895
-    ts: 151480028218
-    dur: 17808
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13062
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4746
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 198917
-    ts: 151480421527
-    dur: 6054697
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "WindowManagerService.java:3510"
-    waiter_count: 2
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "binder:642_1"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 151480373744
-    binder_reply_tid: 655
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 4285014
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8128
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 298752
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 199215
-    ts: 151485277532
-    dur: 100494
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 100494
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 200459
-    ts: 151522525568
-    dur: 158610
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_4"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 152468
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6142
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 200464
-    ts: 151522664426
-    dur: 129781
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "void android.os.MessageQueue.removeMessages(android.os.Handler, int, java.lang.Object)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.removeMessages"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:678"
-    waiter_count: 1
-    blocking_thread_name: "binder:1743_4"
-    blocked_thread_name: "binder:1743_1"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 95534
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14428
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 4716
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 200498
-    ts: 151523971700
-    dur: 16104
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11715
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4389
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 200504
-    ts: 151524205355
-    dur: 2526539
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "android.app.ActivityTaskManager$RootTaskInfo com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo()"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "ActivityTaskManagerService.java:1977"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 151524126122
-    binder_reply_tid: 2484
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 146287
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 736425
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 837135
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 806692
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 200686
-    ts: 151525929080
-    dur: 15796
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11421
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4375
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 200698
-    ts: 151526249720
-    dur: 15985
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11535
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4450
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 200701
-    ts: 151526309303
-    dur: 70661
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 48653
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 22008
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 200706
-    ts: 151526417800
-    dur: 14641
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10553
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4088
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 200758
-    ts: 151528982161
-    dur: 15998
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "pool-2-thread-1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11573
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4425
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 204670
-    ts: 151591029252
-    dur: 5162562
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_7"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 5147973
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14589
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 207989
-    ts: 151650412135
-    dur: 57750
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 22166
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 35584
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 209137
-    ts: 151679556907
-    dur: 34050
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24850
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9200
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210185
-    ts: 151700021088
-    dur: 38506
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15592
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 22914
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210654
-    ts: 151705585601
-    dur: 18972
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13813
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5159
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210656
-    ts: 151705799327
-    dur: 15353
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11077
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4276
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210660
-    ts: 151706096100
-    dur: 16856
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12332
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4524
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210662
-    ts: 151706227828
-    dur: 14526
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10353
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4173
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210667
-    ts: 151706731496
-    dur: 16917
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12300
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4617
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210669
-    ts: 151706781229
-    dur: 15499
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11025
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4474
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210671
-    ts: 151706816125
-    dur: 77412
+    node_id: 1151
+    ts: 1737141884094
+    dur: 513114
     blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
     blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
     short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
     short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1485"
-    blocked_src: "PowerManagerService.java:3197"
+    blocking_src: "PowerManagerService.java:1502"
+    blocked_src: "PowerManagerService.java:3257"
     waiter_count: 0
-    blocking_thread_name: "binder:642_11"
+    blocking_thread_name: "main"
     blocked_thread_name: "PowerManagerSer"
     process_name: "system_server"
     is_blocked_thread_main: false
-    is_blocking_thread_main: false
+    is_blocking_thread_main: true
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 10928
+      thread_state_dur: 206447
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 66484
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210679
-    ts: 151707347518
-    dur: 15628
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11443
+      thread_state_dur: 306667
       thread_state_count: 2
     }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4185
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 210681
-    ts: 151707391688
-    dur: 13797
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9942
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3855
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 210683
-    ts: 151707417741
-    dur: 13755
-    blocking_method: "void com.android.server.power.PowerManagerService.releaseWakeLockInternal(android.os.IBinder, int)"
+    node_id: 1161
+    ts: 1737142534967
+    dur: 5471
+    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
     blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.releaseWakeLockInternal"
+    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
     short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1645"
-    blocked_src: "PowerManagerService.java:3197"
+    blocking_src: "PowerManagerService.java:1502"
+    blocked_src: "PowerManagerService.java:3257"
     waiter_count: 0
-    blocking_thread_name: "binder:642_11"
+    blocking_thread_name: "main"
     blocked_thread_name: "PowerManagerSer"
     process_name: "system_server"
     is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9053
-      thread_state_count: 2
-    }
+    is_blocking_thread_main: true
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4702
+      thread_state_dur: 5471
       thread_state_count: 1
     }
   }
   node {
-    node_id: 211530
-    ts: 151734633355
-    dur: 34618
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 1211
+    ts: 1737145912664
+    dur: 12262591
+    blocking_method: "void com.android.server.media.MediaSessionService.pushSession1Changed(int)"
+    blocked_method: "java.util.List com.android.server.media.MediaSessionService$SessionManagerImpl.getSessions(android.content.ComponentName, int)"
+    short_blocking_method: "com.android.server.media.MediaSessionService.pushSession1Changed"
+    short_blocked_method: "com.android.server.media.MediaSessionService$SessionManagerImpl.getSessions"
+    blocking_src: "MediaSessionService.java:735"
+    blocked_src: "MediaSessionService.java:1241"
     waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 25232
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9386
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 211542
-    ts: 151734708786
-    dur: 31564
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 19750
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11814
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 212765
-    ts: 151756336212
-    dur: 2155151
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
+    blocking_thread_name: "main"
+    blocked_thread_name: "binder:642_2"
     process_name: "system_server"
     is_blocked_thread_main: false
-    is_blocking_thread_main: false
+    is_blocking_thread_main: true
+    binder_reply_ts: 1737145697570
+    binder_reply_tid: 658
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 2092437
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 62714
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 214866
-    ts: 151799831997
-    dur: 282683
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 10354
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 192051
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 80278
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 215228
-    ts: 151803905483
-    dur: 3346
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:554"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_7"
-    blocked_thread_name: "hwuiTask1"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 3346
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 215258
-    ts: 151804511825
-    dur: 40038
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_7"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 7261
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 19941
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 12836
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 216074
-    ts: 151824437372
-    dur: 18711
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.io"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13981
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4730
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 216099
-    ts: 151826672797
-    dur: 16175
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.io"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11777
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4398
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 216113
-    ts: 151829114990
-    dur: 16305
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.io"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11816
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4489
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 216624
-    ts: 151835203704
-    dur: 15985
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.io"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11524
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4461
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 216807
-    ts: 151839576411
-    dur: 16175
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.io"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11637
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4538
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 216824
-    ts: 151840909885
-    dur: 16493
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.io"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12040
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4453
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 219873
-    ts: 151885392210
-    dur: 4068598
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_9"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 3703423
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 365175
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 219985
-    ts: 151888183448
-    dur: 1517666
-    blocking_method: "android.window.TaskSnapshot com.android.server.wm.TaskSnapshotCache.getSnapshot(int, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.TaskSnapshotCache.getSnapshot"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "TaskSnapshotCache.java:68"
-    blocked_src: "WindowManagerService.java:5618"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 249910
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 220125
-    ts: 151891858263
-    dur: 2937979
-    blocking_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:5618"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 709780
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1346133
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 876638
+      thread_state_dur: 11819183
       thread_state_count: 4
     }
     thread_states {
-      thread_state: "S"
-      thread_state_dur: 5428
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 220232
-    ts: 151894397078
-    dur: 483215
-    blocking_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    blocked_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    blocking_src: "WindowManagerService.java:5643"
-    blocked_src: "WindowManagerService.java:2267"
-    waiter_count: 1
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 151894273714
-    binder_reply_tid: 2484
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 89479
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 221315
-    ts: 151916362098
-    dur: 4233514
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 372505
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 3434828
-      thread_state_count: 2
-    }
-    thread_states {
       thread_state: "Running"
-      thread_state_dur: 426181
-      thread_state_count: 2
+      thread_state_dur: 443408
+      thread_state_count: 4
     }
   }
   node {
-    node_id: 222745
-    ts: 151937611114
-    dur: 2925191
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_10"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 1499099
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 56215
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1369877
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 231390
-    ts: 152058801734
-    dur: 18079
+    node_id: 1287
+    ts: 1737161170809
+    dur: 21040
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -11159,337 +2272,26 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13558
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4521
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 231393
-    ts: 152058866877
-    dur: 3133
-    blocking_method: "void com.android.server.wm.RemoteAnimationController.onAnimationFinished()"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.RemoteAnimationController.onAnimationFinished"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "RemoteAnimationController.java:278"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 3133
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 231399
-    ts: 152058912015
-    dur: 16509
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12608
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3901
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 231414
-    ts: 152059057875
-    dur: 14648
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10584
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4064
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 231620
-    ts: 152062624794
-    dur: 16819
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12331
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4488
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 231873
-    ts: 152068357703
-    dur: 598852
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "boolean com.android.server.wm.WindowManagerService.getInTouchMode()"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.getInTouchMode"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "WindowManagerService.java:3883"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152067851858
-    binder_reply_tid: 3032
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 14729
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 453048
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 131075
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 231910
-    ts: 152068856506
-    dur: 16449
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11963
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4486
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 232851
-    ts: 152093393852
-    dur: 7129660
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:2267"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_9"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152093294825
-    binder_reply_tid: 1995
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 3974048
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 119662
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 1279994
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1755956
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 233029
-    ts: 152094581771
-    dur: 7948149
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:5471"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 3926708
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 233695
-    ts: 152105084522
-    dur: 444515
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 431457
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13058
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 234365
-    ts: 152120709538
-    dur: 18998
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
+    blocking_thread_name: "Thread-45"
     blocked_thread_name: "system_server"
     process_name: "system_server"
     is_blocked_thread_main: true
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 14057
+      thread_state_dur: 14533
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4941
+      thread_state_dur: 6507
       thread_state_count: 1
     }
   }
   node {
-    node_id: 234452
-    ts: 152121689419
-    dur: 390240
-    blocking_method: "void com.android.server.inputmethod.InputMethodManagerService.onSessionCreated(com.android.server.inputmethod.IInputMethodInvoker, com.android.internal.view.IInputMethodSession, android.view.InputChannel)"
-    blocked_method: "void com.android.server.inputmethod.InputMethodManagerService.reportFullscreenMode(android.os.IBinder, boolean)"
-    short_blocking_method: "com.android.server.inputmethod.InputMethodManagerService.onSessionCreated"
-    short_blocked_method: "com.android.server.inputmethod.InputMethodManagerService.reportFullscreenMode"
-    blocking_src: "InputMethodManagerService.java:3001"
-    blocked_src: "InputMethodManagerService.java:5891"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_A"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 134217
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 222913
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 33110
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 234773
-    ts: 152124344597
-    dur: 25195
+    node_id: 1289
+    ts: 1737161421139
+    dur: 20479
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -11497,139 +2299,26 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17602
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7593
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 238015
-    ts: 152192120696
-    dur: 43678
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 32033
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11645
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 238017
-    ts: 152192248580
-    dur: 32613
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 23386
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9227
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 238019
-    ts: 152192310187
-    dur: 31876
-    blocking_method: "void com.android.server.power.PowerManagerService.releaseWakeLockInternal(android.os.IBinder, int)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.releaseWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1645"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 20915
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10961
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 238171
-    ts: 152194442604
-    dur: 670533
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
+    blocking_thread_name: "main"
     blocked_thread_name: "batterystats-ha"
     process_name: "system_server"
     is_blocked_thread_main: false
-    is_blocking_thread_main: false
+    is_blocking_thread_main: true
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 574508
-      thread_state_count: 1
+      thread_state_dur: 14231
+      thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 86997
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 9028
+      thread_state_dur: 6248
       thread_state_count: 1
     }
   }
   node {
-    node_id: 244759
-    ts: 152473832975
-    dur: 47586
+    node_id: 1291
+    ts: 1737161616671
+    dur: 18545
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -11637,1053 +2326,11 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 34586
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13000
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 244774
-    ts: 152474560578
-    dur: 126874
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.anim"
+    blocking_thread_name: "main"
+    blocked_thread_name: "batterystats-ha"
     process_name: "system_server"
     is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 126874
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 244796
-    ts: 152476288064
-    dur: 181382
-    blocking_method: "void com.android.server.wm.Session.setOnBackInvokedCallbackInfo(android.view.IWindow, android.window.OnBackInvokedCallbackInfo)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    short_blocking_method: "com.android.server.wm.Session.setOnBackInvokedCallbackInfo"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    blocking_src: "Session.java:935"
-    blocked_src: "WindowManagerService.java:2050"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152476168967
-    binder_reply_tid: 3032
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 100941
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 80441
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 244821
-    ts: 152478209039
-    dur: 4777
-    blocking_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2050"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4777
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246474
-    ts: 152625269378
-    dur: 52026
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:2628_3"
-    blocked_thread_name: "android.camera2"
-    process_name: "com.android.camera2"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 37872
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14154
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246499
-    ts: 152626094960
-    dur: 183099
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_4"
-    blocked_thread_name: "ll.splashscreen"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 159454
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 23645
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246548
-    ts: 152628855054
-    dur: 8922035
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "RootWindowContainer.java:3548"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 4095097
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4694856
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 132082
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246552
-    ts: 152629035204
-    dur: 11655890
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 1436199
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 828550
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1022214
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 246560
-    ts: 152630025053
-    dur: 588646
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "VolumeDialogCon"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 573891
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14755
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246717
-    ts: 152635663336
-    dur: 9427784
-    blocking_method: "android.window.TaskSnapshot com.android.server.wm.TaskSnapshotCache.getSnapshot(int, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.ActivityClientController.activityTopResumedStateLost()"
-    short_blocking_method: "com.android.server.wm.TaskSnapshotCache.getSnapshot"
-    short_blocked_method: "com.android.server.wm.ActivityClientController.activityTopResumedStateLost"
-    blocking_src: "TaskSnapshotCache.java:68"
-    blocked_src: "ActivityClientController.java:166"
-    waiter_count: 2
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152635551243
-    binder_reply_tid: 3032
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 934880
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 137908
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 4180115
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246789
-    ts: 152638689664
-    dur: 4700
-    blocking_method: "android.util.StatsEvent$Buffer android.util.StatsEvent$Buffer.obtain()"
-    blocked_method: "void android.util.StatsEvent$Buffer.release()"
-    short_blocking_method: "android.util.StatsEvent$Buffer.obtain"
-    short_blocked_method: "android.util.StatsEvent$Buffer.release"
-    blocking_src: "StatsEvent.java:853"
-    blocked_src: "StatsEvent.java:874"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4700
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246792
-    ts: 152638772769
-    dur: 30704
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 22281
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8423
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246796
-    ts: 152638966690
-    dur: 27701
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 19549
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8152
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246799
-    ts: 152639088105
-    dur: 24746
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17394
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7352
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246892
-    ts: 152641935126
-    dur: 2574068
-    blocking_method: "void com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1(com.android.server.wm.SurfaceAnimator$OnAnimationFinishedCallback, int, com.android.server.wm.AnimationAdapter)"
-    blocked_method: "int com.android.server.wm.WindowManagerService$LocalService.hasInputMethodClientFocus(android.os.IBinder, int, int, int)"
-    short_blocking_method: "com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$LocalService.hasInputMethodClientFocus"
-    blocking_src: "SurfaceAnimator.java:113"
-    blocked_src: "WindowManagerService.java:7977"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_9"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152641782406
-    binder_reply_tid: 1995
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 676035
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 191871
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 932732
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 773430
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 246963
-    ts: 152645231476
-    dur: 5027
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityTopResumedStateLost()"
-    blocked_method: "boolean com.android.server.wm.ActivityTaskManagerService.checkCanCloseSystemDialogs(int, int, java.lang.String)"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityTopResumedStateLost"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.checkCanCloseSystemDialogs"
-    blocking_src: "ActivityClientController.java:166"
-    blocked_src: "ActivityTaskManagerService.java:3106"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152645156779
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5027
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 246991
-    ts: 152646586223
-    dur: 265386
-    blocking_method: "void com.android.server.wm.Session.setOnBackInvokedCallbackInfo(android.view.IWindow, android.window.OnBackInvokedCallbackInfo)"
-    blocked_method: "boolean com.android.server.wm.ActivityTaskManagerService.checkCanCloseSystemDialogs(int, int, java.lang.String)"
-    short_blocking_method: "com.android.server.wm.Session.setOnBackInvokedCallbackInfo"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.checkCanCloseSystemDialogs"
-    blocking_src: "Session.java:935"
-    blocked_src: "ActivityTaskManagerService.java:3106"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_A"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152645156779
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 17987
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 131486
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 115913
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 247309
-    ts: 152651054092
-    dur: 766859
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:2050"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152650948216
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 555953
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 203054
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 7852
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 247348
-    ts: 152651607325
-    dur: 984931
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:2267"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152651491587
-    binder_reply_tid: 2484
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 76669
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 79039
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 623449
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 247356
-    ts: 152651851570
-    dur: 3968663
-    blocking_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportFocusChanged(android.os.IBinder, android.os.IBinder)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportFocusChanged"
-    blocking_src: "WindowManagerService.java:2050"
-    blocked_src: "WindowManagerService.java:5251"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 156844
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 118551
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 737476
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 2955792
-      thread_state_count: 4
-    }
-  }
-  node {
-    node_id: 247413
-    ts: 152654290646
-    dur: 4288867
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "WindowManagerService.java:2267"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152654118173
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 575877
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 236961
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 1007891
-      thread_state_count: 8
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 2468138
-      thread_state_count: 5
-    }
-  }
-  node {
-    node_id: 247431
-    ts: 152654887635
-    dur: 3540274
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 2
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 247535
-    ts: 152659318110
-    dur: 24438
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17695
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6743
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 247538
-    ts: 152659376252
-    dur: 368506
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "WindowManagerService.java:5618"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 154314
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 214192
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 247544
-    ts: 152659517261
-    dur: 102033
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 247563
-    ts: 152659644705
-    dur: 1238837
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1137429
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6904
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 248350
-    ts: 152673153320
-    dur: 15424
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "android.camera2"
-    process_name: "com.android.camera2"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11080
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4344
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 248718
-    ts: 152690124576
-    dur: 14712697
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:5471"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 2596946
-      thread_state_count: 12
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 243598
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 2595621
-      thread_state_count: 17
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 9276532
-      thread_state_count: 7
-    }
-  }
-  node {
-    node_id: 248766
-    ts: 152691049680
-    dur: 14103703
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:4573"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 323681
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 248798
-    ts: 152691912735
-    dur: 13055073
-    blocking_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    blocked_method: "android.app.ActivityTaskManager$RootTaskInfo com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo"
-    blocking_src: "WindowManagerService.java:3511"
-    blocked_src: "ActivityTaskManagerService.java:1977"
-    waiter_count: 2
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 152691834006
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 138106
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 249452
-    ts: 152708471542
-    dur: 208076
-    blocking_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "Session.java:581"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 18640
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 66483
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 42882
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 80071
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 250321
-    ts: 152738982450
-    dur: 263451
-    blocking_method: "void com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow(android.os.IBinder, android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "WindowManagerService.java:7897"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 24782
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 107499
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 131170
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 250336
-    ts: 152739214952
-    dur: 904814
-    blocking_method: "void com.android.server.inputmethod.InputMethodManagerService.reportStartInput(android.os.IBinder, android.os.IBinder)"
-    blocked_method: "void com.android.server.inputmethod.InputMethodManagerService$LocalServiceImpl.onImeParentChanged()"
-    short_blocking_method: "com.android.server.inputmethod.InputMethodManagerService.reportStartInput"
-    short_blocked_method: "com.android.server.inputmethod.InputMethodManagerService$LocalServiceImpl.onImeParentChanged"
-    blocking_src: "InputMethodManagerService.java:3358"
-    blocked_src: "InputMethodManagerService.java:5754"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 698336
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 61433
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 145045
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 272752
-    ts: 153291672826
-    dur: 718567
-    blocking_method: "void com.android.server.wm.RemoteAnimationController.onAnimationFinished()"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.RemoteAnimationController.onAnimationFinished"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "RemoteAnimationController.java:278"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 118388
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 159567
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 440612
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 273101
-    ts: 153306465613
-    dur: 418375
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:2267"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 153306287844
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 152019
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 259192
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 7164
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273651
-    ts: 153322812591
-    dur: 28097
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 22233
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5864
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273656
-    ts: 153322898690
-    dur: 17866
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
+    is_blocking_thread_main: true
     thread_states {
       thread_state: "R+"
       thread_state_dur: 12444
@@ -12691,14 +2338,14 @@
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 5422
+      thread_state_dur: 6101
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273673
-    ts: 153323080118
-    dur: 18732
+    node_id: 1297
+    ts: 1737162104329
+    dur: 183696
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -12706,53 +2353,123 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
+    blocking_thread_name: "main"
+    blocked_thread_name: "PowerManagerSer"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 13245
+      thread_state_dur: 176780
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 5487
+      thread_state_dur: 6916
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273701
-    ts: 153324187675
-    dur: 2194431
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 1301
+    ts: 1737162328333
+    dur: 419228
+    blocking_method: "void com.android.server.power.PowerManagerService.releaseWakeLockInternal(android.os.IBinder, int)"
+    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
+    short_blocking_method: "com.android.server.power.PowerManagerService.releaseWakeLockInternal"
+    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
+    blocking_src: "PowerManagerService.java:1662"
+    blocked_src: "PowerManagerService.java:3257"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "PowerManagerSer"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 326268
+      thread_state_count: 5
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 92960
+      thread_state_count: 4
+    }
+  }
+  node {
+    node_parent_id: 1307
+    node_id: 1303
+    ts: 1737162534263
+    dur: 420259
+    blocking_method: "void com.android.server.am.AppProfiler.collectPssInBackground()"
+    blocked_method: "void com.android.server.am.ProcessProfileRecord.onProcessInactive(com.android.server.am.ProcessStatsService)"
+    short_blocking_method: "com.android.server.am.AppProfiler.collectPssInBackground"
+    short_blocked_method: "com.android.server.am.ProcessProfileRecord.onProcessInactive"
+    blocking_src: "AppProfiler.java:514"
+    blocked_src: "ProcessProfileRecord.java:349"
     waiter_count: 0
     blocking_thread_name: "android.bg"
+    blocked_thread_name: "binder:642_14"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 389378
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 8868
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 22013
+      thread_state_count: 2
+    }
+  }
+  node {
+    node_id: 1307
+    ts: 1737162807202
+    dur: 3588216
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "boolean com.android.server.am.ActivityManagerService.unbindService(android.app.IServiceConnection)"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.unbindService"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:12719"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
     blocked_thread_name: "system_server"
     process_name: "system_server"
     is_blocked_thread_main: true
     is_blocking_thread_main: false
     thread_states {
+      thread_state: "R"
+      thread_state_dur: 2258
+      thread_state_count: 1
+    }
+    thread_states {
       thread_state: "R+"
-      thread_state_dur: 2186495
-      thread_state_count: 2
+      thread_state_dur: 2484905
+      thread_state_count: 35
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 7936
-      thread_state_count: 1
+      thread_state_dur: 955815
+      thread_state_count: 36
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 145238
+      thread_state_count: 2
     }
   }
   node {
-    node_id: 273712
-    ts: 153325114355
-    dur: 21557
+    node_id: 1310
+    ts: 1737163058873
+    dur: 19376
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -12760,53 +2477,103 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_14"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15570
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5987
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 273716
-    ts: 153325183146
-    dur: 20307
+    node_id: 1313
+    ts: 1737163156482
+    dur: 18447
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1316
+    ts: 1737163210116
+    dur: 18147
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1337
+    ts: 1737164392191
+    dur: 270357
+    blocking_method: "com.android.server.am.ProcessRecord com.android.server.am.ProcessList.removeProcessNameLocked(java.lang.String, int, com.android.server.am.ProcessRecord)"
+    blocked_method: "boolean com.android.server.am.ActivityManagerService.isUidActive(int, java.lang.String)"
+    short_blocking_method: "com.android.server.am.ProcessList.removeProcessNameLocked"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.isUidActive"
+    blocking_src: "ProcessList.java:3041"
+    blocked_src: "ActivityManagerService.java:7325"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "binder:642_11"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    binder_reply_ts: 1737164232343
+    binder_reply_tid: 2505
+  }
+  node {
+    node_id: 1343
+    ts: 1737165262724
+    dur: 21096
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1347
+    ts: 1737165356298
+    dur: 20332
     blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
     blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
     short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
     short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_14"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13478
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6829
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 273718
-    ts: 153325261725
-    dur: 18062
+    node_id: 1349
+    ts: 1737165472300
+    dur: 26488
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -12814,53 +2581,33 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_14"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12396
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5666
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 273721
-    ts: 153325295524
-    dur: 18429
+    node_id: 1361
+    ts: 1737165537252
+    dur: 37481
     blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
     blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
     short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
     short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_14"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12649
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5780
-      thread_state_count: 1
-    }
   }
   node {
-    node_id: 273723
-    ts: 153325348129
-    dur: 17722
+    node_id: 1364
+    ts: 1737165613345
+    dur: 16393
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -12868,7 +2615,841 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1367
+    ts: 1737165653862
+    dur: 17155
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1369
+    ts: 1737165708794
+    dur: 16172
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1372
+    ts: 1737165748745
+    dur: 16809
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1374
+    ts: 1737165803090
+    dur: 16154
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1377
+    ts: 1737165848320
+    dur: 16352
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1379
+    ts: 1737165902444
+    dur: 16514
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1382
+    ts: 1737165942133
+    dur: 16587
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1384
+    ts: 1737165995669
+    dur: 16227
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1387
+    ts: 1737166034874
+    dur: 16267
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1389
+    ts: 1737166088126
+    dur: 16084
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1392
+    ts: 1737166127218
+    dur: 16224
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1394
+    ts: 1737166180874
+    dur: 16400
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1397
+    ts: 1737166220113
+    dur: 16151
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1399
+    ts: 1737166461659
+    dur: 19206
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "batterystats-ha"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 13062
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6144
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1402
+    ts: 1737166624155
+    dur: 19365
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 13099
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6266
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1405
+    ts: 1737166679041
+    dur: 18738
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12066
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6672
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1407
+    ts: 1737166746264
+    dur: 17318
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11427
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5891
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1410
+    ts: 1737166789697
+    dur: 18114
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11916
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6198
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1412
+    ts: 1737166849465
+    dur: 17295
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11521
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5774
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1415
+    ts: 1737166892174
+    dur: 17346
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11346
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6000
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1417
+    ts: 1737166949809
+    dur: 17047
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11284
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5763
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1420
+    ts: 1737166992097
+    dur: 17240
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11197
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6043
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1422
+    ts: 1737167048878
+    dur: 16995
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11244
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5751
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1425
+    ts: 1737167090769
+    dur: 17223
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11152
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6071
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1427
+    ts: 1737167147508
+    dur: 16908
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11139
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5769
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1430
+    ts: 1737167189280
+    dur: 17404
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11335
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6069
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1506
+    ts: 1737181487572
+    dur: 47351
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 40418
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6933
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1510
+    ts: 1737181929327
+    dur: 20962
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 14607
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6355
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1513
+    ts: 1737181998210
+    dur: 19273
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12184
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7089
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1542
+    ts: 1737183322309
+    dur: 1164236
+    blocking_method: "com.android.server.am.ProcessRecord com.android.server.am.ProcessList.removeProcessNameLocked(java.lang.String, int, com.android.server.am.ProcessRecord)"
+    blocked_method: "boolean com.android.server.am.ActivityManagerService.isUidActive(int, java.lang.String)"
+    short_blocking_method: "com.android.server.am.ProcessList.removeProcessNameLocked"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.isUidActive"
+    blocking_src: "ProcessList.java:3041"
+    blocked_src: "ActivityManagerService.java:7325"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "binder:642_11"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    binder_reply_ts: 1737183173575
+    binder_reply_tid: 2505
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 1056395
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 107841
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1546
+    ts: 1737184711536
+    dur: 932536
+    blocking_method: "void com.android.server.am.AppProfiler.collectPssInBackground()"
+    blocked_method: "void com.android.server.am.ProcessRecord.setPid(int)"
+    short_blocking_method: "com.android.server.am.AppProfiler.collectPssInBackground"
+    short_blocked_method: "com.android.server.am.ProcessRecord.setPid"
+    blocking_src: "AppProfiler.java:514"
+    blocked_src: "ProcessRecord.java:596"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "binder:642_14"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 759009
+      thread_state_count: 5
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 173527
+      thread_state_count: 4
+    }
+  }
+  node {
+    node_id: 1553
+    ts: 1737185887986
+    dur: 36773
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 29746
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7027
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1556
+    ts: 1737185963232
+    dur: 19053
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12192
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6861
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1558
+    ts: 1737186081562
+    dur: 17416
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11477
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5939
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1561
+    ts: 1737186125286
+    dur: 18053
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11807
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6246
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1563
+    ts: 1737186184623
+    dur: 18396
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
@@ -12880,40 +3461,256 @@
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 5617
+      thread_state_dur: 6291
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273726
-    ts: 153325388098
-    dur: 17701
+    node_id: 1566
+    ts: 1737186228484
+    dur: 17302
     blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
     blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
     short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
     short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_14"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 11948
+      thread_state_dur: 11174
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 5753
+      thread_state_dur: 6128
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273728
-    ts: 153325439049
+    node_id: 1568
+    ts: 1737186286357
+    dur: 17995
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12085
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5910
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1571
+    ts: 1737186329374
+    dur: 17099
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11089
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6010
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1573
+    ts: 1737186385961
+    dur: 16913
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11126
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5787
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1576
+    ts: 1737186427621
+    dur: 17307
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11184
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6123
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1578
+    ts: 1737186484644
+    dur: 16614
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10967
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5647
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1581
+    ts: 1737186526032
+    dur: 17399
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11207
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6192
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1583
+    ts: 1737186582856
+    dur: 16982
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11131
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5851
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1586
+    ts: 1737186624590
+    dur: 17194
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11043
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6151
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1588
+    ts: 1737186680997
     dur: 16616
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
@@ -12922,7 +3719,4041 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10931
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5685
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1591
+    ts: 1737186721862
+    dur: 16600
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10693
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5907
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1593
+    ts: 1737186777333
+    dur: 17100
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11290
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5810
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1596
+    ts: 1737186818912
+    dur: 17743
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_14"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11563
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6180
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1726
+    ts: 1737207724565
+    dur: 293900
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 281989
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 11911
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1732
+    ts: 1737208096677
+    dur: 18837
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12696
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6141
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1735
+    ts: 1737208148293
+    dur: 18441
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12011
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6430
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1768
+    ts: 1737210433724
+    dur: 9886915
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "binder:642_12"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 330765
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 4742271
+      thread_state_count: 27
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 616004
+      thread_state_count: 29
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 4197875
+      thread_state_count: 2
+    }
+  }
+  node {
+    node_id: 1772
+    ts: 1737210611879
+    dur: 915778
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1774
+    ts: 1737210664931
+    dur: 10603245
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 1
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "binder:642_2"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 3567249
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1778
+    ts: 1737210812768
+    dur: 15412062
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 2
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "binder:642_A"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 8523903
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1786
+    ts: 1737211317791
+    dur: 15990216
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 3
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "binder:642_8"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 9607080
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1819
+    ts: 1737213634830
+    dur: 2487729
+    blocking_method: "void com.android.server.content.ContentService$ObserverNode$ObserverEntry.binderDied()"
+    blocked_method: "void com.android.server.content.ContentService$ObserverNode$ObserverEntry.binderDied()"
+    short_blocking_method: "com.android.server.content.ContentService$ObserverNode$ObserverEntry.binderDied"
+    short_blocked_method: "com.android.server.content.ContentService$ObserverNode$ObserverEntry.binderDied"
+    blocking_src: "ContentService.java:1676"
+    blocked_src: "ContentService.java:1676"
+    waiter_count: 0
     blocking_thread_name: "binder:642_F"
+    blocked_thread_name: "binder:642_1"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 458437
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 109603
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: -1
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1822
+    ts: 1737213945119
+    dur: 14489462
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 4
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "binder:642_13"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 10733654
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1825
+    ts: 1737214360668
+    dur: 22107
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1828
+    ts: 1737214417825
+    dur: 18273
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1830
+    ts: 1737214486888
+    dur: 17063
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1833
+    ts: 1737214530615
+    dur: 16604
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1835
+    ts: 1737214594606
+    dur: 16069
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1838
+    ts: 1737214636440
+    dur: 16932
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1840
+    ts: 1737214699981
+    dur: 16203
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1843
+    ts: 1737214741536
+    dur: 16227
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1845
+    ts: 1737214804256
+    dur: 16029
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1848
+    ts: 1737214845608
+    dur: 16214
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1850
+    ts: 1737214908097
+    dur: 16476
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1853
+    ts: 1737214949887
+    dur: 16260
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1855
+    ts: 1737215012821
+    dur: 2326724
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1859
+    ts: 1737217389586
+    dur: 20823
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1861
+    ts: 1737217472621
+    dur: 17678
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1864
+    ts: 1737217518658
+    dur: 18293
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 1909
+    ts: 1737220480342
+    dur: 42187
+    blocking_method: "void com.android.server.am.AppProfiler.collectPssInBackground()"
+    blocked_method: "void com.android.server.am.ProcessProfileRecord.onProcessInactive(com.android.server.am.ProcessStatsService)"
+    short_blocking_method: "com.android.server.am.AppProfiler.collectPssInBackground"
+    short_blocked_method: "com.android.server.am.ProcessProfileRecord.onProcessInactive"
+    blocking_src: "AppProfiler.java:514"
+    blocked_src: "ProcessProfileRecord.java:349"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "binder:642_12"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 5765
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 36422
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1955
+    ts: 1737221116248
+    dur: 5019
+    blocking_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    blocked_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    short_blocking_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    short_blocked_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    blocking_src: "ProcessList.java:4499"
+    blocked_src: "ProcessList.java:4554"
+    waiter_count: 0
+    blocking_thread_name: "android.ui"
+    blocked_thread_name: "binder:642_12"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5019
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 1958
+    ts: 1737221139743
+    dur: 4232
+    blocking_method: "android.os.Message android.os.MessageQueue.next()"
+    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    short_blocking_method: "android.os.MessageQueue.next"
+    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
+    blocking_src: "MessageQueue.java:337"
+    blocked_src: "MessageQueue.java:554"
+    waiter_count: 0
+    blocking_thread_name: "android.ui"
+    blocked_thread_name: "binder:642_12"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 2839
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 1393
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2055
+    ts: 1737223735202
+    dur: 40111
+    blocking_method: "android.os.Message android.os.MessageQueue.next()"
+    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    short_blocking_method: "android.os.MessageQueue.next"
+    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
+    blocking_src: "MessageQueue.java:337"
+    blocked_src: "MessageQueue.java:554"
+    waiter_count: 0
+    blocking_thread_name: "android.ui"
+    blocked_thread_name: "binder:642_2"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 15270
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 24841
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2137
+    ts: 1737227163556
+    dur: 7177
+    blocking_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    blocked_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    short_blocking_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    short_blocked_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    blocking_src: "ProcessList.java:4499"
+    blocked_src: "ProcessList.java:4554"
+    waiter_count: 0
+    blocking_thread_name: "android.ui"
+    blocked_thread_name: "binder:642_A"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7177
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2202
+    ts: 1737228235050
+    dur: 70781
+    blocking_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    blocked_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    short_blocking_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    short_blocked_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    blocking_src: "ProcessList.java:4499"
+    blocked_src: "ProcessList.java:4554"
+    waiter_count: 0
+    blocking_thread_name: "android.ui"
+    blocked_thread_name: "binder:642_8"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 28251
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 42530
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2249
+    ts: 1737229615862
+    dur: 9541
+    blocking_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    blocked_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    short_blocking_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    short_blocked_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    blocking_src: "ProcessList.java:4499"
+    blocked_src: "ProcessList.java:4554"
+    waiter_count: 0
+    blocking_thread_name: "android.ui"
+    blocked_thread_name: "binder:642_13"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 9541
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2256
+    ts: 1737229788262
+    dur: 1864661
+    blocking_method: "void com.android.server.am.OomAdjuster.updateOomAdjLocked(java.lang.String)"
+    blocked_method: "boolean com.android.server.am.ActivityManagerService.isUidActive(int, java.lang.String)"
+    short_blocking_method: "com.android.server.am.OomAdjuster.updateOomAdjLocked"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.isUidActive"
+    blocking_src: "OomAdjuster.java:422"
+    blocked_src: "ActivityManagerService.java:7325"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_13"
+    blocked_thread_name: "binder:642_12"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    binder_reply_ts: 1737229638872
+    binder_reply_tid: 2720
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 9624
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 1738885
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 116152
+      thread_state_count: 2
+    }
+  }
+  node {
+    node_id: 2282
+    ts: 1737231587234
+    dur: 7359992
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_13"
+    blocked_thread_name: "binder:642_8"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 7324207
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 35785
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2284
+    ts: 1737231637875
+    dur: 8165621
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 1
+    blocking_thread_name: "binder:642_13"
+    blocked_thread_name: "binder:642_A"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 59191
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 223496
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 36279
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 583889
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2289
+    ts: 1737231841438
+    dur: 8892876
+    blocking_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    blocked_method: "void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied()"
+    short_blocking_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied"
+    blocking_src: "ActivityManagerService.java:1478"
+    blocked_src: "ActivityManagerService.java:1478"
+    waiter_count: 2
+    blocking_thread_name: "binder:642_13"
+    blocked_thread_name: "binder:642_E"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 1514707
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2352
+    ts: 1737239594398
+    dur: 5000
+    blocking_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    blocked_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    short_blocking_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    short_blocked_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    blocking_src: "ProcessList.java:4499"
+    blocked_src: "ProcessList.java:4554"
+    waiter_count: 0
+    blocking_thread_name: "android.ui"
+    blocked_thread_name: "binder:642_8"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5000
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2419
+    ts: 1737240599881
+    dur: 42310
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_A"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 20198
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 22112
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2477
+    ts: 1737245633067
+    dur: 8154
+    blocking_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    blocked_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    short_blocking_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    short_blocked_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    blocking_src: "ProcessList.java:4499"
+    blocked_src: "ProcessList.java:4554"
+    waiter_count: 0
+    blocking_thread_name: "android.ui"
+    blocked_thread_name: "binder:642_E"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 8154
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2485
+    ts: 1737245705728
+    dur: 4362
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 4362
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2609
+    ts: 1737298460334
+    dur: 21850
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15344
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6506
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2612
+    ts: 1737298572141
+    dur: 18243
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12443
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5800
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2615
+    ts: 1737298649475
+    dur: 16545
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11077
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5468
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2618
+    ts: 1737298721765
+    dur: 16357
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10933
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5424
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2621
+    ts: 1737298793731
+    dur: 16482
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11078
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5404
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2624
+    ts: 1737298865961
+    dur: 16788
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11271
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5517
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2627
+    ts: 1737298938587
+    dur: 16125
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10707
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5418
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2630
+    ts: 1737299010537
+    dur: 51638
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 43518
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 8120
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2633
+    ts: 1737299130928
+    dur: 18041
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12275
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5766
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2636
+    ts: 1737299208715
+    dur: 17654
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12007
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5647
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2639
+    ts: 1737299285037
+    dur: 16998
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11352
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5646
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2642
+    ts: 1737299360895
+    dur: 16885
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11243
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5642
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2645
+    ts: 1737299435615
+    dur: 16757
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11120
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5637
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2648
+    ts: 1737299510601
+    dur: 16754
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11118
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5636
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2651
+    ts: 1737299585305
+    dur: 17797
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12032
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5765
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 2654
+    ts: 1737299665374
+    dur: 16561
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11005
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5556
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 4016
+    ts: 1737341060765
+    dur: 500783
+    blocking_method: "com.android.server.pm.Computer com.android.server.pm.PackageManagerService.snapshotComputer()"
+    blocked_method: "com.android.server.pm.Computer com.android.server.pm.PackageManagerService.snapshotComputer()"
+    short_blocking_method: "com.android.server.pm.PackageManagerService.snapshotComputer"
+    short_blocked_method: "com.android.server.pm.PackageManagerService.snapshotComputer"
+    blocking_src: "PackageManagerService.java:1088"
+    blocked_src: "PackageManagerService.java:1088"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 79896
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 65943
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 330392
+      thread_state_count: 3
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 24552
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 4018
+    ts: 1737341481517
+    dur: 21671
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 4025
+    ts: 1737343049979
+    dur: 22668
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15906
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6762
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 4028
+    ts: 1737344126801
+    dur: 22797
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15744
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7053
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 4163
+    ts: 1737369931286
+    dur: 332456
+    blocking_method: "boolean com.android.server.am.OomAdjuster.updateOomAdjLocked(com.android.server.am.ProcessRecord, java.lang.String)"
+    blocked_method: "void com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated(int, long)"
+    short_blocking_method: "com.android.server.am.OomAdjuster.updateOomAdjLocked"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated"
+    blocking_src: "OomAdjuster.java:462"
+    blocked_src: "ActivityManagerService.java:16679"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "tworkPolicy.uid"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 146722
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 185734
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 4233
+    ts: 1737371256653
+    dur: 1055512
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 1034019
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 21493
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 4240
+    ts: 1737372928313
+    dur: 11910
+    blocking_method: "void com.android.server.am.ActivityManagerService.attachApplication(android.app.IApplicationThread, long)"
+    blocked_method: "void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean)"
+    short_blocking_method: "com.android.server.am.ActivityManagerService.attachApplication"
+    short_blocked_method: "com.android.server.am.BroadcastQueue.processNextBroadcast"
+    blocking_src: "ActivityManagerService.java:5028"
+    blocked_src: "BroadcastQueue.java:1154"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 11910
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5343
+    ts: 1737738509304
+    dur: 1506011
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 1479733
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 26278
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5363
+    ts: 1737740148902
+    dur: 62887
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 40283
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 22604
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5423
+    ts: 1737750680394
+    dur: 61812
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 42149
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 19663
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5427
+    ts: 1737750845100
+    dur: 55306
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 35564
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 19742
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5431
+    ts: 1737751668053
+    dur: 197119
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 175322
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 21797
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5437
+    ts: 1737751957836
+    dur: 57557
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 36577
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 20980
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5440
+    ts: 1737752144687
+    dur: 51147
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 33629
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 17518
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5445
+    ts: 1737752295207
+    dur: 148524
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 113328
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 35196
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5448
+    ts: 1737752590130
+    dur: 958626
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 934499
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 24127
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5455
+    ts: 1737753638544
+    dur: 3315112
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 3274178
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 40934
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5465
+    ts: 1737757070844
+    dur: 36740
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 24775
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 11965
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5471
+    ts: 1737757172791
+    dur: 36455
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 23533
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 12922
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5474
+    ts: 1737757342251
+    dur: 42105
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 30217
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 11888
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5478
+    ts: 1737757436661
+    dur: 33956
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 21802
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 12154
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5480
+    ts: 1737757559170
+    dur: 132635
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 119135
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 13500
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5485
+    ts: 1737757752455
+    dur: 34371
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 22158
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 12213
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5656
+    ts: 1737785654002
+    dur: 22938
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 16310
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6628
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5658
+    ts: 1737785934018
+    dur: 19831
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "PackageManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 13599
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6232
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5679
+    ts: 1737786392325
+    dur: 307737
+    blocking_method: "boolean com.android.server.am.OomAdjuster.updateOomAdjLocked(com.android.server.am.ProcessRecord, java.lang.String)"
+    blocked_method: "void com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated(int, long)"
+    short_blocking_method: "com.android.server.am.OomAdjuster.updateOomAdjLocked"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated"
+    blocking_src: "OomAdjuster.java:462"
+    blocked_src: "ActivityManagerService.java:16679"
+    waiter_count: 0
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "tworkPolicy.uid"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 45600
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 262137
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5761
+    ts: 1737787806610
+    dur: 22728
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15944
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6784
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5765
+    ts: 1737789462809
+    dur: 20680
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 14384
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6296
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 5771
+    ts: 1737789939928
+    dur: 19832
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 13749
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6083
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 10955
+    ts: 1738826773946
+    dur: 65637
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "batterystats-ha"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 45232
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 20405
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 10966
+    ts: 1738828107585
+    dur: 187487
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "batterystats-ha"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 167527
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 19960
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 11025
+    ts: 1738862386263
+    dur: 65791
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "android.fg"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 45137
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 20654
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 13934
+    ts: 1739927671503
+    dur: 12908792
+    blocking_method: "void com.android.server.StorageManagerService.onVolumeStateChangedAsync(android.os.storage.VolumeInfo, int, int)"
+    blocked_method: "boolean com.android.server.StorageManagerService.isSystemUnlocked(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.onVolumeStateChangedAsync"
+    short_blocked_method: "com.android.server.StorageManagerService.isSystemUnlocked"
+    blocking_src: "StorageManagerService.java:1722"
+    blocked_src: "StorageManagerService.java:3337"
+    waiter_count: 0
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "D"
+      thread_state_dur: 11950576
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 300606
+      thread_state_count: 3
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 7649
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 649961
+      thread_state_count: 3
+    }
+    blocked_functions {
+      blocked_function: "blkdev_issue_flush"
+      blocked_function_dur: 11950576
+      blocked_function_count: 1
+    }
+  }
+  node {
+    node_id: 13938
+    ts: 1739927803390
+    dur: 15628453
+    blocking_method: "void com.android.server.StorageManagerService.onVolumeStateChangedAsync(android.os.storage.VolumeInfo, int, int)"
+    blocked_method: "boolean com.android.server.StorageManagerService.isSystemUnlocked(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.onVolumeStateChangedAsync"
+    short_blocked_method: "com.android.server.StorageManagerService.isSystemUnlocked"
+    blocking_src: "StorageManagerService.java:1722"
+    blocked_src: "StorageManagerService.java:3337"
+    waiter_count: 1
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "binder:642_1"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    binder_reply_ts: 1739927686578
+    binder_reply_tid: 657
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 819671
+      thread_state_count: 3
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 600233
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 890957
+      thread_state_count: 5
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 623113
+      thread_state_count: 2
+    }
+  }
+  node {
+    node_id: 13948
+    ts: 1739931845759
+    dur: 9867807
+    blocking_method: "void com.android.server.StorageManagerService.onVolumeStateChangedAsync(android.os.storage.VolumeInfo, int, int)"
+    blocked_method: "boolean com.android.server.StorageManagerService.isSystemUnlocked(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.onVolumeStateChangedAsync"
+    short_blocked_method: "com.android.server.StorageManagerService.isSystemUnlocked"
+    blocking_src: "StorageManagerService.java:1722"
+    blocked_src: "StorageManagerService.java:3337"
+    waiter_count: 2
+    blocking_thread_name: "StorageManagerService"
+    blocked_thread_name: "binder:642_E"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    binder_reply_ts: 1739931677940
+    binder_reply_tid: 1934
+  }
+  node {
+    node_id: 13975
+    ts: 1739942269308
+    dur: 2165740
+    blocking_method: "android.os.storage.StorageVolume[] com.android.server.StorageManagerService.getVolumeList(int, java.lang.String, int)"
+    blocked_method: "android.os.storage.VolumeRecord[] com.android.server.StorageManagerService.getVolumeRecords(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.getVolumeList"
+    short_blocked_method: "com.android.server.StorageManagerService.getVolumeRecords"
+    blocking_src: "StorageManagerService.java:3847"
+    blocked_src: "StorageManagerService.java:4009"
+    waiter_count: 1
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "StorageManagerS"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 480064
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 1685676
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 13979
+    ts: 1739942426827
+    dur: 23842
+    blocking_method: "android.os.storage.StorageVolume[] com.android.server.StorageManagerService.getVolumeList(int, java.lang.String, int)"
+    blocked_method: "boolean com.android.server.StorageManagerService.isSystemUnlocked(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.getVolumeList"
+    short_blocked_method: "com.android.server.StorageManagerService.isSystemUnlocked"
+    blocking_src: "StorageManagerService.java:3847"
+    blocked_src: "StorageManagerService.java:3337"
+    waiter_count: 2
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14088
+    ts: 1739952323311
+    dur: 688213
+    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
+    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
+    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
+    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
+    blocking_src: "PowerManagerService.java:1502"
+    blocked_src: "PowerManagerService.java:3257"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "PowerManagerSer"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 688213
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14106
+    ts: 1739953546712
+    dur: 44814
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 29806
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 15008
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14110
+    ts: 1739953949546
+    dur: 41355
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "PackageManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 27599
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 13756
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14124
+    ts: 1739955629621
+    dur: 618271
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 555560
+      thread_state_count: 3
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 62711
+      thread_state_count: 2
+    }
+  }
+  node {
+    node_id: 14131
+    ts: 1739956333592
+    dur: 48179
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 23617
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 24562
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14139
+    ts: 1739956578839
+    dur: 1980671
+    blocking_method: "int com.android.server.am.ActivityManagerService.bindServiceInstance(android.app.IApplicationThread, android.os.IBinder, android.content.Intent, java.lang.String, android.app.IServiceConnection, int, java.lang.String, boolean, int, java.lang.String, java.lang.String, int)"
+    blocked_method: "void com.android.server.am.ActivityManagerService.serviceDoneExecuting(android.os.IBinder, int, int, int)"
+    short_blocking_method: "com.android.server.am.ActivityManagerService.bindServiceInstance"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.serviceDoneExecuting"
+    blocking_src: "ActivityManagerService.java:12702"
+    blocked_src: "ActivityManagerService.java:12750"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "binder:642_1"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 1422802
+      thread_state_count: 22
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 557869
+      thread_state_count: 22
+    }
+  }
+  node {
+    node_id: 14141
+    ts: 1739956770216
+    dur: 33942
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14144
+    ts: 1739956863678
+    dur: 31443
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14147
+    ts: 1739956981240
+    dur: 212483
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14151
+    ts: 1739957159014
+    dur: 1509341
+    blocking_method: "int com.android.server.am.ActivityManagerService.bindServiceInstance(android.app.IApplicationThread, android.os.IBinder, android.content.Intent, java.lang.String, android.app.IServiceConnection, int, java.lang.String, boolean, int, java.lang.String, java.lang.String, int)"
+    blocked_method: "void com.android.server.am.ActivityManagerService.publishService(android.os.IBinder, android.content.Intent, android.os.IBinder)"
+    short_blocking_method: "com.android.server.am.ActivityManagerService.bindServiceInstance"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.publishService"
+    blocking_src: "ActivityManagerService.java:12702"
+    blocked_src: "ActivityManagerService.java:12730"
+    waiter_count: 1
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "binder:642_13"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    binder_reply_ts: 1739956996641
+    binder_reply_tid: 2721
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 70662
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 92726
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14154
+    ts: 1739957260292
+    dur: 58458
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14156
+    ts: 1739957398685
+    dur: 27945
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14159
+    ts: 1739957468620
+    dur: 28295
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14163
+    ts: 1739957560321
+    dur: 33593
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14172
+    ts: 1739957659134
+    dur: 27483
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14177
+    ts: 1739957759077
+    dur: 38184
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14190
+    ts: 1739957843194
+    dur: 38223
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14207
+    ts: 1739957975470
+    dur: 32312
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14218
+    ts: 1739958067210
+    dur: 28514
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14227
+    ts: 1739958399006
+    dur: 33080
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14238
+    ts: 1739963968503
+    dur: 1421118
+    blocking_method: "int com.android.server.job.JobSchedulerService.scheduleAsPackage(android.app.job.JobInfo, android.app.job.JobWorkItem, int, java.lang.String, int, java.lang.String)"
+    blocked_method: "void com.android.server.job.JobServiceContext.onServiceConnected(android.content.ComponentName, android.os.IBinder)"
+    short_blocking_method: "com.android.server.job.JobSchedulerService.scheduleAsPackage"
+    short_blocked_method: "com.android.server.job.JobServiceContext.onServiceConnected"
+    blocking_src: "JobSchedulerService.java:1167"
+    blocked_src: "JobServiceContext.java:553"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 31024
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 946627
+      thread_state_count: 9
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 443467
+      thread_state_count: 9
+    }
+  }
+  node {
+    node_id: 14241
+    ts: 1739964126021
+    dur: 35852
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "batterystats-ha"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14243
+    ts: 1739964658240
+    dur: 34889
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "batterystats-ha"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14245
+    ts: 1739965127438
+    dur: 37681
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "PowerManagerSer"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14247
+    ts: 1739965200743
+    dur: 59154
+    blocking_method: "void com.android.server.power.PowerManagerService.releaseWakeLockInternal(android.os.IBinder, int)"
+    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
+    short_blocking_method: "com.android.server.power.PowerManagerService.releaseWakeLockInternal"
+    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
+    blocking_src: "PowerManagerService.java:1662"
+    blocked_src: "PowerManagerService.java:3257"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "PowerManagerSer"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 14507
+    ts: 1739976886497
+    dur: 29604
+    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.nativeWake"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:-2"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "fg"
+    process_name: "com.android.providers.media.module"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 19570
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 10034
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14617
+    ts: 1739982085531
+    dur: 1188242
+    blocking_method: "android.os.storage.StorageVolume[] com.android.server.StorageManagerService.getVolumeList(int, java.lang.String, int)"
+    blocked_method: "boolean com.android.server.StorageManagerService.isSystemUnlocked(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.getVolumeList"
+    short_blocked_method: "com.android.server.StorageManagerService.isSystemUnlocked"
+    blocking_src: "StorageManagerService.java:3847"
+    blocked_src: "StorageManagerService.java:3337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "binder:642_E"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    binder_reply_ts: 1739981897430
+    binder_reply_tid: 1934
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 1012947
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 175295
+      thread_state_count: 2
+    }
+  }
+  node {
+    node_id: 14619
+    ts: 1739982249023
+    dur: 2051396
+    blocking_method: "android.os.storage.StorageVolume[] com.android.server.StorageManagerService.getVolumeList(int, java.lang.String, int)"
+    blocked_method: "boolean com.android.server.StorageManagerService.isUserKeyUnlocked(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.getVolumeList"
+    short_blocked_method: "com.android.server.StorageManagerService.isUserKeyUnlocked"
+    blocking_src: "StorageManagerService.java:3847"
+    blocked_src: "StorageManagerService.java:3331"
+    waiter_count: 1
+    blocking_thread_name: "main"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 105075
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 69326
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 722485
+      thread_state_count: 3
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 267110
+      thread_state_count: 2
+    }
+  }
+  node {
+    node_id: 14623
+    ts: 1739982673132
+    dur: 2750652
+    blocking_method: "android.os.storage.StorageVolume[] com.android.server.StorageManagerService.getVolumeList(int, java.lang.String, int)"
+    blocked_method: "android.os.storage.VolumeInfo[] com.android.server.StorageManagerService.getVolumes(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.getVolumeList"
+    short_blocked_method: "com.android.server.StorageManagerService.getVolumes"
+    blocking_src: "StorageManagerService.java:3847"
+    blocked_src: "StorageManagerService.java:3998"
+    waiter_count: 2
+    blocking_thread_name: "main"
+    blocked_thread_name: "StorageManagerS"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 1129545
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14626
+    ts: 1739982812646
+    dur: 943658
+    blocking_method: "android.os.storage.StorageVolume[] com.android.server.StorageManagerService.getVolumeList(int, java.lang.String, int)"
+    blocked_method: "android.os.storage.VolumeRecord[] com.android.server.StorageManagerService.getVolumeRecords(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.getVolumeList"
+    short_blocked_method: "com.android.server.StorageManagerService.getVolumeRecords"
+    blocking_src: "StorageManagerService.java:3847"
+    blocked_src: "StorageManagerService.java:4009"
+    waiter_count: 3
+    blocking_thread_name: "main"
+    blocked_thread_name: "binder:642_13"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    binder_reply_ts: 1739982622780
+    binder_reply_tid: 2721
+  }
+  node {
+    node_id: 14636
+    ts: 1739983492768
+    dur: 388360
+    blocking_method: "android.os.storage.StorageVolume[] com.android.server.StorageManagerService.getVolumeList(int, java.lang.String, int)"
+    blocked_method: "boolean com.android.server.StorageManagerService.isSystemUnlocked(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.getVolumeList"
+    short_blocked_method: "com.android.server.StorageManagerService.isSystemUnlocked"
+    blocking_src: "StorageManagerService.java:3847"
+    blocked_src: "StorageManagerService.java:3337"
+    waiter_count: 3
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 388360
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14730
+    ts: 1739991072170
+    dur: 23552
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "fg"
+    process_name: "com.android.providers.media.module"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 16867
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6685
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14757
+    ts: 1739995747475
+    dur: 22859
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "fg"
+    process_name: "com.android.providers.media.module"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15986
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6873
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14807
+    ts: 1739997641827
+    dur: 602533
+    blocking_method: "android.os.storage.StorageVolume[] com.android.server.StorageManagerService.getVolumeList(int, java.lang.String, int)"
+    blocked_method: "boolean com.android.server.StorageManagerService.isUserKeyUnlocked(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.getVolumeList"
+    short_blocked_method: "com.android.server.StorageManagerService.isUserKeyUnlocked"
+    blocking_src: "StorageManagerService.java:3847"
+    blocked_src: "StorageManagerService.java:3331"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_13"
+    blocked_thread_name: "system_server"
+    process_name: "system_server"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 452361
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 150172
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14903
+    ts: 1740006407801
+    dur: 28042
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "fg"
+    process_name: "com.android.providers.media.module"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 18585
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 9457
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 14961
+    ts: 1740008070118
+    dur: 21573
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "fg"
+    process_name: "com.android.providers.media.module"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 14863
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6710
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15061
+    ts: 1740012196981
+    dur: 235531
+    blocking_method: "android.content.pm.UserInfo com.android.server.pm.UserManagerService.getUserInfoNoChecks(int)"
+    blocked_method: "android.content.pm.UserInfo com.android.server.pm.UserManagerService.getUserInfoNoChecks(int)"
+    short_blocking_method: "com.android.server.pm.UserManagerService.getUserInfoNoChecks"
+    short_blocked_method: "com.android.server.pm.UserManagerService.getUserInfoNoChecks"
+    blocking_src: "UserManagerService.java:1852"
+    blocked_src: "UserManagerService.java:1852"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "binder:642_1"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    binder_reply_ts: 1740012085111
+    binder_reply_tid: 657
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 3215
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 221610
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 10706
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15144
+    ts: 1740018472842
+    dur: 22492
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.bg"
+    blocked_thread_name: "fg"
+    process_name: "com.android.providers.media.module"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15734
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6758
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15248
+    ts: 1740024214050
+    dur: 228088
+    blocking_method: "android.os.storage.StorageVolume[] com.android.server.StorageManagerService.getVolumeList(int, java.lang.String, int)"
+    blocked_method: "boolean com.android.server.StorageManagerService.isSystemUnlocked(int)"
+    short_blocking_method: "com.android.server.StorageManagerService.getVolumeList"
+    short_blocked_method: "com.android.server.StorageManagerService.isSystemUnlocked"
+    blocking_src: "StorageManagerService.java:3847"
+    blocked_src: "StorageManagerService.java:3337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "binder:642_13"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    binder_reply_ts: 1740024094690
+    binder_reply_tid: 2721
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 216325
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 11763
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15273
+    ts: 1740028121682
+    dur: 4258407
+    blocking_method: "void com.android.server.am.ActivityManagerService.attachApplication(android.app.IApplicationThread, long)"
+    blocked_method: "int com.android.server.am.ActivityManagerService.broadcastIntentWithFeature(android.app.IApplicationThread, java.lang.String, android.content.Intent, java.lang.String, android.content.IIntentReceiver, int, java.lang.String, android.os.Bundle, java.lang.String[], java.lang.String[], java.lang.String[], int, android.os.Bundle, boolean, boolean, int)"
+    short_blocking_method: "com.android.server.am.ActivityManagerService.attachApplication"
+    short_blocked_method: "com.android.server.am.ActivityManagerService.broadcastIntentWithFeature"
+    blocking_src: "ActivityManagerService.java:5028"
+    blocked_src: "ActivityManagerService.java:14447"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "StorageManagerS"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 10178
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 1671014
+      thread_state_count: 10
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 2577215
+      thread_state_count: 10
+    }
+  }
+  node {
+    node_id: 15352
+    ts: 1740030452448
+    dur: 132766
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 15356
+    ts: 1740030616665
+    dur: 2229356
+    blocking_method: "void com.android.server.am.ActivityManagerService.attachApplication(android.app.IApplicationThread, long)"
+    blocked_method: "void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean)"
+    short_blocking_method: "com.android.server.am.ActivityManagerService.attachApplication"
+    short_blocked_method: "com.android.server.am.BroadcastQueue.processNextBroadcast"
+    blocking_src: "ActivityManagerService.java:5028"
+    blocked_src: "BroadcastQueue.java:1154"
+    waiter_count: 1
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 473837
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15361
+    ts: 1740030984676
+    dur: 23693
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 15364
+    ts: 1740031051846
+    dur: 20196
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 15380
+    ts: 1740031570180
+    dur: 341236
+    blocking_method: "void com.android.server.am.OomAdjuster.performUpdateOomAdjPendingTargetsLocked(java.lang.String)"
+    blocked_method: "void com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated(int, long)"
+    short_blocking_method: "com.android.server.am.OomAdjuster.performUpdateOomAdjPendingTargetsLocked"
+    short_blocked_method: "com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated"
+    blocking_src: "OomAdjuster.java:729"
+    blocked_src: "ActivityManagerService.java:16679"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_E"
+    blocked_thread_name: "tworkPolicy.uid"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+  }
+  node {
+    node_id: 15617
+    ts: 1740039831041
+    dur: 21671
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "fg"
+    process_name: "com.android.providers.media.module"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15053
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6618
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15853
+    ts: 1740068387427
+    dur: 60320
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 48516
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 11804
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15856
+    ts: 1740068492050
+    dur: 19741
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12829
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6912
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15858
+    ts: 1740068565965
+    dur: 18127
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12095
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6032
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15861
+    ts: 1740068610842
+    dur: 17707
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11475
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6232
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15863
+    ts: 1740068675554
+    dur: 17200
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11347
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5853
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15866
+    ts: 1740068718431
+    dur: 17491
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11329
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6162
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15868
+    ts: 1740068776690
+    dur: 17264
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11427
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5837
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15871
+    ts: 1740068819512
+    dur: 17871
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11720
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6151
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15873
+    ts: 1740068878149
+    dur: 17045
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11317
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5728
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15876
+    ts: 1740068920129
+    dur: 17449
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11340
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6109
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15878
+    ts: 1740068977698
+    dur: 16964
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11199
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5765
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15881
+    ts: 1740069019548
+    dur: 17287
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11225
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6062
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15883
+    ts: 1740069076545
+    dur: 16993
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11232
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5761
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15886
+    ts: 1740069124909
+    dur: 17544
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11421
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6123
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15914
+    ts: 1740071592461
+    dur: 20257
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 13609
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6648
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15917
+    ts: 1740071648279
+    dur: 18916
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12066
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6850
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15919
+    ts: 1740071715050
+    dur: 17399
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11697
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5702
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15922
+    ts: 1740071756861
+    dur: 16967
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10985
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5982
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15924
+    ts: 1740071816220
+    dur: 16289
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10752
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5537
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15927
+    ts: 1740071855963
+    dur: 16545
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10695
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5850
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15929
+    ts: 1740071909638
+    dur: 17007
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
@@ -12934,41 +7765,41 @@
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 5174
+      thread_state_dur: 5565
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273731
-    ts: 153325468563
-    dur: 16387
+    node_id: 15932
+    ts: 1740071990692
+    dur: 56291
     blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
     blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
     short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
     short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_1"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 11225
+      thread_state_dur: 49664
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 5162
+      thread_state_dur: 6627
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273733
-    ts: 153325513329
-    dur: 16924
+    node_id: 15934
+    ts: 1740072108820
+    dur: 16704
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -12976,7 +7807,876 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11153
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5551
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15937
+    ts: 1740072150609
+    dur: 16590
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10713
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5877
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15939
+    ts: 1740072205156
+    dur: 22851
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 14589
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 8262
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15942
+    ts: 1740072261613
+    dur: 18126
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11502
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6624
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15944
+    ts: 1740072318829
+    dur: 16368
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10900
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5468
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 15947
+    ts: 1740072358594
+    dur: 16392
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_1"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10561
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5831
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16010
+    ts: 1740079340528
+    dur: 24052
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 16871
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7181
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16028
+    ts: 1740080203227
+    dur: 21678
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 14924
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6754
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16039
+    ts: 1740086095611
+    dur: 22424
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15605
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6819
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16044
+    ts: 1740087510600
+    dur: 22032
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15211
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6821
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16046
+    ts: 1740088505321
+    dur: 21783
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15059
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6724
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16052
+    ts: 1740090099371
+    dur: 22117
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 14925
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7192
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16072
+    ts: 1740093579424
+    dur: 22973
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 16354
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6619
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16074
+    ts: 1740094332387
+    dur: 22001
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15266
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6735
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16094
+    ts: 1740096040883
+    dur: 24390
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 16215
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 8175
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16170
+    ts: 1740097708826
+    dur: 88231
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "android.ui"
+    blocked_thread_name: "android.bg"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 34137
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 47611
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "S"
+      thread_state_dur: 6483
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 16250
+    ts: 1740099416847
+    dur: 42564
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R"
+      thread_state_dur: 10199
+      thread_state_count: 1
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 32365
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19095
+    ts: 1740149257124
+    dur: 21884
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "ActivityManager"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 15352
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6532
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19099
+    ts: 1740149607242
+    dur: 4134255
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 4124325
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 9930
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19104
+    ts: 1740153788345
+    dur: 21717
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 13868
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7849
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19107
+    ts: 1740154026307
+    dur: 19643
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 13342
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6301
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19110
+    ts: 1740154078337
+    dur: 18626
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 12017
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6609
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19112
+    ts: 1740154147385
+    dur: 17924
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11927
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5997
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19115
+    ts: 1740154191235
+    dur: 17446
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11202
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6244
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19117
+    ts: 1740154249350
+    dur: 17234
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11297
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5937
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19120
+    ts: 1740154302692
+    dur: 17692
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11426
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6266
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19122
+    ts: 1740154360413
+    dur: 17225
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11518
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5707
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19125
+    ts: 1740154401863
+    dur: 17420
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 11467
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5953
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19127
+    ts: 1740154457143
+    dur: 16522
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10921
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5601
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19130
+    ts: 1740154496716
+    dur: 16532
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10724
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5808
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19132
+    ts: 1740154550391
+    dur: 16256
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10687
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5569
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19135
+    ts: 1740154589516
+    dur: 16334
+    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
+    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
+    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
+    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
+    blocking_src: "ProcessList.java:4554"
+    blocked_src: "ProcessList.java:4499"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
+    process_name: "system_server"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 10535
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 5799
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 19137
+    ts: 1740154698023
+    dur: 17672
+    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
@@ -12988,284 +8688,14 @@
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 5160
+      thread_state_dur: 5908
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273736
-    ts: 153325542606
-    dur: 16285
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11204
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5081
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273738
-    ts: 153325586548
-    dur: 16234
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11197
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5037
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273741
-    ts: 153325614940
-    dur: 16059
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10961
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5098
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273743
-    ts: 153325658378
-    dur: 16126
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11104
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5022
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273746
-    ts: 153325686659
-    dur: 16724
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11285
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5439
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273748
-    ts: 153325742806
-    dur: 17147
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11989
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5158
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273751
-    ts: 153325772618
-    dur: 16174
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11138
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5036
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273753
-    ts: 153325817452
-    dur: 16201
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11225
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4976
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273756
-    ts: 153325845715
-    dur: 16154
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11108
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5046
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273758
-    ts: 153325950118
-    dur: 12517
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 8701
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3816
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273761
-    ts: 153325979591
-    dur: 13424
+    node_id: 19140
+    ts: 1740154747721
+    dur: 17340
     blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
     blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
     short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
@@ -13273,75 +8703,80 @@
     blocking_src: "UidObserverController.java:100"
     blocked_src: "UidObserverController.java:191"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
+    blocking_thread_name: "binder:642_8"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 9164
+      thread_state_dur: 11018
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4260
+      thread_state_dur: 6322
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273763
-    ts: 153326008979
-    dur: 381915
+    node_id: 19150
+    ts: 1740155084763
+    dur: 224375
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
     blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:554"
-    waiter_count: 1
-    blocking_thread_name: "android.bg"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "binder:642_8"
     blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 14708
+      thread_state_dur: 216868
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 7507
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273765
-    ts: 153326038881
-    dur: 14439
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
+    node_id: 19153
+    ts: 1740155350826
+    dur: 29306
+    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
+    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
+    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
+    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
+    blocking_src: "UidObserverController.java:100"
+    blocked_src: "UidObserverController.java:191"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "batterystats-ha"
+    blocking_thread_name: "binder:642_8"
+    blocked_thread_name: "android.ui"
     process_name: "system_server"
     is_blocked_thread_main: false
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 10367
+      thread_state_dur: 18615
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4072
+      thread_state_dur: 10691
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273767
-    ts: 153326095930
-    dur: 12546
+    node_id: 19693
+    ts: 1740166145283
+    dur: 4220029
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -13349,80 +8784,26 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 8779
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3767
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273769
-    ts: 153326236617
-    dur: 14170
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10226
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3944
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 273996
-    ts: 153335016095
-    dur: 22553
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
     is_blocked_thread_main: true
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 18034
+      thread_state_dur: 4198754
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4519
+      thread_state_dur: 21275
       thread_state_count: 1
     }
   }
   node {
-    node_id: 273998
-    ts: 153335097935
-    dur: 13969
+    node_id: 19721
+    ts: 1740171864902
+    dur: 1480141
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -13430,26 +8811,26 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
     is_blocked_thread_main: true
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 9967
+      thread_state_dur: 1459511
       thread_state_count: 2
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 4002
+      thread_state_dur: 20630
       thread_state_count: 1
     }
   }
   node {
-    node_id: 279337
-    ts: 154675721217
-    dur: 99727
+    node_id: 19737
+    ts: 1740174355596
+    dur: 6989578
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -13457,68 +8838,26 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
+    blocking_thread_name: "sAsyncHandlerThread"
+    blocked_thread_name: "d.process.media"
+    process_name: "android.process.media"
     is_blocked_thread_main: true
     is_blocking_thread_main: false
     thread_states {
       thread_state: "R+"
-      thread_state_dur: 27691
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 55190
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 16846
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 279379
-    ts: 154679410622
-    dur: 4612783
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 777015
+      thread_state_dur: 6968266
       thread_state_count: 2
     }
     thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1945336
-      thread_state_count: 9
-    }
-    thread_states {
       thread_state: "Running"
-      thread_state_dur: 1641784
-      thread_state_count: 11
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 248648
+      thread_state_dur: 21312
       thread_state_count: 1
     }
   }
   node {
-    node_id: 279424
-    ts: 154681323829
-    dur: 50204
+    node_id: 19861
+    ts: 1740196222141
+    dur: 8261093
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -13526,16 +8865,53 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
+    blocking_thread_name: "SysUiBg"
+    blocked_thread_name: "ndroid.systemui"
+    process_name: "com.android.systemui"
+    is_blocked_thread_main: true
     is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 8242026
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 19067
+      thread_state_count: 1
+    }
   }
   node {
-    node_id: 279428
-    ts: 154681483841
-    dur: 42148
+    node_id: 20043
+    ts: 1740213696044
+    dur: 519686
+    blocking_method: "void android.content.res.AssetManager.applyStyle(long, int, int, android.content.res.XmlBlock$Parser, int[], long, long)"
+    blocked_method: "boolean android.content.res.AssetManager.isUpToDate()"
+    short_blocking_method: "android.content.res.AssetManager.applyStyle"
+    short_blocked_method: "android.content.res.AssetManager.isUpToDate"
+    blocking_src: "AssetManager.java:1143"
+    blocked_src: "AssetManager.java:1395"
+    waiter_count: 0
+    blocking_thread_name: "SysUiBg"
+    blocked_thread_name: "ndroid.systemui"
+    process_name: "com.android.systemui"
+    is_blocked_thread_main: true
+    is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 495171
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 24515
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 20059
+    ts: 1740215659279
+    dur: 21393
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -13543,16 +8919,26 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
+    blocking_thread_name: "SysUiBg"
+    blocked_thread_name: "ndroid.systemui"
+    process_name: "com.android.systemui"
+    is_blocked_thread_main: true
     is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 14690
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6703
+      thread_state_count: 1
+    }
   }
   node {
-    node_id: 279436
-    ts: 154681894640
-    dur: 545151
+    node_id: 20146
+    ts: 1740226983261
+    dur: 405233
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -13560,16 +8946,26 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
+    blocking_thread_name: "SysUiBg"
+    blocked_thread_name: "ndroid.systemui"
+    process_name: "com.android.systemui"
+    is_blocked_thread_main: true
     is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 390630
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 14603
+      thread_state_count: 1
+    }
   }
   node {
-    node_id: 279479
-    ts: 154683860847
-    dur: 45935
+    node_id: 20475
+    ts: 1740243405187
+    dur: 21177
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
     blocked_method: "android.os.Message android.os.MessageQueue.next()"
     short_blocking_method: "android.os.MessageQueue.enqueueMessage"
@@ -13577,8224 +8973,100 @@
     blocking_src: "MessageQueue.java:554"
     blocked_src: "MessageQueue.java:337"
     waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
+    blocking_thread_name: "SysUiBg"
+    blocked_thread_name: "ndroid.systemui"
+    process_name: "com.android.systemui"
+    is_blocked_thread_main: true
     is_blocking_thread_main: false
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 14632
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 6545
+      thread_state_count: 1
+    }
   }
   node {
-    node_id: 279535
-    ts: 154686830322
-    dur: 7715
+    node_id: 20510
+    ts: 1740245849475
+    dur: 101011
+    blocking_method: "boolean android.content.res.AssetManager.getResourceValue(int, int, android.util.TypedValue, boolean)"
+    blocked_method: "void android.content.res.AssetManager.applyStyle(long, int, int, android.content.res.XmlBlock$Parser, int[], long, long)"
+    short_blocking_method: "android.content.res.AssetManager.getResourceValue"
+    short_blocked_method: "android.content.res.AssetManager.applyStyle"
+    blocking_src: "AssetManager.java:549"
+    blocked_src: "AssetManager.java:1143"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "SysUiBg"
+    process_name: "com.android.systemui"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 101011
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 20837
+    ts: 1740282732663
+    dur: 75213
     blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
+    blocked_method: "android.os.Message android.os.MessageQueue.next()"
+    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocked_method: "android.os.MessageQueue.next"
+    blocking_src: "MessageQueue.java:554"
+    blocked_src: "MessageQueue.java:337"
+    waiter_count: 0
+    blocking_thread_name: "main"
+    blocked_thread_name: "plugin"
+    process_name: "com.android.systemui"
+    is_blocked_thread_main: false
+    is_blocking_thread_main: true
+    thread_states {
+      thread_state: "R+"
+      thread_state_dur: 51401
+      thread_state_count: 2
+    }
+    thread_states {
+      thread_state: "Running"
+      thread_state_dur: 23812
+      thread_state_count: 1
+    }
+  }
+  node {
+    node_id: 36448
+    ts: 1740519832439
+    dur: 41153
+    blocking_method: "void android.os.MessageQueue.removeSyncBarrier(int)"
     blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
+    short_blocking_method: "android.os.MessageQueue.removeSyncBarrier"
     short_blocked_method: "android.os.MessageQueue.enqueueMessage"
-    blocking_src: "MessageQueue.java:554"
+    blocking_src: "MessageQueue.java:520"
     blocked_src: "MessageQueue.java:554"
     waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "binder:1743_1"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 7715
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 279576
-    ts: 154689535979
-    dur: 53916
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 40768
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13148
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 279584
-    ts: 154689878128
-    dur: 98233
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "VolumeDialogCon"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 54812
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 43421
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 279702
-    ts: 154700112249
-    dur: 39835
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 30622
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9213
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 279707
-    ts: 154700197524
-    dur: 271902
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12411
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 259491
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 282562
-    ts: 155172755307
-    dur: 48271
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35030
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13241
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 282590
-    ts: 155173533144
-    dur: 50348
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35536
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14812
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 282718
-    ts: 155184733174
-    dur: 49677
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35931
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13746
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 282720
-    ts: 155184931529
-    dur: 45346
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 31200
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14146
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 283461
-    ts: 155255821967
-    dur: 4911275
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1566682
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 469313
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 2875280
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 283649
-    ts: 155268713260
-    dur: 160552
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 108876
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 51676
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 283654
-    ts: 155268908957
-    dur: 29654
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21292
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8362
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 283661
-    ts: 155268981106
-    dur: 7968042
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "RootWindowContainer.java:3548"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 242082
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2236288
-      thread_state_count: 22
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4963350
-      thread_state_count: 27
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 526322
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 283675
-    ts: 155269889818
-    dur: 7200172
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 151359
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 283710
-    ts: 155274871286
-    dur: 30381
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 283712
-    ts: 155274931351
-    dur: 48739
-    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1485"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 284184
-    ts: 155285916753
-    dur: 20954
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15083
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5871
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284187
-    ts: 155286038451
-    dur: 18153
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12639
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5514
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284192
-    ts: 155286189654
-    dur: 17380
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12167
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5213
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284194
-    ts: 155286234037
-    dur: 17218
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12094
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5124
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284198
-    ts: 155286363351
-    dur: 17219
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12123
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5096
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284200
-    ts: 155286543628
-    dur: 18282
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12989
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5293
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284203
-    ts: 155286849192
-    dur: 20339
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14564
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5775
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284206
-    ts: 155286895368
-    dur: 4065000
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 119049
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2595743
-      thread_state_count: 9
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 1292100
-      thread_state_count: 11
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 58108
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284256
-    ts: 155289430207
-    dur: 2278280
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "WindowManagerService.java:3510"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 155289344704
-    binder_reply_tid: 3032
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 753436
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284267
-    ts: 155289620801
-    dur: 2150499
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "int com.android.server.wm.WindowManagerService.addWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, android.view.InsetsVisibilities, android.view.InputChannel, android.view.InsetsState, android.view.InsetsSourceControl[], android.graphics.Rect, float[])"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.addWindow"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "WindowManagerService.java:1473"
-    waiter_count: 2
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "binder:642_9"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 155289536541
-    binder_reply_tid: 1995
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 816249
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284270
-    ts: 155289642159
-    dur: 17280
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 284274
-    ts: 155289679826
-    dur: 2959678
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 3
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1684453
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284339
-    ts: 155292345582
-    dur: 81765
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 75539
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6226
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284421
-    ts: 155296040207
-    dur: 100244
-    blocking_method: "com.android.server.pm.Computer com.android.server.pm.PackageManagerService.snapshotComputer()"
-    blocked_method: "com.android.server.pm.Computer com.android.server.pm.PackageManagerService.snapshotComputer()"
-    short_blocking_method: "com.android.server.pm.PackageManagerService.snapshotComputer"
-    short_blocked_method: "com.android.server.pm.PackageManagerService.snapshotComputer"
-    blocking_src: "PackageManagerService.java:1088"
-    blocked_src: "PackageManagerService.java:1088"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "binder:642_10"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 155295954325
-    binder_reply_tid: 2423
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 25798
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 5001
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 69445
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284447
-    ts: 155296949187
-    dur: 17417
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12336
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5081
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284463
-    ts: 155297145262
-    dur: 28639
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24085
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4554
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284469
-    ts: 155297358863
-    dur: 18888
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13150
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5738
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284472
-    ts: 155297476585
-    dur: 14210
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10158
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4052
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284486
-    ts: 155297911307
-    dur: 15424
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11331
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4093
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284640
-    ts: 155300501895
-    dur: 16662
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11900
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4762
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284648
-    ts: 155300569361
-    dur: 13596
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9612
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3984
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284652
-    ts: 155300608880
-    dur: 12990
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9138
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3852
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284662
-    ts: 155300642538
-    dur: 142665
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24608
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 118057
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 284935
-    ts: 155312224034
-    dur: 55798
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 44856
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10942
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 285492
-    ts: 155322838942
-    dur: 518203
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 6077
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 478924
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 33202
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 286624
-    ts: 155340482003
-    dur: 186350
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "android.app.ActivityTaskManager$RootTaskInfo com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo()"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "ActivityTaskManagerService.java:1977"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 155340400359
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 186350
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 286632
-    ts: 155340688391
-    dur: 2268106
-    blocking_method: "android.app.ActivityTaskManager$RootTaskInfo com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo()"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityTaskManagerService.java:1977"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 11803
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 278216
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1978087
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 286634
-    ts: 155340873697
-    dur: 16461
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11904
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4557
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 287654
-    ts: 155380740079
-    dur: 36913
-    blocking_method: "com.android.server.pm.Computer com.android.server.pm.PackageManagerService.snapshotComputer()"
-    blocked_method: "com.android.server.pm.Computer com.android.server.pm.PackageManagerService.snapshotComputer()"
-    short_blocking_method: "com.android.server.pm.PackageManagerService.snapshotComputer"
-    short_blocked_method: "com.android.server.pm.PackageManagerService.snapshotComputer"
-    blocking_src: "PackageManagerService.java:1088"
-    blocked_src: "PackageManagerService.java:1088"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 155380672552
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 36913
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 288032
-    ts: 155389134917
-    dur: 3735
-    blocking_method: "int com.android.server.wm.WindowManagerService.addWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, android.view.InsetsVisibilities, android.view.InputChannel, android.view.InsetsState, android.view.InsetsSourceControl[], android.graphics.Rect, float[])"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.addWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:1473"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3735
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 288116
-    ts: 155392875085
-    dur: 16643
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "UiThreadHelper"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12187
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4456
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 288758
-    ts: 155404931729
-    dur: 778117
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 216741
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 540073
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 21303
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 289064
-    ts: 155411562446
-    dur: 51012448
-    blocking_method: "void java.lang.Object.wait(long, int)"
-    blocked_method: "void android.opengl.GLSurfaceView$GLThread.requestRenderAndNotify(java.lang.Runnable)"
-    short_blocking_method: "java.lang.Object.wait"
-    short_blocked_method: "android.opengl.GLSurfaceView$GLThread.requestRenderAndNotify"
-    blocking_src: "Object.java:-2"
-    blocked_src: "GLSurfaceView.java:1658"
-    waiter_count: 0
-    blocking_thread_name: "GLThread 33"
-    blocked_thread_name: "droid.gallery3d"
-    process_name: "com.android.gallery3d"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 35426829
-      thread_state_count: 13
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2614840
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4108785
-      thread_state_count: 15
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 8861994
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 298447
-    ts: 155583645393
-    dur: 19134
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14438
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4696
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 298461
-    ts: 155583693234
-    dur: 26178
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 19872
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6306
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 299704
-    ts: 155600601232
-    dur: 18685
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14276
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4409
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 299722
-    ts: 155600655072
-    dur: 524123
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 498354
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 25769
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 302506
-    ts: 155641007330
-    dur: 981094
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:5471"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "D"
-      thread_state_dur: 29143
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 51099
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 299066
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 601786
-      thread_state_count: 4
-    }
-    blocked_functions {
-      blocked_function: "__fdget_pos"
-      blocked_function_dur: 29143
-      blocked_function_count: 1
-    }
-  }
-  node {
-    node_id: 303006
-    ts: 155652198052
-    dur: 21436
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15950
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5486
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 303019
-    ts: 155652244378
-    dur: 18713
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11822
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6891
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 304340
-    ts: 155662930458
-    dur: 17689
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.imms"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13129
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4560
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 306527
-    ts: 155690476999
-    dur: 22073
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.imms"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16297
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5776
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 306531
-    ts: 155690551050
-    dur: 19900
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_1"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14506
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5394
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 310097
-    ts: 155720204505
-    dur: 445942
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_9"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 10515
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 274470
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 160957
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 311379
-    ts: 155735882363
-    dur: 52891
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_9"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21057
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 31834
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 311919
-    ts: 155746005967
-    dur: 17412
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13195
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4217
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 312462
-    ts: 155751057241
-    dur: 18220
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13348
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4872
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 312481
-    ts: 155751103401
-    dur: 17378
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10902
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6476
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 313365
-    ts: 155767812592
-    dur: 42117
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 36095
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6022
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 313385
-    ts: 155767891909
-    dur: 20981
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12929
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8052
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 317986
-    ts: 155840228616
-    dur: 290039
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_9"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 61912
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 51442
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 125031
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 51654
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 319796
-    ts: 155873044906
-    dur: 271415
-    blocking_method: "void com.android.server.wm.RemoteAnimationController.onAnimationFinished()"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.RemoteAnimationController.onAnimationFinished"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "RemoteAnimationController.java:278"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 68650
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 198930
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 3835
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 319820
-    ts: 155873641028
-    dur: 969590
-    blocking_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "ActivityTaskSupervisor.java:2407"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 8704
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 723077
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 237809
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 319897
-    ts: 155874668874
-    dur: 2317073
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 676860
-      thread_state_count: 9
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 1640213
-      thread_state_count: 10
-    }
-  }
-  node {
-    node_id: 319917
-    ts: 155875476465
-    dur: 146939
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 319922
-    ts: 155875701914
-    dur: 21975
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 319925
-    ts: 155875745994
-    dur: 265261
-    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1485"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 319929
-    ts: 155875789405
-    dur: 19414
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 320070
-    ts: 155877006886
-    dur: 149923
-    blocking_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityTaskSupervisor.java:2407"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 149923
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 320084
-    ts: 155877668412
-    dur: 23657
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17362
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6295
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 320106
-    ts: 155878145125
-    dur: 266649
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 256594
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10055
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 320133
-    ts: 155878678292
-    dur: 64028
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 51391
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12637
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 320140
-    ts: 155878827384
-    dur: 21163
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "bgres-controlle"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15152
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6011
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 320155
-    ts: 155879072462
-    dur: 22118
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15800
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6318
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 320165
-    ts: 155879180000
-    dur: 19870
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13919
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5951
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 320725
-    ts: 155891286848
-    dur: 22696
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16395
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6301
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 320984
-    ts: 155901263900
-    dur: 21521
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15663
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5858
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 323433
-    ts: 156011346712
-    dur: 103995
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 103995
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 323455
-    ts: 156012768642
-    dur: 429624
-    blocking_method: "void com.android.server.wm.Session.setOnBackInvokedCallbackInfo(android.view.IWindow, android.window.OnBackInvokedCallbackInfo)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    short_blocking_method: "com.android.server.wm.Session.setOnBackInvokedCallbackInfo"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    blocking_src: "Session.java:935"
-    blocked_src: "WindowManagerService.java:2050"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 156012621681
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 115591
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 100375
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 213658
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 323485
-    ts: 156014767115
-    dur: 39935
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 28649
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11286
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 323489
-    ts: 156014854395
-    dur: 186547
-    blocking_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2050"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15505
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 171042
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325616
-    ts: 156156830949
-    dur: 307851
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ll.splashscreen"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 294354
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13497
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325647
-    ts: 156158659055
-    dur: 142055
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 124465
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 17590
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325680
-    ts: 156160911794
-    dur: 81838
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 68526
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13312
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325685
-    ts: 156161044782
-    dur: 9134706
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "RootWindowContainer.java:3548"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 1349939
-      thread_state_count: 11
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1917196
-      thread_state_count: 15
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5729167
-      thread_state_count: 25
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 138404
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325692
-    ts: 156161514092
-    dur: 45737
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "VolumeDialogCon"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 32965
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12772
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325716
-    ts: 156162782471
-    dur: 8719037
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 665052
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 163175
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 510289
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325730
-    ts: 156163853450
-    dur: 9801070
-    blocking_method: "boolean com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay(int, java.lang.String, int, boolean, boolean)"
-    blocked_method: "void com.android.server.wm.ActivityClientController.activityTopResumedStateLost()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskManagerService$LocalService.startHomeOnDisplay"
-    short_blocked_method: "com.android.server.wm.ActivityClientController.activityTopResumedStateLost"
-    blocking_src: "ActivityTaskManagerService.java:6052"
-    blocked_src: "ActivityClientController.java:166"
-    waiter_count: 2
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 156163729927
-    binder_reply_tid: 3032
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 2663301
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325911
-    ts: 156170506715
-    dur: 30663
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21918
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8745
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325929
-    ts: 156171103923
-    dur: 105787
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 86138
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 19649
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 325988
-    ts: 156172634925
-    dur: 1585117
-    blocking_method: "void com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1(com.android.server.wm.SurfaceAnimator$OnAnimationFinishedCallback, int, com.android.server.wm.AnimationAdapter)"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "SurfaceAnimator.java:113"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 78424
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 715746
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 790947
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 326030
-    ts: 156173874588
-    dur: 29335
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_2"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21301
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8034
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326038
-    ts: 156174201444
-    dur: 32998
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24322
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8676
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326116
-    ts: 156178396533
-    dur: 197110
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "ActivityManager"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 136427
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 60683
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326178
-    ts: 156180651359
-    dur: 19146
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "SysUiBg"
-    blocked_thread_name: "VolumeDialogCon"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13669
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5477
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326186
-    ts: 156181043161
-    dur: 21320
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15500
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5820
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326191
-    ts: 156181158932
-    dur: 62323
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 51280
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11043
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326579
-    ts: 156188855053
-    dur: 2800363
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.Session.setOnBackInvokedCallbackInfo(android.view.IWindow, android.window.OnBackInvokedCallbackInfo)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.Session.setOnBackInvokedCallbackInfo"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "Session.java:935"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 19619
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1792730
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 861600
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 126414
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326588
-    ts: 156189002719
-    dur: 2820593
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "WindowManagerService.java:2050"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 156188939586
-    binder_reply_tid: 2484
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 173975
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326599
-    ts: 156189281592
-    dur: 3220
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 326601
-    ts: 156189312293
-    dur: 5655209
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 2
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 52859
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 3128417
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 136889
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 326624
-    ts: 156190291877
-    dur: 18098
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 326709
-    ts: 156194563679
-    dur: 582113
-    blocking_method: "void com.android.server.wm.WindowManagerService.removeWindow(com.android.server.wm.Session, android.view.IWindow)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.removeWindow"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowManagerService.java:2050"
-    blocked_src: "Session.java:581"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 10733
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 353029
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 218351
-      thread_state_count: 6
-    }
-  }
-  node {
-    node_id: 326715
-    ts: 156194819193
-    dur: 17866
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 326718
-    ts: 156194876438
-    dur: 14402
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 326744
-    ts: 156196098808
-    dur: 17777
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12903
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4874
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326748
-    ts: 156196156721
-    dur: 14126
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9910
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4216
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326751
-    ts: 156196199682
-    dur: 14764
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10548
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4216
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 326754
-    ts: 156196231217
-    dur: 67089
-    blocking_method: "void com.android.server.wm.WindowManagerService.removeWindowToken(android.os.IBinder, boolean, boolean, int)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.removeWindowToken"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2956"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9895
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 57194
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 327598
-    ts: 156217819443
-    dur: 15183
-    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.nativeWake"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:-2"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.gallery3d"
-    process_name: "com.android.gallery3d"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10617
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4566
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 327871
-    ts: 156238942418
-    dur: 15916097
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:5471"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 173273
-      thread_state_count: 9
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1310503
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 2152335
-      thread_state_count: 15
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 12279986
-      thread_state_count: 6
-    }
-  }
-  node {
-    node_id: 327910
-    ts: 156240089207
-    dur: 20839
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15039
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5800
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 327936
-    ts: 156240702777
-    dur: 13554308
-    blocking_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged(com.android.server.wm.Session, android.view.IWindow, java.util.List)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportSystemGestureExclusionChanged"
-    blocking_src: "WindowManagerService.java:3511"
-    blocked_src: "WindowManagerService.java:4573"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_A"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 8640
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 327949
-    ts: 156240832205
-    dur: 13455349
-    blocking_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    blocked_method: "android.app.ActivityTaskManager$RootTaskInfo com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo"
-    blocking_src: "WindowManagerService.java:3511"
-    blocked_src: "ActivityTaskManagerService.java:1977"
-    waiter_count: 2
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 156240764666
-    binder_reply_tid: 2484
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 39109
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 327961
-    ts: 156240932012
-    dur: 15389420
-    blocking_method: "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()"
-    blocked_method: "void com.android.server.wm.ActivityClientController.activityIdle(android.os.IBinder, android.content.res.Configuration, boolean)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.getCurrentAnimatorScale"
-    short_blocked_method: "com.android.server.wm.ActivityClientController.activityIdle"
-    blocking_src: "WindowManagerService.java:3511"
-    blocked_src: "ActivityClientController.java:136"
-    waiter_count: 3
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 15989
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1374454
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 631302
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 51242
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 329628
-    ts: 156286118081
-    dur: 6956857
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 4856952
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 130783
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 396442
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 1572680
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 330039
-    ts: 156290858500
-    dur: 3091528
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportFocusChanged(android.os.IBinder, android.os.IBinder)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportFocusChanged"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "WindowManagerService.java:5251"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 2447770
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 330152
-    ts: 156293210545
-    dur: 172233
-    blocking_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    blocked_method: "boolean com.android.server.wm.WindowManagerService$LocalService.isHardKeyboardAvailable()"
-    short_blocking_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$LocalService.isHardKeyboardAvailable"
-    blocking_src: "Session.java:581"
-    blocked_src: "WindowManagerService.java:7908"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 156292502926
-    binder_reply_tid: 2484
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 62577
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 15440
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 94216
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 330168
-    ts: 156293643604
-    dur: 986486
-    blocking_method: "com.android.internal.inputmethod.InputBindResult com.android.server.inputmethod.InputMethodManagerService.startInputOrWindowGainedFocusInternal(int, com.android.internal.view.IInputMethodClient, android.os.IBinder, int, int, int, android.view.inputmethod.EditorInfo, com.android.internal.view.IInputContext, com.android.internal.inputmethod.IRemoteAccessibilityInputConnection, int, android.window.ImeOnBackInvokedDispatcher)"
-    blocked_method: "void com.android.server.inputmethod.InputMethodManagerService.reportFullscreenMode(android.os.IBinder, boolean)"
-    short_blocking_method: "com.android.server.inputmethod.InputMethodManagerService.startInputOrWindowGainedFocusInternal"
-    short_blocked_method: "com.android.server.inputmethod.InputMethodManagerService.reportFullscreenMode"
-    blocking_src: "InputMethodManagerService.java:3860"
-    blocked_src: "InputMethodManagerService.java:5891"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "binder:642_1"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 662588
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 323898
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 331215
-    ts: 156312334164
-    dur: 19425
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.imms"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14971
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4454
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 334935
-    ts: 156369270123
-    dur: 927998
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "void com.android.server.wm.Session.setWallpaperZoomOut(android.os.IBinder, float)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.Session.setWallpaperZoomOut"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "Session.java:581"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_C"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 527034
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 385450
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 15514
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 348248
-    ts: 156704493050
-    dur: 51241
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 37094
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14147
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 351852
-    ts: 156836477024
-    dur: 3214078
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 439671
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 620882
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 2139371
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 14154
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 352071
-    ts: 156841069591
-    dur: 36940
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "OomAdjuster"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 26370
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10570
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 352082
-    ts: 156841595115
-    dur: 37119
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 26417
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10702
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 352090
-    ts: 156842118693
-    dur: 46584
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 33310
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13274
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 352098
-    ts: 156842569028
-    dur: 42156
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "tworkPolicy.uid"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 30323
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11833
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 352346
-    ts: 156852725961
-    dur: 1289527
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:2267"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_1"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 156852544773
-    binder_reply_tid: 655
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 22997
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 360073
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 890952
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 15505
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 352382
-    ts: 156854148196
-    dur: 76489
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 64360
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12129
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 352387
-    ts: 156854380585
-    dur: 36179
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 25496
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10683
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 352420
-    ts: 156855239393
-    dur: 39650
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 27729
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11921
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 353164
-    ts: 156886493220
-    dur: 21789
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16142
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5647
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 357017
-    ts: 157855784627
-    dur: 50201
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "InputDispatcher"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 37010
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13191
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 357022
-    ts: 157856012902
-    dur: 42584
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "InputDispatcher"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 30311
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12273
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 358606
-    ts: 158055185435
-    dur: 90634
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 22073
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21546
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 47015
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 358641
-    ts: 158055468270
-    dur: 395935
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 38389
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 30694
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 326852
-      thread_state_count: 4
-    }
-  }
-  node {
-    node_id: 360593
-    ts: 158077073666
-    dur: 42834
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "InputDispatcher"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 37504
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5330
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 360609
-    ts: 158077133576
-    dur: 18853
-    blocking_method: "void com.android.server.power.PowerManagerService.userActivityInternal(int, long, int, int, int)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.userActivityInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1897"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "InputDispatcher"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12059
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6794
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 366740
-    ts: 158152659967
-    dur: 3063
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:554"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_6"
+    blocking_thread_name: "main"
     blocked_thread_name: "RenderThread"
-    process_name: "com.android.launcher3"
+    process_name: "com.android.systemui"
     is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3063
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 379817
-    ts: 159259891414
-    dur: 1153097
-    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1485"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
+    is_blocking_thread_main: true
     thread_states {
       thread_state: "R"
-      thread_state_dur: 335018
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 328060
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 490019
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 379978
-    ts: 159264393064
-    dur: 51273
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 36515
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14758
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 380009
-    ts: 159265945682
-    dur: 5459919
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.RootWindowContainer$RankTaskLayersRunnable.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "RootWindowContainer.java:3548"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 517884
-      thread_state_count: 7
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 446032
-      thread_state_count: 11
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4021825
-      thread_state_count: 18
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 474178
-      thread_state_count: 4
-    }
-  }
-  node {
-    node_id: 380042
-    ts: 159266958579
-    dur: 5142658
-    blocking_method: "int com.android.server.wm.ActivityStarter.execute()"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityStarter.execute"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityStarter.java:686"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 707819
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 380426
-    ts: 159277264615
-    dur: 22565
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16138
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6427
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 380467
-    ts: 159279908044
-    dur: 4547013
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 857156
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 230711
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 548717
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 2910429
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 380484
-    ts: 159280525601
-    dur: 4477863
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 3458836
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 380498
-    ts: 159280830419
-    dur: 5128980
-    blocking_method: "void com.android.server.wm.ActivityClientController.activityPaused(android.os.IBinder)"
-    blocked_method: "int com.android.server.wm.ActivityClientController.getDisplayId(android.os.IBinder)"
-    short_blocking_method: "com.android.server.wm.ActivityClientController.activityPaused"
-    short_blocked_method: "com.android.server.wm.ActivityClientController.getDisplayId"
-    blocking_src: "ActivityClientController.java:175"
-    blocked_src: "ActivityClientController.java:563"
-    waiter_count: 2
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "binder:642_10"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 159280774831
-    binder_reply_tid: 2423
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 4414771
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 380601
-    ts: 159282662436
-    dur: 140456
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 133316
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7140
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 380618
-    ts: 159282886209
-    dur: 19869
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14287
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5582
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 380982
-    ts: 159288566508
-    dur: 15896
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11587
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4309
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 380985
-    ts: 159288646811
-    dur: 13233
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9416
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3817
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 381070
-    ts: 159294178868
-    dur: 18201
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "droid.launcher3"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13179
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5022
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 381316
-    ts: 159300919065
-    dur: 1999420
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.WindowManagerService.reportFocusChanged(android.os.IBinder, android.os.IBinder)"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.WindowManagerService.reportFocusChanged"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "WindowManagerService.java:5251"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 16934
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1181852
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 676310
-      thread_state_count: 6
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 124324
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 381340
-    ts: 159301731013
-    dur: 17042
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 381343
-    ts: 159301773415
-    dur: 1174349
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 958802
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 382711
-    ts: 159341188333
-    dur: 81545
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 71225
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10320
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 383137
-    ts: 159351036106
-    dur: 984677
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "int com.android.server.wm.ActivityTaskManagerService.getLastResumedActivityUserId()"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.ActivityTaskManagerService.getLastResumedActivityUserId"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "ActivityTaskManagerService.java:3775"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_1"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 159350981010
-    binder_reply_tid: 655
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 771819
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 6332
+      thread_state_dur: 13084
       thread_state_count: 1
     }
     thread_states {
       thread_state: "Running"
-      thread_state_dur: 134618
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 71908
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 383157
-    ts: 159351397804
-    dur: 730979
-    blocking_method: "void com.android.server.wm.WindowAnimator.lambda$new$1(long)"
-    blocked_method: "boolean com.android.server.wm.TaskFragmentOrganizerController.isActivityEmbedded(android.os.IBinder)"
-    short_blocking_method: "com.android.server.wm.WindowAnimator.lambda$new$1"
-    short_blocked_method: "com.android.server.wm.TaskFragmentOrganizerController.isActivityEmbedded"
-    blocking_src: "WindowAnimator.java:103"
-    blocked_src: "TaskFragmentOrganizerController.java:1029"
-    waiter_count: 1
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 159351309622
-    binder_reply_tid: 3032
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 64496
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 23034
+      thread_state_dur: 19277
       thread_state_count: 1
     }
     thread_states {
       thread_state: "S"
-      thread_state_dur: 26802
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 384085
-    ts: 159380515741
-    dur: 18099
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1977_1"
-    blocked_thread_name: "UiThreadHelper"
-    process_name: "com.android.launcher3"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13304
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4795
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 384826
-    ts: 159404818164
-    dur: 43424
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 38573
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4851
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 384889
-    ts: 159406760394
-    dur: 19425
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14630
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4795
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 384891
-    ts: 159406814825
-    dur: 15493
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11185
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4308
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 384893
-    ts: 159406849471
-    dur: 16425
-    blocking_method: "void com.android.server.power.PowerManagerService.acquireWakeLockInternal(android.os.IBinder, int, int, java.lang.String, java.lang.String, android.os.WorkSource, java.lang.String, int, int, android.os.IWakeLockCallback)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.acquireWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1485"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10683
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5742
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 384917
-    ts: 159408702300
-    dur: 16047
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11533
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4514
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 384924
-    ts: 159409766935
-    dur: 16597
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11992
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4605
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 384926
-    ts: 159409804952
-    dur: 14190
-    blocking_method: "android.content.Intent com.android.server.am.ActivityManagerService.registerReceiverWithFeature(android.app.IApplicationThread, java.lang.String, java.lang.String, java.lang.String, android.content.IIntentReceiver, android.content.IntentFilter, java.lang.String, int, int)"
-    blocked_method: "void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.registerReceiverWithFeature"
-    short_blocked_method: "com.android.server.am.BroadcastQueue.processNextBroadcast"
-    blocking_src: "ActivityManagerService.java:13240"
-    blocked_src: "BroadcastQueue.java:1158"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9710
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4480
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 385658
-    ts: 159421840380
-    dur: 1263336
-    blocking_method: "java.util.List com.android.internal.os.BatteryUsageStatsProvider.getBatteryUsageStats(java.util.List)"
-    blocked_method: "void com.android.internal.os.BatteryStatsImpl.noteModemControllerActivity(android.telephony.ModemActivityInfo, long, long, long, android.app.usage.NetworkStatsManager)"
-    short_blocking_method: "com.android.internal.os.BatteryUsageStatsProvider.getBatteryUsageStats"
-    short_blocked_method: "com.android.internal.os.BatteryStatsImpl.noteModemControllerActivity"
-    blocking_src: "BatteryUsageStatsProvider.java:127"
-    blocked_src: "BatteryStatsImpl.java:13736"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "batterystats-wo"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 563315
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 140780
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 559241
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 387118
-    ts: 159457190261
-    dur: 17410
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12822
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4588
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 387122
-    ts: 159457498145
-    dur: 16135
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11795
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4340
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 387125
-    ts: 159457535164
-    dur: 40538
-    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
-    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
-    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
-    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
-    blocking_src: "UidObserverController.java:100"
-    blocked_src: "UidObserverController.java:191"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 25914
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14624
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 387127
-    ts: 159457565734
-    dur: 528967
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 522200
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6767
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 387138
-    ts: 159457813097
-    dur: 1903855
-    blocking_method: "boolean com.android.server.am.OomAdjuster.updateOomAdjLocked(com.android.server.am.ProcessRecord, java.lang.String)"
-    blocked_method: "void com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated(int, long)"
-    short_blocking_method: "com.android.server.am.OomAdjuster.updateOomAdjLocked"
-    short_blocked_method: "com.android.server.am.ActivityManagerService$LocalService.notifyNetworkPolicyRulesUpdated"
-    blocking_src: "OomAdjuster.java:462"
-    blocked_src: "ActivityManagerService.java:16658"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "tworkPolicy.uid"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 22303
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1166187
-      thread_state_count: 32
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 438851
-      thread_state_count: 33
-    }
-  }
-  node {
-    node_id: 387147
-    ts: 159458520075
-    dur: 16349
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "OomAdjuster"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387163
-    ts: 159458956705
-    dur: 35845
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387166
-    ts: 159459012430
-    dur: 15101
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387168
-    ts: 159459106452
-    dur: 13789
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387171
-    ts: 159459132063
-    dur: 14032
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387173
-    ts: 159459174179
-    dur: 13538
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387176
-    ts: 159459199047
-    dur: 13148
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387178
-    ts: 159459241072
-    dur: 13457
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387181
-    ts: 159459265349
-    dur: 13168
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387183
-    ts: 159459301855
-    dur: 13010
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387186
-    ts: 159459325560
-    dur: 12952
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387188
-    ts: 159459361154
-    dur: 12853
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387191
-    ts: 159459384435
-    dur: 13288
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387193
-    ts: 159459420128
-    dur: 12782
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387196
-    ts: 159459443326
-    dur: 12877
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387198
-    ts: 159459478620
-    dur: 12576
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387201
-    ts: 159459501454
-    dur: 12744
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387203
-    ts: 159459546739
-    dur: 12739
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387206
-    ts: 159459591967
-    dur: 14316
-    blocking_method: "int com.android.server.am.UidObserverController.enqueueUidChange(com.android.server.am.UidObserverController$ChangeRecord, int, int, int, long, int, boolean)"
-    blocked_method: "void com.android.server.am.UidObserverController.dispatchUidsChanged()"
-    short_blocking_method: "com.android.server.am.UidObserverController.enqueueUidChange"
-    short_blocked_method: "com.android.server.am.UidObserverController.dispatchUidsChanged"
-    blocking_src: "UidObserverController.java:100"
-    blocked_src: "UidObserverController.java:191"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387212
-    ts: 159459797236
-    dur: 15416
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11108
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4308
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 387221
-    ts: 159460322317
-    dur: 1191440
-    blocking_method: "int com.android.server.am.ActivityManagerService.bindServiceInstance(android.app.IApplicationThread, android.os.IBinder, android.content.Intent, java.lang.String, android.app.IServiceConnection, int, java.lang.String, boolean, int, java.lang.String, java.lang.String, int)"
-    blocked_method: "void com.android.server.am.ActivityManagerService.serviceDoneExecuting(android.os.IBinder, int, int, int)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.bindServiceInstance"
-    short_blocked_method: "com.android.server.am.ActivityManagerService.serviceDoneExecuting"
-    blocking_src: "ActivityManagerService.java:12681"
-    blocked_src: "ActivityManagerService.java:12729"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "binder:642_12"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 86571
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 721982
-      thread_state_count: 30
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 382887
-      thread_state_count: 30
-    }
-  }
-  node {
-    node_id: 387230
-    ts: 159460580687
-    dur: 951996
-    blocking_method: "int com.android.server.am.ActivityManagerService.bindServiceInstance(android.app.IApplicationThread, android.os.IBinder, android.content.Intent, java.lang.String, android.app.IServiceConnection, int, java.lang.String, boolean, int, java.lang.String, java.lang.String, int)"
-    blocked_method: "void com.android.server.am.ActivityManagerService.publishService(android.os.IBinder, android.content.Intent, android.os.IBinder)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.bindServiceInstance"
-    short_blocked_method: "com.android.server.am.ActivityManagerService.publishService"
-    blocking_src: "ActivityManagerService.java:12681"
-    blocked_src: "ActivityManagerService.java:12709"
-    waiter_count: 1
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "binder:642_F"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 159460521688
-    binder_reply_tid: 2422
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 64535
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 387233
-    ts: 159460728309
-    dur: 15293
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387236
-    ts: 159460758428
-    dur: 13041
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387238
-    ts: 159460798923
-    dur: 12835
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387241
-    ts: 159460821321
-    dur: 12172
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387243
-    ts: 159460855104
-    dur: 12235
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387246
-    ts: 159460876428
-    dur: 12164
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387248
-    ts: 159460912835
-    dur: 12128
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387251
-    ts: 159460934386
-    dur: 12824
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387253
-    ts: 159460968155
-    dur: 12190
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387256
-    ts: 159460989340
-    dur: 12290
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387258
-    ts: 159461022224
-    dur: 12134
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387261
-    ts: 159461043290
-    dur: 12125
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387263
-    ts: 159461076451
-    dur: 12596
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387266
-    ts: 159461098062
-    dur: 12252
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387268
-    ts: 159461130926
-    dur: 12204
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387271
-    ts: 159461152008
-    dur: 12091
-    blocking_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    blocked_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    short_blocking_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    short_blocked_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    blocking_src: "ProcessList.java:4551"
-    blocked_src: "ProcessList.java:4496"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "android.ui"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 387273
-    ts: 159461386887
-    dur: 15350
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_1"
-    blocked_thread_name: "ActivityManager"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 388720
-    ts: 159496849717
-    dur: 654648
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 14623
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 464157
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 175868
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 389341
-    ts: 159509465402
-    dur: 17313
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13082
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4231
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 389344
-    ts: 159509510535
-    dur: 15527
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9184
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6343
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 390177
-    ts: 159525758917
-    dur: 767210
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 751928
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 15282
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 390233
-    ts: 159526572541
-    dur: 18184
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10673
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7511
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 391152
-    ts: 159535813481
-    dur: 1300359
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1287918
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12441
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 391226
-    ts: 159537150639
-    dur: 18021
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10676
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7345
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 393040
-    ts: 159563040428
-    dur: 12068928
-    blocking_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    blocked_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    short_blocked_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    blocking_src: "WindowSurfacePlacer.java:56"
-    blocked_src: "WindowManagerService.java:5471"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 578910
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 8292358
-      thread_state_count: 10
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 2775099
-      thread_state_count: 12
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 422561
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 393066
-    ts: 159563796893
-    dur: 16945
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-  }
-  node {
-    node_id: 393814
-    ts: 159575994849
-    dur: 18752
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 13036
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5716
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 393819
-    ts: 159576044848
-    dur: 15903
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9734
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6169
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 394820
-    ts: 159588751789
-    dur: 15896
-    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.nativeWake"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:-2"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "pool-2-thread-8"
-    blocked_thread_name: "ssioncontroller"
-    process_name: "com.android.permissioncontroller"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11289
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4607
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 395214
-    ts: 159596940160
-    dur: 296906
-    blocking_method: "void com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow(android.os.IBinder, android.os.IBinder)"
-    blocked_method: "void com.android.server.wm.WindowSurfacePlacer$Traverser.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService$LocalService.updateInputMethodTargetWindow"
-    short_blocked_method: "com.android.server.wm.WindowSurfacePlacer$Traverser.run"
-    blocking_src: "WindowManagerService.java:7897"
-    blocked_src: "WindowSurfacePlacer.java:56"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_A"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 12320
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 136019
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 148567
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 395337
-    ts: 159598486377
-    dur: 9108173
-    blocking_method: "void com.android.server.power.hint.HintManagerService$AppHintSession.reportActualWorkDuration(long[], long[])"
-    blocked_method: "void com.android.server.power.hint.HintManagerService$AppHintSession.reportActualWorkDuration(long[], long[])"
-    short_blocking_method: "com.android.server.power.hint.HintManagerService$AppHintSession.reportActualWorkDuration"
-    short_blocked_method: "com.android.server.power.hint.HintManagerService$AppHintSession.reportActualWorkDuration"
-    blocking_src: "HintManagerService.java:434"
-    blocked_src: "HintManagerService.java:434"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_F"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 876261
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 184443
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 147197
-      thread_state_count: 4
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 7900272
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 395405
-    ts: 159598724054
-    dur: 16528
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11807
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4721
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 395494
-    ts: 159599184288
-    dur: 99320
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 92168
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7152
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 396089
-    ts: 159607083429
-    dur: 17347
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_9"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12618
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4729
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 396407
-    ts: 159610412029
-    dur: 16436
-    blocking_method: "void android.os.MessageQueue.nativeWake(long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.nativeWake"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:-2"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1951_5"
-    blocked_thread_name: "ndroid.settings"
-    process_name: "com.android.settings"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11145
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5291
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 396414
-    ts: 159610488442
-    dur: 12704
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1951_5"
-    blocked_thread_name: "ndroid.settings"
-    process_name: "com.android.settings"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9016
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 3688
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 397366
-    ts: 159620899448
-    dur: 16443
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "batterystats-ha"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11988
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4455
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 397407
-    ts: 159621082580
-    dur: 15856
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11644
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4212
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 397417
-    ts: 159621129950
-    dur: 14265
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10158
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4107
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 397424
-    ts: 159621160739
-    dur: 15082
-    blocking_method: "void com.android.server.power.PowerManagerService.releaseWakeLockInternal(android.os.IBinder, int)"
-    blocked_method: "void com.android.server.power.PowerManagerService.handleSandman(int)"
-    short_blocking_method: "com.android.server.power.PowerManagerService.releaseWakeLockInternal"
-    short_blocked_method: "com.android.server.power.PowerManagerService.handleSandman"
-    blocking_src: "PowerManagerService.java:1645"
-    blocked_src: "PowerManagerService.java:3197"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "PowerManagerSer"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9656
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5426
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 397753
-    ts: 159623184358
-    dur: 16499
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.settings"
-    process_name: "com.android.settings"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 11584
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4915
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 398202
-    ts: 159628387266
-    dur: 1633779
-    blocking_method: "void com.android.server.am.ActivityManagerService.trimApplications(boolean, java.lang.String)"
-    blocked_method: "android.content.Intent com.android.server.am.ActivityManagerService.registerReceiverWithFeature(android.app.IApplicationThread, java.lang.String, java.lang.String, java.lang.String, android.content.IIntentReceiver, android.content.IntentFilter, java.lang.String, int, int)"
-    short_blocking_method: "com.android.server.am.ActivityManagerService.trimApplications"
-    short_blocked_method: "com.android.server.am.ActivityManagerService.registerReceiverWithFeature"
-    blocking_src: "ActivityManagerService.java:15822"
-    blocked_src: "ActivityManagerService.java:13240"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "binder:642_11"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    binder_reply_ts: 159626070064
-    binder_reply_tid: 2484
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 1454318
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 179461
-      thread_state_count: 4
-    }
-  }
-  node {
-    node_id: 399287
-    ts: 159640394560
-    dur: 15230
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.settings"
-    process_name: "com.android.settings"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10971
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4259
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 399490
-    ts: 159643695534
-    dur: 25222
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 20256
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4966
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 399494
-    ts: 159643744501
-    dur: 15078
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 9299
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5779
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 399649
-    ts: 159648016090
-    dur: 16990
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1951_6"
-    blocked_thread_name: "ndroid.settings"
-    process_name: "com.android.settings"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 12575
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4415
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 400376
-    ts: 159655976484
-    dur: 19162
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14011
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 5151
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 400379
-    ts: 159656021424
-    dur: 17456
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 10916
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6540
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 402629
-    ts: 159697223084
-    dur: 25727
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 18496
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7231
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 402632
-    ts: 159697280647
-    dur: 99356
-    blocking_method: "void com.android.server.wm.WindowManagerService$H.handleMessage(android.os.Message)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService$H.handleMessage"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:5566"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 14805
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 84551
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 406711
-    ts: 159755224333
-    dur: 51380
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 37577
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13803
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 406735
-    ts: 159755340492
-    dur: 48103
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 29984
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 18119
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 406983
-    ts: 159757668858
-    dur: 82086
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.settings"
-    process_name: "com.android.settings"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 66307
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 15779
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 407732
-    ts: 159772942997
-    dur: 49847
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35698
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14149
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 407735
-    ts: 159773100289
-    dur: 47825
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 29342
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 18483
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 408354
-    ts: 159788439504
-    dur: 49092
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35216
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13876
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 408357
-    ts: 159788548172
-    dur: 47291
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 29647
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 17644
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 409177
-    ts: 159809477764
-    dur: 786375
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 750681
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 35694
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 409208
-    ts: 159810382047
-    dur: 45537
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 26924
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 18613
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 409893
-    ts: 159823481864
-    dur: 28555
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 20683
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7872
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 409896
-    ts: 159823545900
-    dur: 748556
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 711274
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 37282
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 410996
-    ts: 159837050737
-    dur: 38315
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 27418
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10897
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 411002
-    ts: 159837134846
-    dur: 36829
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 23089
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13740
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 411727
-    ts: 159853294557
-    dur: 32040
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 23176
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8864
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 411732
-    ts: 159853364551
-    dur: 97176
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 76530
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 20646
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412455
-    ts: 159872657636
-    dur: 49776
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 36391
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13385
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412468
-    ts: 159873041074
-    dur: 58858
-    blocking_method: "void android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets(float, float, float, float, float, boolean)"
-    blocked_method: "void android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged(boolean)"
-    short_blocking_method: "android.service.wallpaper.WallpaperService$Engine$2.dispatchWallpaperOffsets"
-    short_blocked_method: "android.service.wallpaper.WallpaperService$Engine.doOffsetsChanged"
-    blocking_src: "WallpaperService.java:424"
-    blocked_src: "WallpaperService.java:1545"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35360
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 23498
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412500
-    ts: 159874002176
-    dur: 4796667
-    blocking_method: "void com.android.server.wm.RemoteAnimationController.onAnimationFinished()"
-    blocked_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    short_blocking_method: "com.android.server.wm.RemoteAnimationController.onAnimationFinished"
-    short_blocked_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    blocking_src: "RemoteAnimationController.java:278"
-    blocked_src: "ActivityTaskSupervisor.java:2407"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_11"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 46661
-      thread_state_count: 3
-    }
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 7306
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 435903
-      thread_state_count: 5
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 4306797
-      thread_state_count: 3
-    }
-  }
-  node {
-    node_id: 412547
-    ts: 159875511825
-    dur: 761145
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 730594
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 30551
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412552
-    ts: 159875972491
-    dur: 343825
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.enqueueMessage"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:554"
-    waiter_count: 1
-    blocking_thread_name: "binder:1743_A"
-    blocked_thread_name: "binder:1743_9"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 59546
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412655
-    ts: 159877795411
-    dur: 273728
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 252009
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 21719
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412688
-    ts: 159878301333
-    dur: 69744
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 58475
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 11269
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412697
-    ts: 159878583200
-    dur: 38815
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 28835
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9980
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412702
-    ts: 159878753425
-    dur: 727100
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_7"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 631874
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 79652
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 15574
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412705
-    ts: 159878854500
-    dur: 1200121
-    blocking_method: "void com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage(android.os.Message)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.ActivityTaskSupervisor$ActivityTaskSupervisorHandler.handleMessage"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "ActivityTaskSupervisor.java:2407"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R"
-      thread_state_dur: 438418
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 761703
-      thread_state_count: 2
-    }
-  }
-  node {
-    node_id: 412718
-    ts: 159880416776
-    dur: 32701
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 23492
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 9209
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412721
-    ts: 159880610806
-    dur: 150005
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.display"
-    blocked_thread_name: "OomAdjuster"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 128138
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 21867
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412726
-    ts: 159881095679
-    dur: 32800
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 24020
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8780
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412730
-    ts: 159881434088
-    dur: 29072
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.bg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 20747
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8325
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412735
-    ts: 159881541866
-    dur: 26490
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "WifiHandlerThre"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 18754
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7736
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412743
-    ts: 159881795171
-    dur: 30976
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 22065
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8911
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 412878
-    ts: 159883121404
-    dur: 2749114
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "tworkPolicy.uid"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 2733253
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 15861
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 413366
-    ts: 159890628362
-    dur: 29089
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "android.fg"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21062
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8027
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 413815
-    ts: 159908224787
-    dur: 4669
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_10"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 4669
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 413836
-    ts: 159909153132
-    dur: 28814
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_9"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 20378
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8436
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 413839
-    ts: 159909203455
-    dur: 22648
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.bg"
-    blocked_thread_name: "system_server"
-    process_name: "system_server"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 16514
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 6134
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 413847
-    ts: 159909794958
-    dur: 4373
-    blocking_method: "void com.android.server.am.ProcessList.dispatchProcessesChanged()"
-    blocked_method: "com.android.server.am.ActivityManagerService$ProcessChangeItem com.android.server.am.ProcessList.enqueueProcessChangeItemLocked(int, int)"
-    short_blocking_method: "com.android.server.am.ProcessList.dispatchProcessesChanged"
-    short_blocked_method: "com.android.server.am.ProcessList.enqueueProcessChangeItemLocked"
-    blocking_src: "ProcessList.java:4496"
-    blocked_src: "ProcessList.java:4551"
-    waiter_count: 0
-    blocking_thread_name: "android.ui"
-    blocked_thread_name: "binder:642_10"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "S"
-      thread_state_dur: 4373
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 414026
-    ts: 159917383153
-    dur: 29717
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_9"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 21426
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 8291
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 414980
-    ts: 159942161039
-    dur: 39470
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 28582
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 10888
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 414994
-    ts: 159942672030
-    dur: 127885
-    blocking_method: "int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, android.view.WindowManager$LayoutParams, int, int, int, int, int, int, android.window.ClientWindowFrames, android.util.MergedConfiguration, android.view.SurfaceControl, android.view.InsetsState, android.view.InsetsSourceControl[], android.os.Bundle)"
-    blocked_method: "void com.android.server.wm.InputMonitor$UpdateInputWindows.run()"
-    short_blocking_method: "com.android.server.wm.WindowManagerService.relayoutWindow"
-    short_blocked_method: "com.android.server.wm.InputMonitor$UpdateInputWindows.run"
-    blocking_src: "WindowManagerService.java:2267"
-    blocked_src: "InputMonitor.java:119"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_A"
-    blocked_thread_name: "android.anim"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 127885
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 415029
-    ts: 159944725671
-    dur: 26802
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "binder:1743_B"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 19404
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7398
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 416784
-    ts: 160100767957
-    dur: 53599
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 39366
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14233
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 417064
-    ts: 160120422629
-    dur: 79423
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 40077
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 39346
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 417067
-    ts: 160120735870
-    dur: 51226
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "android.anim"
-    blocked_thread_name: "android.display"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 33915
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 17311
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 418505
-    ts: 160202105640
-    dur: 46695
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 33975
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12720
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 419342
-    ts: 160240310843
-    dur: 47358
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 34352
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13006
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 420321
-    ts: 160302181066
-    dur: 47100
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 34019
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13081
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 422547
-    ts: 160439055209
-    dur: 47832
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 34791
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13041
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 425845
-    ts: 160620064467
-    dur: 116136
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 23923
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 92213
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 436553
-    ts: 161154899823
-    dur: 49934
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 36018
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13916
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 437830
-    ts: 161186016704
-    dur: 44698
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 31728
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12970
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 438300
-    ts: 161203509308
-    dur: 44578
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 31771
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12807
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 442764
-    ts: 161338934772
-    dur: 50024
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35724
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14300
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 443239
-    ts: 161355909821
-    dur: 48135
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 33762
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14373
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 444158
-    ts: 161373390547
-    dur: 298426
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 269041
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 29385
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 445189
-    ts: 161405564583
-    dur: 24526
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 17369
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 7157
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 445653
-    ts: 161423247692
-    dur: 49119
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35086
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14033
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 446152
-    ts: 161439909193
-    dur: 49301
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35295
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 14006
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 446637
-    ts: 161456450823
-    dur: 41591
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 29417
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12174
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 447426
-    ts: 161473245517
-    dur: 42290
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 30224
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 12066
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 447932
-    ts: 161489453789
-    dur: 49272
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 35309
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13963
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 448985
-    ts: 161522628492
-    dur: 47013
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.systemui"
-    process_name: "com.android.systemui"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 33527
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13486
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 449023
-    ts: 161523337193
-    dur: 67295
-    blocking_method: "void com.android.server.power.hint.HintManagerService$AppHintSession.reportActualWorkDuration(long[], long[])"
-    blocked_method: "void com.android.server.power.hint.HintManagerService$AppHintSession.reportActualWorkDuration(long[], long[])"
-    short_blocking_method: "com.android.server.power.hint.HintManagerService$AppHintSession.reportActualWorkDuration"
-    short_blocked_method: "com.android.server.power.hint.HintManagerService$AppHintSession.reportActualWorkDuration"
-    blocking_src: "HintManagerService.java:434"
-    blocked_src: "HintManagerService.java:434"
-    waiter_count: 0
-    blocking_thread_name: "binder:642_12"
-    blocked_thread_name: "binder:642_9"
-    process_name: "system_server"
-    is_blocked_thread_main: false
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 3714
-      thread_state_count: 1
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 63581
-      thread_state_count: 1
-    }
-  }
-  node {
-    node_id: 449467
-    ts: 161538478640
-    dur: 44809
-    blocking_method: "boolean android.os.MessageQueue.enqueueMessage(android.os.Message, long)"
-    blocked_method: "android.os.Message android.os.MessageQueue.next()"
-    short_blocking_method: "android.os.MessageQueue.enqueueMessage"
-    short_blocked_method: "android.os.MessageQueue.next"
-    blocking_src: "MessageQueue.java:554"
-    blocked_src: "MessageQueue.java:337"
-    waiter_count: 0
-    blocking_thread_name: "RenderThread"
-    blocked_thread_name: "ndroid.settings"
-    process_name: "com.android.settings"
-    is_blocked_thread_main: true
-    is_blocking_thread_main: false
-    thread_states {
-      thread_state: "R+"
-      thread_state_dur: 31654
-      thread_state_count: 2
-    }
-    thread_states {
-      thread_state: "Running"
-      thread_state_dur: 13155
+      thread_state_dur: 8792
       thread_state_count: 1
     }
   }
diff --git a/test/trace_processor/diff_tests/android/android_system_property_slice.out b/test/trace_processor/diff_tests/android/android_system_property_slice.out
index 8fe8d07..2505d36 100644
--- a/test/trace_processor/diff_tests/android/android_system_property_slice.out
+++ b/test/trace_processor/diff_tests/android/android_system_property_slice.out
@@ -1,3 +1,3 @@
-"id","type","name","id","ts","dur","type","name"
-1,"track","DeviceStateChanged",0,1000,0,"internal_slice","some_state_from_sysprops"
-1,"track","DeviceStateChanged",1,3000,0,"internal_slice","some_state_from_atrace"
+"type","name","id","ts","dur","type","name"
+"track","DeviceStateChanged",0,1000,0,"internal_slice","some_state_from_sysprops"
+"track","DeviceStateChanged",1,3000,0,"internal_slice","some_state_from_atrace"
diff --git a/test/trace_processor/diff_tests/android/tests.py b/test/trace_processor/diff_tests/android/tests.py
index 59f41e0..25190b0 100644
--- a/test/trace_processor/diff_tests/android/tests.py
+++ b/test/trace_processor/diff_tests/android/tests.py
@@ -58,14 +58,14 @@
         }
         """),
         query="""
-        SELECT t.id, t.type, t.name, c.id, c.ts, c.type, c.value
+        SELECT t.type, t.name, c.id, c.ts, c.type, c.value
         FROM counter_track t JOIN counter c ON t.id = c.track_id
         WHERE name = 'ScreenState';
         """,
         out=Csv("""
-        "id","type","name","id","ts","type","value"
-        0,"counter_track","ScreenState",0,1000,"counter",2.000000
-        0,"counter_track","ScreenState",1,2000,"counter",1.000000
+        "type","name","id","ts","type","value"
+        "counter_track","ScreenState",0,1000,"counter",2.000000
+        "counter_track","ScreenState",1,2000,"counter",1.000000
         """))
 
   def test_android_system_property_slice(self):
@@ -105,7 +105,7 @@
         }
         """),
         query="""
-        SELECT t.id, t.type, t.name, s.id, s.ts, s.dur, s.type, s.name
+        SELECT t.type, t.name, s.id, s.ts, s.dur, s.type, s.name
         FROM track t JOIN slice s ON s.track_id = t.id
         WHERE t.name = 'DeviceStateChanged';
         """,
@@ -236,15 +236,18 @@
         query="""
       SELECT IMPORT('android.monitor_contention');
       SELECT
-        *
+        blocking_method,
+        blocked_method,
+        short_blocking_method,
+        short_blocked_method
       FROM android_monitor_contention
       WHERE binder_reply_id IS NOT NULL
       ORDER BY dur DESC
       LIMIT 1;
       """,
         out=Csv("""
-        "blocking_method","blocked_method","short_blocking_method","short_blocked_method","blocking_src","blocked_src","waiter_count","blocked_utid","blocked_thread_name","blocking_utid","blocking_thread_name","upid","process_name","id","ts","dur","track_id","is_blocked_thread_main","is_blocking_thread_main","binder_reply_id","binder_reply_ts","binder_reply_tid"
-        "float com.android.server.wm.WindowManagerService.getCurrentAnimatorScale()","android.app.ActivityTaskManager$RootTaskInfo com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo()","com.android.server.wm.WindowManagerService.getCurrentAnimatorScale","com.android.server.wm.ActivityTaskManagerService.getFocusedRootTaskInfo","WindowManagerService.java:3511","ActivityTaskManagerService.java:1977",2,555,"binder:642_3",527,"android.anim",279,"system_server",69099,146987786843,24888520,1317,0,0,69097,146987701011,1559
+        "blocking_method","blocked_method","short_blocking_method","short_blocked_method"
+        "boolean com.android.server.am.ActivityManagerService.forceStopPackageLocked(java.lang.String, int, boolean, boolean, boolean, boolean, boolean, int, java.lang.String)","boolean com.android.server.am.ActivityManagerService.isUidActive(int, java.lang.String)","com.android.server.am.ActivityManagerService.forceStopPackageLocked","com.android.server.am.ActivityManagerService.isUidActive"
       """))
 
   def test_monitor_contention_chain_blocked_functions(self):
@@ -255,12 +258,12 @@
       SELECT
         *
       FROM android_monitor_contention_chain_blocked_functions_by_txn
-      WHERE id = 302506
+      WHERE id = 13934
       ORDER BY blocked_function_dur;
       """,
         out=Csv("""
         "id","blocked_function","blocked_function_dur","blocked_function_count"
-        302506,"__fdget_pos",29143,1
+        13934,"blkdev_issue_flush",11950576,1
       """))
 
   def test_monitor_contention_chain_thread_states(self):
@@ -271,15 +274,15 @@
       SELECT
         *
       FROM android_monitor_contention_chain_thread_state_by_txn
-      WHERE id = 302506
+      WHERE id = 13934
       ORDER BY thread_state_dur;
       """,
         out=Csv("""
         "id","thread_state","thread_state_dur","thread_state_count"
-        302506,"D",29143,1
-        302506,"R",51099,3
-        302506,"R+",299066,2
-        302506,"Running",601786,4
+        13934,"R+",7649,1
+        13934,"R",300606,3
+        13934,"Running",649961,3
+        13934,"D",11950576,1
       """))
 
   def test_monitor_contention_chain_extraction(self):
@@ -305,7 +308,6 @@
         id,
         ts,
         dur,
-        track_id,
         is_blocked_thread_main,
         is_blocking_thread_main,
         IIF(binder_reply_id IS NULL, "", binder_reply_id) AS binder_reply_id,
@@ -316,8 +318,8 @@
       LIMIT 1;
       """,
         out=Csv("""
-        "parent_id","blocking_method","blocked_method","short_blocking_method","short_blocked_method","blocking_src","blocked_src","waiter_count","blocked_utid","blocked_thread_name","blocking_utid","blocking_thread_name","upid","process_name","id","ts","dur","track_id","is_blocked_thread_main","is_blocking_thread_main","binder_reply_id","binder_reply_ts","binder_reply_tid"
-        "","void java.lang.Object.wait(long, int)","void android.opengl.GLSurfaceView$GLThread.requestRenderAndNotify(java.lang.Runnable)","java.lang.Object.wait","android.opengl.GLSurfaceView$GLThread.requestRenderAndNotify","Object.java:-2","GLSurfaceView.java:1658",0,313,"droid.gallery3d",1769,"GLThread 33",313,"com.android.gallery3d",289064,155411562446,51012448,2036,1,0,"","",""
+        "parent_id","blocking_method","blocked_method","short_blocking_method","short_blocked_method","blocking_src","blocked_src","waiter_count","blocked_utid","blocked_thread_name","blocking_utid","blocking_thread_name","upid","process_name","id","ts","dur","is_blocked_thread_main","is_blocking_thread_main","binder_reply_id","binder_reply_ts","binder_reply_tid"
+        "","void com.android.server.am.ActivityManagerService.forceStopPackage(java.lang.String, int)","boolean com.android.server.am.ActivityManagerService.unbindService(android.app.IServiceConnection)","com.android.server.am.ActivityManagerService.forceStopPackage","com.android.server.am.ActivityManagerService.unbindService","ActivityManagerService.java:3992","ActivityManagerService.java:12719",0,640,"StorageUserConn",495,"binder:642_1",250,"system_server",327,1737063410007,46114664,0,0,"","",""
       """))
 
   def test_monitor_contention_metric(self):
diff --git a/test/trace_processor/diff_tests/android/tests_general.py b/test/trace_processor/diff_tests/android/tests_general.py
deleted file mode 100644
index fd555a5..0000000
--- a/test/trace_processor/diff_tests/android/tests_general.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (C) 2023 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License a
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from python.generators.diff_tests.testing import Path, DataPath, Metric
-from python.generators.diff_tests.testing import Csv, Json, TextProto
-from python.generators.diff_tests.testing import DiffTestBlueprint
-from python.generators.diff_tests.testing import DiffTestModule
-
-
-class AndroidGeneral(DiffTestModule):
-
-  def test_game_intervention_list(self):
-    return DiffTestBlueprint(
-        trace=Path('game_intervention_list_test.textproto'),
-        query="""
-SELECT
-  package_name,
-  uid,
-  current_mode,
-  standard_mode_supported,
-  standard_mode_downscale,
-  standard_mode_use_angle,
-  standard_mode_fps,
-  perf_mode_supported,
-  perf_mode_downscale,
-  perf_mode_use_angle,
-  perf_mode_fps,
-  battery_mode_supported,
-  battery_mode_downscale,
-  battery_mode_use_angle,
-  battery_mode_fps
-FROM android_game_intervention_list
-ORDER BY package_name;
-""",
-        out=Path('game_intervention_list_test.out'))
-
-  def test_android_system_property_counter(self):
-    return DiffTestBlueprint(
-        trace=Path('android_system_property.textproto'),
-        query="""
-SELECT t.id, t.type, t.name, c.id, c.ts, c.type, c.value
-FROM counter_track t JOIN counter c ON t.id = c.track_id
-WHERE name = 'ScreenState';
-""",
-        out=Csv("""
-"id","type","name","id","ts","type","value"
-0,"counter_track","ScreenState",0,1000,"counter",2.000000
-0,"counter_track","ScreenState",1,2000,"counter",1.000000
-"""))
-
-  def test_android_system_property_slice(self):
-    return DiffTestBlueprint(
-        trace=Path('android_system_property.textproto'),
-        query="""
-SELECT t.id, t.type, t.name, s.id, s.ts, s.dur, s.type, s.name
-FROM track t JOIN slice s ON s.track_id = t.id
-WHERE t.name = 'DeviceStateChanged';
-""",
-        out=Path('android_system_property_slice.out'))
diff --git a/test/trace_processor/diff_tests/dynamic/tests.py b/test/trace_processor/diff_tests/dynamic/tests.py
index 24589ee..408e36b 100644
--- a/test/trace_processor/diff_tests/dynamic/tests.py
+++ b/test/trace_processor/diff_tests/dynamic/tests.py
@@ -113,7 +113,10 @@
           ABS_TIME_STR(25) AS t25,
           ABS_TIME_STR(35) AS t35;
         """,
-        out=Path('various_clocks_abs_time_str.out'))
+        out=Csv("""
+        "t15","t25","t35"
+        "1970-01-01T00:00:00.000000005","2022-05-18T19:59:59.999999995","2022-05-18T20:00:00.000000000"
+        """))
 
   def test_empty_abs_time_str(self):
     return DiffTestBlueprint(
diff --git a/test/trace_processor/diff_tests/dynamic/various_clocks_abs_time_str.out b/test/trace_processor/diff_tests/dynamic/various_clocks_abs_time_str.out
deleted file mode 100644
index de34644..0000000
--- a/test/trace_processor/diff_tests/dynamic/various_clocks_abs_time_str.out
+++ /dev/null
@@ -1,2 +0,0 @@
-"t15","t25","t35"
-"1970-01-01T00:00:00.000000005","2022-05-18T20:00:00.000000005","2022-05-18T20:00:00.000000000"
diff --git a/test/trace_processor/diff_tests/fuchsia/tests.py b/test/trace_processor/diff_tests/fuchsia/tests.py
index 54d0773..d7b8b4d 100644
--- a/test/trace_processor/diff_tests/fuchsia/tests.py
+++ b/test/trace_processor/diff_tests/fuchsia/tests.py
@@ -231,3 +231,27 @@
         "Update time(ms)",21
         "Vsync interval",900
         """))
+
+  def test_fuchsia_args_import(self):
+    return DiffTestBlueprint(
+        trace=DataPath('fuchsia_events_and_args.fxt'),
+        query="""
+        SELECT key,int_value,string_value,real_value,value_type,display_value
+        FROM args
+        LIMIT 12;
+        """,
+        out=Csv("""
+        "key","int_value","string_value","real_value","value_type","display_value"
+        "SomeNullArg","[NULL]","null","[NULL]","string","null"
+        "Someuint32",2145,"[NULL]","[NULL]","int","2145"
+        "Someuint64",423621626134123415,"[NULL]","[NULL]","int","423621626134123415"
+        "Someint32",-7,"[NULL]","[NULL]","int","-7"
+        "Someint64",-234516543631231,"[NULL]","[NULL]","int","-234516543631231"
+        "Somedouble","[NULL]","[NULL]",3.141500,"real","3.1415"
+        "ping","[NULL]","pong","[NULL]","string","pong"
+        "somepointer",3285933758964,"[NULL]","[NULL]","pointer","0x2fd10ea19f4"
+        "someotherpointer",43981,"[NULL]","[NULL]","pointer","0xabcd"
+        "somekoid",18,"[NULL]","[NULL]","int","18"
+        "somebool",1,"[NULL]","[NULL]","bool","true"
+        "someotherbool",0,"[NULL]","[NULL]","bool","false"
+        """))
diff --git a/test/trace_processor/diff_tests/graphics/android_jank_cuj.out b/test/trace_processor/diff_tests/graphics/android_jank_cuj.out
index 41cf687..5784a98 100644
--- a/test/trace_processor/diff_tests/graphics/android_jank_cuj.out
+++ b/test/trace_processor/diff_tests/graphics/android_jank_cuj.out
@@ -27,6 +27,8 @@
       app_missed: false
       sf_missed: false
       dur_expected: 16000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 2
@@ -36,6 +38,8 @@
       app_missed: true
       sf_missed: true
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 3
@@ -45,6 +49,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 4
@@ -54,6 +60,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 5
@@ -63,6 +71,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 6
@@ -72,6 +82,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     sf_frame {
       frame_number: 1
@@ -127,6 +139,8 @@
       missed_app_frames: 5
       missed_sf_frames: 1
       frame_dur_max: 40000000
+      sf_callback_missed_frames: 0
+      hwui_callback_missed_frames: 0
     }
     timeline_metrics {
       total_frames: 6
@@ -143,6 +157,8 @@
       frame_dur_ms_p90: 34.0
       frame_dur_ms_p95: 37.0
       frame_dur_ms_p99: 39.400000000000006
+      sf_callback_missed_frames: 0
+      hwui_callback_missed_frames: 0
     }
     trace_metrics {
       total_frames: 6
@@ -159,6 +175,8 @@
       frame_dur_ms_p90: 34.0
       frame_dur_ms_p95: 37.0
       frame_dur_ms_p99: 39.400000000000006
+      sf_callback_missed_frames: 0
+      hwui_callback_missed_frames: 0
     }
   }
   cuj {
@@ -189,6 +207,8 @@
       app_missed: false
       sf_missed: false
       dur_expected: 16000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 2
@@ -198,6 +218,8 @@
       app_missed: true
       sf_missed: true
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 3
@@ -207,6 +229,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 4
@@ -216,6 +240,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 5
@@ -225,6 +251,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 6
@@ -234,6 +262,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 7
@@ -243,6 +273,8 @@
       app_missed: false
       sf_missed: true
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 8
@@ -252,6 +284,8 @@
       app_missed: false
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 9
@@ -261,6 +295,8 @@
       app_missed: false
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 10
@@ -270,6 +306,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 11
@@ -279,6 +317,8 @@
       app_missed: true
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 12
@@ -288,6 +328,8 @@
       app_missed: false
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: false
+      hwui_callback_missed: false
     }
     frame {
       frame_number: 13
@@ -297,6 +339,8 @@
       app_missed: false
       sf_missed: false
       dur_expected: 20000000
+      sf_callback_missed: true
+      hwui_callback_missed: true
     }
     sf_frame {
       frame_number: 1
@@ -361,6 +405,8 @@
       missed_sf_frames: 2
       missed_frames_max_successive: 5
       frame_dur_max: 62000000
+      sf_callback_missed_frames: 1
+      hwui_callback_missed_frames: 1
     }
     timeline_metrics {
       total_frames: 13
@@ -377,6 +423,8 @@
       frame_dur_ms_p90: 56.80000000000001
       frame_dur_ms_p95: 61.000000
       frame_dur_ms_p99: 61.000000
+      sf_callback_missed_frames: 1
+      hwui_callback_missed_frames: 1
     }
     trace_metrics {
       total_frames: 13
@@ -393,6 +441,8 @@
       frame_dur_ms_p90: 60.000000
       frame_dur_ms_p95: 61.000000
       frame_dur_ms_p99: 61.000000
+      sf_callback_missed_frames: 1
+      hwui_callback_missed_frames: 1
     }
   }
 }
diff --git a/test/trace_processor/diff_tests/graphics/android_jank_cuj.py b/test/trace_processor/diff_tests/graphics/android_jank_cuj.py
index 1256d6d..beb39f7 100644
--- a/test/trace_processor/diff_tests/graphics/android_jank_cuj.py
+++ b/test/trace_processor/diff_tests/graphics/android_jank_cuj.py
@@ -31,9 +31,14 @@
 # RenderEngine thread
 SF_RETID = 1055
 
+PROCESS_TRACK = 1234
+FIRST_CUJ_TRACK = 321
+SHADE_CUJ_TRACK = 654
+CANCELED_CUJ_TRACK = 987
 
-def add_main_thread_instant(trace, ts, buf):
-  trace.add_atrace_instant(ts=ts, tid=PID, pid=PID, buf=buf)
+def add_instant_for_track(trace, ts, track, name):
+  trace.add_track_event_slice(ts=ts, dur=0, track=track, name=name)
+
 
 def add_main_thread_atrace(trace, ts, ts_end, buf):
   trace.add_atrace_begin(ts=ts, tid=PID, pid=PID, buf=buf)
@@ -88,10 +93,14 @@
               ts_draw_frame,
               ts_end_draw_frame,
               ts_gpu=None,
-              ts_end_gpu=None):
+              ts_end_gpu=None,
+              resync=False):
   add_main_thread_atrace(trace, ts_do_frame, ts_end_do_frame,
                          "Choreographer#doFrame %d" % vsync)
-
+  if resync:
+    add_main_thread_atrace(trace, ts_do_frame, ts_end_do_frame,
+                           "Choreographer#doFrame - resynced to %d in 0.0s"
+                           % (vsync+1))
   gpu_idx = 1000 + vsync * 10 + 1
   if ts_gpu is None:
     gpu_fence_message = "GPU completion fence %d has signaled"
@@ -108,14 +117,13 @@
 
 
 def add_sf_frame(trace,
-                 vsync,
-                 ts_commit,
-                 ts_end_commit,
-                 ts_composite,
-                 ts_end_composite,
-                 ts_compose_surfaces=None,
-                 ts_end_compose_surfaces=None):
-
+    vsync,
+    ts_commit,
+    ts_end_commit,
+    ts_composite,
+    ts_end_composite,
+    ts_compose_surfaces=None,
+    ts_end_compose_surfaces=None):
   add_sf_main_thread_atrace(trace, ts_commit, ts_end_commit,
                             "commit %d" % vsync)
   add_sf_main_thread_atrace_begin(trace, ts_composite, "composite %d" % vsync)
@@ -160,13 +168,13 @@
 
 
 def add_actual_surface_frame_events(ts,
-                                    dur,
-                                    token,
-                                    cookie=None,
-                                    jank=None,
-                                    on_time_finish_override=None,
-                                    display_frame_token_override=None,
-                                    layer_name=LAYER):
+    dur,
+    token,
+    cookie=None,
+    jank=None,
+    on_time_finish_override=None,
+    display_frame_token_override=None,
+    layer_name=LAYER):
   if cookie is None:
     cookie = token + 1
   jank_type = jank if jank is not None else 1
@@ -208,17 +216,32 @@
     tid=JITID, tgid=PID, cmdline="Jit thread pool", name="Jit thread pool")
 trace.add_thread(
     tid=SF_RETID, tgid=SF_PID, cmdline="RenderEngine", name="RenderEngine")
+trace.add_process_track_descriptor(PROCESS_TRACK, pid=PID)
+trace.add_track_descriptor(FIRST_CUJ_TRACK, parent=PROCESS_TRACK)
+trace.add_track_descriptor(SHADE_CUJ_TRACK, parent=PROCESS_TRACK)
+trace.add_track_descriptor(CANCELED_CUJ_TRACK, parent=PROCESS_TRACK)
+trace.add_track_event_slice_begin(ts=5, track=FIRST_CUJ_TRACK,
+                                  name="J<FIRST_CUJ>")
+trace.add_track_event_slice_end(ts=100_000_000, track=FIRST_CUJ_TRACK)
+trace.add_track_event_slice_begin(ts=10, track=SHADE_CUJ_TRACK,
+                                  name="J<SHADE_ROW_EXPAND>")
+trace.add_track_event_slice_end(ts=901_000_010, track=SHADE_CUJ_TRACK)
+add_instant_for_track(trace, ts=11, track=SHADE_CUJ_TRACK, name="FT#layerId#0")
+add_instant_for_track(
+    trace,
+    ts=950_100_000,
+    track=SHADE_CUJ_TRACK,
+    name="FT#MissedHWUICallback#150")
+add_instant_for_track(
+    trace,
+    ts=950_100_000,
+    track=SHADE_CUJ_TRACK,
+    name="FT#MissedSFCallback#150")
+
+trace.add_track_event_slice_begin(
+    ts=100_100_000, track=CANCELED_CUJ_TRACK, name="J<CANCELED>")
+trace.add_track_event_slice_end(ts=999_000_000, track=CANCELED_CUJ_TRACK)
 trace.add_ftrace_packet(cpu=0)
-trace.add_atrace_async_begin(ts=5, tid=PID, pid=PID, buf="J<FIRST_CUJ>")
-trace.add_atrace_async_begin(ts=10, tid=PID, pid=PID, buf="J<SHADE_ROW_EXPAND>")
-add_main_thread_instant(trace, ts=11, buf="J<SHADE_ROW_EXPAND>#FT#layerId#0")
-trace.add_atrace_async_end(
-    ts=100_000_000, tid=PID, pid=PID, buf="J<FIRST_CUJ>")
-trace.add_atrace_async_begin(
-    ts=100_100_000, tid=PID, pid=PID, buf="J<CANCELED>")
-trace.add_atrace_async_end(
-    ts=901_000_010, tid=PID, pid=PID, buf="J<SHADE_ROW_EXPAND>")
-trace.add_atrace_async_end(ts=999_000_000, tid=PID, pid=PID, buf="J<CANCELED>")
 
 trace.add_atrace_counter(
     ts=150_000_000,
@@ -296,7 +319,8 @@
     ts_draw_frame=4_000_000,
     ts_end_draw_frame=5_000_000,
     ts_gpu=10_000_000,
-    ts_end_gpu=15_000_000)
+    ts_end_gpu=15_000_000,
+    resync=True)
 add_main_thread_atrace(
     trace, ts=1_500_000, ts_end=2_000_000, buf="binder transaction")
 add_render_thread_atrace(
@@ -585,7 +609,6 @@
     ts_gpu=None,
     ts_end_gpu=None)
 
-
 # Actual timeline slice starts 0.5ms after doFrame
 add_frame(
     trace,
@@ -621,7 +644,8 @@
     ts_gpu=1_400_000_000,
     ts_end_gpu=1_500_000_000)
 
-add_main_thread_instant(trace, ts=990_000_000, buf="J<CANCELED>#FT#cancel#0")
+add_instant_for_track(trace, ts=990_000_000, track=CANCELED_CUJ_TRACK,
+                      name="FT#cancel#0")
 
 add_expected_display_frame_events(ts=1_000_000_000, dur=16_000_000, token=10)
 add_actual_display_frame_events(ts=1_000_000_000, dur=16_000_000, token=10)
@@ -683,7 +707,8 @@
 add_actual_surface_frame_events(ts=300_000_000, cookie=112, dur=61_000_000,
                                 token=110)
 add_actual_surface_frame_events(ts=300_000_000, cookie=114, dur=80_000_000,
-                                token=110, jank=64, layer_name="TX - JankyLayer#1")
+                                token=110, jank=64,
+                                layer_name="TX - JankyLayer#1")
 
 add_expected_surface_frame_events(ts=400_000_000, dur=20_000_000, token=120)
 add_actual_surface_frame_events(
diff --git a/test/trace_processor/diff_tests/graphics/frame_missed.py b/test/trace_processor/diff_tests/graphics/frame_missed.py
index d08191d..04469b7 100644
--- a/test/trace_processor/diff_tests/graphics/frame_missed.py
+++ b/test/trace_processor/diff_tests/graphics/frame_missed.py
@@ -28,12 +28,12 @@
 
 trace.add_ftrace_packet(1)
 
-trace.add_print(ts=99, tid=11, buf='C|10|PrevFrameMissed|0')
-trace.add_print(ts=100, tid=11, buf='C|10|PrevFrameMissed|0')
-trace.add_print(ts=101, tid=11, buf='C|10|PrevFrameMissed|1')
-trace.add_print(ts=102, tid=11, buf='C|10|PrevFrameMissed|0')
-trace.add_print(ts=103, tid=11, buf='C|10|PrevFrameMissed|1')
-trace.add_print(ts=104, tid=11, buf='C|10|PrevFrameMissed|1')
-trace.add_print(ts=105, tid=11, buf='C|10|PrevFrameMissed|0')
+trace.add_print(ts=99, tid=11, buf='C|10|PrevFrameMissed 101|0')
+trace.add_print(ts=100, tid=11, buf='C|10|PrevFrameMissed 102|0')
+trace.add_print(ts=101, tid=11, buf='C|10|PrevFrameMissed 102|1')
+trace.add_print(ts=102, tid=11, buf='C|10|PrevFrameMissed 102|0')
+trace.add_print(ts=103, tid=11, buf='C|10|PrevFrameMissed 101|1')
+trace.add_print(ts=104, tid=11, buf='C|10|PrevFrameMissed 101|1')
+trace.add_print(ts=105, tid=11, buf='C|10|PrevFrameMissed 101|0')
 
 sys.stdout.buffer.write(trace.trace.SerializeToString())
diff --git a/test/trace_processor/diff_tests/graphics/tests.py b/test/trace_processor/diff_tests/graphics/tests.py
index aea2818..7ab6c89 100644
--- a/test/trace_processor/diff_tests/graphics/tests.py
+++ b/test/trace_processor/diff_tests/graphics/tests.py
@@ -111,6 +111,20 @@
           missed_gpu_frames: 0
           missed_frame_rate: 0.42857142857142855 # = 3/7
           gpu_invocations: 0
+          metrics_per_display: {
+            display_id: "101"
+            missed_frames: 2
+            missed_hwc_frames: 0
+            missed_gpu_frames: 0
+            missed_frame_rate: 0.5
+          }
+          metrics_per_display: {
+            display_id: "102"
+            missed_frames: 1
+            missed_hwc_frames: 0
+            missed_gpu_frames: 0
+            missed_frame_rate: 0.33333333333333333
+          }
         }
         """))
 
diff --git a/test/trace_processor/diff_tests/include_index.py b/test/trace_processor/diff_tests/include_index.py
index 1d216a0..caab798 100644
--- a/test/trace_processor/diff_tests/include_index.py
+++ b/test/trace_processor/diff_tests/include_index.py
@@ -87,6 +87,7 @@
 from diff_tests.track_event.tests import TrackEvent
 from diff_tests.translation.tests import Translation
 from diff_tests.ufs.tests import Ufs
+from diff_tests.webview.tests import WebView
 
 sys.path.pop()
 
@@ -167,4 +168,5 @@
       *TablesSched(index_path, 'tables', 'TablesSched').fetch(),
       *TrackEvent(index_path, 'track_event', 'TrackEvent').fetch(),
       *Translation(index_path, 'translation', 'Translation').fetch(),
+      *WebView(index_path, 'webview', 'WebView').fetch(),
   ]
diff --git a/test/trace_processor/diff_tests/parsing/sched_waking_raw_test.sql b/test/trace_processor/diff_tests/parsing/sched_waking_raw_test.sql
index 7fe9c9d..481f3f5 100644
--- a/test/trace_processor/diff_tests/parsing/sched_waking_raw_test.sql
+++ b/test/trace_processor/diff_tests/parsing/sched_waking_raw_test.sql
@@ -13,4 +13,7 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 --
-SELECT ts, name, cpu, key, int_value, string_value FROM raw JOIN args ON raw.arg_set_id = args.arg_set_id WHERE name = "sched_waking" ORDER BY cpu ASC, ts ASC;
+SELECT ts, name, cpu, key, int_value, string_value
+FROM ftrace_event JOIN args USING(arg_set_id)
+WHERE name = "sched_waking"
+ORDER BY cpu ASC, ts ASC;
diff --git a/test/trace_processor/diff_tests/parsing/tests.py b/test/trace_processor/diff_tests/parsing/tests.py
index 609bdf1..41abe1c 100644
--- a/test/trace_processor/diff_tests/parsing/tests.py
+++ b/test/trace_processor/diff_tests/parsing/tests.py
@@ -175,7 +175,7 @@
         trace=DataPath('lmk_userspace.pb'),
         query="""
         SELECT to_ftrace(id)
-        FROM raw;
+        FROM ftrace_event;
         """,
         out=Path('print_systrace_lmk_userspace.out'))
 
@@ -272,7 +272,7 @@
         trace=Path('print_systrace_unsigned.py'),
         query="""
         SELECT to_ftrace(id)
-        FROM raw;
+        FROM ftrace_event;
         """,
         out=Path('print_systrace_unsigned.out'))
 
@@ -299,7 +299,7 @@
         """),
         query="""
         SELECT to_ftrace(id)
-        FROM raw;
+        FROM ftrace_event;
         """,
         out=Path('cgroup_attach_task_pre_s_print_systrace.out'))
 
@@ -326,7 +326,7 @@
         """),
         query="""
         SELECT to_ftrace(id)
-        FROM raw;
+        FROM ftrace_event;
         """,
         out=Path('cgroup_attach_task_post_s_print_systrace.out'))
 
@@ -919,7 +919,7 @@
         trace=Path('sched_blocked_reason_symbolized.textproto'),
         query="""
         SELECT to_ftrace(id) AS line
-        FROM raw;
+        FROM ftrace_event;
         """,
         out=Path('sched_blocked_reason_symbolized_to_systrace.out'))
 
diff --git a/test/trace_processor/diff_tests/startup/android_startup_attribution.out b/test/trace_processor/diff_tests/startup/android_startup_attribution.out
index 46a279e..8336103 100644
--- a/test/trace_processor/diff_tests/startup/android_startup_attribution.out
+++ b/test/trace_processor/diff_tests/startup/android_startup_attribution.out
@@ -25,8 +25,8 @@
       }
       dur_ms: 999.9999
       time_dex_open {
-        dur_ns: 20
-        dur_ms: 2e-05
+        dur_ns: 499999845
+        dur_ms: 499.999845
       }
       time_verify_class {
         dur_ns: 40
@@ -45,6 +45,10 @@
         dur_ns: 50
         dur_ms: 5e-05
       }
+      time_dex_open_thread_main {
+        dur_ns: 499999845
+        dur_ms: 499.999845
+      }
     }
     activity_hosting_process_count: 1
     process {
@@ -94,8 +98,21 @@
       installd_dur_ns: 0
       dex2oat_dur_ns: 0
     }
+    verify_class {
+      name: "vr"
+      dur_ns: 30
+    }
+    verify_class {
+      name: "vp"
+      dur_ns: 5
+    }
+    verify_class {
+      name: "dl"
+      dur_ns: 5
+    }
     startup_type: "hot"
     slow_start_reason: "GC Activity"
+    slow_start_reason: "Main Thread - Time spent in OpenDexFilesFromOat*"
     slow_start_reason: "Main Thread - Binder transactions blocked"
   }
 }
diff --git a/test/trace_processor/diff_tests/startup/android_startup_attribution.py b/test/trace_processor/diff_tests/startup/android_startup_attribution.py
index b921201..0d7e784 100644
--- a/test/trace_processor/diff_tests/startup/android_startup_attribution.py
+++ b/test/trace_processor/diff_tests/startup/android_startup_attribution.py
@@ -78,7 +78,7 @@
 
 trace.add_atrace_begin(
     ts=170, pid=APP_PID, tid=APP_TID, buf='OpenDexFilesFromOat(something else)')
-trace.add_atrace_end(ts=175, pid=APP_PID, tid=APP_TID)
+trace.add_atrace_end(ts=5*10**8, pid=APP_PID, tid=APP_TID)
 
 # OpenDex slice outside the startup.
 trace.add_atrace_begin(
diff --git a/test/trace_processor/diff_tests/startup/android_startup_attribution_slow.out b/test/trace_processor/diff_tests/startup/android_startup_attribution_slow.out
index ea33f96..80f6f81 100644
--- a/test/trace_processor/diff_tests/startup/android_startup_attribution_slow.out
+++ b/test/trace_processor/diff_tests/startup/android_startup_attribution_slow.out
@@ -45,6 +45,10 @@
         dur_ns: 50000000000
         dur_ms: 50000
       }
+      time_dex_open_thread_main {
+        dur_ns: 20000000000
+        dur_ms: 20000.0
+      }
     }
     activity_hosting_process_count: 1
     process {
@@ -73,9 +77,21 @@
       installd_dur_ns: 0
       dex2oat_dur_ns: 0
     }
+    verify_class {
+      name: "vr"
+      dur_ns: 30000000000
+    }
+    verify_class {
+      name: "vp"
+      dur_ns: 5000000000
+    }
+    verify_class {
+      name: "dl"
+      dur_ns: 5000000000
+    }
     startup_type: "hot"
-    slow_start_reason: "JIT Activity"
     slow_start_reason: "GC Activity"
+    slow_start_reason: "JIT Activity"
     slow_start_reason: "JIT compiled methods"
   }
 }
diff --git a/test/trace_processor/diff_tests/startup/android_startup_breakdown.out b/test/trace_processor/diff_tests/startup/android_startup_breakdown.out
index 5baa172..52dd550 100644
--- a/test/trace_processor/diff_tests/startup/android_startup_breakdown.out
+++ b/test/trace_processor/diff_tests/startup/android_startup_breakdown.out
@@ -102,12 +102,12 @@
       installd_dur_ns: 0
       dex2oat_dur_ns: 0
     }
+    slow_start_reason: "No baseline or cloud profiles"
+    slow_start_reason: "Optimized artifacts missing, run from apk"
     slow_start_reason: "Time spent in bindApplication"
     slow_start_reason: "Time spent in view inflation"
     slow_start_reason: "Time spent in ResourcesManager#getResources"
-    slow_start_reason: "Potential CPU contention with init"
-    slow_start_reason: "No baseline or cloud profiles"
-    slow_start_reason: "Optimized artifacts missing, run from apk"
+    slow_start_reason: "Potential CPU contention with another process"
     startup_type: "cold"
   }
 }
diff --git a/test/trace_processor/diff_tests/startup/android_startup_breakdown_slow.out b/test/trace_processor/diff_tests/startup/android_startup_breakdown_slow.out
index c58d970..254759a 100644
--- a/test/trace_processor/diff_tests/startup/android_startup_breakdown_slow.out
+++ b/test/trace_processor/diff_tests/startup/android_startup_breakdown_slow.out
@@ -102,11 +102,11 @@
       installd_dur_ns: 0
       dex2oat_dur_ns: 0
     }
+    slow_start_reason: "Optimized artifacts missing, run from apk"
     slow_start_reason: "Time spent in bindApplication"
     slow_start_reason: "Time spent in view inflation"
     slow_start_reason: "Time spent in ResourcesManager#getResources"
-    slow_start_reason: "Potential CPU contention with init"
-    slow_start_reason: "Optimized artifacts missing, run from apk"
+    slow_start_reason: "Potential CPU contention with another process"
     startup_type: "cold"
   }
 }
diff --git a/test/trace_processor/diff_tests/startup/android_startup_slow.out b/test/trace_processor/diff_tests/startup/android_startup_slow.out
index 3b5d1ab..53d53b9 100644
--- a/test/trace_processor/diff_tests/startup/android_startup_slow.out
+++ b/test/trace_processor/diff_tests/startup/android_startup_slow.out
@@ -66,6 +66,6 @@
     slow_start_reason: "Main Thread - Time spent in Runnable state"
     slow_start_reason: "Main Thread - Time spent in interruptible sleep state"
     slow_start_reason: "Main Thread - Time spent in Blocking I/O"
-    slow_start_reason: "Potential CPU contention with init"
+    slow_start_reason: "Potential CPU contention with another process"
   }
 }
diff --git a/test/trace_processor/diff_tests/webview/tests.py b/test/trace_processor/diff_tests/webview/tests.py
new file mode 100644
index 0000000..ea6200b
--- /dev/null
+++ b/test/trace_processor/diff_tests/webview/tests.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python3
+# Copyright (C) 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License a
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from python.generators.diff_tests.testing import Path, DataPath, Metric
+from python.generators.diff_tests.testing import Csv, Json, TextProto
+from python.generators.diff_tests.testing import DiffTestBlueprint
+from python.generators.diff_tests.testing import TestSuite
+
+
+class WebView(TestSuite):
+
+  def test_webview_jank_approximation_metric(self):
+    return DiffTestBlueprint(
+        trace=DataPath('webview_jank.pb'),
+        query=Metric('webview_jank_approximation'),
+        out=TextProto(r"""
+            [perfetto.protos.webview_jank_approximation] {
+                webview_janks: 4
+                webview_janks_without_startup: 4
+                webview_app_janks: 12
+                webview_total_janks: 4
+                total_janks: 12
+            }
+            """))
diff --git a/test/vts/OWNERS b/test/vts/OWNERS
new file mode 100644
index 0000000..10fd9fe
--- /dev/null
+++ b/test/vts/OWNERS
@@ -0,0 +1,6 @@
+# Bug component: 323270
+ddiproietto@google.com
+hjd@google.com
+lalitm@google.com
+primiano@google.com
+rsavitski@google.com
diff --git a/tools/cpu_profile b/tools/cpu_profile
index 07e795a..1dfdbb7 100755
--- a/tools/cpu_profile
+++ b/tools/cpu_profile
@@ -37,18 +37,18 @@
 
 
 # ----- Amalgamator: begin of python/perfetto/prebuilts/manifests/traceconv.py
-# This file has been generated by: /usr/local/google/home/lalitm/perfetto/tools/roll-prebuilts v33.1
+# This file has been generated by: /Users/hjd/src/perfetto/tools/roll-prebuilts v34.0
 TRACECONV_MANIFEST = [{
     'arch':
         'mac-amd64',
     'file_name':
         'traceconv',
     'file_size':
-        7822272,
+        7904536,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-amd64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-amd64/traceconv',
     'sha256':
-        '2b1bae4755ee0dd7f3a8e55653f8a7c344f688ea29700064ef8211c55bb4ae9f',
+        '037f84ac943f3f4d75447c668cc49c966fe3d85eca3a455c958b24fc6a9e314a',
     'platform':
         'darwin',
     'machine': ['x86_64']
@@ -58,11 +58,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        6604056,
+        6554600,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-arm64/traceconv',
     'sha256':
-        'c0bd6d1ebe2c61ffeefbd4f01426e9b853c81daf70530be7e78c97a4d3af100c',
+        'eda545ef4fa37fdfa1b47ced7cbbe0aa3c0df9bd161cacd7c78e6c55aef98d20',
     'platform':
         'darwin',
     'machine': ['arm64']
@@ -72,11 +72,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        8122112,
+        7664384,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-amd64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-amd64/traceconv',
     'sha256':
-        'c4c57d8e7b435822a1437b2dc7f7154f6ff2e197deff1f9284bbd36bbedb004f',
+        '24285e6e0e873d393fa5a993bac18ec8e1ab5fae6f4e3453214e095ef36e4c45',
     'platform':
         'linux',
     'machine': ['x86_64']
@@ -86,11 +86,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        6692016,
+        5657944,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm/traceconv',
     'sha256':
-        'da666eb9f80bcbec4c959f4adf493a59ff89e4106666fe1884291078dba0243b',
+        'c9af3d976f849fc75e96c2c552cb14fcc9eacce6fe7c45c4a8289080b0f66706',
     'platform':
         'linux',
     'machine': ['armv6l', 'armv7l', 'armv8l']
@@ -100,11 +100,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        7575344,
+        7184224,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm64/traceconv',
     'sha256':
-        '8ca00c39c5ec7bd78576f64c4ab05e663d803b06b36fbddf968825edbe236fca',
+        'c6dc936492d58a40cd8e0b58abc46bd479e0c1c387cd1ba29198a6c9b2000d7a',
     'platform':
         'linux',
     'machine': ['aarch64']
@@ -114,55 +114,55 @@
     'file_name':
         'traceconv',
     'file_size':
-        5376396,
+        5325260,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm/traceconv',
     'sha256':
-        'b77e7f0274ba45ff32d34df347845bc996763291fcc6b2a697f56c0c9a543150'
+        '963267dcb58cdde9f61a952e5cb7f3557833209d3251e7fdcefc3b52db54f77b'
 }, {
     'arch':
         'android-arm64',
     'file_name':
         'traceconv',
     'file_size':
-        6793744,
+        6572688,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm64/traceconv',
     'sha256':
-        'e83f3d43f8782cb57e9d3e8a3cd31826c9713da9f92bd8d8be2c48872ed423eb'
+        '87373c351fe5e947826cd957438cab8a37a352bf83b1cbbb15fe276eee9d873a'
 }, {
     'arch':
         'android-x86',
     'file_name':
         'traceconv',
     'file_size':
-        7694692,
+        7303588,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x86/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x86/traceconv',
     'sha256':
-        'c9ee2c3c91d6c68cb7f52a626767bde5e267f34c6ddf987ff73eec3d813c0a2c'
+        'dfc4e714963b5ed662d29d6028ffa69e67f8cd2f9a28223f715437a260fd456f'
 }, {
     'arch':
         'android-x64',
     'file_name':
         'traceconv',
     'file_size':
-        7940680,
+        7482056,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x64/traceconv',
     'sha256':
-        'f75122ca3e6bbe393b705c3bc5514d81c57f38bf408d857d89c4268b79a39e08'
+        '79c666c629fcffd810635270b45e58b40ed253d22650f41550057e5d8f8c49a7'
 }, {
     'arch':
         'windows-amd64',
     'file_name':
         'traceconv.exe',
     'file_size':
-        7239168,
+        7072768,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/windows-amd64/traceconv.exe',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/windows-amd64/traceconv.exe',
     'sha256':
-        '5be5d698f69d44b4baa8ae1f21955becad9d0e6774e967f923b8386744002cfe',
+        '40fac80fdeae443a924e160650c94629e6463c1fb5a4f04f4ef6e9e5e72a3965',
     'platform':
         'win32',
     'machine': ['amd64']
diff --git a/tools/gen_android_bp b/tools/gen_android_bp
index d0eb99f..5317914 100755
--- a/tools/gen_android_bp
+++ b/tools/gen_android_bp
@@ -819,10 +819,9 @@
   module.cmd = ' '.join([
       f'$(location {bp_binary_module_name})',
       '--gen-dir=$(genDir)',
+      '--relative-input-dir=external/perfetto',
       '--inputs',
       '$(in)',
-      '--outputs',
-      '$(out)',
   ])
   module.out.update(target.outputs)
   module.genrule_headers.add(module.name)
diff --git a/tools/gen_bazel b/tools/gen_bazel
index 7a69db1..3121aa8 100755
--- a/tools/gen_bazel
+++ b/tools/gen_bazel
@@ -29,6 +29,7 @@
 import os
 import re
 import sys
+from typing import Any
 from typing import Dict
 from typing import List
 from typing import Optional
@@ -39,6 +40,10 @@
 
 from compat import itervalues, iteritems, basestring
 
+# Visibility option for targets which we want an allowlist of public targets
+# which can depend on it.
+ALLOWLIST_PUBLIC_VISIBILITY = 'PERFETTO_CONFIG.public_visibility'
+
 # Arguments for the GN output directory.
 # host_os="linux" is to generate the right build files from Mac OS.
 gn_args = ' '.join([
@@ -83,14 +88,29 @@
 
 # Proto target groups which will be made public.
 proto_groups = {
-    'config': ['//protos/perfetto/config:source_set'],
-    'trace': [
-        '//protos/perfetto/trace:non_minimal_source_set',
-        '//protos/perfetto/trace:minimal_source_set'
-    ],
-    'metrics': ['//protos/perfetto/metrics:source_set',],
-    'chromium': ['//protos/third_party/chromium:source_set',],
-    'chrome_metrics': ['//protos/perfetto/metrics/chrome:source_set',],
+    'config': {
+        'sources': ['//protos/perfetto/config:source_set'],
+        'visibility': ['//visibility:public'],
+    },
+    'trace': {
+        'sources': [
+            '//protos/perfetto/trace:non_minimal_source_set',
+            '//protos/perfetto/trace:minimal_source_set'
+        ],
+        'visibility': ALLOWLIST_PUBLIC_VISIBILITY,
+    },
+    'metrics': {
+        'sources': ['//protos/perfetto/metrics:source_set',],
+        'visibility': ['//visibility:public'],
+    },
+    'chromium': {
+        'sources': ['//protos/third_party/chromium:source_set',],
+        'visibility': ALLOWLIST_PUBLIC_VISIBILITY,
+    },
+    'chrome_metrics': {
+        'sources': ['//protos/perfetto/metrics/chrome:source_set',],
+        'visibility': ALLOWLIST_PUBLIC_VISIBILITY,
+    },
 }
 
 # Path for the protobuf sources in the standalone build.
@@ -363,10 +383,6 @@
     return res
 
 
-# Public visibility for targets in Bazel.
-PUBLIC_VISIBILITY = 'PERFETTO_CONFIG.public_visibility'
-
-
 def get_bazel_label_name(gn_name: str):
   """Converts a GN target name into a Bazel label name.
 
@@ -477,11 +493,11 @@
   return plugin_label
 
 
-def gen_proto_group_target(gn: GnParser, name: str, target_names: List[str]):
+def gen_proto_group_target(gn: GnParser, name: str, desc: Dict[str, Any]):
   # Get a recursive list of the proto_library targets rooted here which
   # have src.
-  deps_set = set(target_names)
-  for target_name in target_names:
+  deps_set = set(desc['sources'])
+  for target_name in desc['sources']:
     target = gn.get_target(target_name)
     deps_set.update(d.name for d in target.transitive_proto_deps())
 
@@ -493,28 +509,28 @@
       ':' + get_bazel_proto_sources_label(name)
       for name in sorted(list(deps_set))
   ]
-  sources_label.visibility = PUBLIC_VISIBILITY
-  sources_label.comment = f'''[{', '.join(target_names)}]'''
+  sources_label.visibility = desc['visibility']
+  sources_label.comment = f'''[{', '.join(desc['sources'])}]'''
 
   cc_label = BazelLabel(name + '_cc_proto', 'perfetto_cc_proto_library')
   cc_label.deps = [':' + sources_label.name]
-  cc_label.visibility = PUBLIC_VISIBILITY
+  cc_label.visibility = desc['visibility']
   cc_label.comment = sources_label.comment
 
   java_label = BazelLabel(name + '_java_proto', 'perfetto_java_proto_library')
   java_label.deps = [':' + sources_label.name]
-  java_label.visibility = PUBLIC_VISIBILITY
+  java_label.visibility = desc['visibility']
   java_label.comment = sources_label.comment
 
   lite_name = name + '_java_proto_lite'
   java_lite_label = BazelLabel(lite_name, 'perfetto_java_lite_proto_library')
   java_lite_label.deps = [':' + sources_label.name]
-  java_lite_label.visibility = PUBLIC_VISIBILITY
+  java_lite_label.visibility = desc['visibility']
   java_lite_label.comment = sources_label.comment
 
   py_label = BazelLabel(name + '_py_pb2', 'perfetto_py_proto_library')
   py_label.deps = [':' + sources_label.name]
-  py_label.visibility = PUBLIC_VISIBILITY
+  py_label.visibility = desc['visibility']
   py_label.comment = sources_label.comment
 
   return [sources_label, cc_label, java_label, java_lite_label, py_label]
@@ -549,8 +565,8 @@
   label.comment = target.name
   label.namespace = find_arg('namespace')
 
-  label.deps += sorted(':' + get_bazel_label_name(x.name)
-                       for x in target.transitive_deps)
+  label.deps += sorted(
+      ':' + get_bazel_label_name(x.name) for x in target.transitive_deps)
   label.outs += target.outputs
   return [label]
 
@@ -566,6 +582,9 @@
   label = BazelLabel(get_bazel_label_name(target.name), 'perfetto_cc_tp_tables')
   label.comment = target.name
   label.srcs += (gn_utils.label_to_path(x) for x in target.sources)
+  label.deps += sorted(':' + get_bazel_label_name(x.name)
+                       for x in target.transitive_deps
+                       if x.name not in default_python_targets)
   label.outs += target.outputs
   return [label]
 
@@ -757,8 +776,8 @@
 
 '''.lstrip()
   # Generate targets for proto groups.
-  for l_name, t_names in proto_groups.items():
-    res += ''.join(str(x) for x in gen_proto_group_target(gn, l_name, t_names))
+  for l_name, t_desc in proto_groups.items():
+    res += ''.join(str(x) for x in gen_proto_group_target(gn, l_name, t_desc))
 
   # For any non-source set and non-descriptor targets, ensure the source set
   # associated to that target is discovered.
diff --git a/tools/gen_binary_descriptors b/tools/gen_binary_descriptors
index 952e809..e09a5c4 100755
--- a/tools/gen_binary_descriptors
+++ b/tools/gen_binary_descriptors
@@ -21,7 +21,6 @@
 import argparse
 import tempfile
 import subprocess
-import hashlib
 from compat import iteritems
 
 SOURCE_TARGET = [
@@ -36,13 +35,6 @@
 SCRIPT_PATH = 'tools/gen_binary_descriptors'
 
 
-def hash_path(path):
-  hash = hashlib.sha1()
-  with open(os.path.join(ROOT_DIR, path), 'rb') as f:
-    hash.update(f.read())
-  return hash.hexdigest()
-
-
 def find_protoc():
   for root, _, files in os.walk(os.path.join(ROOT_DIR, 'out')):
     if 'protoc' in files:
@@ -50,26 +42,7 @@
   return None
 
 
-def check(source, target):
-  assert os.path.exists(os.path.join(ROOT_DIR, target)), \
-      'Output file {} does not exist and so cannot be checked'.format(target)
-
-  sha1_file = target + '.sha1'
-  assert os.path.exists(sha1_file), \
-      'SHA1 file {} does not exist and so cannot be checked'.format(sha1_file)
-
-  with open(sha1_file, 'rb') as f:
-    s = f.read()
-
-  hashes = re.findall(r'// SHA1\((.*)\)\n// (.*)\n', s.decode())
-  assert sorted([SCRIPT_PATH, source]) == sorted([key for key, _ in hashes])
-  for path, expected_sha1 in hashes:
-    actual_sha1 = hash_path(os.path.join(ROOT_DIR, path))
-    assert actual_sha1 == expected_sha1, \
-        'In {} hash given for {} did not match'.format(target, path)
-
-
-def generate(source, target, protoc_path):
+def generate(source, target, protoc_path, check_only):
   # delete=False + manual unlink is required for Windows. Otherwise the temp
   # file is kept locked exclusively and unaccassible until it's destroyed.
   with tempfile.NamedTemporaryFile(delete=False) as fdescriptor:
@@ -86,23 +59,17 @@
     s = fdescriptor.read()
     fdescriptor.close()
     os.remove(fdescriptor.name)
+
+    if check_only:
+      with open(target, 'rb') as old:
+        old_content = old.read()
+        if (s != old_content):
+          raise AssertionError('Target {} does not match', target)
+      return
+
     with open(target, 'wb') as out:
       out.write(s)
 
-    sha1_path = target + '.sha1'
-    with open(sha1_path, 'wb') as c:
-      c.write("""
-// SHA1({script_path})
-// {script_hash}
-// SHA1({source_path})
-// {source_hash}
-  """.format(
-          script_path=SCRIPT_PATH,
-          script_hash=hash_path(__file__),
-          source_path=source,
-          source_hash=hash_path(os.path.join(source)),
-      ).encode())
-
 
 def main():
   parser = argparse.ArgumentParser()
@@ -112,15 +79,12 @@
 
   try:
     for source, target in SOURCE_TARGET:
-      if args.check_only:
-        check(source, target)
-      else:
-        protoc = args.protoc or find_protoc()
-        assert protoc, 'protoc not found specific (--protoc PROTOC_PATH)'
-        assert os.path.exists(protoc), '{} does not exist'.format(protoc)
-        if protoc is not args.protoc:
-          print('Using protoc: {}'.format(protoc))
-        generate(source, target, protoc)
+      protoc = args.protoc or find_protoc()
+      assert protoc, 'protoc not found specific (--protoc PROTOC_PATH)'
+      assert os.path.exists(protoc), '{} does not exist'.format(protoc)
+      if protoc is not args.protoc:
+        print('Using protoc: {}'.format(protoc))
+      generate(source, target, protoc, args.check_only)
   except AssertionError as e:
     if not str(e):
       raise
diff --git a/tools/gen_tp_table_docs.py b/tools/gen_tp_table_docs.py
index 8b8565a..97e183e 100755
--- a/tools/gen_tp_table_docs.py
+++ b/tools/gen_tp_table_docs.py
@@ -59,7 +59,9 @@
     raise Exception('Unknown column documentation type '
                     f'{table.table.class_name}::{col.column.name}')
 
-  parsed_type = table.parse_type(col.column.type)
+  parsed_type = util.parse_type_with_cols(table.table,
+                                          [c.column for c in table.columns],
+                                          col.column.type)
   docs_type = parsed_type.cpp_type
   if docs_type == 'StringPool::Id':
     docs_type = 'string'
@@ -88,11 +90,20 @@
   parser = argparse.ArgumentParser()
   parser.add_argument('--out', required=True)
   parser.add_argument('inputs', nargs='*')
+  parser.add_argument('--relative-input-dir')
   args = parser.parse_args()
 
-  tables = util.parse_tables_from_files(args.inputs)
+  def get_relin_path(in_path: str):
+    if not args.relative_input_dir:
+      return in_path
+    return os.path.relpath(in_path, args.relative_input_dir)
+
+  modules = [
+      os.path.splitext(get_relin_path(i).replace('/', '.'))[0]
+      for i in args.inputs
+  ]
   table_docs = []
-  for parsed in tables:
+  for parsed in util.parse_tables_from_modules(modules):
     table = parsed.table
     doc = table.tabledoc
     assert doc
diff --git a/tools/gen_tp_table_headers.py b/tools/gen_tp_table_headers.py
index 1ce0963..f15245e 100755
--- a/tools/gen_tp_table_headers.py
+++ b/tools/gen_tp_table_headers.py
@@ -28,63 +28,71 @@
 
 #pylint: disable=wrong-import-position
 from python.generators.trace_processor_table.serialize import serialize_header
+from python.generators.trace_processor_table.util import find_table_deps
 from python.generators.trace_processor_table.util import ParsedTable
-from python.generators.trace_processor_table.util import parse_tables_from_files
+from python.generators.trace_processor_table.util import parse_tables_from_modules
 #pylint: enable=wrong-import-position
 
+# Suffix which replaces the .py extension for all input modules.
+OUT_HEADER_SUFFIX = '_py.h'
+
 
 @dataclass
 class Header:
   """Represents a Python module which will be converted to a header."""
-  out_path: str
-  relout_path: str
   tables: List[ParsedTable]
 
 
 def main():
   """Main function."""
   parser = argparse.ArgumentParser()
-  parser.add_argument('--gen-dir', required=True)
   parser.add_argument('--inputs', required=True, nargs='*')
-  parser.add_argument('--outputs', required=True, nargs='*')
-  parser.add_argument('--header-prefix')
+  parser.add_argument('--gen-dir', required=True)
+  parser.add_argument('--relative-input-dir')
+  parser.add_argument('--import-prefix', default='')
   args = parser.parse_args()
 
-  if len(args.inputs) != len(args.outputs):
-    raise Exception('Number of inputs must match number of outputs')
+  def get_relin_path(in_path: str):
+    if not args.relative_input_dir:
+      return in_path
+    return os.path.relpath(in_path, args.relative_input_dir)
 
-  header_prefix = args.header_prefix if args.header_prefix else ''
-  in_to_out = dict(zip(args.inputs, args.outputs))
+  def get_relout_path(in_path: str):
+    return os.path.splitext(in_path)[0] + OUT_HEADER_SUFFIX
+
+  def get_out_path(in_path: str):
+    return os.path.join(args.gen_dir, get_relout_path(in_path))
+
+  def get_header_path(in_path: str):
+    return os.path.join(args.import_prefix, get_relout_path(in_path))
+
+  modules = [
+      os.path.splitext(get_relin_path(i).replace(os.sep, '.'))[0]
+      for i in args.inputs
+  ]
   headers: Dict[str, Header] = {}
-  for table in parse_tables_from_files(args.inputs):
-    out_path = in_to_out[table.input_path]
-    relout_path = os.path.join(header_prefix,
-                               os.path.relpath(out_path, args.gen_dir))
-
-    header = headers.get(table.input_path, Header(out_path, relout_path, []))
+  for table in parse_tables_from_modules(modules):
+    input_path = os.path.relpath(table.table.python_module, ROOT_DIR)
+    header = headers.get(input_path, Header([]))
     header.tables.append(table)
-    headers[table.input_path] = header
+    headers[input_path] = header
 
-  # Build a mapping from table class name to the output path of the header
-  # which will be generated for it. This is used to include one header into
-  # another for Id dependencies.
-  table_class_name_to_relout: Dict[str, str] = {}
-  for header in headers.values():
-    for table in header.tables:
-      table_class_name_to_relout[table.table.class_name] = header.relout_path
+  for in_path, header in headers.items():
+    out_path = get_out_path(in_path)
+    relout_path = get_relout_path(in_path)
 
-  for header in headers.values():
     # Find all headers depended on by this table. These will be #include-ed when
     # generating the header file below so ensure we remove ourself.
     header_relout_deps: Set[str] = set()
     for table in header.tables:
-      header_relout_deps = header_relout_deps.union(
-          [table_class_name_to_relout[c] for c in table.find_table_deps()])
-    header_relout_deps.discard(header.relout_path)
+      header_relout_deps = header_relout_deps.union([
+          get_header_path(os.path.relpath(c.python_module, ROOT_DIR))
+          for c in find_table_deps(table.table)
+      ])
+    header_relout_deps.discard(relout_path)
 
-    with open(header.out_path, 'w', encoding='utf8') as out:
-      ifdef_guard = re.sub(r'[^a-zA-Z0-9_-]', '_',
-                           header.relout_path).upper() + '_'
+    with open(out_path, 'w', encoding='utf8') as out:
+      ifdef_guard = re.sub(r'[^a-zA-Z0-9_-]', '_', relout_path).upper() + '_'
       out.write(
           serialize_header(ifdef_guard, header.tables,
                            sorted(header_relout_deps)))
diff --git a/tools/heap_profile b/tools/heap_profile
index 40e7f40..6e32c4b 100755
--- a/tools/heap_profile
+++ b/tools/heap_profile
@@ -34,18 +34,18 @@
 
 
 # ----- Amalgamator: begin of python/perfetto/prebuilts/manifests/traceconv.py
-# This file has been generated by: /usr/local/google/home/lalitm/perfetto/tools/roll-prebuilts v33.1
+# This file has been generated by: /Users/hjd/src/perfetto/tools/roll-prebuilts v34.0
 TRACECONV_MANIFEST = [{
     'arch':
         'mac-amd64',
     'file_name':
         'traceconv',
     'file_size':
-        7822272,
+        7904536,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-amd64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-amd64/traceconv',
     'sha256':
-        '2b1bae4755ee0dd7f3a8e55653f8a7c344f688ea29700064ef8211c55bb4ae9f',
+        '037f84ac943f3f4d75447c668cc49c966fe3d85eca3a455c958b24fc6a9e314a',
     'platform':
         'darwin',
     'machine': ['x86_64']
@@ -55,11 +55,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        6604056,
+        6554600,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-arm64/traceconv',
     'sha256':
-        'c0bd6d1ebe2c61ffeefbd4f01426e9b853c81daf70530be7e78c97a4d3af100c',
+        'eda545ef4fa37fdfa1b47ced7cbbe0aa3c0df9bd161cacd7c78e6c55aef98d20',
     'platform':
         'darwin',
     'machine': ['arm64']
@@ -69,11 +69,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        8122112,
+        7664384,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-amd64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-amd64/traceconv',
     'sha256':
-        'c4c57d8e7b435822a1437b2dc7f7154f6ff2e197deff1f9284bbd36bbedb004f',
+        '24285e6e0e873d393fa5a993bac18ec8e1ab5fae6f4e3453214e095ef36e4c45',
     'platform':
         'linux',
     'machine': ['x86_64']
@@ -83,11 +83,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        6692016,
+        5657944,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm/traceconv',
     'sha256':
-        'da666eb9f80bcbec4c959f4adf493a59ff89e4106666fe1884291078dba0243b',
+        'c9af3d976f849fc75e96c2c552cb14fcc9eacce6fe7c45c4a8289080b0f66706',
     'platform':
         'linux',
     'machine': ['armv6l', 'armv7l', 'armv8l']
@@ -97,11 +97,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        7575344,
+        7184224,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm64/traceconv',
     'sha256':
-        '8ca00c39c5ec7bd78576f64c4ab05e663d803b06b36fbddf968825edbe236fca',
+        'c6dc936492d58a40cd8e0b58abc46bd479e0c1c387cd1ba29198a6c9b2000d7a',
     'platform':
         'linux',
     'machine': ['aarch64']
@@ -111,55 +111,55 @@
     'file_name':
         'traceconv',
     'file_size':
-        5376396,
+        5325260,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm/traceconv',
     'sha256':
-        'b77e7f0274ba45ff32d34df347845bc996763291fcc6b2a697f56c0c9a543150'
+        '963267dcb58cdde9f61a952e5cb7f3557833209d3251e7fdcefc3b52db54f77b'
 }, {
     'arch':
         'android-arm64',
     'file_name':
         'traceconv',
     'file_size':
-        6793744,
+        6572688,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm64/traceconv',
     'sha256':
-        'e83f3d43f8782cb57e9d3e8a3cd31826c9713da9f92bd8d8be2c48872ed423eb'
+        '87373c351fe5e947826cd957438cab8a37a352bf83b1cbbb15fe276eee9d873a'
 }, {
     'arch':
         'android-x86',
     'file_name':
         'traceconv',
     'file_size':
-        7694692,
+        7303588,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x86/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x86/traceconv',
     'sha256':
-        'c9ee2c3c91d6c68cb7f52a626767bde5e267f34c6ddf987ff73eec3d813c0a2c'
+        'dfc4e714963b5ed662d29d6028ffa69e67f8cd2f9a28223f715437a260fd456f'
 }, {
     'arch':
         'android-x64',
     'file_name':
         'traceconv',
     'file_size':
-        7940680,
+        7482056,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x64/traceconv',
     'sha256':
-        'f75122ca3e6bbe393b705c3bc5514d81c57f38bf408d857d89c4268b79a39e08'
+        '79c666c629fcffd810635270b45e58b40ed253d22650f41550057e5d8f8c49a7'
 }, {
     'arch':
         'windows-amd64',
     'file_name':
         'traceconv.exe',
     'file_size':
-        7239168,
+        7072768,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/windows-amd64/traceconv.exe',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/windows-amd64/traceconv.exe',
     'sha256':
-        '5be5d698f69d44b4baa8ae1f21955becad9d0e6774e967f923b8386744002cfe',
+        '40fac80fdeae443a924e160650c94629e6463c1fb5a4f04f4ef6e9e5e72a3965',
     'platform':
         'win32',
     'machine': ['amd64']
diff --git a/tools/install-build-deps b/tools/install-build-deps
index 68c5518..255be95 100755
--- a/tools/install-build-deps
+++ b/tools/install-build-deps
@@ -553,9 +553,7 @@
       action='store_true',
       help='Node and NPM packages to Build the Web-based UI via ./ui/build')
   parser.add_argument(
-      '--grpc',
-      action='store_true',
-      help='Packages to build gRPC')
+      '--grpc', action='store_true', help='Packages to build gRPC')
   parser.add_argument('--check-only')
   parser.add_argument('--filter', action='append')
   parser.add_argument('--verify', help='Check all URLs', action='store_true')
diff --git a/tools/record_android_trace b/tools/record_android_trace
index 65f215d..a9db452 100755
--- a/tools/record_android_trace
+++ b/tools/record_android_trace
@@ -33,18 +33,18 @@
 
 
 # ----- Amalgamator: begin of python/perfetto/prebuilts/manifests/tracebox.py
-# This file has been generated by: /usr/local/google/home/lalitm/perfetto/tools/roll-prebuilts v33.1
+# This file has been generated by: /Users/hjd/src/perfetto/tools/roll-prebuilts v34.0
 TRACEBOX_MANIFEST = [{
     'arch':
         'mac-amd64',
     'file_name':
         'tracebox',
     'file_size':
-        1415776,
+        1432064,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-amd64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-amd64/tracebox',
     'sha256':
-        '860cccef002f1a7216d301a09b97d7276b8a57c8d85ad1c3aa4697bb115ffca7',
+        '4ceb7646cd99303224ab5e7ff0a9f84c04f3c5466fff65a55dab65171ae9d482',
     'platform':
         'darwin',
     'machine': ['x86_64']
@@ -54,11 +54,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        1309272,
+        1325704,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-arm64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-arm64/tracebox',
     'sha256':
-        '9c079ac561064c33e9bdfe2e23e92fb95c025603e545c1aae31b2bd7de0398ad',
+        '2c560fcce5e19eb692e50487af134e2078347cdb79decba0c572917860528388',
     'platform':
         'darwin',
     'machine': ['arm64']
@@ -68,11 +68,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        2137040,
+        2155496,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-amd64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-amd64/tracebox',
     'sha256':
-        '9eb9ce1a14432c284fecce7886786bb2555bcb6dfb4f00a2df2885984961a5fc',
+        '10b92180bb461a7e21be3f8b3d4640430a98d0547238ce095709213b378217d2',
     'platform':
         'linux',
     'machine': ['x86_64']
@@ -82,11 +82,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        1277896,
+        1288764,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm/tracebox',
     'sha256':
-        '60c71b39be7e04d9d0278e36e7e4d33c32a03d6cc8a3782a9e5ed2484f3f2082',
+        'fa28950ce2b7a9345fbb9272f2dd04d3d4eb2a87f021df25e1e649840eae60b5',
     'platform':
         'linux',
     'machine': ['armv6l', 'armv7l', 'armv8l']
@@ -96,11 +96,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        2065704,
+        2082704,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm64/tracebox',
     'sha256':
-        'a8d9e9e186b5daf45ec80b975b9a3ad04cb578890beda136b821c80b9cc74995',
+        '85c371d79b8e23d22a293c29e6399dc311d891a6bd85d7eeaf2cb0179c69eb27',
     'platform':
         'linux',
     'machine': ['aarch64']
@@ -110,44 +110,44 @@
     'file_name':
         'tracebox',
     'file_size':
-        1161172,
+        1169364,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm/tracebox',
     'sha256':
-        'f9dac5df26d471d1cf0aff942d7249da6b4122543e003813203ef128a15f93fd'
+        '40a3f31600f02dea10e290134d5c862e0e717f4f039756889a4e72c60f1591b6'
 }, {
     'arch':
         'android-arm64',
     'file_name':
         'tracebox',
     'file_size':
-        1764008,
+        1776296,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm64/tracebox',
     'sha256':
-        '3b325a09b6efae0939b73d4d74e6e01e3735508ed31b774f3a21765efab95099'
+        '562505fca18b34a97687dc002aeebcbf20acef68c8a8e48bed6d618c20e07c92'
 }, {
     'arch':
         'android-x86',
     'file_name':
         'tracebox',
     'file_size':
-        1755052,
+        1767340,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x86/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x86/tracebox',
     'sha256':
-        '86e31fa7e2b476187a0222ac2cf6a4ee7e5f8fb5b0e019c1349d14534343a581'
+        'eb47eb43ba93403557dd15a61196799e945ec324d96109db2f155fb131f9996a'
 }, {
     'arch':
         'android-x64',
     'file_name':
         'tracebox',
     'file_size':
-        2034344,
+        2054824,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x64/tracebox',
     'sha256':
-        '7692f6ceaa5d2eb9da42486262610a1820a9b31d46255f624407bf712eff021d'
+        'a3ae6d108e041ba368a9770f952772f111865d4eff7c8e4e4e2f653f45017948'
 }]
 
 # ----- Amalgamator: end of python/perfetto/prebuilts/manifests/tracebox.py
diff --git a/tools/trace_processor b/tools/trace_processor
index 96d5fa3..1ed7c63 100755
--- a/tools/trace_processor
+++ b/tools/trace_processor
@@ -30,18 +30,18 @@
 
 
 # ----- Amalgamator: begin of python/perfetto/prebuilts/manifests/trace_processor_shell.py
-# This file has been generated by: /usr/local/google/home/lalitm/perfetto/tools/roll-prebuilts v33.1
+# This file has been generated by: /Users/hjd/src/perfetto/tools/roll-prebuilts v34.0
 TRACE_PROCESSOR_SHELL_MANIFEST = [{
     'arch':
         'mac-amd64',
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8583152,
+        8714576,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-amd64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-amd64/trace_processor_shell',
     'sha256':
-        '35673d3546dec894b5d55147da2fad523a8f5917b42ec1c327c940b82d3ce565',
+        '9bdb89493f0f00db5d3a73166450ac2f6ee830de16415e79c5a0234990caa644',
     'platform':
         'darwin',
     'machine': ['x86_64']
@@ -51,11 +51,11 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        7303384,
+        7286968,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-arm64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-arm64/trace_processor_shell',
     'sha256':
-        'a4d301cf8c0c01d328a9253d5ba78f4249333d4b04236cf8be0c7dad2a65e7e0',
+        '948536035fbe680b47b94a99d320ff459450738e4aeeb16cef18364f0023622b',
     'platform':
         'darwin',
     'machine': ['arm64']
@@ -65,11 +65,11 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8991600,
+        8576688,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-amd64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-amd64/trace_processor_shell',
     'sha256':
-        'e8dd82c1ec73fbbf4165ab0d9cbbb750cff5bcf723a1eab51adc9382bf652361',
+        '493698c81fffcabc340c72831b175962dba5a31dfe8572a6d5af083a116af4f8',
     'platform':
         'linux',
     'machine': ['x86_64']
@@ -79,11 +79,11 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        7117104,
+        6125384,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm/trace_processor_shell',
     'sha256':
-        'bbfde44ec004815a36cecdc1dbc135f815f46ac6a3989c87cb0c577510c1c8fe',
+        '53f1e27603695cf92d22519993b6eafa9c60957d9cb33bd0b300df8573b87ebb',
     'platform':
         'linux',
     'machine': ['armv6l', 'armv7l', 'armv8l']
@@ -93,11 +93,11 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8384816,
+        8036288,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm64/trace_processor_shell',
     'sha256':
-        'c4f9a499e8c443961725448aabc04cd7dc18cb79883f6b8b615fd8f4ed7c8c16',
+        '2a2cda222c9d5e18b638057688babb00a3a975ccd4b7dd65f26211c2cb7767f9',
     'platform':
         'linux',
     'machine': ['aarch64']
@@ -107,55 +107,55 @@
     'file_name':
         'trace_processor_shell',
     'file_size':
-        5823560,
+        5813384,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm/trace_processor_shell',
     'sha256':
-        'ec5d23fc761021fe10a7cdb66d35590dab0216b2305f5163ace98da28b535fb8'
+        'f3ec4c194d0b06af5b296c1c479e6b29090e6b7cc7e58fbd55ca2919a126f0ee'
 }, {
     'arch':
         'android-arm64',
     'file_name':
         'trace_processor_shell',
     'file_size':
-        7474864,
+        7294768,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm64/trace_processor_shell',
     'sha256':
-        'f4877f51d0fbb8e9ead576e746a7adf7806b5cb2dffc4373a55ceeec21f615ff'
+        'f44f47d4b873ec68b6fa4f4c69a3e5a13d58b4d9cb2ec591fa687d4480c1950b'
 }, {
     'arch':
         'android-x86',
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8436764,
+        8090716,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x86/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x86/trace_processor_shell',
     'sha256':
-        '68ad60af32890f903afb7cbee7cc8f0f4f4b18dea7ab077cb1d807ea80053dcb'
+        '5636d8251747376787640bc3a4894ecf3091e4bf3d38b007003e1992fc5792df'
 }, {
     'arch':
         'android-x64',
     'file_name':
         'trace_processor_shell',
     'file_size':
-        8781544,
+        8359784,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x64/trace_processor_shell',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x64/trace_processor_shell',
     'sha256':
-        'edf5efca4cf46ffbd3586592490b14d61758198c7d46c1bc8e083b1ab19382f5'
+        '50440fa055ab998f6cf24f9a9a7388520cc854708735521505e10291bc52f3d0'
 }, {
     'arch':
         'windows-amd64',
     'file_name':
         'trace_processor_shell.exe',
     'file_size':
-        8252928,
+        8130560,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/windows-amd64/trace_processor_shell.exe',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/windows-amd64/trace_processor_shell.exe',
     'sha256':
-        '323a210f857ce840c4d69dfa7f9b0a32501ffa4a856e5667a0916e3f8006a5d0',
+        '5cbcf98e29a2d989523235e11e4e0dade692a295ebf47a6c93a09a050ce9bc91',
     'platform':
         'win32',
     'machine': ['amd64']
diff --git a/tools/tracebox b/tools/tracebox
index d788baf..bf03fa6 100755
--- a/tools/tracebox
+++ b/tools/tracebox
@@ -30,18 +30,18 @@
 
 
 # ----- Amalgamator: begin of python/perfetto/prebuilts/manifests/tracebox.py
-# This file has been generated by: /usr/local/google/home/lalitm/perfetto/tools/roll-prebuilts v33.1
+# This file has been generated by: /Users/hjd/src/perfetto/tools/roll-prebuilts v34.0
 TRACEBOX_MANIFEST = [{
     'arch':
         'mac-amd64',
     'file_name':
         'tracebox',
     'file_size':
-        1415776,
+        1432064,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-amd64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-amd64/tracebox',
     'sha256':
-        '860cccef002f1a7216d301a09b97d7276b8a57c8d85ad1c3aa4697bb115ffca7',
+        '4ceb7646cd99303224ab5e7ff0a9f84c04f3c5466fff65a55dab65171ae9d482',
     'platform':
         'darwin',
     'machine': ['x86_64']
@@ -51,11 +51,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        1309272,
+        1325704,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-arm64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-arm64/tracebox',
     'sha256':
-        '9c079ac561064c33e9bdfe2e23e92fb95c025603e545c1aae31b2bd7de0398ad',
+        '2c560fcce5e19eb692e50487af134e2078347cdb79decba0c572917860528388',
     'platform':
         'darwin',
     'machine': ['arm64']
@@ -65,11 +65,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        2137040,
+        2155496,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-amd64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-amd64/tracebox',
     'sha256':
-        '9eb9ce1a14432c284fecce7886786bb2555bcb6dfb4f00a2df2885984961a5fc',
+        '10b92180bb461a7e21be3f8b3d4640430a98d0547238ce095709213b378217d2',
     'platform':
         'linux',
     'machine': ['x86_64']
@@ -79,11 +79,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        1277896,
+        1288764,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm/tracebox',
     'sha256':
-        '60c71b39be7e04d9d0278e36e7e4d33c32a03d6cc8a3782a9e5ed2484f3f2082',
+        'fa28950ce2b7a9345fbb9272f2dd04d3d4eb2a87f021df25e1e649840eae60b5',
     'platform':
         'linux',
     'machine': ['armv6l', 'armv7l', 'armv8l']
@@ -93,11 +93,11 @@
     'file_name':
         'tracebox',
     'file_size':
-        2065704,
+        2082704,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm64/tracebox',
     'sha256':
-        'a8d9e9e186b5daf45ec80b975b9a3ad04cb578890beda136b821c80b9cc74995',
+        '85c371d79b8e23d22a293c29e6399dc311d891a6bd85d7eeaf2cb0179c69eb27',
     'platform':
         'linux',
     'machine': ['aarch64']
@@ -107,44 +107,44 @@
     'file_name':
         'tracebox',
     'file_size':
-        1161172,
+        1169364,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm/tracebox',
     'sha256':
-        'f9dac5df26d471d1cf0aff942d7249da6b4122543e003813203ef128a15f93fd'
+        '40a3f31600f02dea10e290134d5c862e0e717f4f039756889a4e72c60f1591b6'
 }, {
     'arch':
         'android-arm64',
     'file_name':
         'tracebox',
     'file_size':
-        1764008,
+        1776296,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm64/tracebox',
     'sha256':
-        '3b325a09b6efae0939b73d4d74e6e01e3735508ed31b774f3a21765efab95099'
+        '562505fca18b34a97687dc002aeebcbf20acef68c8a8e48bed6d618c20e07c92'
 }, {
     'arch':
         'android-x86',
     'file_name':
         'tracebox',
     'file_size':
-        1755052,
+        1767340,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x86/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x86/tracebox',
     'sha256':
-        '86e31fa7e2b476187a0222ac2cf6a4ee7e5f8fb5b0e019c1349d14534343a581'
+        'eb47eb43ba93403557dd15a61196799e945ec324d96109db2f155fb131f9996a'
 }, {
     'arch':
         'android-x64',
     'file_name':
         'tracebox',
     'file_size':
-        2034344,
+        2054824,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x64/tracebox',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x64/tracebox',
     'sha256':
-        '7692f6ceaa5d2eb9da42486262610a1820a9b31d46255f624407bf712eff021d'
+        'a3ae6d108e041ba368a9770f952772f111865d4eff7c8e4e4e2f653f45017948'
 }]
 
 # ----- Amalgamator: end of python/perfetto/prebuilts/manifests/tracebox.py
diff --git a/tools/traceconv b/tools/traceconv
index f838c69..9298eb3 100755
--- a/tools/traceconv
+++ b/tools/traceconv
@@ -30,18 +30,18 @@
 
 
 # ----- Amalgamator: begin of python/perfetto/prebuilts/manifests/traceconv.py
-# This file has been generated by: /usr/local/google/home/lalitm/perfetto/tools/roll-prebuilts v33.1
+# This file has been generated by: /Users/hjd/src/perfetto/tools/roll-prebuilts v34.0
 TRACECONV_MANIFEST = [{
     'arch':
         'mac-amd64',
     'file_name':
         'traceconv',
     'file_size':
-        7822272,
+        7904536,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-amd64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-amd64/traceconv',
     'sha256':
-        '2b1bae4755ee0dd7f3a8e55653f8a7c344f688ea29700064ef8211c55bb4ae9f',
+        '037f84ac943f3f4d75447c668cc49c966fe3d85eca3a455c958b24fc6a9e314a',
     'platform':
         'darwin',
     'machine': ['x86_64']
@@ -51,11 +51,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        6604056,
+        6554600,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/mac-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/mac-arm64/traceconv',
     'sha256':
-        'c0bd6d1ebe2c61ffeefbd4f01426e9b853c81daf70530be7e78c97a4d3af100c',
+        'eda545ef4fa37fdfa1b47ced7cbbe0aa3c0df9bd161cacd7c78e6c55aef98d20',
     'platform':
         'darwin',
     'machine': ['arm64']
@@ -65,11 +65,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        8122112,
+        7664384,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-amd64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-amd64/traceconv',
     'sha256':
-        'c4c57d8e7b435822a1437b2dc7f7154f6ff2e197deff1f9284bbd36bbedb004f',
+        '24285e6e0e873d393fa5a993bac18ec8e1ab5fae6f4e3453214e095ef36e4c45',
     'platform':
         'linux',
     'machine': ['x86_64']
@@ -79,11 +79,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        6692016,
+        5657944,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm/traceconv',
     'sha256':
-        'da666eb9f80bcbec4c959f4adf493a59ff89e4106666fe1884291078dba0243b',
+        'c9af3d976f849fc75e96c2c552cb14fcc9eacce6fe7c45c4a8289080b0f66706',
     'platform':
         'linux',
     'machine': ['armv6l', 'armv7l', 'armv8l']
@@ -93,11 +93,11 @@
     'file_name':
         'traceconv',
     'file_size':
-        7575344,
+        7184224,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/linux-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/linux-arm64/traceconv',
     'sha256':
-        '8ca00c39c5ec7bd78576f64c4ab05e663d803b06b36fbddf968825edbe236fca',
+        'c6dc936492d58a40cd8e0b58abc46bd479e0c1c387cd1ba29198a6c9b2000d7a',
     'platform':
         'linux',
     'machine': ['aarch64']
@@ -107,55 +107,55 @@
     'file_name':
         'traceconv',
     'file_size':
-        5376396,
+        5325260,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm/traceconv',
     'sha256':
-        'b77e7f0274ba45ff32d34df347845bc996763291fcc6b2a697f56c0c9a543150'
+        '963267dcb58cdde9f61a952e5cb7f3557833209d3251e7fdcefc3b52db54f77b'
 }, {
     'arch':
         'android-arm64',
     'file_name':
         'traceconv',
     'file_size':
-        6793744,
+        6572688,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-arm64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-arm64/traceconv',
     'sha256':
-        'e83f3d43f8782cb57e9d3e8a3cd31826c9713da9f92bd8d8be2c48872ed423eb'
+        '87373c351fe5e947826cd957438cab8a37a352bf83b1cbbb15fe276eee9d873a'
 }, {
     'arch':
         'android-x86',
     'file_name':
         'traceconv',
     'file_size':
-        7694692,
+        7303588,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x86/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x86/traceconv',
     'sha256':
-        'c9ee2c3c91d6c68cb7f52a626767bde5e267f34c6ddf987ff73eec3d813c0a2c'
+        'dfc4e714963b5ed662d29d6028ffa69e67f8cd2f9a28223f715437a260fd456f'
 }, {
     'arch':
         'android-x64',
     'file_name':
         'traceconv',
     'file_size':
-        7940680,
+        7482056,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/android-x64/traceconv',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/android-x64/traceconv',
     'sha256':
-        'f75122ca3e6bbe393b705c3bc5514d81c57f38bf408d857d89c4268b79a39e08'
+        '79c666c629fcffd810635270b45e58b40ed253d22650f41550057e5d8f8c49a7'
 }, {
     'arch':
         'windows-amd64',
     'file_name':
         'traceconv.exe',
     'file_size':
-        7239168,
+        7072768,
     'url':
-        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v33.1/windows-amd64/traceconv.exe',
+        'https://commondatastorage.googleapis.com/perfetto-luci-artifacts/v34.0/windows-amd64/traceconv.exe',
     'sha256':
-        '5be5d698f69d44b4baa8ae1f21955becad9d0e6774e967f923b8386744002cfe',
+        '40fac80fdeae443a924e160650c94629e6463c1fb5a4f04f4ef6e9e5e72a3965',
     'platform':
         'win32',
     'machine': ['amd64']
diff --git a/ui/release/channels.json b/ui/release/channels.json
index 82a840f..fb05de4 100644
--- a/ui/release/channels.json
+++ b/ui/release/channels.json
@@ -6,7 +6,7 @@
     },
     {
       "name": "canary",
-      "rev": "e7842630351168618fc705d840a2d59309a25ec5"
+      "rev": "056cc57893b57b82ed411256c2bd4091641f55fb"
     },
     {
       "name": "autopush",
diff --git a/ui/src/assets/common.scss b/ui/src/assets/common.scss
index 2112dee..0435422 100644
--- a/ui/src/assets/common.scss
+++ b/ui/src/assets/common.scss
@@ -460,7 +460,7 @@
 .scrolling-panel-container {
   position: relative;
   overflow-x: hidden;
-  overflow-y: auto;
+  overflow-y: scroll; // Always show vertical scrollbar
   flex: 1 1 auto;
   will-change: transform; // Force layer creation.
   display: grid;
diff --git a/ui/src/assets/index.html b/ui/src/assets/index.html
index dc3216e..7a03f4a 100644
--- a/ui/src/assets/index.html
+++ b/ui/src/assets/index.html
@@ -33,7 +33,7 @@
 * Force-reload the page with Ctrl+Shift+R (Mac: Meta+Shift+R) or
   Shift + click on the refresh button.
 
-* <a href="javascript:clearAllCaches();">Click here</a> to clear all the site storage and caches and reload the page.
+* <a href="javascript:clearAllCaches();">Clear all the site storage and caches</a> and reload the page.
 
 * Clear the site data and caches from devtools, following <a target="_blank" href="https://developers.google.com/web/tools/chrome-devtools/storage/cache#deletecache">these instructions</a>.
 
diff --git a/ui/src/assets/perfetto.scss b/ui/src/assets/perfetto.scss
index 7a00576..e4da147 100644
--- a/ui/src/assets/perfetto.scss
+++ b/ui/src/assets/perfetto.scss
@@ -38,3 +38,4 @@
 @import "widgets/spinner";
 @import "widgets/tree";
 @import "widgets/switch";
+@import "widgets/form";
diff --git a/ui/src/assets/record.scss b/ui/src/assets/record.scss
index 43cf635..187499f6 100644
--- a/ui/src/assets/record.scss
+++ b/ui/src/assets/record.scss
@@ -101,7 +101,7 @@
         flex-direction: row;
         align-items: center;
         padding: 10px 0px 10px 0px;
-        color: #ffffff;
+        color: #fff;
 
         .code-snippet {
           width: 100%;
@@ -150,7 +150,7 @@
     padding-top: 0.5rem;
     padding-bottom: 0.5rem;
     background-color: #0000ff;
-    color: #ffffff;
+    color: #fff;
     cursor: pointer;
     -webkit-appearance: button;
     text-transform: none;
@@ -399,6 +399,8 @@
       line-height: 12.5px;
       margin-top: -5px;
       opacity: 0;
+      text-overflow: ellipsis;
+      white-space: nowrap;
     }
 
     &:hover {
diff --git a/ui/src/assets/widgets/form.scss b/ui/src/assets/widgets/form.scss
new file mode 100644
index 0000000..569df72
--- /dev/null
+++ b/ui/src/assets/widgets/form.scss
@@ -0,0 +1,38 @@
+// Copyright (C) 2023 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+.pf-form {
+  display: grid;
+  grid-template-columns: auto auto;
+  margin: 6px;
+  row-gap: 8px;
+  column-gap: 8px;
+
+  .pf-form-button-bar {
+    grid-column: span 2;
+    margin-top: 6px;
+    display: flex;
+    justify-content: right;
+    flex-direction: row-reverse;
+    align-items: center;
+
+    .pf-button {
+      margin-right: 4px;
+    }
+  }
+
+  .pf-form-label {
+    font-weight: 600;
+  }
+}
diff --git a/ui/src/assets/widgets/menu.scss b/ui/src/assets/widgets/menu.scss
index e161d4c..5bc6a9f 100644
--- a/ui/src/assets/widgets/menu.scss
+++ b/ui/src/assets/widgets/menu.scss
@@ -22,10 +22,10 @@
 
   .pf-menu-item {
     font-family: $pf-font;
-    font-size: inherit;
+    font-size: 14px;
     user-select: none;
     text-align: left;
-    padding: 6px 12px;
+    padding: 5px 10px;
     white-space: nowrap;
     min-width: max-content;
     cursor: pointer;
diff --git a/ui/src/common/canvas_utils.ts b/ui/src/common/canvas_utils.ts
index aef36a0..d086f5b 100644
--- a/ui/src/common/canvas_utils.ts
+++ b/ui/src/common/canvas_utils.ts
@@ -86,5 +86,11 @@
   ctx.lineTo(x + width - 3, y + (triangleSize * 3.5));
   ctx.lineTo(x + width, y + 4 * triangleSize);
   ctx.lineTo(x, y + height);
+
+  const gradient = ctx.createLinearGradient(x, y, x + width, y + height);
+  gradient.addColorStop(0.66, ctx.fillStyle as string);
+  gradient.addColorStop(1, '#FFFFFF');
+  ctx.fillStyle = gradient;
+
   ctx.fill();
 }
diff --git a/ui/src/common/query_result.ts b/ui/src/common/query_result.ts
index 8fd9f52..e8d482d 100644
--- a/ui/src/common/query_result.ts
+++ b/ui/src/common/query_result.ts
@@ -67,12 +67,12 @@
 export const STR_NULL: string|null = 'str_null';
 export const BLOB: Uint8Array = new Uint8Array();
 export const BLOB_NULL: Uint8Array|null = new Uint8Array();
-export const LONG: bigint = BigInt(0);
-export const LONG_NULL: bigint|null = BigInt(1);
+export const LONG: bigint = 0n;
+export const LONG_NULL: bigint|null = 1n;
 
 export type ColumnType = string|number|bigint|null|Uint8Array;
 
-const SHIFT_32BITS = BigInt(32);
+const SHIFT_32BITS = 32n;
 
 // Fast decode varint int64 into a bigint
 // Inspired by
@@ -213,7 +213,7 @@
   switch (actual) {
     case CellType.CELL_NULL:
       return expected === NUM_NULL || expected === STR_NULL ||
-          expected === BLOB_NULL;
+          expected === BLOB_NULL || expected === LONG_NULL;
     case CellType.CELL_VARINT:
       return expected === NUM || expected === NUM_NULL || expected === LONG ||
           expected === LONG_NULL;
@@ -829,7 +829,7 @@
         if (actualType === CellType.CELL_NULL) {
           err = 'SQL value is NULL but that was not expected' +
               ` (expected type: ${columnTypeToString(expType)}). ` +
-              'Did you intend to use NUM_NULL, STR_NULL or BLOB_NULL?';
+              'Did you mean NUM_NULL, LONG_NULL, STR_NULL or BLOB_NULL?';
         } else {
           err = `Incompatible cell type. Expected: ${
               columnTypeToString(
diff --git a/ui/src/common/query_result_unittest.ts b/ui/src/common/query_result_unittest.ts
index 49b0b0d..50641fe 100644
--- a/ui/src/common/query_result_unittest.ts
+++ b/ui/src/common/query_result_unittest.ts
@@ -358,9 +358,9 @@
 
   test('Parsing single byte positive integers', () => {
     const testData: Array<[Uint8Array, BigInt]> = [
-      [new Uint8Array([0x00]), BigInt(0)],
-      [new Uint8Array([0x01]), BigInt(1)],
-      [new Uint8Array([0x7f]), BigInt(127)],
+      [new Uint8Array([0x00]), 0n],
+      [new Uint8Array([0x01]), 1n],
+      [new Uint8Array([0x7f]), 127n],
     ];
 
     testData.forEach(([input, expected]) => {
@@ -370,10 +370,10 @@
 
   test('Parsing multi-byte positive integers', () => {
     const testData: Array<[Uint8Array, BigInt]> = [
-      [new Uint8Array([0x80, 0x01]), BigInt(128)],
-      [new Uint8Array([0xff, 0x7f]), BigInt(16383)],
-      [new Uint8Array([0x80, 0x80, 0x01]), BigInt(16384)],
-      [new Uint8Array([0xff, 0xff, 0x7f]), BigInt(2097151)],
+      [new Uint8Array([0x80, 0x01]), 128n],
+      [new Uint8Array([0xff, 0x7f]), 16383n],
+      [new Uint8Array([0x80, 0x80, 0x01]), 16384n],
+      [new Uint8Array([0xff, 0xff, 0x7f]), 2097151n],
       [
         new Uint8Array([
           0xff,
@@ -387,7 +387,7 @@
           0xff,
           0x00,
         ]),
-        BigInt('9223372036854775807'),
+        9223372036854775807n,
       ],
     ];
 
@@ -411,7 +411,7 @@
           0xff,
           0x01,
         ]),
-        BigInt(-1),
+        -1n,
       ],
       [
         new Uint8Array([
@@ -426,7 +426,7 @@
           0xff,
           0x01,
         ]),
-        BigInt(-2),
+        -2n,
       ],
       [
         new Uint8Array([
@@ -441,7 +441,7 @@
           0x80,
           0x01,
         ]),
-        BigInt('-9223372036854775808'),
+        -9223372036854775808n,
       ],
     ];
 
diff --git a/ui/src/common/state.ts b/ui/src/common/state.ts
index 995f643..d4d07b7 100644
--- a/ui/src/common/state.ts
+++ b/ui/src/common/state.ts
@@ -661,9 +661,9 @@
 
 export function getDefaultRecordingTargets(): RecordingTarget[] {
   return [
-    {os: 'Q', name: 'Android Q+'},
-    {os: 'P', name: 'Android P'},
-    {os: 'O', name: 'Android O-'},
+    {os: 'Q', name: 'Android Q+ / 10+'},
+    {os: 'P', name: 'Android P / 9'},
+    {os: 'O', name: 'Android O- / 8-'},
     {os: 'C', name: 'Chrome'},
     {os: 'CrOS', name: 'Chrome OS (system trace)'},
     {os: 'L', name: 'Linux desktop'},
diff --git a/ui/src/common/state_unittest.ts b/ui/src/common/state_unittest.ts
index 58610dc..9b5a064 100644
--- a/ui/src/common/state_unittest.ts
+++ b/ui/src/common/state_unittest.ts
@@ -14,6 +14,7 @@
 
 import {createEmptyState} from './empty_state';
 import {getContainingTrackId, PrimaryTrackSortKey, State} from './state';
+import {deserializeStateObject, serializeStateObject} from './upload_utils';
 
 test('createEmptyState', () => {
   const state: State = createEmptyState();
@@ -46,20 +47,10 @@
   expect(getContainingTrackId(state, 'b')).toEqual('containsB');
 });
 
-function serializeState(state: State): string {
-  return JSON.stringify(state, (key, value) => {
-    return key === 'nonSerializableState' ? undefined : value;
-  });
-}
-
-function deserializeState(json: string): State {
-  return JSON.parse(json);
-}
-
 test('state is serializable', () => {
   const state: State = createEmptyState();
-  const json = serializeState(state);
-  const restored: State = deserializeState(json);
+  const json = serializeStateObject(state);
+  const restored: State = deserializeStateObject(json);
 
   // Remove nonSerializableState from original
   const serializableState: any = state as any;
diff --git a/ui/src/common/upload_utils.ts b/ui/src/common/upload_utils.ts
index 875b072..0c97921 100644
--- a/ui/src/common/upload_utils.ts
+++ b/ui/src/common/upload_utils.ts
@@ -34,11 +34,53 @@
   return `https://storage.googleapis.com/${BUCKET_NAME}/${name}`;
 }
 
-export async function saveState(stateOrConfig: State|
-                                RecordConfig): Promise<string> {
-  const text = JSON.stringify(stateOrConfig, (key, value) => {
+// Bigint's are not serializable using JSON.stringify, so we use a special
+// object when serialising
+export type SerializedBigint = {
+  __kind: 'bigint',
+  value: string
+};
+
+// Check if a value looks like a serialized bigint
+export function isSerializedBigint(value: unknown): value is SerializedBigint {
+  if (value === null) {
+    return false;
+  }
+  if (typeof value !== 'object') {
+    return false;
+  }
+  if ('__kind' in value && 'value' in value) {
+    return value.__kind === 'bigint' && typeof value.value === 'string';
+  }
+  return false;
+}
+
+export function serializeStateObject(object: unknown): string {
+  const json = JSON.stringify(object, (key, value) => {
+    if (typeof value === 'bigint') {
+      return {
+        __kind: 'bigint',
+        value: value.toString(),
+      };
+    }
     return key === 'nonSerializableState' ? undefined : value;
   });
+  return json;
+}
+
+export function deserializeStateObject(json: string): any {
+  const object = JSON.parse(json, (_key, value) => {
+    if (isSerializedBigint(value)) {
+      return BigInt(value.value);
+    }
+    return value;
+  });
+  return object;
+}
+
+export async function saveState(stateOrConfig: State|
+                                RecordConfig): Promise<string> {
+  const text = serializeStateObject(stateOrConfig);
   const hash = await toSha256(text);
   const url = 'https://www.googleapis.com/upload/storage/v1/b/' +
       `${BUCKET_NAME}/o?uploadType=media` +
diff --git a/ui/src/common/upload_utils_unittest.ts b/ui/src/common/upload_utils_unittest.ts
new file mode 100644
index 0000000..4c0b8ce
--- /dev/null
+++ b/ui/src/common/upload_utils_unittest.ts
@@ -0,0 +1,105 @@
+// Copyright (C) 2023 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import {
+  deserializeStateObject,
+  isSerializedBigint,
+  serializeStateObject,
+} from './upload_utils';
+
+describe('isSerializedBigint', () => {
+  it('should return true for a valid serialized bigint', () => {
+    const value = {
+      __kind: 'bigint',
+      value: '1234567890',
+    };
+    expect(isSerializedBigint(value)).toBeTruthy();
+  });
+
+  it('should return false for a null value', () => {
+    expect(isSerializedBigint(null)).toBeFalsy();
+  });
+
+  it('should return false for a non-object value', () => {
+    expect(isSerializedBigint(123)).toBeFalsy();
+  });
+
+  it('should return false for a non-serialized bigint value', () => {
+    const value = {
+      __kind: 'not-bigint',
+      value: '1234567890',
+    };
+    expect(isSerializedBigint(value)).toBeFalsy();
+  });
+});
+
+describe('serializeStateObject', () => {
+  it('should serialize a simple object', () => {
+    const object = {
+      a: 1,
+      b: 2,
+      c: 3,
+    };
+    const expectedJson = `{"a":1,"b":2,"c":3}`;
+    expect(serializeStateObject(object)).toEqual(expectedJson);
+  });
+
+  it('should serialize a bigint', () => {
+    const object = {
+      a: 123456789123456789n,
+    };
+    const expectedJson =
+        `{"a":{"__kind":"bigint","value":"123456789123456789"}}`;
+    expect(serializeStateObject(object)).toEqual(expectedJson);
+  });
+
+  it('should not serialize a non-serializable property', () => {
+    const object = {
+      a: 1,
+      b: 2,
+      c: 3,
+      nonSerializableState: 4,
+    };
+    const expectedJson = `{"a":1,"b":2,"c":3}`;
+    expect(serializeStateObject(object)).toEqual(expectedJson);
+  });
+});
+
+describe('deserializeStateObject', () => {
+  it('should deserialize a simple object', () => {
+    const json = `{"a":1,"b":2,"c":3}`;
+    const expectedObject = {
+      a: 1,
+      b: 2,
+      c: 3,
+    };
+    expect(deserializeStateObject(json)).toEqual(expectedObject);
+  });
+
+  it('should deserialize a bigint', () => {
+    const json = `{"a":{"__kind":"bigint","value":"123456789123456789"}}`;
+    const expectedObject = {
+      a: 123456789123456789n,
+    };
+    expect(deserializeStateObject(json)).toEqual(expectedObject);
+  });
+
+  it('should deserialize a null', () => {
+    const json = `{"a":null}`;
+    const expectedObject = {
+      a: null,
+    };
+    expect(deserializeStateObject(json)).toEqual(expectedObject);
+  });
+});
diff --git a/ui/src/controller/ftrace_controller.ts b/ui/src/controller/ftrace_controller.ts
index 132eda2..f558a4a 100644
--- a/ui/src/controller/ftrace_controller.ts
+++ b/ui/src/controller/ftrace_controller.ts
@@ -12,13 +12,11 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import {FtraceFilterState} from 'src/common/state';
-
 import {Engine} from '../common/engine';
 import {NUM, STR, STR_NULL} from '../common/query_result';
+import {FtraceFilterState, Pagination} from '../common/state';
 import {TimeSpan, toNsCeil, toNsFloor} from '../common/time';
-import {FtraceEvent, globals as frontendGlobals} from '../frontend/globals';
-import {globals} from '../frontend/globals';
+import {FtraceEvent, globals} from '../frontend/globals';
 import {publishFtracePanelData} from '../frontend/publish';
 import {ratelimit} from '../frontend/rate_limiters';
 
@@ -34,30 +32,12 @@
   numEvents: number;
 }
 
-function cloneFtraceFilterState(other: FtraceFilterState): FtraceFilterState {
-  return {
-    excludedNames: [...other.excludedNames],
-  };
-}
-
-function ftraceFilterStateEq(
-    a: FtraceFilterState, b: FtraceFilterState): boolean {
-  if (a.excludedNames === b.excludedNames) return true;
-  if (a.excludedNames.length !== b.excludedNames.length) return false;
-
-  for (let i = 0; i < a.excludedNames.length; ++i) {
-    if (a.excludedNames[i] !== b.excludedNames[i]) return false;
-  }
-
-  return true;
-}
-
 export class FtraceController extends Controller<'main'> {
   private engine: Engine;
   private oldSpan: TimeSpan = new TimeSpan(0, 0);
-  private oldFtraceFilter: FtraceFilterState = {
-    excludedNames: [],
-  };
+  private oldFtraceFilter?: FtraceFilterState;
+  private oldPagination?: Pagination;
+
   constructor({engine}: FtraceControllerArgs) {
     super('main');
     this.engine = engine;
@@ -65,44 +45,39 @@
 
   run() {
     if (this.shouldUpdate()) {
-      this.updateEverything();
+      this.oldSpan = globals.frontendLocalState.visibleWindowTime.clone();
+      this.oldFtraceFilter = globals.state.ftraceFilter;
+      this.oldPagination = globals.state.ftracePagination;
+      if (globals.state.ftracePagination.count > 0) {
+        this.lookupFtraceEventsRateLimited();
+      }
     }
   }
 
-  private updateEverything = ratelimit(() => {
+  private lookupFtraceEventsRateLimited = ratelimit(() => {
     const {offset, count} = globals.state.ftracePagination;
-    this.oldSpan = frontendGlobals.frontendLocalState.visibleWindowTime;
-    this.oldFtraceFilter =
-        cloneFtraceFilterState(frontendGlobals.state.ftraceFilter);
-    this.lookupFtraceEvents(offset, count).then(({events,
-                                                  offset,
-                                                  numEvents}: RetVal) => {
+    // The formatter doesn't like formatted chained methods :(
+    const promise = this.lookupFtraceEvents(offset, count);
+    promise.then(({events, offset, numEvents}: RetVal) => {
       publishFtracePanelData({events, offset, numEvents});
     });
   }, 250);
 
   private shouldUpdate(): boolean {
-    if (this.oldSpan != frontendGlobals.frontendLocalState.visibleWindowTime) {
-      // The visible window has changed, definitely update
+    // Has the visible window moved?
+    const visibleWindow = globals.frontendLocalState.visibleWindowTime;
+    if (this.oldSpan.start !== visibleWindow.start ||
+        this.oldSpan.end !== visibleWindow.end) {
       return true;
     }
 
-    const globalPanelData = frontendGlobals.ftracePanelData;
-    if (!globalPanelData) {
-      // No state has been written yet, so we definitely need to update
+    // Has the pagination changed?
+    if (this.oldPagination !== globals.state.ftracePagination) {
       return true;
     }
 
-    // Work out whether we've scrolled near our rendered bounds
-    const {offset, count} = globals.state.ftracePagination;
-    if (offset != globalPanelData.offset ||
-        count != globalPanelData.events.length) {
-      return true;
-    }
-
-    // Work out of the ftrace filter has changed
-    const filter = frontendGlobals.state.ftraceFilter;
-    if (!ftraceFilterStateEq(this.oldFtraceFilter, filter)) {
+    // Has the filter changed?
+    if (this.oldFtraceFilter !== globals.state.ftraceFilter) {
       return true;
     }
 
@@ -110,8 +85,8 @@
   }
 
   async lookupFtraceEvents(offset: number, count: number): Promise<RetVal> {
-    const appState = frontendGlobals.state;
-    const frontendState = frontendGlobals.frontendLocalState;
+    const appState = globals.state;
+    const frontendState = globals.frontendLocalState;
     const {start, end} = frontendState.visibleWindowTime;
 
     const startNs = toNsFloor(start);
@@ -120,6 +95,11 @@
     const excludeList = appState.ftraceFilter.excludedNames;
     const excludeListSql = excludeList.map((s) => `'${s}'`).join(',');
 
+    // TODO(stevegolton): This query can be slow when traces are huge.
+    // The number of events is only used for correctly sizing the panel's
+    // scroll container so that the scrollbar works as if the panel were fully
+    // populated.
+    // Perhaps we could work out some UX that doesn't need this.
     let queryRes = await this.engine.query(`
       select count(id) as numEvents
       from ftrace_event
diff --git a/ui/src/controller/permalink_controller.ts b/ui/src/controller/permalink_controller.ts
index a382a40..ad58b27 100644
--- a/ui/src/controller/permalink_controller.ts
+++ b/ui/src/controller/permalink_controller.ts
@@ -26,6 +26,7 @@
 import {
   BUCKET_NAME,
   buggyToSha256,
+  deserializeStateObject,
   saveState,
   saveTrace,
   toSha256,
@@ -195,7 +196,7 @@
     }
     const text = await response.text();
     const stateHash = await toSha256(text);
-    const state = JSON.parse(text);
+    const state = deserializeStateObject(text);
     if (stateHash !== id) {
       // Old permalinks incorrectly dropped some digits from the
       // hexdigest of the SHA256. We don't want to invalidate those
diff --git a/ui/src/controller/record_controller.ts b/ui/src/controller/record_controller.ts
index 3f6eb05..5982af5 100644
--- a/ui/src/controller/record_controller.ts
+++ b/ui/src/controller/record_controller.ts
@@ -128,7 +128,8 @@
     return value.startsWith('MEMINFO_') || value.startsWith('VMSTAT_') ||
         value.startsWith('STAT_') || value.startsWith('LID_') ||
         value.startsWith('BATTERY_COUNTER_') || value === 'DISCARD' ||
-        value === 'RING_BUFFER';
+        value === 'RING_BUFFER' || value === 'BACKGROUND' ||
+        value === 'USER_INITIATED';
   }
   // Since javascript doesn't have 64 bit numbers when converting protos to
   // json the proto library encodes them as strings. This is lossy since
@@ -139,9 +140,10 @@
   function is64BitNumber(key: string): boolean {
     return [
       'maxFileSizeBytes',
+      'pid',
       'samplingIntervalBytes',
       'shmemSizeBytes',
-      'pid',
+      'timestampUnitMultiplier',
     ].includes(key);
   }
   function* message(msg: {}, indent: number): IterableIterator<string> {
@@ -414,7 +416,7 @@
       _callback: RPCImplCallback) {
     try {
       const state = globals.state;
-      // TODO(hjd): This is a bit weird. We implicity send each RPC message to
+      // TODO(hjd): This is a bit weird. We implicitly send each RPC message to
       // whichever target is currently selected (creating that target if needed)
       // it would be nicer if the setup/teardown was more explicit.
       const target = await this.getTargetController(state.recordingTarget);
diff --git a/ui/src/controller/trace_controller.ts b/ui/src/controller/trace_controller.ts
index f57105d..b704e87 100644
--- a/ui/src/controller/trace_controller.ts
+++ b/ui/src/controller/trace_controller.ts
@@ -113,7 +113,6 @@
   'android_dma_heap',
   'android_surfaceflinger',
   'android_batt',
-  'android_camera',
   'android_other_traces',
   'chrome_dropped_frames',
   'chrome_long_latency',
@@ -486,7 +485,7 @@
       // Pull out the counts ftrace events by name
       const query = `select
             name,
-            count(*) as cnt
+            count(name) as cnt
           from ftrace_event
           group by name
           order by cnt desc`;
diff --git a/ui/src/controller/track_decider.ts b/ui/src/controller/track_decider.ts
index 241e248..0653552 100644
--- a/ui/src/controller/track_decider.ts
+++ b/ui/src/controller/track_decider.ts
@@ -265,20 +265,21 @@
 
   async addGlobalAsyncTracks(engine: EngineProxy): Promise<void> {
     const rawGlobalAsyncTracks = await engine.query(`
-      with global_tracks as materialized (
+      with tracks_with_slices as materialized (
+        select distinct track_id
+        from slice
+      ),
+      global_tracks as (
         select
           track.parent_id as parent_id,
           track.id as track_id,
-          track.name as name,
-          count(1) cnt
+          track.name as name
         from track
-        join slice on slice.track_id = track.id
+        join tracks_with_slices on tracks_with_slices.track_id = track.id
         where
           track.type = "track"
           or track.type = "gpu_track"
           or track.type = "cpu_track"
-        group by track_id
-        having cnt > 0
       ),
       global_tracks_grouped as (
         select
@@ -405,45 +406,6 @@
     }
   }
 
-  async addGlobalCounterTracks(engine: EngineProxy): Promise<void> {
-    // Add global or GPU counter tracks that are not bound to any pid/tid.
-    const globalCounters = await engine.query(`
-    select name, id
-    from (
-      select name, id
-      from counter_track
-      where type = 'counter_track'
-      union
-      select name, id
-      from gpu_counter_track
-      where name != 'gpufreq'
-    )
-    order by name
-  `);
-
-    const it = globalCounters.iter({
-      name: STR,
-      id: NUM,
-    });
-
-    for (; it.valid(); it.next()) {
-      const name = it.name;
-      const trackId = it.id;
-      this.tracksToAdd.push({
-        engineId: this.engineId,
-        kind: COUNTER_TRACK_KIND,
-        name,
-        trackSortKey: PrimaryTrackSortKey.COUNTER_TRACK,
-        trackGroup: SCROLLING_TRACK_GROUP,
-        config: {
-          name,
-          trackId,
-          scale: getCounterScale(name),
-        },
-      });
-    }
-  }
-
   async addCpuPerfCounterTracks(engine: EngineProxy): Promise<void> {
     // Perf counter tracks are bound to CPUs, follow the scheduling and
     // frequency track naming convention ("Cpu N ...").
@@ -720,15 +682,12 @@
   }
 
   async addFtraceTrack(engine: EngineProxy): Promise<void> {
-    const query = `select
-            cpu,
-            count(*) as cnt
+    const query = `select distinct cpu
           from ftrace_event
-          where cpu + 1 > 1 or utid + 1 > 1
-          group by cpu`;
+          where cpu + 1 > 1 or utid + 1 > 1`;
 
     const result = await engine.query(query);
-    const it = result.iter({cpu: NUM, cnt: NUM});
+    const it = result.iter({cpu: NUM});
 
     let groupUuid = undefined;
     let summaryTrackId = undefined;
diff --git a/ui/src/frontend/chrome_slice_panel.ts b/ui/src/frontend/chrome_slice_panel.ts
index aee2fea..6c982cf 100644
--- a/ui/src/frontend/chrome_slice_panel.ts
+++ b/ui/src/frontend/chrome_slice_panel.ts
@@ -68,7 +68,12 @@
          JOIN process USING(upid)
          WHERE slice.id = ${slice.id!}
          )
-         SELECT * FROM android_monitor_contention_chain, slice_process
+         SELECT *,
+         IIF(blocked_thread_name LIKE 'binder:%', 'binder', blocked_thread_name)
+          AS blocked_thread_name_norm,
+         IIF(blocking_thread_name LIKE 'binder:%', 'binder', blocking_thread_name)
+          AS blocking_thread_name_norm
+         FROM android_monitor_contention_chain, slice_process
          WHERE android_monitor_contention_chain.upid = slice_process.upid;
 
          WITH
@@ -76,15 +81,15 @@
          SELECT
            id,
            dur,
-           CAT_STACKS(blocked_thread_name || ':' || short_blocked_method,
-             blocking_thread_name || ':' || short_blocking_method) AS stack
+           CAT_STACKS(blocked_thread_name_norm || ':' || short_blocked_method,
+             blocking_thread_name_norm || ':' || short_blocking_method) AS stack
          FROM FAST
          WHERE parent_id IS NULL
          UNION ALL
          SELECT
          c.id,
          c.dur AS dur,
-         CAT_STACKS(stack, blocking_thread_name || ':' || short_blocking_method) AS stack
+         CAT_STACKS(stack, blocking_thread_name_norm || ':' || short_blocking_method) AS stack
          FROM FAST c, R AS p
          WHERE p.id = c.parent_id
          )
diff --git a/ui/src/frontend/cpu_profile_panel.ts b/ui/src/frontend/cpu_profile_panel.ts
index 16861fd..6632f19 100644
--- a/ui/src/frontend/cpu_profile_panel.ts
+++ b/ui/src/frontend/cpu_profile_panel.ts
@@ -39,7 +39,7 @@
     if (!stack) return [];
 
     const result = [];
-    for (let i = 0; i < stack.length; i++) {
+    for (let i = stack.length - 1; i >= 0; --i) {
       result.push(m('tr', m('td', stack[i].name), m('td', stack[i].mapping)));
     }
 
diff --git a/ui/src/frontend/frontend_local_state.ts b/ui/src/frontend/frontend_local_state.ts
index b24f69a..34663d8 100644
--- a/ui/src/frontend/frontend_local_state.ts
+++ b/ui/src/frontend/frontend_local_state.ts
@@ -145,9 +145,11 @@
   selectArea(
       startSec: number, endSec: number,
       tracks = this._selectedArea ? this._selectedArea.tracks : []) {
-    assertTrue(endSec >= startSec);
+    assertTrue(
+        endSec >= startSec,
+        `Impossible select area: startSec [${startSec}] >= endSec [${endSec}]`);
     this.showPanningHint = true;
-    this._selectedArea = {startSec, endSec, tracks},
+    this._selectedArea = {startSec, endSec, tracks};
     globals.rafScheduler.scheduleFullRedraw();
   }
 
diff --git a/ui/src/frontend/ftrace_panel.ts b/ui/src/frontend/ftrace_panel.ts
index 29d0207..8de83cb 100644
--- a/ui/src/frontend/ftrace_panel.ts
+++ b/ui/src/frontend/ftrace_panel.ts
@@ -105,6 +105,11 @@
   onremove({dom}: m.CVnodeDOM) {
     const sc = this.scrollContainer(dom);
     sc.removeEventListener('scroll', this.onScroll);
+
+    globals.dispatch(Actions.updateFtracePagination({
+      offset: 0,
+      count: 0,
+    }));
   }
 
   onScroll = (e: Event) => {
diff --git a/ui/src/frontend/index.ts b/ui/src/frontend/index.ts
index 9c3cba5..cef61e8 100644
--- a/ui/src/frontend/index.ts
+++ b/ui/src/frontend/index.ts
@@ -28,10 +28,10 @@
 import {onSelectionChanged} from '../common/selection_observer';
 import {State} from '../common/state';
 import {initWasm} from '../common/wasm_engine_proxy';
+import {initController, runControllers} from '../controller';
 import {
   isGetCategoriesResponse,
 } from '../controller/chrome_proxy_record_controller';
-import {initController, runControllers} from '../controller/index';
 
 import {AnalyzePage} from './analyze_page';
 import {initCssConstants} from './css_constants';
diff --git a/ui/src/frontend/pan_and_zoom_handler.ts b/ui/src/frontend/pan_and_zoom_handler.ts
index 5f2413c..7018e34 100644
--- a/ui/src/frontend/pan_and_zoom_handler.ts
+++ b/ui/src/frontend/pan_and_zoom_handler.ts
@@ -47,7 +47,7 @@
 const PAN_CURSOR = 'move';
 
 // Use key mapping based on the 'KeyboardEvent.code' property vs the
-// 'KeyboardEvent.key', because the the former corresponds to the physical key
+// 'KeyboardEvent.key', because the former corresponds to the physical key
 // position rather than the glyph printed on top of it, and is unaffected by
 // the user's keyboard layout.
 // For example, 'KeyW' always corresponds to the key at the physical location of
diff --git a/ui/src/frontend/query_result_tab.ts b/ui/src/frontend/query_result_tab.ts
index 670101a..e0eb644 100644
--- a/ui/src/frontend/query_result_tab.ts
+++ b/ui/src/frontend/query_result_tab.ts
@@ -68,41 +68,30 @@
   constructor(args: NewBottomTabArgs) {
     super(args);
 
+    this.initTrack(args);
+  }
+
+  async initTrack(args: NewBottomTabArgs) {
+    let uuid = '';
     if (this.config.prefetchedResponse !== undefined) {
       this.queryResponse = this.config.prefetchedResponse;
+      uuid = args.uuid;
     } else {
-      runQuery(this.config.query, this.engine)
-          .then(async (result: QueryResponse) => {
-            this.queryResponse = result;
-            globals.rafScheduler.scheduleFullRedraw();
+      const result = await runQuery(this.config.query, this.engine);
+      this.queryResponse = result;
+      globals.rafScheduler.scheduleFullRedraw();
+      if (result.error !== undefined) {
+        return;
+      }
 
-            if (result.error !== undefined) {
-              return;
-            }
+      uuid = uuidv4();
+    }
 
-            const uuid = uuidv4();
-            const viewId = uuidToViewName(uuid);
-            // Assuming that it was a SELECT query, try creating a view to allow
-            // us to reuse it for further queries.
-            // TODO(altimin): This should get the actual query that was used to
-            // generate the results from the SQL query iterator.
-            try {
-              const createViewResult = await this.engine.query(
-                  `create view ${viewId} as ${this.config.query}`);
-              if (createViewResult.error()) {
-                // If it failed, do nothing.
-                return;
-              }
-            } catch (e) {
-              if (e instanceof QueryError) {
-                // If it failed, do nothing.
-                return;
-              }
-              throw e;
-            }
-            this.sqlViewName = viewId;
-            globals.rafScheduler.scheduleFullRedraw();
-          });
+    if (uuid !== '') {
+      this.sqlViewName = await this.createViewForDebugTrack(uuid);
+      if (this.sqlViewName) {
+        globals.rafScheduler.scheduleFullRedraw();
+      }
     }
   }
 
@@ -139,6 +128,29 @@
   }
 
   renderTabCanvas() {}
+
+  async createViewForDebugTrack(uuid: string): Promise<string> {
+    const viewId = uuidToViewName(uuid);
+    // Assuming that the query results come from a SELECT query, try creating a
+    // view to allow us to reuse it for further queries.
+    // TODO(altimin): This should get the actual query that was used to
+    // generate the results from the SQL query iterator.
+    try {
+      const createViewResult = await this.engine.query(
+          `create view ${viewId} as ${this.config.query}`);
+      if (createViewResult.error()) {
+        // If it failed, do nothing.
+        return '';
+      }
+    } catch (e) {
+      if (e instanceof QueryError) {
+        // If it failed, do nothing.
+        return '';
+      }
+      throw e;
+    }
+    return viewId;
+  }
 }
 
 bottomTabRegistry.register(QueryResultTab);
diff --git a/ui/src/frontend/thread_state.ts b/ui/src/frontend/thread_state.ts
index 818e5c2..c7031f2 100644
--- a/ui/src/frontend/thread_state.ts
+++ b/ui/src/frontend/thread_state.ts
@@ -50,7 +50,7 @@
   threadStateSqlId: ThreadStateSqlId;
   // Id of the corresponding entry in the |sched| table.
   schedSqlId?: SchedSqlId;
-  // Timestamp of the the beginning of this thread state in nanoseconds.
+  // Timestamp of the beginning of this thread state in nanoseconds.
   ts: TPTimestamp;
   // Duration of this thread state in nanoseconds.
   dur: number;
diff --git a/ui/src/frontend/value.ts b/ui/src/frontend/value.ts
index a31e38f..9b866b0 100644
--- a/ui/src/frontend/value.ts
+++ b/ui/src/frontend/value.ts
@@ -60,7 +60,7 @@
   items: {[name: string]: Value},
 }&ValueParams;
 
-// Helper function to simplify creation of an dictionary.
+// Helper function to simplify creation of a dictionary.
 // This function accepts and filters out nulls as values in the passed
 // dictionary (useful for simplifying the code to render optional values).
 export function dict(
diff --git a/ui/src/frontend/viewer_page.ts b/ui/src/frontend/viewer_page.ts
index 996cae6..d3651e7 100644
--- a/ui/src/frontend/viewer_page.ts
+++ b/ui/src/frontend/viewer_page.ts
@@ -15,6 +15,7 @@
 import m from 'mithril';
 
 import {Actions} from '../common/actions';
+import {featureFlags} from '../common/feature_flags';
 import {TimeSpan} from '../common/time';
 
 import {TRACK_SHELL_WIDTH} from './css_constants';
@@ -35,6 +36,13 @@
 
 const SIDEBAR_WIDTH = 256;
 
+const OVERVIEW_PANEL_FLAG = featureFlags.register({
+  id: 'overviewVisible',
+  name: 'Overview Panel',
+  description: 'Show the panel providing an overview of the trace',
+  defaultValue: true,
+});
+
 // Checks if the mousePos is within 3px of the start or end of the
 // current selected time range.
 function onTimeRangeBoundary(mousePos: number): 'START'|'END'|null {
@@ -252,6 +260,11 @@
       } as TrackGroupAttrs));
     }
 
+    const overviewPanel = [];
+    if (OVERVIEW_PANEL_FLAG.get()) {
+      overviewPanel.push(m(OverviewTimelinePanel, {key: 'overview'}));
+    }
+
     return m(
         '.page',
         m('.split-panel',
@@ -269,7 +282,7 @@
             m('.pinned-panel-container', m(PanelContainer, {
                 doesScroll: false,
                 panels: [
-                  m(OverviewTimelinePanel, {key: 'overview'}),
+                  ...overviewPanel,
                   m(TimeAxisPanel, {key: 'timeaxis'}),
                   m(TimeSelectionPanel, {key: 'timeselection'}),
                   m(NotesPanel, {key: 'notes'}),
diff --git a/ui/src/frontend/widgets/button.ts b/ui/src/frontend/widgets/button.ts
index 28df66a..6c90c2e 100644
--- a/ui/src/frontend/widgets/button.ts
+++ b/ui/src/frontend/widgets/button.ts
@@ -35,6 +35,8 @@
   disabled?: boolean;
   // Optional right icon.
   rightIcon?: string;
+  // List of space separated class names forwarded to the icon.
+  className?: string;
   // Remaining attributes forwarded to the underlying HTML <button>.
   [htmlAttrs: string]: any;
 }
@@ -63,6 +65,7 @@
       minimal = false,
       disabled = false,
       rightIcon,
+      className,
       ...htmlAttrs
     } = attrs;
 
@@ -72,6 +75,7 @@
         compact && 'pf-compact',
         minimal && 'pf-minimal',
         (icon && !label) && 'pf-icon-only',
+        className,
     );
 
     return m(
diff --git a/ui/src/frontend/widgets/form.ts b/ui/src/frontend/widgets/form.ts
new file mode 100644
index 0000000..64bf1ee
--- /dev/null
+++ b/ui/src/frontend/widgets/form.ts
@@ -0,0 +1,61 @@
+// Copyright (C) 2023 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import m from 'mithril';
+import {classNames} from '../classnames';
+
+interface FormAttrs {
+  // List of space separated class names forwarded to the icon.
+  className?: string;
+  // Remaining attributes forwarded to the underlying HTML <button>.
+  [htmlAttrs: string]: any;
+}
+
+export class Form implements m.ClassComponent<FormAttrs> {
+  view({attrs, children}: m.CVnode<FormAttrs>) {
+    const {className, ...htmlAttrs} = attrs;
+
+    const classes = classNames(
+        'pf-form',
+        className,
+    );
+
+    return m(
+        'form.pf-form',
+        {
+          class: classes,
+          ...htmlAttrs,
+        },
+        children,
+    );
+  }
+}
+
+export class FormButtonBar implements m.ClassComponent<{}> {
+  view({children}: m.CVnode<{}>) {
+    return m('.pf-form-button-bar', children);
+  }
+}
+
+interface FormLabelAttrs {
+  for: string;
+  // Remaining attributes forwarded to the underlying HTML <button>.
+  [htmlAttrs: string]: any;
+}
+
+export class FormLabel implements m.ClassComponent<FormLabelAttrs> {
+  view({attrs, children}: m.CVnode<FormLabelAttrs>) {
+    return m('label.pf-form-label', attrs, children);
+  }
+}
diff --git a/ui/src/frontend/widgets_page.ts b/ui/src/frontend/widgets_page.ts
index 2c2ca9b..8b7b2e3 100644
--- a/ui/src/frontend/widgets_page.ts
+++ b/ui/src/frontend/widgets_page.ts
@@ -24,6 +24,7 @@
 import {Button} from './widgets/button';
 import {Checkbox} from './widgets/checkbox';
 import {EmptyState} from './widgets/empty_state';
+import {Form, FormButtonBar, FormLabel} from './widgets/form';
 import {Icon} from './widgets/icon';
 import {Menu, MenuDivider, MenuItem, PopupMenu2} from './widgets/menu';
 import {MultiSelect, MultiSelectDiff} from './widgets/multiselect';
@@ -540,7 +541,7 @@
                     PopupMenu2,
                     {
                       trigger: m(Anchor, {
-                        text: 'SELECT * FROM raw WHERE id = 123',
+                        text: 'SELECT * FROM ftrace_event WHERE id = 123',
                         icon: 'unfold_more',
                       }),
                     },
@@ -585,6 +586,24 @@
           },
           wide: true,
         }),
+        m('h2', 'Form'),
+        m(
+          WidgetShowcase, {
+            renderWidget: () => m(
+              Form,
+              m(FormLabel, {for: 'foo'}, 'Foo'),
+              m(TextInput, {id: 'foo'}),
+              m(FormLabel, {for: 'bar'}, 'Bar'),
+              m(Select, {id: 'bar'}, [
+                m('option', {value: 'foo', label: 'Foo'}),
+                m('option', {value: 'bar', label: 'Bar'}),
+                m('option', {value: 'baz', label: 'Baz'}),
+              ]),
+              m(FormButtonBar,
+                m(Button, {label: 'Submit', rightIcon: 'chevron_right'}),
+                m(Button, {label: 'Cancel', minimal: true}),
+              )),
+          }),
     );
   },
 });
diff --git a/ui/src/tracks/counter/index.ts b/ui/src/tracks/counter/index.ts
index e495499..9aa8f74 100644
--- a/ui/src/tracks/counter/index.ts
+++ b/ui/src/tracks/counter/index.ts
@@ -32,8 +32,9 @@
 } from '../../controller/track_controller';
 import {checkerboardExcept} from '../../frontend/checkerboard';
 import {globals} from '../../frontend/globals';
-import {PopupMenuButton, PopupMenuItem} from '../../frontend/popup_menu';
 import {NewTrackArgs, Track} from '../../frontend/track';
+import {Button} from '../../frontend/widgets/button';
+import {MenuItem, PopupMenu2} from '../../frontend/widgets/menu';
 
 export const COUNTER_TRACK_KIND = 'CounterTrack';
 
@@ -259,18 +260,11 @@
       {name: 'DELTA_FROM_PREVIOUS', humanName: 'Delta'},
       {name: 'RATE', humanName: 'Rate'},
     ];
-    const items: PopupMenuItem[] = [];
-    for (const scale of scales) {
-      let text;
-      if (currentScale === scale.name) {
-        text = `*${scale.humanName}*`;
-      } else {
-        text = scale.humanName;
-      }
-      items.push({
-        itemType: 'regular',
-        text,
-        callback: () => {
+    const menuItems = scales.map((scale) => {
+      return m(MenuItem, {
+        label: scale.humanName,
+        active: currentScale === scale.name,
+        onclick: () => {
           this.config.scale = scale.name;
           Actions.updateTrackConfig({
             id: this.trackState.id,
@@ -278,11 +272,15 @@
           });
         },
       });
-    }
-    return m(PopupMenuButton, {
-      icon: 'show_chart',
-      items,
     });
+
+    return m(
+        PopupMenu2,
+        {
+          trigger: m(Button, {icon: 'show_chart', minimal: true}),
+        },
+        menuItems,
+    );
   }
 
   renderCanvas(ctx: CanvasRenderingContext2D): void {
diff --git a/ui/src/tracks/debug/add_debug_track_menu.ts b/ui/src/tracks/debug/add_debug_track_menu.ts
index 8b04415..2982773 100644
--- a/ui/src/tracks/debug/add_debug_track_menu.ts
+++ b/ui/src/tracks/debug/add_debug_track_menu.ts
@@ -16,9 +16,10 @@
 
 import {EngineProxy} from '../../common/engine';
 import {Button} from '../../frontend/widgets/button';
+import {Form, FormButtonBar, FormLabel} from '../../frontend/widgets/form';
 import {Select} from '../../frontend/widgets/select';
 import {TextInput} from '../../frontend/widgets/text_input';
-import {Tree, TreeNode} from '../../frontend/widgets/tree';
+
 import {addDebugTrack, SliceColumns} from './slice_track';
 
 export const ARG_PREFIX = 'arg_';
@@ -67,51 +68,59 @@
               },
               column));
       }
-      return m(TreeNode, {
-        left: name,
-        right: m(
-            Select,
-            {
-              oninput: (e: Event) => {
-                if (!e.target) return;
-                this.sliceColumns[name] = (e.target as HTMLSelectElement).value;
-              },
+      return [
+        m(FormLabel,
+          {for: name,
+          },
+          name),
+        m(Select,
+          {
+            id: name,
+            oninput: (e: Event) => {
+              if (!e.target) return;
+              this.sliceColumns[name] = (e.target as HTMLSelectElement).value;
             },
-            options),
-      });
+          },
+          options),
+      ];
     };
-    return [
-      m(
-          Tree,
-          m(TreeNode, {
-            left: 'Name',
-            right: m(TextInput, {
-              onkeydown: (e: KeyboardEvent) => {
-                // Allow Esc to close popup.
-                if (e.key === 'Escape') return;
-                e.stopPropagation();
-              },
-              oninput: (e: KeyboardEvent) => {
-                if (!e.target) return;
-                this.name = (e.target as HTMLInputElement).value;
+    return m(
+        Form,
+        m(FormLabel,
+          {for: 'track_name',
+          },
+          'Name'),
+        m(TextInput, {
+          id: 'track_name',
+          onkeydown: (e: KeyboardEvent) => {
+            // Allow Esc to close popup.
+            if (e.key === 'Escape') return;
+            e.stopPropagation();
+          },
+          oninput: (e: KeyboardEvent) => {
+            if (!e.target) return;
+            this.name = (e.target as HTMLInputElement).value;
+          },
+        }),
+        renderSelect('ts'),
+        renderSelect('dur'),
+        renderSelect('name'),
+        m(
+            FormButtonBar,
+            m(Button, {
+              label: 'Show',
+              className: 'pf-close-parent-popup-on-click',
+              onclick: (e: Event) => {
+                e.preventDefault();
+                addDebugTrack(
+                    vnode.attrs.engine,
+                    vnode.attrs.sqlViewName,
+                    this.name,
+                    this.sliceColumns,
+                    vnode.attrs.columns);
               },
             }),
-          }),
-          renderSelect('ts'),
-          renderSelect('dur'),
-          renderSelect('name'),
-          ),
-      m(Button, {
-        label: 'Show',
-        onclick: () => {
-          addDebugTrack(
-              vnode.attrs.engine,
-              vnode.attrs.sqlViewName,
-              this.name,
-              this.sliceColumns,
-              vnode.attrs.columns);
-        },
-      }),
-    ];
+            ),
+    );
   }
 }
diff --git a/ui/src/tracks/ftrace/index.ts b/ui/src/tracks/ftrace/index.ts
index e82934d..e5913fa 100644
--- a/ui/src/tracks/ftrace/index.ts
+++ b/ui/src/tracks/ftrace/index.ts
@@ -29,12 +29,7 @@
 
 
 export interface Data extends TrackData {
-  // Total number of  events within [start, end], before any quantization.
-  numEvents: number;
-
-  // Below: data quantized by resolution and aggregated by event priority.
   timestamps: Float64Array;
-
   names: string[];
 }
 
@@ -68,7 +63,6 @@
       select
         cast(ts / ${quantNs} as integer) * ${quantNs} as tsQuant,
         type,
-        count(type) as numEvents,
         name
       from ftrace_event
       where
@@ -78,23 +72,21 @@
       order by tsQuant limit ${LIMIT};`);
 
     const rowCount = queryRes.numRows();
-    const result = {
+    const result: Data = {
       start,
       end,
       resolution,
       length: rowCount,
-      numEvents: 0,
       timestamps: new Float64Array(rowCount),
       names: [],
-    } as Data;
+    };
 
     const it = queryRes.iter(
-        {tsQuant: NUM, type: STR, numEvents: NUM, name: STR},
+        {tsQuant: NUM, type: STR, name: STR},
     );
     for (let row = 0; it.valid(); it.next(), row++) {
       result.timestamps[row] = fromNs(it.tsQuant);
       result.names[row] = it.name;
-      result.numEvents += it.numEvents;
     }
     return result;
   }
diff --git a/ui/tsconfig.base.json b/ui/tsconfig.base.json
index 9709c8d..ce1d45b 100644
--- a/ui/tsconfig.base.json
+++ b/ui/tsconfig.base.json
@@ -1,7 +1,7 @@
 {
   "compilerOptions": {
     "baseUrl": ".",
-    "target": "es6",
+    "target": "es2020",
     "module": "commonjs",
     "moduleResolution": "node",
     // Lints and checks.