libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Testing time


From: Arun Sharma
Subject: Re: [Libunwind-devel] Testing time
Date: Sun, 17 Apr 2011 20:37:43 -0700

On Fri, Apr 1, 2011 at 2:57 AM, Lassi Tuura <address@hidden> wrote:
> I refreshed the performance optimisation patch to reflect the current git 
> tree; attached at the end.

Sorry for the delay in reviewing this. I was a bit worried about the
static branch prediction hints, given articles such as [1]. But it
doesn't look like it's causing gcc to emit prefixes to branch
instructions. Gcc (at least the version I looked at) is doing the
right thing, by moving the unlikely code to a forward branch, which is
statically predicted to be not taken (and probably resulting in better
icache behavior).

-HIDDEN void *
-tdep_uc_addr (ucontext_t *uc, int reg)
-{
-  return x86_64_r_uc_addr (uc, reg);
-}

Things like this could be handled by gcc-4.6 -flto (some simple
examples I tried worked). But I'm guessing that most libunwind users
aren't doing it and there is a benefit by eliminating the extra
function call.

I went ahead and applied this patch as-is with minor whitespace fixes.

 -Arun

[1] 
http://software.intel.com/en-us/articles/branch-and-loop-reorganization-to-prevent-mispredicts/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]