If you are timing things inside the kernel 'time' won't give you what you want, this is for timing user-land processes. I would use the do_gettimeofday function and store the values in a variable and use a /proc entry to read them. This will have the least interference with the timings. This will also let you do some stats on it, say longest time, shortest time and average time. Tom On Thursday 11 July 2002 11:26 am, Christine Ames wrote: > --- Jonathan Khoo <jonath-k@is.aist-nara.ac.jp> wrote: > > Hi guys, > > > > I want to measure the timings between various operations in the > > kernel > > and the only way I know of is to use printk to output the timings. > > However, I also realize that by adding unnecessary printk > > statements > > will affect the system performance. How can I measure the "actual" > > timings? > > Those more experienced will (please!) correct me if I am wrong: > > ]time your-command // will time start/end of a command > > E.g. to "time" the command ls -l: > > [root@eng-03 wordbook] time ll > total 692 > -rwxr-xr-x 1 root root 516 Feb 28 06:00 > dictionary.lst* > -rwxr-xr-x 1 root root 1809 Feb 28 06:00 en_US.aff* > -rwxr-xr-x 1 root root 695724 Feb 28 06:00 en_US.dic* > > real 0m0.245s > user 0m0.010s > sys 0m0.010s > > Harmony, > > --Christine > > > __________________________________________________ > Do You Yahoo!? > Sign up for SBC Yahoo! Dial - First Month Free > http://sbc.yahoo.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/