Re: [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO

2014-12-15 Thread Andy Lutomirski
On Mon, Dec 15, 2014 at 10:36 AM, Chris Mason wrote: > > > On Thu, Dec 11, 2014 at 1:36 AM, Ingo Molnar wrote: >> >> >> * Andy Lutomirski wrote: >> >>> On Wed, Dec 10, 2014 at 2:56 PM, Shaohua Li wrote: >>> > On Wed, Dec 10, 2014 at 02:13:23PM -0800, Andy Lutomirski wrote: >>> >> On Wed, Dec

Re: [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO

2014-12-15 Thread Chris Mason
On Thu, Dec 11, 2014 at 1:36 AM, Ingo Molnar wrote: * Andy Lutomirski wrote: On Wed, Dec 10, 2014 at 2:56 PM, Shaohua Li wrote: > On Wed, Dec 10, 2014 at 02:13:23PM -0800, Andy Lutomirski wrote: >> On Wed, Dec 10, 2014 at 1:57 PM, Shaohua Li wrote: >> > On Wed, Dec 10, 2014 at 11:10:

Re: [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO

2014-12-10 Thread Ingo Molnar
* Andy Lutomirski wrote: > On Wed, Dec 10, 2014 at 2:56 PM, Shaohua Li wrote: > > On Wed, Dec 10, 2014 at 02:13:23PM -0800, Andy Lutomirski wrote: > >> On Wed, Dec 10, 2014 at 1:57 PM, Shaohua Li wrote: > >> > On Wed, Dec 10, 2014 at 11:10:52AM -0800, Andy Lutomirski wrote: > >> >> On Sun, Dec

Re: [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO

2014-12-10 Thread Andy Lutomirski
On Wed, Dec 10, 2014 at 2:56 PM, Shaohua Li wrote: > On Wed, Dec 10, 2014 at 02:13:23PM -0800, Andy Lutomirski wrote: >> On Wed, Dec 10, 2014 at 1:57 PM, Shaohua Li wrote: >> > On Wed, Dec 10, 2014 at 11:10:52AM -0800, Andy Lutomirski wrote: >> >> On Sun, Dec 7, 2014 at 7:03 PM, Shaohua Li wrote

Re: [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO

2014-12-10 Thread Shaohua Li
On Wed, Dec 10, 2014 at 02:13:23PM -0800, Andy Lutomirski wrote: > On Wed, Dec 10, 2014 at 1:57 PM, Shaohua Li wrote: > > On Wed, Dec 10, 2014 at 11:10:52AM -0800, Andy Lutomirski wrote: > >> On Sun, Dec 7, 2014 at 7:03 PM, Shaohua Li wrote: > >> > This primarily speeds up clock_gettime(CLOCK_THR

Re: [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO

2014-12-10 Thread Andy Lutomirski
On Wed, Dec 10, 2014 at 1:57 PM, Shaohua Li wrote: > On Wed, Dec 10, 2014 at 11:10:52AM -0800, Andy Lutomirski wrote: >> On Sun, Dec 7, 2014 at 7:03 PM, Shaohua Li wrote: >> > This primarily speeds up clock_gettime(CLOCK_THREAD_CPUTIME_ID, ..). We >> > use the following method to compute the thre

Re: [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO

2014-12-10 Thread Shaohua Li
On Wed, Dec 10, 2014 at 11:10:52AM -0800, Andy Lutomirski wrote: > On Sun, Dec 7, 2014 at 7:03 PM, Shaohua Li wrote: > > This primarily speeds up clock_gettime(CLOCK_THREAD_CPUTIME_ID, ..). We > > use the following method to compute the thread cpu time: > > I like the idea, and I like making this

Re: [PATCH 3/3] X86: Add a thread cpu time implementation to vDSO

2014-12-10 Thread Andy Lutomirski
On Sun, Dec 7, 2014 at 7:03 PM, Shaohua Li wrote: > This primarily speeds up clock_gettime(CLOCK_THREAD_CPUTIME_ID, ..). We > use the following method to compute the thread cpu time: I like the idea, and I like making this type of profiling fast. I don't love the implementation because it's an i

[PATCH 3/3] X86: Add a thread cpu time implementation to vDSO

2014-12-07 Thread Shaohua Li
This primarily speeds up clock_gettime(CLOCK_THREAD_CPUTIME_ID, ..). We use the following method to compute the thread cpu time: t0 = process start t1 = most recent context switch time t2 = time at which the vsyscall is invoked thread_cpu_time = sum(time slices between t0 to t1) +