Commit 731ebc0e authored by mlippautz's avatar mlippautz Committed by Commit bot

[tools] Default to stdin for processing in eval_gc_time.sh

NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1817063002

Cr-Commit-Position: refs/heads/master@{#34949}
parent 6703cce1
...@@ -7,11 +7,16 @@ ...@@ -7,11 +7,16 @@
# Convenience Script used to rank GC NVP output. # Convenience Script used to rank GC NVP output.
print_usage_and_die() { print_usage_and_die() {
echo "Usage: $0 new-gen-rank|old-gen-rank max|avg logfile" echo "Usage: $0 RANK SORT [LOGFILE]"
echo ""
echo "Arguments:"
echo " RANK: old-gen-rank | new-gen-rank"
echo " SORT: max | avg"
echo " LOGFILE: the file to process. will default to /dev/stdin"
exit 1 exit 1
} }
if [ $# -ne 3 ]; then if [[ $# -lt 2 || $# -gt 3 ]]; then
print_usage_and_die print_usage_and_die
fi fi
...@@ -31,7 +36,11 @@ case $2 in ...@@ -31,7 +36,11 @@ case $2 in
print_usage_and_die print_usage_and_die
esac esac
LOGFILE=$3 if [ $# -eq 3 ]; then
LOGFILE=$3
else
LOGFILE=/dev/stdin
fi
GENERAL_INTERESTING_KEYS="\ GENERAL_INTERESTING_KEYS="\
pause \ pause \
...@@ -95,7 +104,7 @@ case $OP in ...@@ -95,7 +104,7 @@ case $OP in
${INTERESTING_NEW_GEN_KEYS} ${INTERESTING_NEW_GEN_KEYS}
;; ;;
old-gen-rank) old-gen-rank)
cat $LOGFILE | grep "gc=ms" | grep "reduce_memory=0" | grep -v "steps=0" \ cat $LOGFILE | grep "gc=ms" \
| $BASE_DIR/eval_gc_nvp.py \ | $BASE_DIR/eval_gc_nvp.py \
--no-histogram \ --no-histogram \
--rank $RANK_MODE \ --rank $RANK_MODE \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment