On 8 July 2014 18:20, Al Viro <v...@zeniv.linux.org.uk> wrote: > On Tue, Jul 08, 2014 at 05:33:16PM +0100, Peter Maydell wrote: > >> > Incidentally, combination of --enable-gprof and (default) --enable-pie >> > won't build - it dies with ld(1) complaining about relocs in gcrt1.o. >> >> This sounds like a toolchain bug to me :-) > > Debian stable/amd64, gcc 4.7.2, binutils 2.22. And google search finds > this, for example: http://osdir.com/ml/qemu-devel/2013-05/msg00710.html. > That one has gcc 4.4.3.
That just makes it a long-standing toolchain bug. I don't see any reason why PIE + gprof shouldn't work, it just looks like gprof doesn't ship and link a PIE runtime. > Stats I quoted were from qemu-system-alpha booting debian/lenny (5.10) and > going through their kernel package build. I have perf report in front of > me right now; the top ones are > 41.77% qemu-system-alp perf-24701.map [.] 0x7fbbee558930 > 11.78% qemu-system-alp qemu-system-alpha [.] cpu_alpha_exec > and cpu_alpha_exec() spends most of the time in inlined tb_find_fast(). > It might be worth checking the actual distribution of the hash of virt > address used by that sucker - I wonder if dividing its argument by 4 > wouldn't improve the things, but I don't have stats on actual frequency > of conflicts, etc. In any case, the first lump (42%) seems to be tastier ;-) Depends on your point of view -- arguably we ought to be spending *more* time executing translated guest code... (As you say, the problem is that we don't have any breakdown of what things might turn out to be hotspots in the translated code.) -- PMM