Android 4.1-how to use systrace for Performance Analysis

Source: Internet
Author: User

Systrace is a set of tools introduced by Android 4.1 For performance analysis. It is based on the ftrace mechanism of the Linux kernel (used to track function calls in the Linux kernel) and can output the current function call status of each thread, in addition, it can be compared with the current CPU thread running status, display vsync interval, surfaceflinger window composite interval, and other system information on the same timeline, it is easier and easier for us to analyze the running status of programs at a certain point in the current system context, for example, you can easily analyze which functions of your program occupy too much time in the UI thread, thus missing the current window
Composite causes frame drop.

 

How to use:

Http://developer.android.com/tools/help/systrace.html

 

How to analyze performance:

Http://developer.android.com/tools/debugging/systrace.html

 

Ftrace-related materials:

Http://www.kernel.org/doc/Documentation/trace/ftrace.txt

Https://www.osadl.org/fileadmin/dam/presentations/RTLWS11/rostedt-ftrace.pdf

 

Support description:

1. Only supported in Android 4.1 +

2. Non-native Rom such as CM may not be supported. Check whether the system has this directory-/sys/kernel/debug/tracing.

3. The systrace. py script can only be run in Ubuntu, but cannot be run in windows.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.