[cairo-commit] util/cairo-trace
Chris Wilson
ickle at kemper.freedesktop.org
Sat Jun 13 07:52:19 PDT 2009
util/cairo-trace/cairo-trace.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit f115c5479ead934774fea99d74d780e2bb1681c4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Jun 13 15:49:15 2009 +0100
[trace] Strip absolute path off name when profiling
Carl spotted this last night, but I misinterpreted it as an old problem
caused by the application changing its working directory before its first
cairo call - thus causing cairo-trace to attempt to open a file in the new
directory. Instead the problem was attempting to trace an executable with
an absolute path, where we just tagged it with a .lzma extentsion and
attempted to pipe the output there. Obviously this fails for the user
profiling system binaries. So use basename to strip the leading path.
diff --git a/util/cairo-trace/cairo-trace.in b/util/cairo-trace/cairo-trace.in
index 16cdad6..3e54d4e 100644
--- a/util/cairo-trace/cairo-trace.in
+++ b/util/cairo-trace/cairo-trace.in
@@ -108,8 +108,9 @@ fi
if test -z "$nofile"; then
CAIRO_TRACE_OUTDIR=`pwd` "$@"
elif test -n "$compress"; then
- echo Generating compressed trace file $1.$$.lzma
- CAIRO_TRACE_FD=3 "$@" 3>&1 >/dev/null | lzma -cz9 > $1.$$.lzma
+ name=`basename $1`
+ echo Generating compressed trace file $name.$$.lzma
+ CAIRO_TRACE_FD=3 "$@" 3>&1 >/dev/null | lzma -cz9 > $name.$$.lzma
else
CAIRO_TRACE_FD=3 "$@" 3>&1 >/dev/null
fi
More information about the cairo-commit
mailing list