Monitoring pthread context switching

Posted by simon on Stack Overflow See other posts from Stack Overflow or by simon
Published on 2010-05-26T15:09:10Z Indexed on 2010/05/26 15:11 UTC
Read the original article Hit count: 444

Filed under:
|
|
|
|

I would like to monitor the the context switching behavior in a multi-threaded pthread application.

In other RTOSes(Micro C OS) I have been able to register a context switch callback for each thread in the application, and then log (or toggle a gpio) and watch the thread context switching in real time. This was a valuable tool for debugging the real time behavior and interaction of the multiple threads.

My current environment is embedded linux utilizing the pthread api. Is there a way to montior each of the context switches?

© Stack Overflow or respective owner

Related posts about linux

Related posts about embedded