[Mesa-dev] [RFC] gallium: Make printing info on debug builds default off

Jakob Bornecrantz wallbraker at gmail.com
Thu Aug 5 18:17:03 PDT 2010


This commit silences the printing off most of the debug information
when running debug builds. The big culprits are the the tgsi sanity
checker that gets run on all shaders on debug. All the options. And
finaly the cpu caps printer.

This came after a discussion on #dri-devel that --enable-debug should
just make it possible to use gdb and not print a ton of stuff to stderr.

My only hesitation is turning of the debug options since its rather
usefull to know which options you can play with.

Comments, acks and nacks please.

Cheers Jakob.
---
 src/gallium/auxiliary/tgsi/tgsi_sanity.c  |    2 +-
 src/gallium/auxiliary/tgsi/tgsi_sanity.h  |    2 +-
 src/gallium/auxiliary/util/u_cpu_detect.c |    2 +-
 src/gallium/auxiliary/util/u_debug.c      |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index 9e02040..d055011 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -34,7 +34,7 @@
 #include "tgsi_iterate.h"
 
 
-DEBUG_GET_ONCE_BOOL_OPTION(print_sanity, "TGSI_PRINT_SANITY", TRUE);
+DEBUG_GET_ONCE_BOOL_OPTION(print_sanity, "TGSI_PRINT_SANITY", FALSE);
 
 
 typedef struct {
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.h b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
index 46d8d18..73f0f41 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
@@ -36,7 +36,7 @@ extern "C" {
 
 /* Check the given token stream for errors and common mistakes.
  * Diagnostic messages are printed out to the debug output, and is
- * controlled by the debug option TGSI_PRINT_SANITY (default true).
+ * controlled by the debug option TGSI_PRINT_SANITY (default false).
  * Returns TRUE if there are no errors, even though there could be some warnings.
  */
 boolean
diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c
index 6f38d22..2291a53 100644
--- a/src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/src/gallium/auxiliary/util/u_cpu_detect.c
@@ -73,7 +73,7 @@
 #endif
 
 
-DEBUG_GET_ONCE_BOOL_OPTION(dump_cpu, "GALLIUM_DUMP_CPU", TRUE);
+DEBUG_GET_ONCE_BOOL_OPTION(dump_cpu, "GALLIUM_DUMP_CPU", FALSE);
 
 
 struct util_cpu_caps util_cpu_caps;
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index ad16255..504e6d2 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -88,7 +88,7 @@ debug_get_option_should_print(void)
     * but its cool since we set first to false
     */
    first = FALSE;
-   value = debug_get_bool_option("GALLIUM_PRINT_OPTIONS", TRUE);
+   value = debug_get_bool_option("GALLIUM_PRINT_OPTIONS", FALSE);
    /* XXX should we print this option? Currently it wont */
    return value;
 }
-- 
1.7.0.4



More information about the mesa-dev mailing list