[Mesa-dev] [PATCH] gallivm: Only build lp_profile() body when PROFILE is defined

Jose Fonseca jfonseca at vmware.com
Sat Jun 6 01:02:08 PDT 2015


On 06/06/15 02:30, Tom Stellard wrote:
> The only use of lp_profile() is wrapped in #if defined(PROFILE),
> so there is no reason to build it unless this macro is defined.
> ---
>   src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
> index 9a85248..03c0260 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
> @@ -246,7 +246,7 @@ lp_disassemble(LLVMValueRef func, const void *code) {
>   extern "C" void
>   lp_profile(LLVMValueRef func, const void *code)
>   {
> -#if defined(__linux__) && (defined(DEBUG) || defined(PROFILE))
> +#if defined(PROFILE)
>      static boolean first_time = TRUE;
>      static FILE *perf_map_file = NULL;
>      static int perf_asm_fd = -1;
>

Makes sense.  But please leave defined(__linux__) there, as this code 
should not be built on run on Windows profile builds.

With that, this is

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

Jose


More information about the mesa-dev mailing list