Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added profiling script that makes 2 builds and compares the results. …

…It will

run on all options in IF_DEFS.  More granularity to come.
  • Loading branch information...
commit 7090035f3bb8a5d2a7c8bbaf3cc1789952c16201 1 parent 2aaea78
Russell Cohen authored
Showing with 31 additions and 0 deletions.
  1. +3 −0  .gitignore
  2. +28 −0 profile.sh
View
3  .gitignore
@@ -25,3 +25,6 @@ pip-log.txt
#Mr Developer
.mr.developer.cfg
+
+#Build files
+*.o
View
28 profile.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+#finds all the file source files that contain the relevant ifdef
+make > bout
+echo "built clean version"
+mv python python-clean
+
+ifdef_flags=`grep -o -E '^.*?:' | sed 's/://'`
+for flag in $if_def_flags
+do
+ involvedfiles=`find -name *.c | xargs grep "$flag" | grep -o -E '^.*?:'| uniq | sed 's/://'`
+ for f in $involvedfiles
+ do
+ touch $f
+ echo "touched $f"
+ done
+done
+
+make EXTRA_CFLAGS="-DLINEARPROBING" > profile-out/bout
+echo "built optimized version"
+mv python python-opt
+
+echo "starting first benmark run"
+./python-clean Tools/pybench/pybench.py | tee profile-out/outputNotOptimized
+
+echo "starting second benmark run"
+./python-opt Tools/pybench/pybench.py | tee profile-out/outputOptimized
+
+python comp_per.py profile-out/outputOptimized profile-out/outputNotOptimized
Please sign in to comment.
Something went wrong with that request. Please try again.