From 18edea36ba6604e4cbdbda1ed56e6117b5768d94 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 19 Jun 2009 14:14:32 +0100 Subject: [PATCH] [perf] Report line of error during trace Query the number of new lines processed so far and report that on hitting an error. --- perf/cairo-perf-trace.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c index 3ed2bb870..6859a0d7f 100644 --- a/perf/cairo-perf-trace.c +++ b/perf/cairo-perf-trace.c @@ -258,10 +258,14 @@ execute (cairo_perf_t *perf, status = cairo_script_interpreter_destroy (csi); if (status) { if (perf->summary) { - fprintf (perf->summary, "Error during replay: %s\n", + unsigned int line_no; + + line_no = cairo_script_interpreter_get_line_number (csi); + fprintf (perf->summary, "Error during replay, line %d: %s\n", + line_no, cairo_status_to_string (status)); - goto out; } + goto out; } if (perf->raw) {