Re: thread context switching

2014-03-19 Thread nayobix
Try ftrace for the scheduler

On March 18, 2014 6:01:50 PM EET, Nada Saif nada.sa...@gmail.com wrote:
Hi,

I want to measure thread context switching in c, How I can do that?

Thanks,
N.A.S




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

-- 
nayobix___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: thread context switching

2014-03-19 Thread Oussama Jabbari
Hello,

maybe KernalShark can help:

https://lwn.net/Articles/425583/

Regards,

On Wed, Mar 19, 2014 at 10:10 AM, nayobix nayo...@nayobix.org wrote:
 Try ftrace for the scheduler

 On March 18, 2014 6:01:50 PM EET, Nada Saif nada.sa...@gmail.com wrote:

 Hi,

 I want to measure thread context switching in c, How I can do that?

 Thanks,
 N.A.S

 

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


 --
 nayobix

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


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


Re: thread context switching

2014-03-19 Thread Nada Saif
Thanks guys . I thought there is an easy way for that...I'm trying to do it
with multi-threads  synchronization..

Bests,



On Wed, Mar 19, 2014 at 1:54 PM, Oussama Jabbari
oussama.jabb...@gmail.comwrote:

 Hello,

 maybe KernalShark can help:

 https://lwn.net/Articles/425583/

 Regards,

 On Wed, Mar 19, 2014 at 10:10 AM, nayobix nayo...@nayobix.org wrote:
  Try ftrace for the scheduler
 
  On March 18, 2014 6:01:50 PM EET, Nada Saif nada.sa...@gmail.com
 wrote:
 
  Hi,
 
  I want to measure thread context switching in c, How I can do that?
 
  Thanks,
  N.A.S
 
  
 
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 
 
  --
  nayobix
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 

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


Re: thread context switching

2014-03-18 Thread parinay
Did you try the solution mentioned by Saqlain ?

http://lists.kernelnewbies.org/pipermail/kernelnewbies/2014-March/010050.html


On Tue, Mar 18, 2014 at 9:31 PM, Nada Saif nada.sa...@gmail.com wrote:
 Hi,

 I want to measure thread context switching in c, How I can do that?

 Thanks,
 N.A.S

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




-- 
easy is right
begin right and you're easy
continue easy and you're right
the right way to go easy is to forget the right way
and forget that the going is easy

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


Re: thread context switching

2014-03-18 Thread Greg KH
On Tue, Mar 18, 2014 at 07:01:50PM +0300, Nada Saif wrote:
 Hi,
 
 I want to measure thread context switching in c

Why?

 , How I can do that?\

Have you looked at the perf command?

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


Re: thread context switching

2014-03-18 Thread Valdis . Kletnieks
On Tue, 18 Mar 2014 19:01:50 +0300, Nada Saif said:

 I want to measure thread context switching in c, How I can do that?

What are you trying to measure, exactly, and why?  The answer depends on
the details of the question.

However, my first go-to solution would see if 'perf' can cough up the
numbers you need.  It's able to slurp out all sorts of timing data from
the kernel (though some data and trace points require CONFIG_* variables
to be set in the kernel build).


pgpz0guNYeRuJ.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: thread context switching

2014-03-18 Thread Mandeep Sandhu
On Tue, Mar 18, 2014 at 10:24 PM,  valdis.kletni...@vt.edu wrote:
 On Tue, 18 Mar 2014 19:01:50 +0300, Nada Saif said:

 I want to measure thread context switching in c, How I can do that?

Looks suspiciously like an interview-type question? :)


 What are you trying to measure, exactly, and why?  The answer depends on
 the details of the question.

 However, my first go-to solution would see if 'perf' can cough up the
 numbers you need.  It's able to slurp out all sorts of timing data from
 the kernel (though some data and trace points require CONFIG_* variables
 to be set in the kernel build).

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


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