Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-10-2008, 10:00 AM   #1
LQ Newbie
Registered: Jan 2008
Posts: 5

Rep: Reputation: 0
Exclamation Counting thread's context switches

Hi all,
Is it possible to count the context-switches for a thread? I'm tracing an application 'A' with ptrace(). Say 'A' has n threads. I want to know how may times each thread in 'A' faced a context-switch.
Do we have any mechanism that can notify the tracing process about context-switches in traced process?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get thread's pid? jackandking Programming 11 11-22-2017 10:30 AM
Counting thread's context switches bluehive Programming 2 06-15-2008 07:35 PM
Number of context switches linuxdoniv Programming 1 05-08-2008 08:50 AM
Context switches balteo Linux - General 0 09-06-2005 08:09 AM
What are the drawbacks of syscalls and context switches? shy Programming 7 11-25-2004 03:03 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration