Skip to main content
QUICK REVIEW

[论文解读] PersisDroid: Android Performance Diagnosis via Anatomizing Asynchronous Executions

Yu Kang, Yangfan Zhou|arXiv (Cornell University)|Dec 25, 2015
Software System Performance and Reliability参考文献 15被引用 5
一句话总结

PersisDroid 是一种动态插桩工具,通过分析由 UI 事件触发的异步执行来诊断 Android 应用性能。它将这些执行分类为六种类型,实现在多种 Android 设备上的低开销、高兼容性跟踪,并识别出诸如长队列时间以及第三方库使用不当等性能瓶颈,成功检测出 30 个开源应用中的 20 个存在潜在问题。

ABSTRACT

Android applications (apps) grow dramatically in recent years. Apps are user interface (UI) centric typically. Rapid UI responsiveness is key consideration to app developers. However, we still lack a handy tool for profiling app performance so as to diagnose performance problems. This paper presents PersisDroid, a tool specifically designed for this task. The key notion of PersisDroid is that the UI-triggered asynchronous executions also contribute to the UI performance, and hence its performance should be properly captured to facilitate performance diagnosis. However, Android allows tremendous ways to start the asynchronous executions, posing a great challenge to profiling such execution. This paper finds that they can be grouped into six categories. As a result, they can be tracked and profiled according to the specifics of each category with a dynamic instrumentation approach carefully tailored for Android. PersisDroid can then properly profile the asynchronous executions in task granularity, which equips it with low-overhead and high compatibility merits. Most importantly, the profiling data can greatly help the developers in detecting and locating performance anomalies. We code and open-source release PersisDroid. The tool is applied in diagnosing 20 open-source apps, and we find 11 of them contain potential performance problems, which shows its effectiveness in performance diagnosis for Android apps.

研究动机与目标

  • 为解决缺乏有效诊断 Android 应用性能的工具,特别是与异步 UI 触发操作相关的性能问题。
  • 克服在 Android 应用中跟踪各种非结构化异步执行启动方式的挑战。
  • 设计一种轻量级、兼容性好且高效的性能分析解决方案,捕获异步任务行为,而无需重新编译内核或框架。
  • 使开发者能够检测并定位性能异常,如长队列时间以及第三方库中任务管理不当的问题。
  • 通过在 30 个开源 Android 应用上的实际评估,证明该工具的有效性。

提出的方法

  • 基于运行时模式,将 Android 中所有可能启动异步执行的方式分类为六种不同的类型。
  • 仅对通用框架方法应用动态插桩,最大限度降低开销,并确保在多种 Android 设备和操作系统版本上的兼容性。
  • 以任务粒度对异步任务进行性能分析,捕获执行时间、队列时间以及任务生命周期事件。
  • 将队列时间作为检测性能问题的关键指标,例如因执行器使用不当导致的任务串行化。
  • 利用性能分析数据检测常见反模式,包括 AsyncTask 的 execute 与 executeOnExecutor 使用不当,以及未取消的第三方异步任务。
  • 采用轻量级、非侵入式插桩方法,避免修改内核或框架,从而可在商业设备上直接部署。

实验结果

研究问题

  • RQ1如何系统性地对 Android 应用中由 UI 事件触发的异步执行进行分类和跟踪?
  • RQ2如何设计一种轻量级、兼容性好且高效的性能分析方法,无需源代码或内核修改即可分析异步任务性能?
  • RQ3通过分析异步任务行为(尤其是队列时间)是否能有效揭示真实 Android 应用中的性能瓶颈?
  • RQ4此类分析在多大程度上能够检测到常见反模式,如 AsyncTask 使用不当或未取消的第三方异步任务?
  • RQ5该工具在识别多样化的开源 Android 应用中的真实性能问题方面效果如何?

主要发现

  • PersisDroid 在 30 个开源 Android 应用中成功识别出 20 个存在潜在性能问题的应用,展现出强大的实际检测能力。
  • 该工具检测到由过长队列时间引起的问题,表明因异步执行机制使用不当导致的任务串行化。
  • 通过性能分析,可靠检测到常见反模式,如在 AsyncTask 中使用默认的 execute 方法而非 executeOnExecutor。
  • 该工具发现 AsynHttpClient 等库中存在未取消的第三方异步任务,这是资源泄漏和性能下降的已知根源。
  • 动态插桩方法实现低开销和高兼容性,可在无需重新编译的情况下部署于广泛范围的商业 Android 设备上。
  • 性能分析数据使开发者能够高精度定位性能异常,显著减少手动调试的工作量。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。