Test-Traces 完整分析与优化方案
生成时间 : 2026-04-30 14:11:04 分析引擎 : SmartPerfetto (backend skills) 分析 Trace 数: 6
目录
- [Launch Light (轻量启动)](#Launch Light (轻量启动) "#launchlightpftrace")
- [Launch Heavy (重度启动)](#Launch Heavy (重度启动) "#lacunhheavypftrace")
- [Scroll Standard AOSP (无预动画)](#Scroll Standard AOSP (无预动画) "#scrollStandardAOSPAppWithoutPreAnimationpftrace")
- [Scroll Demo Customer](#Scroll Demo Customer "#scrolldemocustomerscrollpftrace")
- [Scroll Flutter SurfaceView (微信阅读)](#Scroll Flutter SurfaceView (微信阅读) "#ScrollFlutterSurfaceViewWechatWenyiwenpftrace")
- [Scroll Flutter TextureView (327项目)](#Scroll Flutter TextureView (327项目) "#ScrollFlutter327TextureViewpftrace")
Launch Light (轻量启动)
| 字段 | 值 |
|---|---|
| 文件名 | launch_light.pftrace |
| 文件大小 | 10.5 MB |
| 分析说明 | 冷/温启动性能分析 |
| Trace ID | 274b33a8-494b-4abc-9140-f56b9cbe7f73 |
📊 Skill: startup_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
检测到的启动事件 (共 1 行)
| 启动 ID | 包名 | 启动类型 | 耗时 | 开始时间 | 结束时间 | 耗时 | TTID | TTFD | 评级 |
|---|---|---|---|---|---|---|---|---|---|
| 1 | com.example.androidappdemo | 冷启动 | 301.839437 | 40919843208025 | 40920145047462 | 301839437 | 299.818888 | - | 优秀 |
启动数据质量 (共 1 行)
| 样本数 | 阻断问题 | 告警问题 | 门禁状态 | 问题编码 | 说明 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | PASS | 数据质量通过,允许进入深度分析 |
启动延迟归因分析 (共 15 行)
| 延迟原因 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 占比 | 类别 |
|---|---|---|---|---|---|---|
| choreographer_do_frame | 79 | 51.034834 | 0.65 | 13.26 | 16.9 | Other |
| launch_delay | 1 | 43.761881 | 43.76 | 43.76 | 14.5 | Other |
| inflate | 57 | 42.633743 | 0.75 | 4.42 | 14.1 | Layout |
| bind_application | 130 | 33.008791 | 0.25 | 1.53 | 10.9 | IO |
| Running | 98 | 32.885134 | 0.34 | 5.32 | 10.9 | Other |
| activity_start | 91 | 32.059491 | 0.35 | 3.48 | 10.6 | Other |
| binder | 236 | 27.483396 | 0.12 | 5.19 | 9.1 | IPC |
| resources_manager_get_resources | 55 | 14.214194 | 0.26 | 1.88 | 4.7 | Other |
| activity_resume | 80 | 11.92542 | 0.15 | 1.12 | 4 | Other |
| R+ | 22 | 2.954387 | 0.13 | 1.24 | 1 | Other |
| client_transaction_executed | 10 | 2.818442 | 0.28 | 1.63 | 0.9 | IO |
| S | 3 | 2.723551 | 0.91 | 2.47 | 0.9 | Other |
| R | 21 | 1.215292 | 0.06 | 0.32 | 0.4 | Other |
| art_lock_contention | 364 | 1.127634 | 0 | 0.56 | 0.4 | IO |
| dlopen | 15 | 1.048219 | 0.07 | 0.49 | 0.3 | IO |
主线程耗时操作 Top15 (共 15 行)
| 操作名称 | 线程 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 启动占比 | 启动类型 |
|---|---|---|---|---|---|---|---|
| clientTransactionExecuted | .androidappdemo | 1 | 108.412475 | 108.41 | 108.41 | 35.9 | |
| activityStart | .androidappdemo | 1 | 86.484416 | 86.48 | 86.48 | 28.7 | |
| performCreate:com.example.androidappdemo.MainActivity | .androidappdemo | 1 | 59.000733 | 59 | 59 | 19.5 | |
| traversal | .androidappdemo | 2 | 53.494222 | 26.75 | 52.45 | 17.7 | |
| inflate | .androidappdemo | 3 | 53.264444 | 17.75 | 41.97 | 17.6 | |
| Choreographer#doFrame 137576 | .androidappdemo | 1 | 52.511352 | 52.51 | 52.51 | 17.4 | |
| bindApplication | .androidappdemo | 1 | 48.975546 | 48.98 | 48.98 | 16.2 | |
| ResourcesImpl#updateConfiguration | .androidappdemo | 4 | 31.509318 | 7.88 | 13.27 | 10.4 | |
| activityResume | .androidappdemo | 1 | 19.051188 | 19.05 | 19.05 | 6.3 | |
| Mutator threads suspended for EnableDebugFeatures | .androidappdemo | 1 | 17.796631 | 17.8 | 17.8 | 5.9 | |
| ResourcesManager#applyConfigurationToResources | .androidappdemo | 1 | 17.10966 | 17.11 | 17.11 | 5.7 | |
| measure | .androidappdemo | 1 | 14.660401 | 14.66 | 14.66 | 4.9 | |
| ResourcesManager#getResources | .androidappdemo | 2 | 13.731405 | 6.87 | 7.05 | 4.5 | |
| binder transaction | .androidappdemo | 4 | 13.482421 | 3.37 | 5.25 | 4.5 | |
| ActivityThreadMain | .androidappdemo | 1 | 7.903158 | 7.9 | 7.9 | 2.6 |
主线程文件 IO Top15 (共 5 行)
| IO 操作 | 线程 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 启动占比 | 启动类型 |
|---|---|---|---|---|---|---|---|
| Mutator threads suspended for EnableDebugFeatures | .androidappdemo | 1 | 17.796631 | 17.8 | 17.8 | 5.9 | |
| ActivityThreadMain | .androidappdemo | 1 | 7.903158 | 7.9 | 7.9 | 2.6 | |
| ProfileInstallerInitializer | .androidappdemo | 1 | 1.514567 | 1.51 | 1.51 | 0.5 | |
| OpenDexFilesFromOat(/data/app/~~xmhXNkTvnKP6yATdBPs4VA==/com | .androidappdemo | 1 | 0.89738 | 0.9 | 0.9 | 0.3 | |
| dlopen: libframework-connectivity-tiramisu-jni.so | .androidappdemo | 1 | 0.515747 | 0.52 | 0.52 | 0.2 |
启动期间 Binder 调用 (共 15 行)
| 服务进程 | AIDL 方法 | 调用次数 | 总耗时 | 平均耗时 | 最大耗时 | 主线程调用 | 启动占比 |
|---|---|---|---|---|---|---|---|
| /vendor/bin/hw/android.hardware.graphics.allocator-V2-servic | - | 9 | 12.867554 | 1.43 | 3.02 | 0 | 4.3 |
| system_server | AIDL::java::IActivityManager::attachApplication::server | 1 | 5.254597 | 5.25 | 5.25 | 1 | 1.7 |
| /system/bin/servicemanager | - | 18 | 4.057371 | 0.23 | 1.01 | 11 | 1.3 |
| system_server | AIDL::java::IActivityManager::finishAttachApplication::serve | 1 | 2.939087 | 2.94 | 2.94 | 1 | 1 |
| system_server | AIDL::java::IWindowSession::addToDisplayAsUser::server | 1 | 2.706624 | 2.71 | 2.71 | 1 | 0.9 |
| system_server | AIDL::java::IWindowSession::relayout::server | 1 | 2.582113 | 2.58 | 2.58 | 1 | 0.9 |
| system_server | AIDL::java::IContentProvider::#21::server | 4 | 1.943685 | 0.49 | 0.86 | 4 | 0.6 |
| system_server | AIDL::java::IHintManager::getSessionChannel::server | 1 | 1.277222 | 1.28 | 1.28 | 0 | 0.4 |
| system_server | AIDL::java::IHintManager::createHintSessionWithConfig::serve | 1 | 0.914632 | 0.91 | 0.91 | 0 | 0.3 |
| system_server | AIDL::java::IActivityManager::checkPermissionForDevice::serv | 3 | 0.733195 | 0.24 | 0.49 | 3 | 0.2 |
| system_server | AIDL::java::IActivityManager::publishContentProviders::serve | 1 | 0.673096 | 0.67 | 0.67 | 1 | 0.2 |
| system_server | AIDL::java::IWindowManager::openSession::server | 1 | 0.630859 | 0.63 | 0.63 | 1 | 0.2 |
| system_server | AIDL::java::IPackageManager::getApplicationInfo::server | 2 | 0.606323 | 0.3 | 0.48 | 2 | 0.2 |
| system_server | AIDL::java::IDisplayManager::registerCallbackWithEventMask:: | 2 | 0.605712 | 0.3 | 0.47 | 1 | 0.2 |
| system_server | AIDL::java::IGraphicsStats::requestBufferForProcess::server | 1 | 0.575724 | 0.58 | 0.58 | 1 | 0.2 |
主线程同步 Binder 调用 (共 15 行)
| 服务进程 | AIDL 方法 | 调用次数 | 总耗时 | 平均耗时 | 最大耗时 | 启动占比 |
|---|---|---|---|---|---|---|
| system_server | AIDL::java::IActivityManager::attachApplication::server | 1 | 5.254597 | 5.25 | 5.25 | 1.7 |
| system_server | AIDL::java::IActivityManager::finishAttachApplication::serve | 1 | 2.939087 | 2.94 | 2.94 | 1 |
| system_server | AIDL::java::IWindowSession::addToDisplayAsUser::server | 1 | 2.706624 | 2.71 | 2.71 | 0.9 |
| system_server | AIDL::java::IWindowSession::relayout::server | 1 | 2.582113 | 2.58 | 2.58 | 0.9 |
| /system/bin/servicemanager | - | 11 | 2.053545 | 0.19 | 0.41 | 0.7 |
| system_server | AIDL::java::IContentProvider::#21::server | 4 | 1.943685 | 0.49 | 0.86 | 0.6 |
| system_server | AIDL::java::IActivityManager::checkPermissionForDevice::serv | 3 | 0.733195 | 0.24 | 0.49 | 0.2 |
| system_server | AIDL::java::IActivityManager::publishContentProviders::serve | 1 | 0.673096 | 0.67 | 0.67 | 0.2 |
| system_server | AIDL::java::IWindowManager::openSession::server | 1 | 0.630859 | 0.63 | 0.63 | 0.2 |
| system_server | AIDL::java::IPackageManager::getApplicationInfo::server | 2 | 0.606323 | 0.3 | 0.48 | 0.2 |
| system_server | AIDL::java::IGraphicsStats::requestBufferForProcess::server | 1 | 0.575724 | 0.58 | 0.58 | 0.2 |
| system_server | AIDL::java::IActivityManager::getContentProvider::server | 1 | 0.54895 | 0.55 | 0.55 | 0.2 |
| system_server | AIDL::java::IPackageManager::getProviderInfo::server | 1 | 0.501913 | 0.5 | 0.5 | 0.2 |
| system_server | AIDL::java::IPackageManager::getActivityInfo::server | 2 | 0.473022 | 0.24 | 0.32 | 0.2 |
| system_server | AIDL::java::IDisplayManager::getDisplayInfo::server | 1 | 0.472534 | 0.47 | 0.47 | 0.2 |
启动期间主线程状态 (共 5 行)
| 状态 | 状态说明 | 总耗时 | 占比 | 次数 | 阻塞函数 |
|---|---|---|---|---|---|
| Running | Running (CPU执行) | 206.707638 | 68.5 | 152 | - |
| S | Sleeping (主动睡眠) | 41.505654 | 13.8 | 75 | - |
| R | Runnable (等待调度) | 7.124313 | 2.4 | 121 | - |
| R+ | Runnable+ (抢占等待) | 3.107422 | 1 | 27 | - |
| D | Disk Sleep (IO等待) | 0.183676 | 0.1 | 6 | - |
证据矩阵 (共 5 行)
| 分析项 | 主指标 | 主指标值 | 异常阈值 | 佐证指标 | 佐证值 | 佐证阈值 | 判定 |
|---|---|---|---|---|---|---|---|
| MainThread Hot Slice | main_thread_slices.percent_of_startup | 35.9 | >20% OR max_dur_ms>100 | main_thread_slices.max_dur_ms | 108.41 | >100ms | confirmed |
| MainThread File IO | main_thread_file_io.percent_of_startup | 5.9 | >5% | main_thread_file_io.total_dur_ms | 17.8 | >50ms | needs_corroboration |
| Binder Total | startup_binder.percent_of_startup | 4.3 | >20% | main_sync_binder.percent_of_startup | 1.7 | >5% | normal |
| Main Sync Binder | main_sync_binder.percent_of_startup | 1.7 | >8% | main_binder_blocking.dur_ms | 5.25 | >16ms | normal |
| Sched Latency | sched_latency.severe_delays | 0 | >3 | sched_latency.max_wait_ms | 0.66 | >8ms | normal |
主线程 Binder 阻塞分析 (共 3 行)
| 服务进程 | AIDL 方法 | 耗时 | 阻塞状态 | 阻塞函数 | 时间戳 | 严重程度 |
|---|---|---|---|---|---|---|
| system_server | AIDL::java::IActivityManager::attachApplication::server | 5.254597 | S | - | 40919923155535 | normal |
| system_server | AIDL::java::IActivityManager::attachApplication::server | 5.254597 | R | - | 40919923155535 | normal |
| system_server | AIDL::java::IActivityManager::attachApplication::server | 5.254597 | Running | - | 40919923155535 | normal |
启动期间类加载 (共 10 行)
| 类名 | 线程 | 次数 | 总耗时 | 平均耗时 | 启动占比 |
|---|---|---|---|---|---|
| Lcom/example/androidappdemo/MainActivity; | .androidappdemo | 1 | 0.673746 | 0.67 | 0.2 |
| Landroidx/appcompat/app/AppCompatActivity; | .androidappdemo | 1 | 0.551758 | 0.55 | 0.2 |
| Landroidx/fragment/app/FragmentActivity; | .androidappdemo | 1 | 0.445598 | 0.45 | 0.1 |
| Landroidx/activity/ComponentActivity; | .androidappdemo | 1 | 0.361329 | 0.36 | 0.1 |
| Landroidx/fragment/app/FragmentManager$7; | .androidappdemo | 1 | 0.265422 | 0.27 | 0.1 |
| Landroidx/appcompat/view/menu/ActionMenuItemView; | .androidappdemo | 1 | 0.262532 | 0.26 | 0.1 |
| Landroidx/appcompat/widget/ActionMenuView; | .androidappdemo | 1 | 0.243409 | 0.24 | 0.1 |
| Landroidx/core/widget/NestedScrollView; | .androidappdemo | 1 | 0.241089 | 0.24 | 0.1 |
| Landroidx/coordinatorlayout/widget/CoordinatorLayout; | .androidappdemo | 1 | 0.225993 | 0.23 | 0.1 |
| Lcom/google/android/material/floatingactionbutton/FloatingAc | .androidappdemo | 1 | 0.224976 | 0.22 | 0.1 |
启动期间 GC : (无数据)
启动期间调度延迟 (共 2 行)
| 状态 | 次数 | 总等待 | 平均等待 | 最大等待 | 严重延迟次数 |
|---|---|---|---|---|---|
| R | 121 | 7.124313 | 0.06 | 0.66 | 0 |
| R+ | 27 | 3.107422 | 0.12 | 1.24 | 0 |
📋 优化方案与行动计划
结论 : 应用启动分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:Binder 调用阻塞启动
涉及 Skill : startup_binder_in_range, startup_main_thread_sync_binder_in_range
- 主线程同步 Binder 调用(如
attachApplication)阻塞启动进度 - Action Plan :
- 检查
system_server端 Binder 处理线程池是否足够 - 使用异步 Binder 调用(
oneway)替代同步调用 - 减少
ActivityManagerService中的 CPU 密集型操作 - 考虑使用
AppWidget/JobScheduler延时非关键 Binder 通信
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
startup_analysis- 子 Skill:
binder_blocking_in_range - 子 Skill:
binder_in_range - 子 Skill:
cpu_topology_view - 子 Skill:
main_thread_file_io_in_range - 子 Skill:
main_thread_sched_latency_in_range - 子 Skill:
main_thread_slices_in_range - 子 Skill:
startup_binder_in_range - 子 Skill:
startup_binder_pool_analysis
- 子 Skill:
📊 Skill: cpu_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
目标进程 (共 1 行)
| UPID | PID | 进程名 |
|---|---|---|
| 923 | 8111 | com.example.androidappdemo |
大小核分布(基于 capacity) (共 3 行)
| 核心类型 | Capacity | 运行时间 | 占比 | 调度次数 | 核心数 |
|---|---|---|---|---|---|
| prime (超大核) | 0 | 1264.32186 | 79.7 | 1635 | 2 |
| medium (中核) | 0 | 102.305468 | 6.4 | 320 | 4 |
| big (大核) | 0 | 220.689777 | 13.9 | 326 | 2 |
线程 CPU 使用 Top10 (共 10 行)
| TID | 线程名 | CPU 时间 | 调度次数 | 平均片长 | 线程类型 | 大核占比 |
|---|---|---|---|---|---|---|
| 8123 | Jit thread pool | 838.755986 | 1367 | 0.614 | worker | 98.5 |
| 8111 | .androidappdemo | 371.194862 | 258 | 1.439 | main | 92.2 |
| 8253 | EmojiCompatInit | 285.057374 | 26 | 10.964 | worker | 87.8 |
| 8170 | RenderThread | 45.661702 | 118 | 0.387 | worker | 85.7 |
| 8219 | binder:8111_4 | 19.284669 | 56 | 0.344 | worker | 50.1 |
| 8130 | binder:8111_2 | 5.393759 | 10 | 0.539 | worker | 94.4 |
| 8149 | Profile Saver | 4.393801 | 178 | 0.025 | worker | 25.6 |
| 8206 | mali-cmar-backe | 2.933716 | 78 | 0.038 | worker | 43.7 |
| 8214 | hwuiTask1 | 2.80843 | 30 | 0.094 | worker | 100 |
| 8169 | binder:8111_3 | 1.868286 | 12 | 0.156 | worker | 62.6 |
主线程状态 (共 5 行)
| 状态码 | 状态 | 持续时间 | 占比 | 次数 | IO 等待 |
|---|---|---|---|---|---|
| S | Sleeping (主动睡眠) | 2179.520465 | 84.9 | 142 | - |
| Running | Running (CPU执行中) | 371.194862 | 14.5 | 258 | - |
| R | Runnable (等待调度) | 14.110438 | 0.5 | 224 | - |
| R+ | Runnable+ (抢占等待) | 3.195638 | 0.1 | 30 | - |
| D | Disk Sleep (IO等待) | 0.183676 | 0 | 6 | - |
调度延迟分析(Runnable 等待) (共 1 行)
| 等待时间 | 时间戳 | 持续时间 | 线程名 | 唤醒线程 | 唤醒进程 | 严重程度 |
|---|---|---|---|---|---|---|
| 1.243897 | 40919896931047 | 1243897 | .androidappdemo | - | - | normal |
主线程运行核心分布 (共 8 行)
| CPU | Capacity | 核心类型 | 运行时间 | 占比 | 调度次数 |
|---|---|---|---|---|---|
| 7 | 0 | prime | 140.561809 | 37.9 | 88 |
| 6 | 0 | prime | 105.0177 | 28.3 | 99 |
| 5 | 0 | big | 68.204708 | 18.4 | 29 |
| 4 | 0 | big | 28.462524 | 7.7 | 19 |
| 3 | 0 | medium | 21.512858 | 5.8 | 5 |
| 2 | 0 | medium | 3.810386 | 1 | 5 |
| 0 | 0 | medium | 3.245687 | 0.9 | 9 |
| 1 | 0 | medium | 0.37919 | 0.1 | 4 |
主线程阻塞函数 : (无数据)
CPU 频率使用分布 (共 30 行)
| CPU | Capacity | 核心类型 | 频率 (MHz) | 持续时间 | 占比 |
|---|---|---|---|---|---|
| 0 | 0 | medium | 1803 | 566.845378 | 13.3 |
| 0 | 0 | medium | 1704 | 68.716062 | 1.6 |
| 0 | 0 | medium | 1598 | 40.902874 | 1 |
| 0 | 0 | medium | 1401 | 538.326135 | 12.6 |
| 0 | 0 | medium | 1328 | 110.388222 | 2.6 |
| 0 | 0 | medium | 1197 | 89.036133 | 2.1 |
| 0 | 0 | medium | 1098 | 173.052734 | 4.1 |
| 0 | 0 | medium | 930 | 34.388508 | 0.8 |
| 0 | 0 | medium | 738 | 69.393108 | 1.6 |
| 0 | 0 | medium | 574 | 341.137286 | 8 |
| 0 | 0 | medium | 300 | 2223.800908 | 52.3 |
| 1 | 0 | medium | 1803 | 566.842001 | 13.3 |
| 1 | 0 | medium | 1704 | 68.713052 | 1.6 |
| 1 | 0 | medium | 1598 | 40.900189 | 1 |
| 1 | 0 | medium | 1401 | 538.330036 | 12.6 |
| 1 | 0 | medium | 1328 | 110.380779 | 2.6 |
| 1 | 0 | medium | 1197 | 89.026245 | 2.1 |
| 1 | 0 | medium | 1098 | 173.028565 | 4.1 |
| 1 | 0 | medium | 930 | 34.387654 | 0.8 |
| 1 | 0 | medium | 738 | 69.369914 | 1.6 |
| 1 | 0 | medium | 574 | 341.075401 | 8 |
| 1 | 0 | medium | 300 | 2223.93164 | 52.3 |
| 2 | 0 | medium | 1803 | 566.83415 | 13.3 |
| 2 | 0 | medium | 1704 | 68.711588 | 1.6 |
| 2 | 0 | medium | 1598 | 40.898965 | 1 |
| ... 还有 5 行 |
主线程唤醒者分析 (共 15 行)
| 唤醒线程 | 唤醒进程 | 唤醒次数 | 总等待时间 | 平均等待 | IRQ 唤醒 |
|---|---|---|---|---|---|
| RenderThread | com.example.androidappdemo | 37 | 0.47176 | 0.01 | 0 |
| binder:1339_16 | system_server | 23 | 0.376629 | 0.02 | 0 |
| binder:1339_7 | system_server | 19 | 0.613528 | 0.03 | 0 |
| binder:8111_4 | com.example.androidappdemo | 15 | 3.680908 | 0.25 | 0 |
| app | /system/bin/surfaceflinger | 14 | 0.47115 | 0.03 | 0 |
| servicemanager | /system/bin/servicemanager | 11 | 0.208048 | 0.02 | 0 |
| binder:598_1 | /system/bin/surfaceflinger | 4 | 0.040977 | 0.01 | 0 |
| binder:598_3 | /system/bin/surfaceflinger | 3 | 0.044881 | 0.01 | 0 |
| ADB-JDWP Connec | com.example.androidappdemo | 2 | 0.02246 | 0.01 | 0 |
| binder:1339_20 | system_server | 2 | 0.037679 | 0.02 | 0 |
| swapper | - | 2 | 0.162638 | 0.08 | 2 |
| EmojiCompatInit | com.example.androidappdemo | 1 | 0.017415 | 0.02 | 0 |
| SurfaceSyncGrou | com.example.androidappdemo | 1 | 0.013957 | 0.01 | 0 |
| hwuiTask1 | com.example.androidappdemo | 1 | 0.012126 | 0.01 | 0 |
| hwuiTask0 | com.example.androidappdemo | 1 | 0.014404 | 0.01 | 0 |
线程迁核稳定性(专家探针) (共 2 行)
| 进程 | 线程 | 运行样本 | 涉及 CPU 数 | 迁核次数 | 迁核占比 | 亲和性异常 |
|---|---|---|---|---|---|---|
| com.example.androidappdemo | RenderThread | 124 | 7 | 59 | 47.6 | 1 |
| com.example.androidappdemo | .androidappdemo | 258 | 8 | 102 | 39.5 | 1 |
Cache Miss 影响(专家探针) : (无数据)
📋 优化方案与行动计划
结论 : CPU 分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:CPU 负载过高
涉及 Skill : cpu_analysis, cpu_slice_analysis
- 某进程/线程占用 CPU 资源过多
- Action Plan :
- 使用
cpu_cluster_load_in_range检查大小核负载分布 - 使用
thread_affinity_violation检查线程亲和性违规 - 优化后台线程:使用线程池限流,减少调度竞争
- 检查是否有 CPU 密集型任务运行在主线程
- 使用
futex_wait_distribution分析锁竞争导致的调度延迟
- 使用
优化建议:调度延迟过高
涉及 Skill : sched_latency_in_range, scheduling_analysis
- 线程 Runnable 等待时间过长
- Action Plan :
- 检查
sched_latency_in_range中R状态等待超过 8ms 的线程 - 使用
task_migration_in_range检查任务迁移频率 - 使用
blocking_chain_analysis分析阻塞链 - 调整线程优先级(
android.os.Process.setThreadPriority) - 减少后台批量任务同时触发(使用 WorkManager 限流)
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
cpu_analysis- 子 Skill:
cpu_topology_view - 子 Skill:
thread_affinity_violation
- 子 Skill:
📈 Launch Light (轻量启动) 问题总结
| 指标 | 数值 |
|---|---|
| 运行的 Skills | 2 |
| 成功 | 2 |
| 诊断发现 | 0 |
| 数据表总数 | 24 |
Launch Heavy (重度启动)
| 字段 | 值 |
|---|---|
| 文件名 | lacunh_heavy.pftrace |
| 文件大小 | 18.3 MB |
| 分析说明 | 重度启动 + CPU + 内存分析 |
| Trace ID | 12e4fa4e-2046-4016-9332-34478e2e666b |
📊 Skill: startup_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
检测到的启动事件 (共 1 行)
| 启动 ID | 包名 | 启动类型 | 耗时 | 开始时间 | 结束时间 | 耗时 | TTID | TTFD | 评级 |
|---|---|---|---|---|---|---|---|---|---|
| 2 | com.example.launch.aosp.heavy | 冷启动 | 1338.654478 | 564166786132658 | 564168124787136 | 1338654478 | 1912.202655 | - | 需优化 |
启动数据质量 (共 1 行)
| 样本数 | 阻断问题 | 告警问题 | 门禁状态 | 问题编码 | 说明 |
|---|---|---|---|---|---|
| 1 | 0 | 2 | WARN | R008_TTID_GT_DUR,R009_TYPE_RECLASSIFIED | 检测到可疑指标,结论需谨慎解读 |
启动延迟归因分析 (共 12 行)
| 延迟原因 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 占比 | 类别 |
|---|---|---|---|---|---|---|
| activity_start | 899 | 722.476039 | 0.8 | 95.18 | 54 | Other |
| bind_application | 471 | 477.880573 | 1.01 | 21.39 | 35.7 | IO |
| inflate | 236 | 104.233018 | 0.44 | 0.81 | 7.8 | Layout |
| choreographer_do_frame | 47 | 9.067499 | 0.19 | 4.79 | 0.7 | Other |
| binder | 260 | 9.050422 | 0.03 | 1.72 | 0.7 | IPC |
| client_transaction_executed | 4 | 5.512292 | 1.38 | 5.47 | 0.4 | IO |
| activity_resume | 57 | 3.19786 | 0.06 | 0.34 | 0.2 | Other |
| Running | 6 | 2.916875 | 0.49 | 1.31 | 0.2 | Other |
| art_lock_contention | 107 | 2.858651 | 0.03 | 0.84 | 0.2 | IO |
| dlopen | 30 | 1.16823 | 0.04 | 0.23 | 0.1 | IO |
| resources_manager_get_resources | 3 | 0.242083 | 0.08 | 0.12 | 0 | Other |
| mutex_contention | 24 | 0.050936 | 0 | 0 | 0 | IO |
主线程耗时操作 Top15 (共 15 行)
| 操作名称 | 线程 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 启动占比 | 启动类型 |
|---|---|---|---|---|---|---|---|
| clientTransactionExecuted | unch.aosp.heavy | 1 | 844.480677 | 844.48 | 844.48 | 63.1 | |
| activityStart | unch.aosp.heavy | 1 | 832.190208 | 832.19 | 832.19 | 62.2 | |
| performCreate:com.example.launch.aosp.MainActivity | unch.aosp.heavy | 1 | 827.614479 | 827.61 | 827.61 | 61.8 | |
| LoadSimulator_ActivityInit | unch.aosp.heavy | 1 | 710.060208 | 710.06 | 710.06 | 53 | |
| ChaosTask | unch.aosp.heavy | 70 | 479.861719 | 6.86 | 15.97 | 35.8 | |
| SimulateInflation | unch.aosp.heavy | 1 | 178.842135 | 178.84 | 178.84 | 13.4 | |
| RealInflation | unch.aosp.heavy | 1 | 104.324687 | 104.32 | 104.32 | 7.8 | |
| SqliteLoad | unch.aosp.heavy | 10 | 13.929427 | 1.39 | 2.33 | 1 | |
| Choreographer#doFrame -1 | unch.aosp.heavy | 1 | 12.477396 | 12.48 | 12.48 | 0.9 | |
| Choreographer#doFrame - resynced to 1411741 in 17.8ms | unch.aosp.heavy | 1 | 12.334167 | 12.33 | 12.33 | 0.9 | |
| traversal | unch.aosp.heavy | 1 | 12.326875 | 12.33 | 12.33 | 0.9 | |
| activityResume | unch.aosp.heavy | 1 | 6.795417 | 6.8 | 6.8 | 0.5 | |
| performStart:com.example.launch.aosp.MainActivity | unch.aosp.heavy | 1 | 5.377239 | 5.38 | 5.38 | 0.4 | |
| Lifecycle_onStart | unch.aosp.heavy | 1 | 5.204687 | 5.2 | 5.2 | 0.4 | |
| BitmapDecode | unch.aosp.heavy | 1 | 5.199166 | 5.2 | 5.2 | 0.4 |
主线程文件 IO Top15 (共 2 行)
| IO 操作 | 线程 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 启动占比 | 启动类型 |
|---|---|---|---|---|---|---|---|
| SqliteLoad | unch.aosp.heavy | 61 | 49.510781 | 0.81 | 2.33 | 3.7 | |
| readSP | unch.aosp.heavy | 1 | 0.674896 | 0.67 | 0.67 | 0.1 |
启动期间 Binder 调用 (共 15 行)
| 服务进程 | AIDL 方法 | 调用次数 | 总耗时 | 平均耗时 | 最大耗时 | 主线程调用 | 启动占比 |
|---|---|---|---|---|---|---|---|
| /system/bin/servicemanager | - | 20 | 5.667242 | 0.28 | 1.99 | 7 | 0.4 |
| system_server | AIDL::java::IWindowSession::relayout::server | 1 | 1.743959 | 1.74 | 1.74 | 1 | 0.1 |
| system_server | AIDL::java::IProcessManager::#13::server | 1 | 1.702187 | 1.7 | 1.7 | 0 | 0.1 |
| system_server | AIDL::java::IContentProvider::#21::server | 11 | 1.581305 | 0.14 | 0.64 | 10 | 0.1 |
| /vendor/bin/hw/vendor.qti.hardware.display.allocator-service | - | 9 | 1.206247 | 0.13 | 0.29 | 0 | 0.1 |
| system_server | AIDL::java::IPackageManager::getPackageInfo::server | 4 | 1.050052 | 0.26 | 0.4 | 0 | 0.1 |
| /vendor/bin/vendor.qti.qspmhal-service | - | 3 | 0.996613 | 0.33 | 0.81 | 0 | 0.1 |
| system_server | AIDL::java::IWindowSession::addToDisplayAsUser::server | 1 | 0.953594 | 0.95 | 0.95 | 1 | 0.1 |
| /system/bin/surfaceflinger | AIDL::cpp::ISurfaceComposer::getDynamicDisplayInfoFromId::cp | 1 | 0.457447 | 0.46 | 0.46 | 1 | 0 |
| system_server | AIDL::java::IWindowManager::openSession::server | 1 | 0.424167 | 0.42 | 0.42 | 1 | 0 |
| system_server | AIDL::java::IContentService::registerContentObserver::server | 3 | 0.330988 | 0.11 | 0.16 | 0 | 0 |
| system_server | AIDL::java::IActivityManager::setRenderThread::server | 1 | 0.295886 | 0.3 | 0.3 | 1 | 0 |
| system_server | AIDL::java::IPackageManager::getApplicationInfo::server | 3 | 0.261614 | 0.09 | 0.11 | 2 | 0 |
| /system_ext/bin/gppservice | - | 2 | 0.247604 | 0.12 | 0.19 | 2 | 0 |
| system_server | AIDL::java::IPackageManager::hasSystemFeature::server | 3 | 0.242448 | 0.08 | 0.16 | 3 | 0 |
主线程同步 Binder 调用 (共 15 行)
| 服务进程 | AIDL 方法 | 调用次数 | 总耗时 | 平均耗时 | 最大耗时 | 启动占比 |
|---|---|---|---|---|---|---|
| system_server | AIDL::java::IWindowSession::relayout::server | 1 | 1.743959 | 1.74 | 1.74 | 0.1 |
| system_server | AIDL::java::IContentProvider::#21::server | 10 | 1.486253 | 0.15 | 0.64 | 0.1 |
| system_server | AIDL::java::IWindowSession::addToDisplayAsUser::server | 1 | 0.953594 | 0.95 | 0.95 | 0.1 |
| /system/bin/servicemanager | - | 7 | 0.61646 | 0.09 | 0.14 | 0 |
| /system/bin/surfaceflinger | AIDL::cpp::ISurfaceComposer::getDynamicDisplayInfoFromId::cp | 1 | 0.457447 | 0.46 | 0.46 | 0 |
| system_server | AIDL::java::IWindowManager::openSession::server | 1 | 0.424167 | 0.42 | 0.42 | 0 |
| system_server | AIDL::java::IActivityManager::setRenderThread::server | 1 | 0.295886 | 0.3 | 0.3 | 0 |
| /system_ext/bin/gppservice | - | 2 | 0.247604 | 0.12 | 0.19 | 0 |
| system_server | AIDL::java::IPackageManager::hasSystemFeature::server | 3 | 0.242448 | 0.08 | 0.16 | 0 |
| system_server | AIDL::java::IActivityClientController::setTaskDescription::s | 1 | 0.221146 | 0.22 | 0.22 | 0 |
| system_server | AIDL::java::IPackageManager::getApplicationInfo::server | 2 | 0.192083 | 0.1 | 0.11 | 0 |
| system_server | AIDL::java::IActivityTaskManager::getActivityClientControlle | 1 | 0.191927 | 0.19 | 0.19 | 0 |
| /system/bin/surfaceflinger | AIDL::cpp::IDisplayEventConnection::getLatestVsyncEventData: | 2 | 0.187188 | 0.09 | 0.1 | 0 |
| system_server | AIDL::java::IInputMethodManager::addClient::server | 1 | 0.147656 | 0.15 | 0.15 | 0 |
| system_server | AIDL::java::IPackageManager::getActivityInfo::server | 2 | 0.144062 | 0.07 | 0.08 | 0 |
启动期间主线程状态 (共 4 行)
| 状态 | 状态说明 | 总耗时 | 占比 | 次数 | 阻塞函数 |
|---|---|---|---|---|---|
| Running | Running (CPU执行) | 843.405829 | 63 | 456 | - |
| S | Sleeping (主动睡眠) | 468.819892 | 35 | 330 | - |
| D | Disk Sleep (IO等待) | 22.979376 | 1.7 | 125 | - |
| R | Runnable (等待调度) | 4.592038 | 0.3 | 451 | - |
证据矩阵 (共 5 行)
| 分析项 | 主指标 | 主指标值 | 异常阈值 | 佐证指标 | 佐证值 | 佐证阈值 | 判定 |
|---|---|---|---|---|---|---|---|
| MainThread Hot Slice | main_thread_slices.percent_of_startup | 63.1 | >20% OR max_dur_ms>100 | main_thread_slices.max_dur_ms | 844.48 | >100ms | confirmed |
| MainThread File IO | main_thread_file_io.percent_of_startup | 3.7 | >5% | main_thread_file_io.total_dur_ms | 49.51 | >50ms | normal |
| Binder Total | startup_binder.percent_of_startup | 0.4 | >20% | main_sync_binder.percent_of_startup | 0.1 | >5% | normal |
| Main Sync Binder | main_sync_binder.percent_of_startup | 0.1 | >8% | main_binder_blocking.dur_ms | 0 | >16ms | normal |
| Sched Latency | sched_latency.severe_delays | 0 | >3 | sched_latency.max_wait_ms | 0.49 | >8ms | normal |
主线程 Binder 阻塞分析 : (无数据)
启动期间类加载 : (无数据)
启动期间 GC (共 10 行)
| GC 类型 | 线程 | 主线程 | 次数 | 总耗时 | 平均耗时 | 启动占比 |
|---|---|---|---|---|---|---|
| Background concurrent copying GC | HeapTaskDaemon | 0 | 4 | 91.278334 | 22.82 | 6.8 |
| Background young concurrent copying GC | HeapTaskDaemon | 0 | 4 | 61.605415 | 15.4 | 4.6 |
| GC: Wait For Completion Alloc | pool-3-thread-3 | 0 | 4 | 28.48177 | 7.12 | 2.1 |
| GC: Wait For Completion ClassLinkerForRegisterDexFile | Binder:intercep | 0 | 1 | 26.830104 | 26.83 | 2 |
| Alloc concurrent copying GC | pool-3-thread-1 | 0 | 1 | 11.352865 | 11.35 | 0.8 |
| Lock contention on GC barrier lock (owner tid: 0) | pool-3-thread-2 | 0 | 15 | 0.017555 | 0 | 0 |
| Lock contention on GC barrier lock (owner tid: 24762) | pool-3-thread-2 | 0 | 2 | 0.003907 | 0 | 0 |
| Lock contention on GC barrier lock (owner tid: 0) | unch.aosp.heavy | 1 | 4 | 0.0025 | 0 | 0 |
| Lock contention on GC barrier lock (owner tid: 21307) | HeapTaskDaemon | 0 | 3 | 0.001926 | 0 | 0 |
| Lock contention on GC barrier lock (owner tid: 24762) | unch.aosp.heavy | 1 | 1 | 0.001041 | 0 | 0 |
启动期间调度延迟 (共 1 行)
| 状态 | 次数 | 总等待 | 平均等待 | 最大等待 | 严重延迟次数 |
|---|---|---|---|---|---|
| R | 451 | 4.592038 | 0.01 | 0.49 | 0 |
📋 优化方案与行动计划
结论 : 应用启动分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:Binder 调用阻塞启动
涉及 Skill : startup_binder_in_range, startup_main_thread_sync_binder_in_range
- 主线程同步 Binder 调用(如
attachApplication)阻塞启动进度 - Action Plan :
- 检查
system_server端 Binder 处理线程池是否足够 - 使用异步 Binder 调用(
oneway)替代同步调用 - 减少
ActivityManagerService中的 CPU 密集型操作 - 考虑使用
AppWidget/JobScheduler延时非关键 Binder 通信
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
startup_analysis- 子 Skill:
binder_blocking_in_range - 子 Skill:
binder_in_range - 子 Skill:
cpu_topology_view - 子 Skill:
main_thread_file_io_in_range - 子 Skill:
main_thread_sched_latency_in_range - 子 Skill:
main_thread_slices_in_range - 子 Skill:
startup_binder_in_range - 子 Skill:
startup_binder_pool_analysis
- 子 Skill:
📊 Skill: cpu_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
目标进程 (共 1 行)
| UPID | PID | 进程名 |
|---|---|---|
| 948 | 21307 | com.example.launch.aosp.heavy |
大小核分布(基于 capacity) (共 2 行)
| 核心类型 | Capacity | 运行时间 | 占比 | 调度次数 | 核心数 |
|---|---|---|---|---|---|
| prime (超大核) | 0 | 1545.931545 | 50.7 | 2113 | 2 |
| big (大核) | 0 | 1502.322886 | 49.3 | 2160 | 6 |
线程 CPU 使用 Top10 (共 10 行)
| TID | 线程名 | CPU 时间 | 调度次数 | 平均片长 | 线程类型 | 大核占比 |
|---|---|---|---|---|---|---|
| 21307 | unch.aosp.heavy | 1743.565654 | 947 | 1.841 | main | 100 |
| 24760 | pool-3-thread-2 | 135.290781 | 251 | 0.539 | worker | 100 |
| 24759 | pool-3-thread-1 | 124.363498 | 223 | 0.558 | worker | 100 |
| 24739 | HeapTaskDaemon | 101.850842 | 134 | 0.76 | worker | 100 |
| 24765 | pool-3-thread-7 | 99.325568 | 311 | 0.319 | worker | 100 |
| 24763 | pool-3-thread-5 | 97.328224 | 299 | 0.326 | worker | 100 |
| 24762 | pool-3-thread-4 | 81.250725 | 182 | 0.446 | worker | 100 |
| 24766 | pool-3-thread-8 | 80.945986 | 257 | 0.315 | worker | 100 |
| 24797 | pool-3-thread-1 | 77.709378 | 167 | 0.465 | worker | 100 |
| 24764 | pool-3-thread-6 | 74.830779 | 248 | 0.302 | worker | 100 |
主线程状态 (共 5 行)
| 状态码 | 状态 | 持续时间 | 占比 | 次数 | IO 等待 |
|---|---|---|---|---|---|
| S | Sleeping (主动睡眠) | 2336.931816 | 56.6 | 761 | - |
| Running | Running (CPU执行中) | 1743.565654 | 42.3 | 947 | - |
| D | Disk Sleep (IO等待) | 25.642969 | 0.6 | 152 | - |
| R | Runnable (等待调度) | 19.287527 | 0.5 | 931 | - |
| R+ | Runnable+ (抢占等待) | 1.30375 | 0 | 7 | - |
调度延迟分析(Runnable 等待) : (无数据)
主线程运行核心分布 (共 7 行)
| CPU | Capacity | 核心类型 | 运行时间 | 占比 | 调度次数 |
|---|---|---|---|---|---|
| 7 | 0 | prime | 1114.175868 | 63.9 | 672 |
| 4 | 0 | big | 334.539684 | 19.2 | 132 |
| 0 | 0 | big | 103.484895 | 5.9 | 38 |
| 1 | 0 | big | 78.314739 | 4.5 | 29 |
| 5 | 0 | big | 62.889323 | 3.6 | 42 |
| 3 | 0 | big | 26.14302 | 1.5 | 7 |
| 6 | 0 | prime | 24.018125 | 1.4 | 27 |
主线程阻塞函数 : (无数据)
CPU 频率使用分布 (共 30 行)
| CPU | Capacity | 核心类型 | 频率 (MHz) | 持续时间 | 占比 |
|---|---|---|---|---|---|
| 0 | 0 | big | 3628 | 265.093646 | 4.5 |
| 0 | 0 | big | 3302 | 72.43823 | 1.2 |
| 0 | 0 | big | 2899 | 13.628647 | 0.2 |
| 0 | 0 | big | 2611 | 13.307135 | 0.2 |
| 0 | 0 | big | 2496 | 31.886146 | 0.5 |
| 0 | 0 | big | 2361 | 25.329999 | 0.4 |
| 0 | 0 | big | 2227 | 514.871043 | 8.8 |
| 0 | 0 | big | 2112 | 34.642239 | 0.6 |
| 0 | 0 | big | 1900 | 21.949064 | 0.4 |
| 0 | 0 | big | 1785 | 186.082344 | 3.2 |
| 0 | 0 | big | 1670 | 60.371669 | 1 |
| 0 | 0 | big | 1555 | 36.596303 | 0.6 |
| 0 | 0 | big | 1440 | 57.319375 | 1 |
| 0 | 0 | big | 1324 | 213.759898 | 3.7 |
| 0 | 0 | big | 1228 | 53.714896 | 0.9 |
| 0 | 0 | big | 1113 | 1183.67682 | 20.3 |
| 0 | 0 | big | 998 | 117.164585 | 2 |
| 0 | 0 | big | 883 | 104.332135 | 1.8 |
| 0 | 0 | big | 787 | 2804.915879 | 48.1 |
| 1 | 0 | big | 3628 | 265.091246 | 4.5 |
| 1 | 0 | big | 3302 | 72.437707 | 1.2 |
| 1 | 0 | big | 2899 | 13.628699 | 0.2 |
| 1 | 0 | big | 2611 | 13.307135 | 0.2 |
| 1 | 0 | big | 2496 | 31.885417 | 0.5 |
| 1 | 0 | big | 2361 | 25.329168 | 0.4 |
| ... 还有 5 行 |
主线程唤醒者分析 (共 15 行)
| 唤醒线程 | 唤醒进程 | 唤醒次数 | 总等待时间 | 平均等待 | IRQ 唤醒 |
|---|---|---|---|---|---|
| swapper | - | 662 | 12.835899 | 0.02 | 662 |
| RenderThread | com.example.launch.aosp.heavy | 25 | 0.656252 | 0.03 | 0 |
| HeapTaskDaemon | com.example.launch.aosp.heavy | 21 | 0.152395 | 0.01 | 1 |
| binder:3826_17 | system_server | 16 | 0.130211 | 0.01 | 0 |
| binder:3826_16 | system_server | 15 | 0.096981 | 0.01 | 0 |
| servicemanager | /system/bin/servicemanager | 11 | 0.112708 | 0.01 | 0 |
| binder:3826_1C | system_server | 9 | 0.049218 | 0.01 | 0 |
| crosvm_vcpu2 | crosvm_trustedvm | 9 | 0.88677 | 0.1 | 9 |
| binder:3826_1A | system_server | 8 | 0.056615 | 0.01 | 0 |
| binder:3826_B | system_server | 8 | 0.063958 | 0.01 | 0 |
| app | /system/bin/surfaceflinger | 8 | 0.904217 | 0.11 | 0 |
| binder:3826_1B | system_server | 7 | 0.041041 | 0.01 | 0 |
| pool-3-thread-3 | com.example.launch.aosp.heavy | 6 | 0.098593 | 0.02 | 5 |
| binder:21307_4 | com.example.launch.aosp.heavy | 5 | 0.039532 | 0.01 | 0 |
| binder:2497_3 | /system/bin/surfaceflinger | 5 | 0.047917 | 0.01 | 1 |
线程迁核稳定性(专家探针) (共 2 行)
| 进程 | 线程 | 运行样本 | 涉及 CPU 数 | 迁核次数 | 迁核占比 | 亲和性异常 |
|---|---|---|---|---|---|---|
| com.example.launch.aosp.heavy | RenderThread | 104 | 8 | 34 | 32.7 | 1 |
| com.example.launch.aosp.heavy | unch.aosp.heavy | 947 | 7 | 51 | 5.4 | 0 |
Cache Miss 影响(专家探针) : (无数据)
📋 优化方案与行动计划
结论 : CPU 分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:CPU 负载过高
涉及 Skill : cpu_analysis, cpu_slice_analysis
- 某进程/线程占用 CPU 资源过多
- Action Plan :
- 使用
cpu_cluster_load_in_range检查大小核负载分布 - 使用
thread_affinity_violation检查线程亲和性违规 - 优化后台线程:使用线程池限流,减少调度竞争
- 检查是否有 CPU 密集型任务运行在主线程
- 使用
futex_wait_distribution分析锁竞争导致的调度延迟
- 使用
优化建议:调度延迟过高
涉及 Skill : sched_latency_in_range, scheduling_analysis
- 线程 Runnable 等待时间过长
- Action Plan :
- 检查
sched_latency_in_range中R状态等待超过 8ms 的线程 - 使用
task_migration_in_range检查任务迁移频率 - 使用
blocking_chain_analysis分析阻塞链 - 调整线程优先级(
android.os.Process.setThreadPriority) - 减少后台批量任务同时触发(使用 WorkManager 限流)
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
cpu_analysis- 子 Skill:
cpu_topology_view - 子 Skill:
thread_affinity_violation
- 子 Skill:
📊 Skill: memory_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
目标进程 (共 1 行)
| UPID | PID | 进程名 |
|---|---|---|
| 1000 | 30970 | kworker/u32:11 |
GC 总体情况 (共 1 行)
| GC 次数 | GC 总耗时 | 平均耗时 | 最大耗时 | 最小耗时 | 主线程 GC | 主线程 GC 耗时 | GC 频率 | 频率评级 | 耗时评级 |
|---|---|---|---|---|---|---|---|---|---|
| 70 | 265.328494 | 3.79 | 44.16 | 0 | 10 | 0.010312 | 17.35 | 较多 | 良好 |
GC 类型分布 (共 3 行)
| GC 类型 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 主线程 GC |
|---|---|---|---|---|---|
| Background (后台GC) | 12 | 197.899635 | 16.49 | 44.16 | 0 |
| Alloc (分配触发) | 5 | 39.834635 | 7.97 | 11.35 | 0 |
| Other | 53 | 27.594224 | 0.52 | 26.83 | 10 |
GC 导致的掉帧分析 (共 14 行)
| GC 类型 | GC 耗时 | 掉帧类型 | 帧耗时 | 影响 |
|---|---|---|---|---|
| ClstcFeatureDetails::PackUcscIgc1DLut:: | 0.00177 | None | 10.067813 | 帧超时 |
| ClstcFeatureDetails::PackUcscIgc1DLut:: | 0.001615 | None | 15.594323 | 帧超时 |
| ClstcFeatureDetails::PackUcscIgc1DLut:: | 0.001511 | None | 10.067813 | 帧超时 |
| ClstcFeatureDetails::PackUcscIgc1DLut:: | 0.001458 | None | 15.594323 | 帧超时 |
| Lock contention on GC barrier lock (owner tid: 24762) | 0.001041 | None | 10.27526 | 帧超时 |
| Lock contention on GC barrier lock (owner tid: 24762) | 0.001041 | None | 3.230677 | 正常 |
| Lock contention on GC barrier lock (owner tid: 0) | 0.000938 | None | 10.276041 | 帧超时 |
| Lock contention on GC barrier lock (owner tid: 0) | 0.000938 | None | 3.192552 | 正常 |
| Lock contention on GC barrier lock (owner tid: 0) | 0.000573 | None | 10.27526 | 帧超时 |
| Lock contention on GC barrier lock (owner tid: 0) | 0.000573 | None | 3.230677 | 正常 |
| Lock contention on GC barrier lock (owner tid: 0) | 0.000572 | None | 10.276041 | 帧超时 |
| Lock contention on GC barrier lock (owner tid: 0) | 0.000417 | None | 10.273541 | 帧超时 |
| Lock contention on GC barrier lock (owner tid: 0) | 0.000417 | None | 4.129531 | 正常 |
| Lock contention on GC barrier lock (owner tid: 24739) | 0.000417 | None | 10.276041 | 帧超时 |
主线程 GC (可能导致掉帧) : (无数据)
GC 期间主线程状态分析 : (无数据)
GC 间隔分析(内存抖动检测) (共 3 行)
| 间隔分段 | 次数 | 平均间隔 | 最小间隔 |
|---|---|---|---|
| <100ms (频繁) | 58 | 8.77 | -44.01 |
| 100-500ms | 9 | 217.34 | 108.88 |
| 500ms-1s | 2 | 652.48 | 539.17 |
耗时最长的 GC 事件 (共 15 行)
| GC 类型 | 耗时 | 线程 | 时间 | 持续时间(ns) | 主线程 |
|---|---|---|---|---|---|
| Background young concurrent copying GC | 44.160208 | HeapTaskDaemon | 564167376699324 | 44160208 | 否 |
| Background concurrent copying GC | 31.448438 | HeapTaskDaemon | 564167272416928 | 31448438 | 否 |
| GC: Wait For Completion ClassLinkerForRegisterDexFile | 26.830104 | Binder:intercep | 564167277070574 | 26830104 | 否 |
| Background concurrent copying GC | 23.985729 | HeapTaskDaemon | 564167438807241 | 23985729 | 否 |
| Background concurrent copying GC | 20.873073 | HeapTaskDaemon | 564167754289324 | 20873073 | 否 |
| Background concurrent copying GC | 14.971094 | HeapTaskDaemon | 564167964296407 | 14971094 | 否 |
| Background young concurrent copying GC | 12.949479 | HeapTaskDaemon | 564168112460938 | 12949479 | 否 |
| Background young concurrent copying GC | 12.719115 | HeapTaskDaemon | 564166412091043 | 12719115 | 否 |
| Background concurrent copying GC | 11.890261 | HeapTaskDaemon | 564169802351406 | 11890261 | 否 |
| Alloc concurrent copying GC | 11.352865 | pool-3-thread-1 | 564167170835730 | 11352865 | 否 |
| GC: Wait For Completion Alloc | 9.390052 | pool-3-thread-2 | 564167172970887 | 9390052 | 否 |
| GC: Wait For Completion Alloc | 9.341094 | pool-3-thread-3 | 564167172941407 | 9341094 | 否 |
| Background young concurrent copying GC | 7.457031 | HeapTaskDaemon | 564168118690261 | 7457031 | 否 |
| Background young concurrent copying GC | 6.229427 | HeapTaskDaemon | 564167587385678 | 6229427 | 否 |
| Background young concurrent copying GC | 5.738958 | HeapTaskDaemon | 564167882816043 | 5738958 | 否 |
📋 优化方案与行动计划
结论 : 内存性能分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:GC 压力过大
涉及 Skill : memory_analysis, gc_analysis
- GC 次数过多或暂停时间过长
- Action Plan :
- 使用
gc_events_in_range查看 GC 类型分布和频率 - 减少每秒对象分配量(检查热点分配代码)
- 使用
android.os.Debug.MemoryInfo分析内存快照 - 检查图片缓存和大对象分配(Bitmap 池化)
- 使用 LeakCanary 或 Android Profiler 检测内存泄漏
- 使用
优化建议:内存压力过大
涉及 Skill : memory_analysis, lmk_analysis
- 应用内存占用过高,可能触发 LMK
- Action Plan :
- 使用
memory_pressure_in_rangeSkill 分析内存压力时间线 - 使用
page_fault_in_range分析缺页异常影响 - 使用 Heap Dump Explorer 分析 Java 堆对象分布
- 使用 heapprofd 分析 Native 堆内存分配
- 优化图片内存(使用 Glide/Coil 的
trimMemory回调)
- 使用
📖 关联 Perfetto Skills 参考:
- 主 Skill:
memory_analysis- 子 Skill:
vsync_period_detection
- 子 Skill:
📈 Launch Heavy (重度启动) 问题总结
| 指标 | 数值 |
|---|---|
| 运行的 Skills | 3 |
| 成功 | 3 |
| 诊断发现 | 0 |
| 数据表总数 | 32 |
Scroll Standard AOSP (无预动画)
| 字段 | 值 |
|---|---|
| 文件名 | scroll_Standard-AOSP-App-Without-PreAnimation.pftrace |
| 文件大小 | 6.3 MB |
| 分析说明 | 标准AOSP滑动卡顿分析 |
| Trace ID | e81f4b60-6fc8-4eaf-a1e4-51ee8afeb57d |
📊 Skill: scrolling_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
显示配置 (共 1 行)
| 刷新率 | VSync 周期 | 来源 | 总帧数 |
|---|---|---|---|
| 120 | 8.33 | sf_vsync_counter | 157 |
滑动性能概览 (共 1 行)
| 总帧数 | 感知掉帧 | 感知掉帧率 | Buffer Stuffing | BS 占比 | App 侧掉帧 | SF 侧掉帧 | 实际 FPS | 刷新率 | 平均呈现间隔 | P95 呈现间隔 | 评级 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 157 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 120 | 8407373 | 6542522 | 优秀 |
帧稳定性方差(专家探针) : (无数据)
掉帧类型分布 (共 1 行)
| 掉帧类型 | 帧数 | 实际掉帧 | 假阳性 | 总耗时 | 平均耗时 | 类型标签 |
|---|---|---|---|---|---|---|
| None | 157 | 0 | 0 | 624996511 | 3980869 | 标签:None(可能漏检) |
🎯 分析结论 : (无数据)
滑动分析 - 数据源缺失 : (无数据)
滑动区间 (共 1 行)
| 区间 | 进程 | 开始时间 | 结束时间 | 帧数 | 持续时间 | 持续时间 | 平均帧耗时 | 最大帧耗时 | FPS |
|---|---|---|---|---|---|---|---|---|---|
| 1 | com.example.wechatfriendforcustomscroller | 271813532895707 | 271814852117062 | 157 | 1319.2 | 1319221355 | 3980869 | 7671094 | 119 |
区间掉帧 (共 1 行)
| 区间 | 总帧数 | 感知掉帧 | 感知掉帧率 | App 掉帧 | Buffer Stuffing | 最大跳帧 | 掉帧类型 |
|---|---|---|---|---|---|---|---|
| 1 | 157 | 0 | 0 | 0 | 0 | 0 | - |
掉帧列表 : (无数据)
📋 优化方案与行动计划
结论 : 滑动性能分析分析完成
🟢 分析完成,未发现异常
关键指标:
- 总帧数: 157
- 总帧数: 157
- 掉帧数: 0
- 掉帧率: 0%
分析耗时 0ms
优化建议:检测到滑动掉帧
涉及 Skill : scrolling_analysis, consumer_jank_detection
- 帧率不稳定,存在 Jank(长帧)
- Action Plan :
- 使用
jank_frame_detailSkill 定位掉帧根因(Binder/GC/IO/Rendering) - 减少主线程 UI 绘制负担:优化
Layout层级、使用ConstraintLayout - 使用
AsyncListDiffer/Paging 3实现渐进式列表加载 - 对 Flutter 应用:检查
build()方法中的耗时操作,使用RepaintBoundary - 分析
frame_pipeline_varianceSkill 查找管线各阶段波动
- 使用
优化建议:输入延迟过高
涉及 Skill : scroll_response_latency, input_to_frame_latency
- 从触摸输入到手帧输出延迟超标
- Action Plan :
- 使用
input_events_in_rangeSkill 分析输入事件分发延迟 - 检查
touch_to_display_latency完整流水线 - 确保主线程不阻塞超过 16ms(使用 StrictMode)
- 使用
MotionEvent批处理和预测减少延迟
- 使用
优化建议:渲染线程阻塞
涉及 Skill : render_thread_slices, frame_blocking_calls
- 渲染线程被 Binder/IO/同步锁阻塞
- Action Plan :
- 检查
lock_contention_in_rangeSkill 分析锁竞争 - 减少渲染管线的跨进程调用(SurfaceFlinger/Binder)
- Flutter 应用:使用 Impeller 替代 Skia 渲染引擎
- 对于 TextureView:切换到 SurfaceView 减少 GFX 管线开销
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
scrolling_analysis- 子 Skill:
cpu_topology_view
- 子 Skill:
📊 Skill: surfaceflinger_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
显示配置 (共 1 行)
| 刷新率 | VSync 周期 | 来源 |
|---|---|---|
| 120 | 8.33 | sf_vsync_counter |
SurfaceFlinger 合成概览 (共 1 行)
| 总合成数 | 平均合成耗时 | 最大合成耗时 | P95 合成耗时 | 慢合成次数 | 评级 |
|---|---|---|---|---|---|
| 496 | 246597 | 2614010 | 781 | 0 | 优秀 |
GPU vs HWC 合成 (共 2 行)
| 合成方式 | 帧数 | 占比 | 平均耗时 | 最大耗时 |
|---|---|---|---|---|
| Other | 496 | 75.2 | 246597 | 2614010 |
| HWC | 164 | 24.8 | 950 | 2031 |
SurfaceFlinger 分析结论 (共 1 行)
| 问题分类 | 置信度 | 根因总结 | 关键证据 | 优化建议 |
|---|---|---|---|---|
| NORMAL | 0.6 | SurfaceFlinger 合成性能正常 | ["总合成数: 496","慢合成数: 0 (0.0%)","平均合成耗时: 0.2ms","最大合成耗时: 2.6ms | SurfaceFlinger 运行正常,无需优化 |
SurfaceFlinger 分析 - 数据缺失 : (无数据)
慢合成事件 (>1.5x VSync) : (无数据)
Fence 等待事件 : (无数据)
合成阶段耗时 (共 3 行)
| 合成阶段 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 时间占比 |
|---|---|---|---|---|---|
| Present | 937 | 263224017 | 280922 | 2294844 | 57.8 |
| Composite | 289 | 121724997 | 421194 | 2614010 | 26.7 |
| Commit | 196 | 70165055 | 357985 | 1166770 | 15.4 |
活跃 Layer 统计 (共 5 行)
| Layer | 帧数 | 总耗时 | 平均耗时 |
|---|---|---|---|
| updateLayerSnapshots | 166 | 36309002 | 218729 |
| partitionLayers | 166 | 4201514 | 25310 |
| LayerSnapshotBuilder:update | 166 | 3710254 | 22351 |
| presentFrameAndReleaseLayers for (4630946416801175443) | 164 | 1917439 | 11692 |
| recordLayerHistoryBufferUpdate | 157 | 337772 | 2151 |
📋 优化方案与行动计划
结论 : SurfaceFlinger 分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:SurfaceFlinger 合成卡顿
涉及 Skill : surfaceflinger_analysis, sf_composition_in_range
- SurfaceFlinger 合成速度不达标,可能 GPU 渲染 / HWC 合成问题
- Action Plan :
- 检查
sf_composition_in_range中 GPU 合成耗时,减少 GPU 过度绘制 - 减少 Surface 并行更新数量(减少
sf_layer_count) - 对 Flutter:使用
SurfaceView而非TextureView减少 SF 合成负担 - 确保使用了硬件合成器(HWC),而非全部 GPU 合成
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
surfaceflinger_analysis
📈 Scroll Standard AOSP (无预动画) 问题总结
| 指标 | 数值 |
|---|---|
| 运行的 Skills | 2 |
| 成功 | 2 |
| 诊断发现 | 0 |
| 数据表总数 | 18 |
Scroll Demo Customer
| 字段 | 值 |
|---|---|
| 文件名 | scroll-demo-customer-scroll.pftrace |
| 文件大小 | 14.2 MB |
| 分析说明 | 客户Demo滑动卡顿分析 |
| Trace ID | ff55011c-510d-4121-bd1e-faaebd9f06ae |
📊 Skill: scrolling_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
显示配置 (共 1 行)
| 刷新率 | VSync 周期 | 来源 | 总帧数 |
|---|---|---|---|
| 120 | 8.33 | sf_vsync_counter | 350 |
滑动性能概览 (共 1 行)
| 总帧数 | 感知掉帧 | 感知掉帧率 | Buffer Stuffing | BS 占比 | App 侧掉帧 | SF 侧掉帧 | 实际 FPS | 刷新率 | 平均呈现间隔 | P95 呈现间隔 | 评级 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 350 | 7 | 2 | 14 | 4 | 6 | 1 | 78.7 | 120 | 8371900 | 6457508 | 良好 |
帧稳定性方差(专家探针) (共 1 行)
| 总帧数 | 平均帧耗时 | 标准差 | 帧间波动 | 高抖动转折 | 波动等级 |
|---|---|---|---|---|---|
| 350 | 5.01 | 7.31 | 2.43 | 14 | low |
掉帧类型分布 (共 4 行)
| 掉帧类型 | 帧数 | 实际掉帧 | 假阳性 | 总耗时 | 平均耗时 | 类型标签 |
|---|---|---|---|---|---|---|
| App Deadline Missed | 6 | 6 | 0 | 311678595 | 51946433 | 标签:App |
| App Deadline Missed, Buffer Stuffing | 1 | 1 | 0 | 62733490 | 62733490 | 标签:App |
| None | 329 | 0 | 0 | 1.296s | 3940299 | 标签:None(可能漏检) |
| Buffer Stuffing | 14 | 0 | 14 | 82648542 | 5903467 | 标签:Buffer Stuffing(需验证) |
🎯 分析结论 : (无数据)
滑动分析 - 数据源缺失 : (无数据)
滑动区间 (共 2 行)
| 区间 | 进程 | 开始时间 | 结束时间 | 帧数 | 持续时间 | 持续时间 | 平均帧耗时 | 最大帧耗时 | FPS |
|---|---|---|---|---|---|---|---|---|---|
| 1 | com.example.wechatfriendforcustomscroller | 506731662198343 | 506733321151727 | 181 | 1659 | 1658953384 | 5422194 | 62733490 | 109.1 |
| 2 | com.example.wechatfriendforcustomscroller | 506734577353914 | 506736111573289 | 166 | 1534.2 | 1534219375 | 4606361 | 60942657 | 108.2 |
区间掉帧 (共 2 行)
| 区间 | 总帧数 | 感知掉帧 | 感知掉帧率 | App 掉帧 | Buffer Stuffing | 最大跳帧 | 掉帧类型 |
|---|---|---|---|---|---|---|---|
| 1 | 181 | 4 | 2.21 | 3 | 14 | 7 | App Deadline Missed,App Deadline Missed, Buffer Stuffing |
| 2 | 166 | 3 | 1.81 | 3 | 0 | 7 | App Deadline Missed |
掉帧列表 (共 7 行)
(表头过多,不在此处展开,共 47 列,7 行)
📋 优化方案与行动计划
结论 : 滑动性能分析分析完成
🟢 分析完成,未发现异常
关键指标:
- 总帧数: 350
- 总帧数: 350
- 掉帧数: 7
- 掉帧率: 2%
分析耗时 0ms
优化建议:检测到滑动掉帧
涉及 Skill : scrolling_analysis, consumer_jank_detection
- 帧率不稳定,存在 Jank(长帧)
- Action Plan :
- 使用
jank_frame_detailSkill 定位掉帧根因(Binder/GC/IO/Rendering) - 减少主线程 UI 绘制负担:优化
Layout层级、使用ConstraintLayout - 使用
AsyncListDiffer/Paging 3实现渐进式列表加载 - 对 Flutter 应用:检查
build()方法中的耗时操作,使用RepaintBoundary - 分析
frame_pipeline_varianceSkill 查找管线各阶段波动
- 使用
优化建议:输入延迟过高
涉及 Skill : scroll_response_latency, input_to_frame_latency
- 从触摸输入到手帧输出延迟超标
- Action Plan :
- 使用
input_events_in_rangeSkill 分析输入事件分发延迟 - 检查
touch_to_display_latency完整流水线 - 确保主线程不阻塞超过 16ms(使用 StrictMode)
- 使用
MotionEvent批处理和预测减少延迟
- 使用
优化建议:渲染线程阻塞
涉及 Skill : render_thread_slices, frame_blocking_calls
- 渲染线程被 Binder/IO/同步锁阻塞
- Action Plan :
- 检查
lock_contention_in_rangeSkill 分析锁竞争 - 减少渲染管线的跨进程调用(SurfaceFlinger/Binder)
- Flutter 应用:使用 Impeller 替代 Skia 渲染引擎
- 对于 TextureView:切换到 SurfaceView 减少 GFX 管线开销
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
scrolling_analysis- 子 Skill:
cpu_topology_view - 子 Skill:
frame_pipeline_variance
- 子 Skill:
📊 Skill: surfaceflinger_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
显示配置 (共 1 行)
| 刷新率 | VSync 周期 | 来源 |
|---|---|---|
| 120 | 8.33 | sf_vsync_counter |
SurfaceFlinger 合成概览 (共 1 行)
| 总合成数 | 平均合成耗时 | 最大合成耗时 | P95 合成耗时 | 慢合成次数 | 评级 |
|---|---|---|---|---|---|
| 744 | 1154115 | 5681510 | 6152 | 0 | 优秀 |
GPU vs HWC 合成 (共 3 行)
| 合成方式 | 帧数 | 占比 | 平均耗时 | 最大耗时 |
|---|---|---|---|---|
| Other | 744 | 65.5 | 1154115 | 5681510 |
| HWC | 374 | 32.9 | 1414 | 2865 |
| GPU | 18 | 1.6 | 1415828 | 9566093 |
SurfaceFlinger 分析结论 (共 1 行)
| 问题分类 | 置信度 | 根因总结 | 关键证据 | 优化建议 |
|---|---|---|---|---|
| FENCE_TIMEOUT | 0.8 | Fence 超时: 13 次 Fence 等待超过 10ms,最大 39.1ms | ["总合成数: 744","慢合成数: 0 (0.0%)","平均合成耗时: 1.2ms","最大合成耗时: 5.7ms | 检查 GPU 负载,可能 GPU 工作队列积压导致 Fence 延迟 |
SurfaceFlinger 分析 - 数据缺失 : (无数据)
慢合成事件 (>1.5x VSync) : (无数据)
Fence 等待事件 (共 30 行)
| 时间 | 等待时间 | Fence 类型 | 严重程度 |
|---|---|---|---|
| 506733565175633 | 39055678 | waiting for presentFence 312 | critical |
| 506736448415997 | 29531198 | waiting for presentFence 1172 | critical |
| 506731601659593 | 18123593 | waiting for presentFence 509 | critical |
| 506733620715477 | 16679688 | waiting for presentFence 1106 | critical |
| 506736494413809 | 16519063 | waiting for presentFence 1142 | critical |
| 506733604252092 | 16446719 | waiting for presentFence 1182 | critical |
| 506736477960632 | 16445834 | waiting for presentFence 1164 | critical |
| 506736264419070 | 15957187 | waiting for presentFence 1134 | warning |
| 506734511449591 | 15095730 | waiting for presentFence 1139 | warning |
| 506737057133184 | 13627813 | waiting for presentFence 614 | warning |
| 506736564016466 | 12714062 | waiting for presentFence 732 | warning |
| 506734185079435 | 12239375 | waiting for presentFence 1120 | warning |
| 506733675407873 | 11393594 | waiting for presentFence 670 | warning |
| 506735439973185 | 9652344 | waiting for presentFence 1120 | warning |
| 506733563625686 | 9566093 | waiting for GPU completion 2 | warning |
| 506735990941935 | 9417604 | waiting for presentFence 1120 | warning |
| 506736106502195 | 9227396 | waiting for presentFence 176 | warning |
| 506736123035632 | 9204584 | waiting for presentFence 174 | warning |
| 506731791820686 | 9120729 | waiting for presentFence 813 | warning |
| 506734863554123 | 9018750 | waiting for presentFence 258 | warning |
| 506732516832978 | 8936406 | waiting for presentFence 451 | warning |
| 506731973117092 | 8883855 | waiting for presentFence 993 | warning |
| 506731956831415 | 8758490 | waiting for presentFence 927 | warning |
| 506734880236779 | 8702969 | waiting for presentFence 499 | warning |
| 506735423806466 | 8693281 | waiting for presentFence 560 | warning |
| ... 还有 5 行 |
合成阶段耗时 (共 4 行)
| 合成阶段 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 时间占比 |
|---|---|---|---|---|---|
| Present | 2886 | 4.070s | 1410086 | 39055678 | 79.5 |
| Composite | 731 | 858586661 | 1174537 | 5681510 | 16.8 |
| Commit | 393 | 119108695 | 303076 | 1309167 | 2.3 |
| Post Composition | 365 | 70025585 | 191851 | 490573 | 1.4 |
活跃 Layer 统计 (共 15 行)
| Layer | 帧数 | 总耗时 | 平均耗时 |
|---|---|---|---|
| presentFrameAndReleaseLayers for (4630946602912453524) | 365 | 10349524 | 28355 |
| REThreaded::drawLayers | 9 | 8869637 | 985515 |
| drawLayersInternal for (4630946602912453524) | 9 | 8760989 | 973443 |
| rebuildLayerStacks#0 | 730 | 5385161 | 7377 |
| oplus_rebuildLayerStacksBegin | 730 | 3297545 | 4517 |
| LayerLifecycleManager:commitChanges | 377 | 1287459 | 3415 |
| DrawLayer: OplusOSEdgeFloatBar#48055 | 9 | 1022814 | 113646 |
| OplusColorPickFill::traverseVisibleLayers | 365 | 992345 | 2719 |
| recordLayerHistoryBufferUpdate | 350 | 990679 | 2831 |
| qtiUpdateLayerState 226 | 365 | 844066 | 2313 |
| presentFrameAndReleaseLayers for (4630946929504945811) | 365 | 524689 | 1438 |
| DrawLayer: #33385 | 9 | 484011 | 53779 |
| DrawLayer: StatusBar#110 | 6 | 394166 | 65694 |
| DrawLayer: com.example.wechatfriendforcustomscroller/com.exa | 2 | 355730 | 177865 |
| drawLayers | 9 | 312448 | 34716 |
📋 优化方案与行动计划
结论 : SurfaceFlinger 分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:SurfaceFlinger 合成卡顿
涉及 Skill : surfaceflinger_analysis, sf_composition_in_range
- SurfaceFlinger 合成速度不达标,可能 GPU 渲染 / HWC 合成问题
- Action Plan :
- 检查
sf_composition_in_range中 GPU 合成耗时,减少 GPU 过度绘制 - 减少 Surface 并行更新数量(减少
sf_layer_count) - 对 Flutter:使用
SurfaceView而非TextureView减少 SF 合成负担 - 确保使用了硬件合成器(HWC),而非全部 GPU 合成
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
surfaceflinger_analysis
📊 Skill: cpu_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
目标进程 (共 1 行)
| UPID | PID | 进程名 |
|---|---|---|
| 885 | 13534 | com.example.wechatfriendforcustomscroller |
大小核分布(基于 capacity) (共 2 行)
| 核心类型 | Capacity | 运行时间 | 占比 | 调度次数 | 核心数 |
|---|---|---|---|---|---|
| prime (超大核) | 0 | 1526.094578 | 86.6 | 4216 | 5 |
| big (大核) | 0 | 237.04437 | 13.4 | 68 | 2 |
线程 CPU 使用 Top10 (共 10 行)
| TID | 线程名 | CPU 时间 | 调度次数 | 平均片长 | 线程类型 | 大核占比 |
|---|---|---|---|---|---|---|
| 13534 | rcustomscroller | 1036.631809 | 950 | 1.091 | main | 100 |
| 13585 | RenderThread | 478.00111 | 801 | 0.597 | worker | 100 |
| 13675 | binder:13534_4 | 73.149745 | 423 | 0.173 | worker | 100 |
| 13546 | HeapTaskDaemon | 64.594063 | 7 | 9.228 | worker | 100 |
| 13581 | OplusMFB | 55.151426 | 978 | 0.056 | worker | 100 |
| 15231 | GPU completion | 20.43126 | 716 | 0.029 | worker | 100 |
| 13604 | binder:13534_3 | 9.352031 | 360 | 0.026 | worker | 100 |
| 13545 | Jit thread pool | 9.037136 | 7 | 1.291 | worker | 100 |
| 13548 | FinalizerDaemon | 6.843177 | 3 | 2.281 | worker | 100 |
| 13580 | Profile Saver | 4.068021 | 1 | 4.068 | worker | 100 |
主线程状态 (共 5 行)
| 状态码 | 状态 | 持续时间 | 占比 | 次数 | IO 等待 |
|---|---|---|---|---|---|
| S | Sleeping (主动睡眠) | 4983.71337 | 82 | 860 | - |
| Running | Running (CPU执行中) | 1036.631809 | 17.1 | 950 | - |
| R | Runnable (等待调度) | 46.290028 | 0.8 | 927 | - |
| D | Disk Sleep (IO等待) | 9.778228 | 0.2 | 3 | - |
| R+ | Runnable+ (抢占等待) | 2.567082 | 0 | 16 | - |
调度延迟分析(Runnable 等待) (共 2 行)
| 等待时间 | 时间戳 | 持续时间 | 线程名 | 唤醒线程 | 唤醒进程 | 严重程度 |
|---|---|---|---|---|---|---|
| 1.807969 | 506734824905529 | 1807969 | rcustomscroller | - | - | normal |
| 1.777917 | 506733056921623 | 1777917 | rcustomscroller | - | - | normal |
主线程运行核心分布 (共 7 行)
| CPU | Capacity | 核心类型 | 运行时间 | 占比 | 调度次数 |
|---|---|---|---|---|---|
| 1 | 0 | prime | 599.789891 | 57.9 | 584 |
| 5 | 0 | big | 114.403225 | 11 | 38 |
| 6 | 0 | big | 96.484063 | 9.3 | 14 |
| 2 | 0 | prime | 75.738542 | 7.3 | 84 |
| 0 | 0 | prime | 67.410051 | 6.5 | 140 |
| 3 | 0 | prime | 57.430257 | 5.5 | 61 |
| 4 | 0 | prime | 25.37578 | 2.4 | 29 |
主线程阻塞函数 : (无数据)
CPU 频率使用分布 (共 30 行)
| CPU | Capacity | 核心类型 | 频率 (MHz) | 持续时间 | 占比 |
|---|---|---|---|---|---|
| 0 | 0 | prime | 3532 | 73.634114 | 0.9 |
| 0 | 0 | prime | 3321 | 48.798959 | 0.6 |
| 0 | 0 | prime | 3072 | 63.276197 | 0.8 |
| 0 | 0 | prime | 2918 | 56.418906 | 0.7 |
| 0 | 0 | prime | 2745 | 430.869273 | 5.5 |
| 0 | 0 | prime | 2400 | 239.6412 | 3.1 |
| 0 | 0 | prime | 1996 | 44.482864 | 0.6 |
| 0 | 0 | prime | 1785 | 55.038436 | 0.7 |
| 0 | 0 | prime | 1555 | 22.260677 | 0.3 |
| 0 | 0 | prime | 1363 | 167.044218 | 2.1 |
| 0 | 0 | prime | 1152 | 1074.270624 | 13.7 |
| 0 | 0 | prime | 960 | 2378.155676 | 30.4 |
| 0 | 0 | prime | 748 | 305.878283 | 3.9 |
| 0 | 0 | prime | 556 | 2847.992653 | 36.4 |
| 1 | 0 | prime | 3532 | 73.632083 | 0.9 |
| 1 | 0 | prime | 3321 | 48.798594 | 0.6 |
| 1 | 0 | prime | 3072 | 63.276354 | 0.8 |
| 1 | 0 | prime | 2918 | 56.419218 | 0.7 |
| 1 | 0 | prime | 2745 | 430.867135 | 5.5 |
| 1 | 0 | prime | 2400 | 239.629738 | 3.1 |
| 1 | 0 | prime | 1996 | 44.481563 | 0.6 |
| 1 | 0 | prime | 1785 | 55.036615 | 0.7 |
| 1 | 0 | prime | 1555 | 22.258123 | 0.3 |
| 1 | 0 | prime | 1363 | 167.037817 | 2.1 |
| 1 | 0 | prime | 1152 | 1074.271773 | 13.7 |
| ... 还有 5 行 |
主线程唤醒者分析 (共 15 行)
| 唤醒线程 | 唤醒进程 | 唤醒次数 | 总等待时间 | 平均等待 | IRQ 唤醒 |
|---|---|---|---|---|---|
| app | /system/bin/surfaceflinger | 363 | 17.524185 | 0.05 | 0 |
| RenderThread | com.example.wechatfriendforcustomscroller | 348 | 13.627191 | 0.04 | 0 |
| swapper | - | 77 | 2.654795 | 0.03 | 77 |
| InputDispatcher | system_server | 26 | 1.13745 | 0.04 | 0 |
| binder:13534_4 | com.example.wechatfriendforcustomscroller | 13 | 0.517032 | 0.04 | 1 |
| crtc_commit:284 | crtc_commit:284 | 5 | 0.506355 | 0.1 | 5 |
| TimerDispatch | /system/bin/surfaceflinger | 2 | 0.037343 | 0.02 | 2 |
| kworker/X24:0 | kworker/X24:0 | 2 | 0.059897 | 0.03 | 0 |
| surfaceflinger | /system/bin/surfaceflinger | 2 | 0.044688 | 0.02 | 2 |
| [GT]ColdPool#13 | com.tencent.mm:push | 1 | 0.026823 | 0.03 | 1 |
| binder:22735_2 | com.oplus.midas | 1 | 0.015312 | 0.02 | 1 |
| binder:22089_3 | com.oplus.subsys | 1 | 0.012812 | 0.01 | 1 |
| 1.ui | com.tencent.mm | 1 | 0.04698 | 0.05 | 1 |
| OplusMFB | com.example.wechatfriendforcustomscroller | 1 | 0.015573 | 0.02 | 0 |
| binder:8468_20 | com.android.phone | 1 | 0.117552 | 0.12 | 1 |
线程迁核稳定性(专家探针) (共 2 行)
| 进程 | 线程 | 运行样本 | 涉及 CPU 数 | 迁核次数 | 迁核占比 | 亲和性异常 |
|---|---|---|---|---|---|---|
| com.example.wechatfriendforcustomscroller | RenderThread | 804 | 7 | 587 | 73 | 1 |
| com.example.wechatfriendforcustomscroller | rcustomscroller | 950 | 7 | 350 | 36.8 | 1 |
Cache Miss 影响(专家探针) : (无数据)
📋 优化方案与行动计划
结论 : CPU 分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:CPU 负载过高
涉及 Skill : cpu_analysis, cpu_slice_analysis
- 某进程/线程占用 CPU 资源过多
- Action Plan :
- 使用
cpu_cluster_load_in_range检查大小核负载分布 - 使用
thread_affinity_violation检查线程亲和性违规 - 优化后台线程:使用线程池限流,减少调度竞争
- 检查是否有 CPU 密集型任务运行在主线程
- 使用
futex_wait_distribution分析锁竞争导致的调度延迟
- 使用
优化建议:调度延迟过高
涉及 Skill : sched_latency_in_range, scheduling_analysis
- 线程 Runnable 等待时间过长
- Action Plan :
- 检查
sched_latency_in_range中R状态等待超过 8ms 的线程 - 使用
task_migration_in_range检查任务迁移频率 - 使用
blocking_chain_analysis分析阻塞链 - 调整线程优先级(
android.os.Process.setThreadPriority) - 减少后台批量任务同时触发(使用 WorkManager 限流)
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
cpu_analysis- 子 Skill:
cpu_topology_view - 子 Skill:
thread_affinity_violation
- 子 Skill:
📈 Scroll Demo Customer 问题总结
| 指标 | 数值 |
|---|---|
| 运行的 Skills | 3 |
| 成功 | 3 |
| 诊断发现 | 0 |
| 数据表总数 | 29 |
Scroll Flutter SurfaceView (微信阅读)
| 字段 | 值 |
|---|---|
| 文件名 | Scroll-Flutter-SurfaceView-Wechat-Wenyiwen.pftrace |
| 文件大小 | 12.0 MB |
| 分析说明 | Flutter SurfaceView滑动分析 |
| Trace ID | c93b7cec-d7cf-4841-81a5-7100924352d0 |
📊 Skill: scrolling_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
显示配置 (共 1 行)
| 刷新率 | VSync 周期 | 来源 | 总帧数 |
|---|---|---|---|
| 120 | 8.33 | sf_vsync_counter | 0 |
滑动性能概览 : (无数据)
帧稳定性方差(专家探针) : (无数据)
掉帧类型分布 : (无数据)
🎯 分析结论 : (无数据)
滑动分析 - 数据源缺失 : (无数据)
滑动区间 : (无数据)
区间掉帧 : (无数据)
掉帧列表 : (无数据)
📋 优化方案与行动计划
结论 : 滑动性能分析分析完成
🟢 分析完成,未发现异常
关键指标:
- 总帧数: 0
分析耗时 0ms
优化建议:检测到滑动掉帧
涉及 Skill : scrolling_analysis, consumer_jank_detection
- 帧率不稳定,存在 Jank(长帧)
- Action Plan :
- 使用
jank_frame_detailSkill 定位掉帧根因(Binder/GC/IO/Rendering) - 减少主线程 UI 绘制负担:优化
Layout层级、使用ConstraintLayout - 使用
AsyncListDiffer/Paging 3实现渐进式列表加载 - 对 Flutter 应用:检查
build()方法中的耗时操作,使用RepaintBoundary - 分析
frame_pipeline_varianceSkill 查找管线各阶段波动
- 使用
优化建议:输入延迟过高
涉及 Skill : scroll_response_latency, input_to_frame_latency
- 从触摸输入到手帧输出延迟超标
- Action Plan :
- 使用
input_events_in_rangeSkill 分析输入事件分发延迟 - 检查
touch_to_display_latency完整流水线 - 确保主线程不阻塞超过 16ms(使用 StrictMode)
- 使用
MotionEvent批处理和预测减少延迟
- 使用
优化建议:渲染线程阻塞
涉及 Skill : render_thread_slices, frame_blocking_calls
- 渲染线程被 Binder/IO/同步锁阻塞
- Action Plan :
- 检查
lock_contention_in_rangeSkill 分析锁竞争 - 减少渲染管线的跨进程调用(SurfaceFlinger/Binder)
- Flutter 应用:使用 Impeller 替代 Skia 渲染引擎
- 对于 TextureView:切换到 SurfaceView 减少 GFX 管线开销
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
scrolling_analysis- 子 Skill:
cpu_topology_view
- 子 Skill:
📊 Skill: surfaceflinger_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
显示配置 (共 1 行)
| 刷新率 | VSync 周期 | 来源 |
|---|---|---|
| 120 | 8.33 | sf_vsync_counter |
SurfaceFlinger 合成概览 (共 1 行)
| 总合成数 | 平均合成耗时 | 最大合成耗时 | P95 合成耗时 | 慢合成次数 | 评级 |
|---|---|---|---|---|---|
| 1163 | 258580 | 2268750 | 627 | 0 | 优秀 |
GPU vs HWC 合成 (共 2 行)
| 合成方式 | 帧数 | 占比 | 平均耗时 | 最大耗时 |
|---|---|---|---|---|
| Other | 1163 | 75 | 258580 | 2268750 |
| HWC | 387 | 25 | 958 | 2032 |
SurfaceFlinger 分析结论 (共 1 行)
| 问题分类 | 置信度 | 根因总结 | 关键证据 | 优化建议 |
|---|---|---|---|---|
| NORMAL | 0.6 | SurfaceFlinger 合成性能正常 | ["总合成数: 1163","慢合成数: 0 (0.0%)","平均合成耗时: 0.3ms","最大合成耗时: 2.3m | SurfaceFlinger 运行正常,无需优化 |
SurfaceFlinger 分析 - 数据缺失 : (无数据)
慢合成事件 (>1.5x VSync) : (无数据)
Fence 等待事件 : (无数据)
合成阶段耗时 (共 3 行)
| 合成阶段 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 时间占比 |
|---|---|---|---|---|---|
| Present | 2472 | 648326968 | 262268 | 2062657 | 58.4 |
| Composite | 673 | 299401834 | 444876 | 2268750 | 27 |
| Commit | 413 | 163088162 | 394887 | 1207448 | 14.7 |
活跃 Layer 统计 (共 5 行)
| Layer | 帧数 | 总耗时 | 平均耗时 |
|---|---|---|---|
| updateLayerSnapshots | 388 | 87614836 | 225811 |
| LayerSnapshotBuilder:update | 388 | 10321103 | 26601 |
| partitionLayers | 388 | 9866979 | 25430 |
| presentFrameAndReleaseLayers for (4630946416801175443) | 387 | 5056820 | 13067 |
| recordLayerHistoryBufferUpdate | 385 | 2815471 | 7313 |
📋 优化方案与行动计划
结论 : SurfaceFlinger 分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:SurfaceFlinger 合成卡顿
涉及 Skill : surfaceflinger_analysis, sf_composition_in_range
- SurfaceFlinger 合成速度不达标,可能 GPU 渲染 / HWC 合成问题
- Action Plan :
- 检查
sf_composition_in_range中 GPU 合成耗时,减少 GPU 过度绘制 - 减少 Surface 并行更新数量(减少
sf_layer_count) - 对 Flutter:使用
SurfaceView而非TextureView减少 SF 合成负担 - 确保使用了硬件合成器(HWC),而非全部 GPU 合成
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
surfaceflinger_analysis
📊 Skill: gpu_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
GPU 频率概览 : (无数据)
GPU 内存概览 : (无数据)
GPU 分析结论 : (无数据)
GPU 分析 - 数据缺失 (共 2 行)
| 状态 | 缺失数据 | 建议 |
|---|---|---|
| 无法执行 GPU 分析 | android_gpu_frequency (GPU 频率数据) | 请确保 trace 采集时启用了 GPU 频率采集 (需要内核支持 gpu_frequency tracepoint) |
| 可用替代方案 | gpu_counter_track (可用) | 可尝试通过 gpu_counter_track 获取 GPU 频率和利用率数据 |
GPU 频率档位分布 : (无数据)
GPU 频率与帧渲染关联 : (无数据)
GPU 高负载时段 : (无数据)
📋 优化方案与行动计划
结论 : GPU 分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
(未生成自动优化建议 - 请结合具体数据手动分析)
📖 关联 Perfetto Skills 参考:
- 主 Skill:
gpu_analysis
📈 Scroll Flutter SurfaceView (微信阅读) 问题总结
| 指标 | 数值 |
|---|---|
| 运行的 Skills | 3 |
| 成功 | 3 |
| 诊断发现 | 0 |
| 数据表总数 | 25 |
Scroll Flutter TextureView (327项目)
| 字段 | 值 |
|---|---|
| 文件名 | Scroll-Flutter-327-TextureView.pftrace |
| 文件大小 | 7.0 MB |
| 分析说明 | Flutter TextureView滑动分析 |
| Trace ID | 0325b5a0-f3a6-4053-81ea-14cba605d7dc |
📊 Skill: scrolling_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
显示配置 (共 1 行)
| 刷新率 | VSync 周期 | 来源 | 总帧数 |
|---|---|---|---|
| 120 | 8.33 | sf_vsync_counter | 165 |
滑动性能概览 (共 1 行)
| 总帧数 | 感知掉帧 | 感知掉帧率 | Buffer Stuffing | BS 占比 | App 侧掉帧 | SF 侧掉帧 | 实际 FPS | 刷新率 | 平均呈现间隔 | P95 呈现间隔 | 评级 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 165 | 3 | 1.82 | 0 | 0 | 1 | 2 | 120 | 120 | 8653513 | 5059307 | 良好 |
帧稳定性方差(专家探针) : (无数据)
掉帧类型分布 (共 4 行)
| 掉帧类型 | 帧数 | 实际掉帧 | 假阳性 | 总耗时 | 平均耗时 | 类型标签 |
|---|---|---|---|---|---|---|
| App Deadline Missed | 1 | 1 | 0 | 0 | - | 标签:App |
| App Deadline Missed, Unknown Jank | 1 | 1 | 0 | 0 | - | 标签:App |
| Display HAL, App Deadline Missed | 1 | 1 | 0 | 0 | - | 标签:App |
| None | 162 | 0 | 0 | 421379840 | 2666961 | 标签:None(可能漏检) |
🎯 分析结论 : (无数据)
滑动分析 - 数据源缺失 : (无数据)
滑动区间 (共 1 行)
| 区间 | 进程 | 开始时间 | 结束时间 | 帧数 | 持续时间 | 持续时间 | 平均帧耗时 | 最大帧耗时 | FPS |
|---|---|---|---|---|---|---|---|---|---|
| 1 | com.example.friendscircle.v27.textureview | 272934635679239 | 272935943868248 | 158 | 1308.2 | 1308189009 | 2666961 | 13033906 | 120.8 |
区间掉帧 (共 1 行)
| 区间 | 总帧数 | 感知掉帧 | 感知掉帧率 | App 掉帧 | Buffer Stuffing | 最大跳帧 | 掉帧类型 |
|---|---|---|---|---|---|---|---|
| 1 | 158 | 0 | 0 | 0 | 0 | 0 | - |
掉帧列表 (共 3 行)
(表头过多,不在此处展开,共 47 列,3 行)
📋 优化方案与行动计划
结论 : 滑动性能分析分析完成
🟢 分析完成,未发现异常
关键指标:
- 总帧数: 165
- 总帧数: 165
- 掉帧数: 3
- 掉帧率: 1.82%
分析耗时 0ms
优化建议:检测到滑动掉帧
涉及 Skill : scrolling_analysis, consumer_jank_detection
- 帧率不稳定,存在 Jank(长帧)
- Action Plan :
- 使用
jank_frame_detailSkill 定位掉帧根因(Binder/GC/IO/Rendering) - 减少主线程 UI 绘制负担:优化
Layout层级、使用ConstraintLayout - 使用
AsyncListDiffer/Paging 3实现渐进式列表加载 - 对 Flutter 应用:检查
build()方法中的耗时操作,使用RepaintBoundary - 分析
frame_pipeline_varianceSkill 查找管线各阶段波动
- 使用
优化建议:输入延迟过高
涉及 Skill : scroll_response_latency, input_to_frame_latency
- 从触摸输入到手帧输出延迟超标
- Action Plan :
- 使用
input_events_in_rangeSkill 分析输入事件分发延迟 - 检查
touch_to_display_latency完整流水线 - 确保主线程不阻塞超过 16ms(使用 StrictMode)
- 使用
MotionEvent批处理和预测减少延迟
- 使用
优化建议:渲染线程阻塞
涉及 Skill : render_thread_slices, frame_blocking_calls
- 渲染线程被 Binder/IO/同步锁阻塞
- Action Plan :
- 检查
lock_contention_in_rangeSkill 分析锁竞争 - 减少渲染管线的跨进程调用(SurfaceFlinger/Binder)
- Flutter 应用:使用 Impeller 替代 Skia 渲染引擎
- 对于 TextureView:切换到 SurfaceView 减少 GFX 管线开销
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
scrolling_analysis- 子 Skill:
cpu_topology_view
- 子 Skill:
📊 Skill: surfaceflinger_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
显示配置 (共 1 行)
| 刷新率 | VSync 周期 | 来源 |
|---|---|---|
| 120 | 8.33 | sf_vsync_counter |
SurfaceFlinger 合成概览 (共 1 行)
| 总合成数 | 平均合成耗时 | 最大合成耗时 | P95 合成耗时 | 慢合成次数 | 评级 |
|---|---|---|---|---|---|
| 522 | 241760 | 2495625 | 469 | 0 | 优秀 |
GPU vs HWC 合成 (共 2 行)
| 合成方式 | 帧数 | 占比 | 平均耗时 | 最大耗时 |
|---|---|---|---|---|
| Other | 522 | 75.2 | 241760 | 2495625 |
| HWC | 172 | 24.8 | 933 | 2031 |
SurfaceFlinger 分析结论 (共 1 行)
| 问题分类 | 置信度 | 根因总结 | 关键证据 | 优化建议 |
|---|---|---|---|---|
| NORMAL | 0.6 | SurfaceFlinger 合成性能正常 | ["总合成数: 522","慢合成数: 0 (0.0%)","平均合成耗时: 0.2ms","最大合成耗时: 2.5ms | SurfaceFlinger 运行正常,无需优化 |
SurfaceFlinger 分析 - 数据缺失 : (无数据)
慢合成事件 (>1.5x VSync) : (无数据)
Fence 等待事件 (共 1 行)
| 时间 | 等待时间 | Fence 类型 | 严重程度 |
|---|---|---|---|
| 272934624363093 | 1024635 | isFencePending | notice |
合成阶段耗时 (共 3 行)
| 合成阶段 | 次数 | 总耗时 | 平均耗时 | 最大耗时 | 时间占比 |
|---|---|---|---|---|---|
| Present | 980 | 267803040 | 273268 | 2193438 | 58.3 |
| Composite | 301 | 125612957 | 417319 | 2495625 | 27.4 |
| Commit | 210 | 65682865 | 312776 | 870417 | 14.3 |
活跃 Layer 统计 (共 5 行)
| Layer | 帧数 | 总耗时 | 平均耗时 |
|---|---|---|---|
| updateLayerSnapshots | 174 | 33961462 | 195181 |
| LayerSnapshotBuilder:update | 174 | 3390897 | 19488 |
| partitionLayers | 174 | 3164268 | 18185 |
| presentFrameAndReleaseLayers for (4630946416801175443) | 172 | 1776781 | 10330 |
| recordLayerHistoryBufferUpdate | 165 | 354275 | 2147 |
📋 优化方案与行动计划
结论 : SurfaceFlinger 分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
优化建议:SurfaceFlinger 合成卡顿
涉及 Skill : surfaceflinger_analysis, sf_composition_in_range
- SurfaceFlinger 合成速度不达标,可能 GPU 渲染 / HWC 合成问题
- Action Plan :
- 检查
sf_composition_in_range中 GPU 合成耗时,减少 GPU 过度绘制 - 减少 Surface 并行更新数量(减少
sf_layer_count) - 对 Flutter:使用
SurfaceView而非TextureView减少 SF 合成负担 - 确保使用了硬件合成器(HWC),而非全部 GPU 合成
- 检查
📖 关联 Perfetto Skills 参考:
- 主 Skill:
surfaceflinger_analysis
📊 Skill: gpu_analysis
状态 : ✅ 成功 | 耗时 : 0ms | 置信度: medium
完整分析数据
GPU 频率概览 : (无数据)
GPU 内存概览 : (无数据)
GPU 分析结论 : (无数据)
GPU 分析 - 数据缺失 (共 2 行)
| 状态 | 缺失数据 | 建议 |
|---|---|---|
| 无法执行 GPU 分析 | android_gpu_frequency (GPU 频率数据) | 请确保 trace 采集时启用了 GPU 频率采集 (需要内核支持 gpu_frequency tracepoint) |
| 可用替代方案 | gpu_counter_track (可用) | 可尝试通过 gpu_counter_track 获取 GPU 频率和利用率数据 |
GPU 频率档位分布 : (无数据)
GPU 频率与帧渲染关联 : (无数据)
GPU 高负载时段 : (无数据)
📋 优化方案与行动计划
结论 : GPU 分析分析完成
🟢 分析完成,未发现异常
分析耗时 0ms
(未生成自动优化建议 - 请结合具体数据手动分析)
📖 关联 Perfetto Skills 参考:
- 主 Skill:
gpu_analysis
📈 Scroll Flutter TextureView (327项目) 问题总结
| 指标 | 数值 |
|---|---|
| 运行的 Skills | 3 |
| 成功 | 3 |
| 诊断发现 | 0 |
| 数据表总数 | 25 |
附录:Perfetto Skill 分析能力总览
本次分析涉及的 Skills
| Skill ID | 类型 | 用途 |
|---|---|---|
startup_analysis |
composite | 应用启动性能分析(冷/温/热启动) |
cpu_analysis |
composite | CPU 调度与负载分析 |
memory_analysis |
composite | 内存使用与 GC 行为分析 |
scrolling_analysis |
composite | 滑动卡顿分析 |
surfaceflinger_analysis |
composite | SurfaceFlinger 合成性能 |
gpu_analysis |
composite | GPU 频率与渲染分析 |