Bug 1080291 (part 3) - Remove watch.sh. r=dbaron.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 12 Oct 2014 17:29:18 -0700
changeset 210047 19a3b5083aaa874c76dfd575cdd4fd8dbe2a580b
parent 210046 90c895fa9a9da2d9a7afceef4c6e5fd70ed0318d
child 210048 332966bc7aa2b5da5442935968a22cfa17209f37
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersdbaron
bugs1080291
milestone35.0a1
Bug 1080291 (part 3) - Remove watch.sh. r=dbaron.
tools/footprint/watch.sh
deleted file mode 100755
--- a/tools/footprint/watch.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# Treats the arguments as a command that is to be forked and observed;
-# e.g.,
-#
-#   watch.sh ./mozilla -f bloaturls.txt
-#
-# Periodically snap-shots the virtual memory info of the process, and
-# dumps the output to ``watch.out''
-
-# Clear the output file
-OUTPUT_FILE=watch.out
-INTERVAL=10
-
-while [ $# -gt 0 ]; do
-    case "$1" in
-    -o) OUTPUT_FILE=$2
-        shift 2
-        ;;
-    -i) INTERVAL=$2
-        shift 2
-        ;;
-    *)  break
-        ;;
-    esac
-done
-
-rm -f ${OUTPUT_FILE}
-
-echo "vmsize vmexe vmlib vmdata vmstk vmrss" > ${OUTPUT_FILE}
-
-# treat the arguments as the command to execute
-$* &
-
-# remember the process ID
-PID=$!
-
-while [ -e /proc/${PID} ]; do
-    cat /proc/${PID}/status |\
-    awk '$1=="VmSize:" { vmsize = $2; }
-$1=="VmData:" { vmdata = $2; }
-$1=="VmStk:" { vmstk = $2; }
-$1=="VmExe:" { vmexe = $2; }
-$1=="VmLib:" { vmlib = $2; }
-$1=="VmRSS:" { vmrss = $2; }
-END { print vmsize, vmexe, vmlib, vmdata, vmstk, vmrss; }' >> ${OUTPUT_FILE}
-    sleep ${INTERVAL}
-done