commit | 78fc9b1c2d27161f3c9ff943a8249a4219dcba4b | [log] [tgz] |
---|---|---|
author | Eric Holk <eholk@google.com> | Wed Mar 06 20:15:03 2019 -0800 |
committer | Eric Holk <eholk@google.com> | Thu Mar 07 10:21:37 2019 -0800 |
tree | a794a270a9c327a2b8489f624578e3deead5a1e6 | |
parent | acfb58a5f7ec3bb11d13b14755400028ba2663de [diff] |
Teach StartupAnalyzer to handle threads with no slices Sometimes we end up with threads that have no slices to them, which was crashing the startup analyzer. This change uses POSITIVE_INFINITY as the start time for threads with no slices. This change also includes a regression test that was generated by reducing a trace that exercised this bug. Further regression tests should now be easier to add. Test: atest Change-Id: Ibc82abb6406689b2e1f8c15558458d16e9f3f65d
Trebuchet is a Kotlin library for parsing and analyzing Android trace files generated by the atrace
or systrace
commands. This is not an officially supported Google product.
The code for the Trebuchet library can be found in the core/
directory.
Trebuchet comes bundled with several programs for analyzing one or more trace files.
The Startup Analyzer program takes a trace file, detects any startup events that occurred during the traced time period, and prints information about the events. If Trebuchet is built using the Android build system, there will be a StartupAnalyzerKt program placed into a directory that is a member of the PATH system variable. If you wish to use Gradle, you can use the startup-analyzer.sh
script located in the scripts/
directory.
The Startup Summarizer program takes a set of trace files, detects startup events in each file, and computes average and standard deviation for startup stats, broken down by program name, compiler filter, and cache status. If Trebuchet is built using the Android build system, there will be a StartupSummarizerKt program placed into a directory that is a member of the PATH system variable. If you wish to use Gradle, you can use the startup-summarizer.sh
script located in the scripts/
directory.
The scripts/
directory contains a shell script called run-startup.sh
, which will start a trace, launch an activity given a package name and an activity name, transfer the trace file to the host machine, and run the StartupAnalyzer.