[PATCH] libdw: pre-compute leb128 loop limits
Mark Wielaard
mjw at redhat.com
Mon Dec 15 21:42:45 UTC 2014
On Mon, 2014-12-15 at 12:18 -0800, Josh Stone wrote:
> On Fedora 21, this appears to be slightly faster, although pretty close
> to noise levels. Mark, can you see if this helps the performance slip
> on your el7 system?
It is slightly faster ~0.5 secs on ~55 secs.
> /* Unrolling 0 like uleb128 didn't prove to benefit optimization. */
> - for (unsigned int i = 0; i < len_leb128 (acc) && *addrp < end; ++i)
> + const size_t max = __libdw_max_len_leb128 (*addrp, end);
> + for (size_t i = 0; i < max; ++i)
> get_sleb128_step (acc, *addrp, i);
> /* Other implementations set VALUE to INT_MAX in this
> case. So we better do this as well. */
Unrolling this does seem to give an addition ~0.2 seconds win.
So both are mostly in the noise, but they do seem to help a little.
But not as much as upgrading GCC :)
Cheers,
Mark
More information about the elfutils-devel
mailing list