[vmkit-commits] [vmkit] r180463 - Added synthesis and plotting of average relative overhead of Incinerator compared to J3.
Peter Senna Tschudin
peter.senna at gmail.com
Thu Apr 25 10:14:15 PDT 2013
Author: peter.senna
Date: Thu Apr 25 12:12:36 2013
New Revision: 180463
URL: http://llvm.org/viewvc/llvm-project?rev=180463&view=rev
Log:
Added synthesis and plotting of average relative overhead of Incinerator compared to J3.
(cherry picked from commit 3e80671c791dde0e1854963cfa091f7c3cf49a2a)
Added:
vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv
vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot
vmkit/trunk/tests/dacapo/float.sh
vmkit/trunk/tests/dacapo/synth-avg-overhead.sh
Modified:
vmkit/trunk/incinerator/tests/benchmarks/j3-stale-ref.plot
vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot
Modified: vmkit/trunk/incinerator/tests/benchmarks/j3-stale-ref.plot
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/benchmarks/j3-stale-ref.plot?rev=180463&r1=180462&r2=180463&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/benchmarks/j3-stale-ref.plot (original)
+++ vmkit/trunk/incinerator/tests/benchmarks/j3-stale-ref.plot Thu Apr 25 12:12:36 2013
@@ -1,7 +1,7 @@
#!/usr/bin/gnuplot -p
set datafile separator ","
-set datafile missing '-'
+set datafile missing '_'
set datafile commentschars "#"
set ylabel "Memory usage (lower is better)"
@@ -18,13 +18,10 @@ set timefmt "%M:%S"
# set title "Stale reference memory leaks in J3 and Incinerator"
+#set term svg
+#set term postscript clip 12
+#set term latex
set term wxt 0
plot \
- 'j3-stale-ref.csv' using 1:(column(11)*1024) linecolor rgb "blue" linewidth "2pt" title "J3" with lines, \
- 'j3-stale-ref-corrected.csv' using 1:(column(11)*1024) linecolor rgb "red" linewidth "2pt" title "Incinerator" with lines
-
-#set term latex
-#set term postscript clip 12
-#plot \
-# 'j3-stale-ref.csv' using 1:(column(11)*1024) linecolor rgb "blue" linewidth "2pt" title "J3" with lines, \
-# 'j3-stale-ref-corrected.csv' using 1:(column(11)*1024) linecolor rgb "red" linewidth "2pt" title "Incinerator" with lines
+ 'j3-stale-ref.csv' using 1:(column(11)*1024) linecolor rgb "grey" linewidth "2pt" title "J3" with lines, \
+ 'j3-stale-ref-corrected.csv' using 1:(column(11)*1024) linecolor rgb "orange" linewidth "2pt" title "Incinerator" with lines
Added: vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv?rev=180463&view=auto
==============================================================================
--- vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv (added)
+++ vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv Thu Apr 25 12:12:36 2013
@@ -0,0 +1,12 @@
+#bench_suite,benchmark,vm,avg_overhead
+2006-10-MR2,antlr,j3,-0.43
+2006-10-MR2,bloat,j3,2.30
+2006-10-MR2,chart,j3,1.94
+2006-10-MR2,eclipse,j3,-1.16
+2006-10-MR2,fop,j3,4.03
+2006-10-MR2,hsqldb,j3,8.93
+2006-10-MR2,jython,j3,1.66
+2006-10-MR2,luindex,j3,1.30
+2006-10-MR2,lusearch,j3,8.98
+2006-10-MR2,pmd,j3,7.47
+2006-10-MR2,xalan,j3,8.89
Added: vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot?rev=180463&view=auto
==============================================================================
--- vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot (added)
+++ vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot Thu Apr 25 12:12:36 2013
@@ -0,0 +1,27 @@
+#!/usr/bin/gnuplot -p
+
+set datafile separator ","
+set datafile missing '_'
+set datafile commentschars "#"
+
+set ylabel "Average relative overhead (lower is better)"
+set ytics 1 border nomirror
+set grid ytics
+
+set style data histogram
+set style histogram clustered gap 1
+set bars fullwidth
+set style fill solid border 0
+set boxwidth 1
+
+# set title "Incinerator overhead in Dacapo benchmarks"
+
+set xtics axis nomirror rotate by 20 offset -2,graph -0.1
+set border 3
+
+#set term svg
+#set term postscript clip 12
+#set term latex
+set term wxt 1
+plot \
+ 'dacapo-avg-overhead.csv' using 4:xtic(2) notitle linecolor rgb "grey"
Modified: vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot?rev=180463&r1=180462&r2=180463&view=diff
==============================================================================
--- vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot (original)
+++ vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot Thu Apr 25 12:12:36 2013
@@ -1,7 +1,7 @@
#!/usr/bin/gnuplot -p
set datafile separator ","
-set datafile missing '-'
+set datafile missing '_'
set datafile commentschars "#"
set ylabel "Duration (lower is better)"
@@ -23,13 +23,10 @@ set boxwidth 1
# set title "Incinerator overhead in Dacapo benchmarks"
+#set term svg
+#set term postscript clip 12
+#set term latex
set term wxt 0
plot \
- 'stats-j3-dacapo-2006-10-MR2.csv' using (column(4)/1000.0):(column(7)/1000.0):xtic(2) linecolor rgb "blue" title "J3", \
- 'stats-incinerator-dacapo-2006-10-MR2.csv' using (column(4)/1000.0):(column(7)/1000.0):xtic(2) linecolor rgb "red" title "Incinerator"
-
-#set term latex
-#set term postscript clip 12
-#plot \
-# 'stats-j3-dacapo-2006-10-MR2.csv' using (column(4)/1000.0):(column(7)/1000.0):xtic(2) linecolor rgb "blue" title "J3", \
-# 'stats-incinerator-dacapo-2006-10-MR2.csv' using (column(4)/1000.0):(column(7)/1000.0):xtic(2) linecolor rgb "red" title "Incinerator"
+ 'stats-j3-dacapo-2006-10-MR2.csv' using (column(4)/1000.0):(column(7)/1000.0):xtic(2) linecolor rgb "grey" title "J3", \
+ 'stats-incinerator-dacapo-2006-10-MR2.csv' using (column(4)/1000.0):(column(7)/1000.0):xtic(2) linecolor rgb "orange" title "Incinerator"
Added: vmkit/trunk/tests/dacapo/float.sh
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tests/dacapo/float.sh?rev=180463&view=auto
==============================================================================
--- vmkit/trunk/tests/dacapo/float.sh (added)
+++ vmkit/trunk/tests/dacapo/float.sh Thu Apr 25 12:12:36 2013
@@ -0,0 +1,36 @@
+#/bin/bash
+
+float_scale=2
+
+# Evaluate then output an equation into a float number with $float_scale precision.
+function float_eval()
+{
+ local stat=0
+ local result=0.0
+
+ if [[ $# -gt 0 ]]; then
+ result=$(echo "scale=$float_scale; $*"|bc -q 2>/dev/null)
+ stat=$?
+
+ if [[ "$stat" -eq 0 && -z "$result" ]]; then stat=1; fi
+ fi
+
+ echo -n $result
+ return $stat
+}
+
+# Evaluate an equation into a condition.
+function float_cond()
+{
+ local cond=0
+
+ if [[ $# -gt 0 ]]; then
+ cond=$(echo "$*"|bc -q 2>/dev/null)
+
+ if [[ -z "$cond" ]]; then cond=0; fi
+ if [[ "$cond" != 0 && "$cond" != 1 ]]; then cond=0; fi
+ fi
+
+ local stat=$(($cond == 0))
+ return $stat
+}
Added: vmkit/trunk/tests/dacapo/synth-avg-overhead.sh
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tests/dacapo/synth-avg-overhead.sh?rev=180463&view=auto
==============================================================================
--- vmkit/trunk/tests/dacapo/synth-avg-overhead.sh (added)
+++ vmkit/trunk/tests/dacapo/synth-avg-overhead.sh Thu Apr 25 12:12:36 2013
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+. ./float.sh
+float_scale=4
+
+ref_stats=$1
+new_stats=$2
+
+ref_header=$(head -1 "$ref_stats")
+
+echo "$(head -1 "$ref_stats" | cut -d ',' -f 1-3),avg_overhead"
+
+for i in $(grep -v '^#' "$ref_stats") ; do
+ key=$(echo "$i" | cut -d ',' -f 1-3)
+ ref_val=$(echo "$i" | cut -d ',' -f 4)
+ new_val=$(grep "^$key," "$new_stats" | cut -d ',' -f 4)
+ overhead=$(float_eval "100.0 * ( $new_val / $ref_val - 1.0 )" )
+ printf "%s,%.2f\n" "$key" "$overhead"
+done
More information about the vmkit-commits
mailing list