Re: How to measure time spent in context switch

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

 



Hi...

On Tue, Jul 17, 2012 at 2:28 AM, Manavendra Nath Manav
<mnm.kernel@xxxxxxxxx> wrote:
> How to measure time spent in context switch in Linux i.e. the time the
> application stays suspended while the kernel is doing something else. I
> don't want to use any profiling tools. What approach should I take to write
> my own C code, which can also run as kernel module if required, to measure
> time spent accurately. Will it also require to modify the scheduler code?
> Does /proc gives any statistics in this regard?

IMHO, you need to mimic how lmbench does it. And AFAIK too, what you
are going to do is very much what lmbench does. But please check their
code for better understanding.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux