tools/memory/collect_b2g_uss_data.sh
author Dave Huseby <dhuseby@mozilla.com>
Thu, 20 Feb 2014 08:50:54 -0500
changeset 169666 9ab12f79f735b6addd20478a7d84a5add4802f6a
permissions -rw-r--r--
Bug 972536 - Add a tool for gathering USS memory data for a process over time for memory leak detection. r=dbaron

#!/bin/sh

if [ $# -ne 2 ]
then
    echo "Usage: `basename $0` <app title> <output_file.csv>"
    exit 1
fi

while true
do
    sample=`adb shell b2g-procrank | grep "^${1}" | awk '{ print $6 }' | sed 's/.$//'`
    echo "$sample"
    echo "$sample" >> "$2"
    sleep 1
done