Re: [PATCH 2/2] perf tools: Fix strict alias issue for find_first_bit

From: Ingo Molnar
Date: Sat Mar 01 2014 - 04:13:47 EST



* David Ahern <dsahern@xxxxxxxxx> wrote:

> On 2/28/14, 2:29 PM, Peter Zijlstra wrote:
> >Hurm; didn't I suggest using -fno-strict-aliasing just like the kernel
> >does? Because the C aliasing rules are bonghits heavy?
>
> you, and Ingo in 2009 -- 65014ab3

Yeah, so that's certainly true for the kernel, but for user-space the
aggressive optimizations that come with the aliasing rules were pretty
good, last I checked.

So it would be nice to check the code generation and performance
impact of -fno-strict-aliasing on perf (if any). If the impact is
restricted to an odd few annotations for weird, low-level methods
like find_bit(), then we might be able to live with it.

The aliasing warnings can also find real bugs and uncleanlinesses.

So I'm really of two minds regarding this.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/