Introducing RheaTrace: An Enhanced Android Performance Tracing Tool
RheaTrace, an open‑source high‑performance tracing tool developed by ByteDance, extends Systrace by adding detailed I/O data, method‑level timing, and improved efficiency, offering Android developers a more comprehensive way to capture and analyze performance issues despite some setup complexities and platform limitations.
Many Android performance engineers have used Systrace, but it is limited to specific system calls, lacks application‑level timing, and does not provide detailed I/O information.
ByteDance’s open‑source tool /system/bin/atrace (also known as btrace or RheaTrace) builds on Systrace and improves it in three key ways:
Efficiency: automatically injects custom events into app methods at compile time with flexible configuration rules.
Performance: rewrites the real‑time atrace data writing process, achieving up to 400% speed gains.
Usability: provides richer I/O data and a novel solution to ensure trace completeness even when exceptions occur.
IO behavior – RheaTrace captures detailed I/O during app cold‑start. By adding the disk tag to the trace command and opening the resulting trace with Perfetto, developers can see precise I/O operations that Systrace only shows as generic events.
Function timing – Unlike Systrace, RheaTrace displays method‑level durations. Adding a simple Thread.sleep(2000) in a click handler results in a trace entry named haoshiMethod , allowing direct attribution of the delay.
Despite its advantages, RheaTrace has several limitations: it only runs on Python 2.7, does not support Windows, captures traces only from the main process, requires external‑storage permissions, and its output systrace.html must be opened with perfetto rather than directly in a browser.
Overall, RheaTrace offers a much richer performance‑analysis experience than native Systrace, though its setup steps are more involved; future versions are expected to address these shortcomings.
Coolpad Technology Team
Committed to advancing technology and supporting innovators. The Coolpad Technology Team regularly shares forward‑looking insights, product updates, and tech news. Tech experts are welcome to join; everyone is invited to follow us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.