Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: tools/plot-timer-events

Issue 1961873002: tools: Fix a syntax error in plot-timer-events (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 --log-internal-timer-events -e "$calibration_script" > /dev/null 63 --log-internal-timer-events -e "$calibration_script" > /dev/null
64 t_2_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \ 64 t_2_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \
65 | tail -n1 | awk -F, '{print $3}'` 65 | tail -n1 | awk -F, '{print $3}'`
66 t_2_end=`grep "timer-event-end,\"V8.Execute\"" $calibration_log \ 66 t_2_end=`grep "timer-event-end,\"V8.Execute\"" $calibration_log \
67 | tail -n1 | awk -F, '{print $3}'` 67 | tail -n1 | awk -F, '{print $3}'`
68 n_2=`grep "timer-event\|tick" $calibration_log | wc -l` 68 n_2=`grep "timer-event\|tick" $calibration_log | wc -l`
69 69
70 rm $calibration_log 70 rm $calibration_log
71 71
72 # Overhead in picoseconds. 72 # Overhead in picoseconds.
73 options=--distortion= 73 distortion=`echo "1000*(($t_1_end - $t_1_start) - ($t_2_end - $t_2_start)) \
74 options+=`echo "1000*(($t_1_end - $t_1_start) - ($t_2_end - $t_2_start)) \
75 / ($n_1 - $n_2)" | bc` 74 / ($n_1 - $n_2)" | bc`
76 echo $options 75 options="--distortion=$distortion"
77 fi 76 fi
78 77
79 cat $log_file | 78 cat $log_file |
80 $d8_exec $tools_path/csvparser.js $tools_path/splaytree.js \ 79 $d8_exec $tools_path/csvparser.js $tools_path/splaytree.js \
81 $tools_path/codemap.js $tools_path/profile.js $tools_path/profile_view.js \ 80 $tools_path/codemap.js $tools_path/profile.js $tools_path/profile_view.js \
82 $tools_path/logreader.js $tools_path/tickprocessor.js \ 81 $tools_path/logreader.js $tools_path/tickprocessor.js \
83 $tools_path/profviz/composer.js $tools_path/profviz/stdio.js \ 82 $tools_path/profviz/composer.js $tools_path/profviz/stdio.js \
84 -- $@ $options 2>/dev/null > timer-events.plot 83 -- $@ $options 2>/dev/null > timer-events.plot
85 84
86 success=$? 85 success=$?
87 if test $success -ne 0; then 86 if test $success -ne 0; then
88 cat timer-events.plot 87 cat timer-events.plot
89 else 88 else
90 cat timer-events.plot | gnuplot > timer-events.png 89 cat timer-events.plot | gnuplot > timer-events.png
91 fi 90 fi
92 91
93 rm -f timer-events.plot 92 rm -f timer-events.plot
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698