mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
gallivm: Enable GALLIVM_DEBUG (mostly) on non-DEBUG builds.
This is what let me do the performance work in my recent gallivm MRs. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21086>
This commit is contained in:
parent
947c60fa2f
commit
a5d360550e
2 changed files with 3 additions and 8 deletions
|
|
@ -56,11 +56,7 @@ extern "C" {
|
|||
|
||||
extern unsigned gallivm_perf;
|
||||
|
||||
#ifdef DEBUG
|
||||
extern unsigned gallivm_debug;
|
||||
#else
|
||||
#define gallivm_debug 0
|
||||
#endif
|
||||
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ static const struct debug_named_value lp_bld_perf_flags[] = {
|
|||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
unsigned gallivm_debug = 0;
|
||||
|
||||
static const struct debug_named_value lp_bld_debug_flags[] = {
|
||||
|
|
@ -76,12 +75,14 @@ static const struct debug_named_value lp_bld_debug_flags[] = {
|
|||
{ "asm", GALLIVM_DEBUG_ASM, NULL },
|
||||
{ "perf", GALLIVM_DEBUG_PERF, NULL },
|
||||
{ "gc", GALLIVM_DEBUG_GC, NULL },
|
||||
/* Don't allow setting DUMP_BC for release builds, since writing the files may be an issue with setuid. */
|
||||
#ifdef DEBUG
|
||||
{ "dumpbc", GALLIVM_DEBUG_DUMP_BC, NULL },
|
||||
#endif
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
DEBUG_GET_ONCE_FLAGS_OPTION(gallivm_debug, "GALLIVM_DEBUG", lp_bld_debug_flags, 0)
|
||||
#endif
|
||||
|
||||
|
||||
static boolean gallivm_initialized = FALSE;
|
||||
|
|
@ -433,9 +434,7 @@ lp_build_init(void)
|
|||
*/
|
||||
LLVMLinkInMCJIT();
|
||||
|
||||
#ifdef DEBUG
|
||||
gallivm_debug = debug_get_option_gallivm_debug();
|
||||
#endif
|
||||
|
||||
gallivm_perf = debug_get_flags_option("GALLIVM_PERF", lp_bld_perf_flags, 0 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue