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

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

Issue 273213002: Pass --nologfile-per-isolate to d8 in plot-timer-events calibration code (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 19 matching lines...) Expand all
30 echo "d8 shell not found in $D8_PATH" 30 echo "d8 shell not found in $D8_PATH"
31 echo "To build, execute 'make native' from the V8 directory" 31 echo "To build, execute 'make native' from the V8 directory"
32 exit 1 32 exit 1
33 fi 33 fi
34 34
35 if [[ "$@" != *--distortion* ]]; then 35 if [[ "$@" != *--distortion* ]]; then
36 # Try to find out how much the instrumentation overhead is. 36 # Try to find out how much the instrumentation overhead is.
37 calibration_log=calibration.log 37 calibration_log=calibration.log
38 calibration_script="for (var i = 0; i < 1000000; i++) print();" 38 calibration_script="for (var i = 0; i < 1000000; i++) print();"
39 39
40 $d8_exec --nocrankshaft --prof --logfile $calibration_log \ 40 $d8_exec --nocrankshaft --prof --log-timer-events \
41 --log-timer-events -e "$calibration_script" > /dev/null 41 --logfile $calibration_log --nologfile-per-isolate \
42 -e "$calibration_script" > /dev/null
42 t_1_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \ 43 t_1_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \
43 | tail -n1 | awk -F, '{print $3}'` 44 | tail -n1 | awk -F, '{print $3}'`
44 t_1_end=`grep "timer-event-end,\"V8.Execute\"" $calibration_log \ 45 t_1_end=`grep "timer-event-end,\"V8.Execute\"" $calibration_log \
45 | tail -n1 | awk -F, '{print $3}'` 46 | tail -n1 | awk -F, '{print $3}'`
46 n_1=`grep "timer-event\|tick" $calibration_log | wc -l` 47 n_1=`grep "timer-event\|tick" $calibration_log | wc -l`
47 48
48 $d8_exec --nocrankshaft --prof --logfile $calibration_log \ 49 $d8_exec --nocrankshaft --prof --log-internal-timer-events \
49 --log-internal-timer-events -e "$calibration_script" > /dev/null 50 --logfile $calibration_log --nologfile-per-isolate \
51 -e "$calibration_script" > /dev/null
50 t_2_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \ 52 t_2_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \
51 | tail -n1 | awk -F, '{print $3}'` 53 | tail -n1 | awk -F, '{print $3}'`
52 t_2_end=`grep "timer-event-end,\"V8.Execute\"" $calibration_log \ 54 t_2_end=`grep "timer-event-end,\"V8.Execute\"" $calibration_log \
53 | tail -n1 | awk -F, '{print $3}'` 55 | tail -n1 | awk -F, '{print $3}'`
54 n_2=`grep "timer-event\|tick" $calibration_log | wc -l` 56 n_2=`grep "timer-event\|tick" $calibration_log | wc -l`
55 57
56 rm $calibration_log 58 rm $calibration_log
57 59
58 # Overhead in picoseconds. 60 # Overhead in picoseconds.
59 options=--distortion= 61 options=--distortion=
(...skipping 10 matching lines...) Expand all
70 -- $@ $options 2>/dev/null > timer-events.plot 72 -- $@ $options 2>/dev/null > timer-events.plot
71 73
72 success=$? 74 success=$?
73 if [[ $success != 0 ]] ; then 75 if [[ $success != 0 ]] ; then
74 cat timer-events.plot 76 cat timer-events.plot
75 else 77 else
76 cat timer-events.plot | gnuplot > timer-events.png 78 cat timer-events.plot | gnuplot > timer-events.png
77 fi 79 fi
78 80
79 rm -f timer-events.plot 81 rm -f timer-events.plot
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698