Timing Measurements for a Context Switch

Dec 11, 2005 1 Replies

I am making a simulator for which i need to do some performance analysis . The measurements i need to take are :


  1. The time a context switch takes for execution. Does this vary greatly depending on the machine arch. ?


  1. There is a block with if statements within a for loop . Is there a way to measure them to a finer resolution so that the time obtained is in some comparison to the context switch ?



Actually doing a comparison between a tradeoff between 1 and 2. Are there any built in linux system calls for this ? Do i have to use a tool ? Have heard of a tool called lmbench, but not used it .



Thanks, vivekian



formatting link

OProfile may also help, if it has been ported to your arch.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required