summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_perf.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-01-27 13:49:43 -0700
committerBrian Paul <[email protected]>2010-01-27 13:49:43 -0700
commite95ad2a2b521514eaec04f9b266ee030ecc639a3 (patch)
tree96eb882f78597cae7af3aa991dfbda3b030a21dc /src/gallium/drivers/llvmpipe/lp_perf.h
parent5460da543608805a3debbb401ccc19442e1cb476 (diff)
llvmpipe: count/report time spent in LLVM compilations
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_perf.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_perf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_perf.h b/src/gallium/drivers/llvmpipe/lp_perf.h
index 9886088c38e..d982bcc989b 100644
--- a/src/gallium/drivers/llvmpipe/lp_perf.h
+++ b/src/gallium/drivers/llvmpipe/lp_perf.h
@@ -49,6 +49,8 @@ struct lp_counters
unsigned nr_partially_covered_16;
unsigned nr_empty_4;
unsigned nr_non_empty_4;
+ unsigned nr_llvm_compiles;
+ int64_t llvm_compile_time; /**< total, in microseconds */
};
@@ -58,8 +60,10 @@ extern struct lp_counters lp_count;
/** Increment the named counter (only for debug builds) */
#ifdef DEBUG
#define LP_COUNT(counter) lp_count.counter++
+#define LP_COUNT_ADD(counter, incr) lp_count.counter += (incr)
#else
#define LP_COUNT(counter)
+#define LP_COUNT_ADD(counter, incr) (void) incr
#endif