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]

Branch taken rate of Linux kernel compiled with GCC 4.9


Hi,

I have analyzed the branch taken rate of the Linux kernel compiled
with GCC (using localyesconfig from Debian config) and found something
strange.

Hardware: Intel Core i7-4770, 32G RAM, 10GbE
Software: Linux 3.16.7, GCC 4.9.3 20121201, Debian sid

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:

Application    Taken (rbf88:k)  Total (rff88:k)    Taken rate
 Apache           3.91e9           6.35e9             62%
 nginx            6.00e9           1.03e10            58%
 MySQL            1.11e9           1.81e9             61%
 PostgreSQL       2.95e8           4.79e8             62%
 memcached        3.69e9           6.39e9             58%
 Redis            1.77e9           3.06e9             58%

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?

Regards,

YUAN, Pengfei
Peking University


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