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

Commit 963d95d1 authored by Josh Gao's avatar Josh Gao Committed by Gerrit Code Review
Browse files

Merge "adb: add script to trace adbd."

parents 0c0f0427 52df920f
Loading
Loading
Loading
Loading

adb/sysdeps_win32_test.cpp

100755 → 100644
+0 −0

File mode changed from 100755 to 100644.

adb/trace.sh

0 → 100755
+17 −0
Original line number Diff line number Diff line
set -e

if ! [ -e $ANDROID_BUILD_TOP/external/chromium-trace/systrace.py ]; then
    echo "error: can't find systrace.py at \$ANDROID_BUILD_TOP/external/chromium-trace/systrace.py"
    exit 1
fi

adb shell "sleep 1; atrace -b 65536 --async_start adb sched power freq idle disk mmc load"
adb shell killall adbd
adb wait-for-device
echo "press enter to finish..."
read
TRACE_TEMP=`mktemp /tmp/trace.XXXXXX`
echo Saving trace to ${TRACE_TEMP}, html file to ${TRACE_TEMP}.html
adb shell atrace --async_stop -z > ${TRACE_TEMP}
$ANDROID_BUILD_TOP/external/chromium-trace/systrace.py --from-file=${TRACE_TEMP} -o ${TRACE_TEMP}.html
chrome ${TRACE_TEMP}.html