OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # find the name of the log file to process, it must not start with a dash. | 3 # find the name of the log file to process, it must not start with a dash. |
4 log_file="v8.log" | 4 log_file="v8.log" |
5 for arg in "$@" | 5 for arg in "$@" |
6 do | 6 do |
7 if ! expr "X${arg}" : "^X-" > /dev/null; then | 7 if ! expr "X${arg}" : "^X-" > /dev/null; then |
8 log_file=${arg} | 8 log_file=${arg} |
9 fi | 9 fi |
10 done | 10 done |
11 | 11 |
12 tools_path=`cd $(dirname "$0");pwd` | 12 tools_path=`cd $(dirname "$0");pwd` |
13 if test ! "$D8_PATH"; then | 13 if test ! "$D8_PATH"; then |
14 d8_public=`which d8` | 14 d8_public=`which d8` |
15 if test -x "$d8_public"; then D8_PATH=$(dirname "$d8_public"); fi | 15 if test -x "$d8_public"; then D8_PATH=$(dirname "$d8_public"); fi |
16 fi | 16 fi |
17 | 17 |
18 if test -n "$D8_PATH"; then | 18 if test ! -n "$D8_PATH"; then |
19 D8_PATH=$tools_path/.. | 19 D8_PATH=$tools_path/.. |
20 fi | 20 fi |
21 | 21 |
22 d8_exec=$D8_PATH/d8 | 22 d8_exec=$D8_PATH/d8 |
23 | 23 |
24 if test ! -x "$d8_exec"; then | 24 if test ! -x "$d8_exec"; then |
25 D8_PATH=`pwd`/out/native | 25 D8_PATH=`pwd`/out/native |
26 d8_exec=$D8_PATH/d8 | 26 d8_exec=$D8_PATH/d8 |
27 fi | 27 fi |
28 | 28 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 -- $@ $options 2>/dev/null > timer-events.plot | 84 -- $@ $options 2>/dev/null > timer-events.plot |
85 | 85 |
86 success=$? | 86 success=$? |
87 if test $success -ne 0; then | 87 if test $success -ne 0; then |
88 cat timer-events.plot | 88 cat timer-events.plot |
89 else | 89 else |
90 cat timer-events.plot | gnuplot > timer-events.png | 90 cat timer-events.plot | gnuplot > timer-events.png |
91 fi | 91 fi |
92 | 92 |
93 rm -f timer-events.plot | 93 rm -f timer-events.plot |
OLD | NEW |