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]

System call comparison


Neil Booth wrote:-

> o Reduced system calls for the file system.  I've not done and test and
>   counted yet (I'll do that over the next week) but because of the design
>   I would be very surprised if they are not down substantially (say 20-40%).

Here are the results for compiling current toplev.c:

		Before		After
fstat()		174		182
lstat()		7		0
pch stuff	1206		16
open()		1061		593
read()		174		182
Total ex PCH	1416		973		(-31%)

The dramatic pch drop is because of some of Geoff's recent changes.
[this is a count of the number of passes through open_file_pch() that
don't exit immediately.]  The old method resulted in less fstats and
opens, presumably path simplification allowed CPP to recognise something
as redundant that it no longer can without path simplification.
However, they appear to have shown up as calls to lstat() instead, to
check the simplification was valid.  The near-halving in open() calls
is due to the better caching / lookup algorithm that means we don't
traipse through all directories before getting a cache hit.

Here is the same test for i386.c:

		Before		After
fstat()		148		153
lstat()		7		0
pch stuff	1102		18
open()		1044		564
read()		148		153
Total ex PCH	1347		888		(-34%)

and others are similar.

Neil.


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