Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91e1b013 authored by Yasuhiro Matsuda's avatar Yasuhiro Matsuda
Browse files

resolved conflicts for merge of 70ab38a5 to master

Change-Id: I7092ecb87f4020add5fe8843f188955a5579c284
parents a50bd8d3 70ab38a5
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -377,6 +377,29 @@ system_server: 15350 15150 (-200)
bootanimation ends at: 33790 31230 (-2560)


Systrace
--------
Systrace [1] can be used for obtaining performance analysis reports during boot
time on userdebug or eng builds.
Here is an example of trace events of "wm" and "am" categories:

  $ANDROID_BUILD_TOP/external/chromium-trace/systrace.py wm am --boot

This command will cause the device to reboot. After the device is rebooted and
the boot sequence has finished, the trace report is obtained from the device
and written as trace.html on the host by hitting Ctrl+C.

LIMITATION
Recording trace events is started after persistent properties are loaded, so
the trace events that are emitted before that are not recorded. Several
services such as vold, surfaceflinger, and servicemanager are affected by this
limitation since they are started before persistent properties are loaded.
Zygote initialization and the processes that are forked from the zygote are not
affected.

[1] http://developer.android.com/tools/help/systrace.html


Debugging init
--------------
By default, programs executed by init will drop stdout and stderr into
+1 −0
Original line number Diff line number Diff line
@@ -311,6 +311,7 @@ on post-fs-data
    mkdir /data/local 0751 root root
    mkdir /data/misc/media 0700 media media
    mkdir /data/misc/vold 0700 root root
    mkdir /data/misc/boottrace 0771 system shell

    # For security reasons, /data/local/tmp should always be empty.
    # Do not place files or directories in /data/local/tmp
+8 −0
Original line number Diff line number Diff line
@@ -33,3 +33,11 @@ on boot
# Allow only the shell group to read and truncate the kernel trace.
    chown root shell /sys/kernel/debug/tracing/trace
    chmod 0660 /sys/kernel/debug/tracing/trace

on property:persist.debug.atrace.boottrace=1
    start boottrace

# Run atrace with the categories written in a file
service boottrace /system/bin/atrace --async_start -f /data/misc/boottrace/categories
    disabled
    oneshot