Re: [PATCH] Avoid running lstat(2) on the same cache entry.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sat, 19 Jan 2008, Linus Torvalds wrote:
> 
> The call trace for the first one is

Btw, the easiest way to do this on Linux isn't totally obvious, because 
you cannot do a simple breakpoint on "lstat()", since GNU libc internally 
uses other names.

So if anybody wants to work on this and runs Linux, the way to do this 
trivially (once you know how) is to do

	gdb git
	..
	.. run the startup to wait for the libraries to be loaded 
	..	
	(gdb) b main
	(gdb) run commit
	..
	.. modern glibc low-level lstat() call is __lxstat64
	.. at least on x86-64
	..
	(gdb) b __lxstat64
	..
	.. Ignore the first few ones (we have 23000+ files in the index, 
	.. so don't worry about getting the *first* one)
	..
	(gdb) ignore 2 1000
	(gdb) c
	..
	.. Ok, look at that backtrace, then go to the next one by
	.. just knowing that we'll be doing 23,000+ for each iteration
	.. over the index.
	..
	.. Rinse and repeat this as required:
	..
	(gdb) where
	(gdb) ignore 2 24000
	(gdb) c

which gets you the backtraces I showed you, without having to think too 
much about all the odd lstat() calls we do for resolving refs etc.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux