Commit 85bd9fdf authored by Shibin George's avatar Shibin George
Browse files

Create a new WD trace file for ease of debugging

With the new trace dumping mechanism, for each half of
watchdog trace collection, a new file will be created.
To make it easier to debug watchdog timeouts in system_server,
write both the set of traces into a new file in /data/anr.

The naming format of the new file will be:
traces_SystemServer_WDT_<date&time>_pid<system_server_pid>

This patch also takes care of the old tracing mechanism
where traces are written to /data/anr/traces.txt. In this
case, we again create a new file in /data/anr with the
same naming format as above, with content copied from
traces.txt.

Also:
1)  Add support for forced kernel-panic when
    persist.sys.crashOnWatchdog is set to true.

2)  Collect /sys/kernel/debug/binder/state file
    and write to /data/anr to provide more info
    about the state of binder transactions at the
    time of watchdog bite.

Tests: adb shell am hang with:
       1) dalvik.vm.stack-trace-dir set
       2) dalvik.vm.stack-trace-file set and
          dalvik.vm.stack-trace-dir unset.

CRs-Fixed: 2165856

Change-Id: Ia4971dcce5e440acf3351bd4f81fa5b9906b17dc
parent 0ee57c06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment