Home | History | Annotate | Download | only in adb
      1 set -e
      2 
      3 if ! [ -e $ANDROID_BUILD_TOP/external/chromium-trace/systrace.py ]; then
      4     echo "error: can't find systrace.py at \$ANDROID_BUILD_TOP/external/chromium-trace/systrace.py"
      5     exit 1
      6 fi
      7 
      8 adb shell "sleep 1; atrace -b 65536 --async_start adb sched power freq idle disk mmc load"
      9 adb shell killall adbd
     10 adb wait-for-device
     11 echo "press enter to finish..."
     12 read
     13 TRACE_TEMP=`mktemp /tmp/trace.XXXXXX`
     14 echo Saving trace to ${TRACE_TEMP}, html file to ${TRACE_TEMP}.html
     15 adb shell atrace --async_stop -z > ${TRACE_TEMP}
     16 $ANDROID_BUILD_TOP/external/chromium-trace/systrace.py --from-file=${TRACE_TEMP} -o ${TRACE_TEMP}.html
     17 chrome ${TRACE_TEMP}.html
     18