Timing Measurements for a Context Switch

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

Reply to
vivekian
Loading thread data ...

formatting link

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

Reply to
Geronimo W. Christ Esq

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.