This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Branch taken rate of Linux kernel compiled with GCC 4.9


On Tue, 13 Jan 2015, Pengfei Yuan wrote:
> I use perf with rbf88:k,rff88:k events (Haswell specific) to profile
> the taken rate of conditional branches in the kernel. Here are the
> results:
[...]
> 
> The results are very strange because all the taken rates are greater
> than 50%. Why not reverse the basic block reordering heuristics to
> make them under 50%? Is there anything wrong with GCC?

Your measurement includes the conditional branches at the end of loop bodies.
When loops iterate, those branches are taken, and it doesn't make sense to
reverse them.

HTH
Alexander


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]