Re: Accurately measure CPU cycles used by a program? thanks

From: J.A. Magallon (jamagallon@able.es)
Date: Mon Apr 29 2002 - 17:22:43 EST


On 2002.04.30 Wanghong Yuan wrote:
>Is there any package or program, which can be used to accurately measure the
>CPU cycles used by a program? I think the following code can only provide an
>inaccurate one, beause it may count on the waiting time of the program.
>
>gettimeofday(t1)
>runprogam
>gettimeofday(t2)
>t2-t1
>
>If I need to instrument the kernel, which part I should investigate? Thanks
>a lot in advance
>

man getrusage

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.3 (Cooker) for i586
Linux werewolf 2.4.19-pre7-jam7 #1 SMP jue abr 25 00:19:56 CEST 2002 i686
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:18 EST