[cairo-commit] 2 commits - build/Makefile.am.analysis perf/cairo-perf-diff perf/cairo-perf-trace.c perf/Makefile.am perf/make-html.py
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jul 20 14:20:19 PDT 2009
build/Makefile.am.analysis | 2 ++
perf/Makefile.am | 2 +-
perf/cairo-perf-diff | 17 +++++++----------
perf/cairo-perf-trace.c | 23 +++++++++++++++++++++--
perf/make-html.py | 3 +--
5 files changed, 32 insertions(+), 15 deletions(-)
New commits:
commit 2dd97ae59c482f09e42d719a941e189560f00b8f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jul 20 22:19:21 2009 +0100
[perf] Include trace comparison in html output
diff --git a/build/Makefile.am.analysis b/build/Makefile.am.analysis
index d0e00ca..a44077a 100644
--- a/build/Makefile.am.analysis
+++ b/build/Makefile.am.analysis
@@ -17,6 +17,8 @@ genlcov:
< cairo-lcov.info > cairo-lcov.info.tmp
LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory cairo-lcov --title "Cairo Code Coverage" --show-details cairo-lcov.info.tmp
$(RM) cairo-lcov.info.tmp
+
+html-local: lcov
else
lcov lcov-perf genlcov:
@echo You need to configure Cairo with support for gcov enabled.
diff --git a/perf/Makefile.am b/perf/Makefile.am
index 1d05d8e..8588fe0 100644
--- a/perf/Makefile.am
+++ b/perf/Makefile.am
@@ -141,7 +141,7 @@ perf: cairo-perf$(EXEEXT) cairo-perf-trace$(EXEEXT)
html-local: index.html
index.html: cairo-perf$(EXEEXT)
- $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-diff -h HEAD > $@
+ $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-diff -t -h HEAD > $@
EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS)
diff --git a/perf/cairo-perf-diff b/perf/cairo-perf-diff
index e695cfc..2ab447e 100755
--- a/perf/cairo-perf-diff
+++ b/perf/cairo-perf-diff
@@ -52,12 +52,14 @@ END
exit 1
}
+benchmarks="cairo-perf"
+
# First, pull off any known options
while true; do
case $1 in
-f|--force) force_cairo_perf="true";;
-h|--html) html_output="true";;
- -t|--trace) use_traces="true";;
+ -t|--trace) benchmarks="${benchmarks} cairo-perf-trace";;
*) break;;
esac
@@ -212,15 +214,10 @@ run_cairo_perf_if_not_cached() {
build $build_dir $sha || exit 1
}
- if [ "$use_traces" = "true" ]; then
- cmd="cairo-perf-trace"
- else
- cmd="cairo-perf"
- fi
- echo "Running \"$cmd $CAIRO_PERF_OPTIONS\" against $rev. Results will be cached in:"
- echo "$perf"
- pwd
- (./$cmd $CAIRO_PERF_OPTIONS || echo "*** Performance test crashed") >> $perf
+ echo "Running \"cairo-perf $CAIRO_PERF_OPTIONS\" against $rev. Results will be cached in:"
+ for cmd in $benchmarks; do
+ (./$cmd $CAIRO_PERF_OPTIONS || echo "*** Performance test crashed") >> $perf
+ done
cd $owd
}
diff --git a/perf/make-html.py b/perf/make-html.py
index 79a2992..0b45335 100755
--- a/perf/make-html.py
+++ b/perf/make-html.py
@@ -27,6 +27,7 @@ print '''\
<html><head>
<title>Performance Changes</title>
<style type="text/css">/*<![CDATA[*/
+ body { background: white; color: black; }
table { border-collapse: collapse; }
th, td { border: 1px solid silver; padding: 0.2em; }
@@ -85,5 +86,3 @@ for target, names in targets:
print '</tbody></table>'
print '</body></html>'
-
-
commit f30cee70f5fadd1f2af60310a148f61ed4fc7069
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jul 20 22:17:30 2009 +0100
[perf] Search multiple directories for traces
In view of sharing traces between multiple builder, add some system wide
directories to the search path. This should be refined to a single
canonical location before release.
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index d8d2f7a..b79f516 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -695,7 +695,7 @@ int
main (int argc, char *argv[])
{
cairo_perf_t perf;
- const char *trace_dir = "cairo-traces";
+ const char *trace_dir = "cairo-traces:/usr/src/cairo-traces:/usr/share/cairo-traces";
unsigned int n;
int i;
@@ -745,7 +745,26 @@ main (int argc, char *argv[])
}
}
} else {
- if (cairo_perf_trace_dir (&perf, target, trace_dir) == 0) {
+ int num_traces = 0;
+ const char *dir;
+
+ dir = trace_dir;
+ do {
+ char buf[1024];
+ const char *end = strchr (dir, ':');
+ if (end != NULL) {
+ memcpy (buf, dir, end-dir);
+ buf[end-dir] = '\0';
+ end++;
+
+ dir = buf;
+ }
+
+ num_traces += cairo_perf_trace_dir (&perf, target, dir);
+ dir = end;
+ } while (dir != NULL);
+
+ if (num_traces == 0) {
warn_no_traces ("Found no traces in", trace_dir);
return 1;
}
More information about the cairo-commit
mailing list