4 exec_prefix=@exec_prefix@
14 usage: cairo-trace [--no-file] command
15 cairo-trace will generate a log of all calls made by command to
16 cairo. This log will be stored in a file in the local directory
17 called command.pid.trace.
18 Whatever else happens is driven by its argument:
19 --flush - Flush the output trace after every call.
20 --no-file - Disable the creation of an output file. Outputs to the
22 --no-callers - Do not lookup the caller address/symbol/line whilst tracing.
23 --mark-dirty - Record image data for cairo_mark_dirty() [default]
24 --no-mark-dirty - Do not record image data for cairo_mark_dirty()
25 --compress - Compress the output with LZMA
26 --profile - Combine --no-callers and --no-mark-dirty and --compress
28 Environment variables understood by cairo-trace:
29 CAIRO_TRACE_FLUSH - flush the output after every function call.
30 CAIRO_TRACE_LINE_INFO - emit line information for most function calls.
36 while test $skip -eq 1; do
72 echo "cairo-trace, version @CAIRO_VERSION_MAJOR@.@CAIRO_VERSION_MINOR@.@CAIRO_VERSION_MICRO@."
79 if test $skip -eq 1; then
84 if test $# -eq 0; then
88 CAIRO_TRACE_PROG_NAME="$1"
89 export CAIRO_TRACE_PROG_NAME
91 if test "x$CAIRO_TRACE_SO" = "x"; then
93 for lib in @libdir@/cairo/libcairo-trace.@SHLIB_EXT@ @libdir@/cairo/libcairo-trace.@SHLIB_EXT@* @libdir@/cairo/libcairo-trace.*.@SHLIB_EXT@ ; do
94 if test -h "$lib" -o -f "$lib"; then
100 if test "x$CAIRO_TRACE_SO" = "x"; then
101 echo "Could not find the cairo-trace shared library in @libdir@/cairo/." >&2
102 echo "Set the CAIRO_TRACE_SO environment variable to the full path of the library." >&2
106 LD_PRELOAD="$CAIRO_TRACE_SO"
107 DYLD_INSERT_LIBRARIES="$CAIRO_TRACE_SO"
108 DYLD_FORCE_FLAT_NAMESPACE=1
110 export DYLD_INSERT_LIBRARIES
111 export DYLD_FORCE_FLAT_NAMESPACE
113 if test -n "$nocallers"; then
114 CAIRO_TRACE_LINE_INFO=0
115 export CAIRO_TRACE_LINE_INFO
118 if test -n "$nomarkdirty"; then
119 CAIRO_TRACE_MARK_DIRTY=0
120 export CAIRO_TRACE_MARK_DIRTY
123 if test -n "$flush"; then
125 export CAIRO_TRACE_FLUSH
128 if test -z "$nofile"; then
129 CAIRO_TRACE_OUTDIR=`pwd` "$@"
130 elif test -n "$compress"; then
132 echo Generating compressed trace file $name.$$.lzma
133 CAIRO_TRACE_FD=3 "$@" 3>&1 >/dev/null | lzma -cz9 > $name.$$.lzma
135 CAIRO_TRACE_FD=3 "$@" 3>&1 >/dev/null