[patch 05/10] fs: remove extra lookup in __lookup_hash

Frank Ch. Eigler fche@redhat.com
Wed Aug 18 17:57:00 GMT 2010


Hi, Andi -

On linux-fsdevel, you wrote:

> As a quick experiment I set a systemtap probe for this on my workstation
> 
> global first, second 
> probe kernel.function("*@fs/namei.c:1143") { first++ }  
> probe kernel.function("*@fs/namei.c:1149") { second++ } 
> probe end { printf("first %d, second %d\n", first, second) }  
> 
> and did a quick kernel build, resulting in:
> 
> first 22753, second 22753

This probably isn't doing what you thought.  You probably should have
used kernel.statement() instead of kernel.function().  Plus if you
use stap -t, you wouldn't need those two explicit counters; you'd 
get hit counts/timings for each probe point at script end.

- FChE



More information about the Systemtap mailing list