lkml.org 
[lkml]   [2015]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] X86: Add a thread cpu time implementation to vDSO
On Fri, Jan 02, 2015 at 08:31:33AM -0700, David Ahern wrote:
> On 1/1/15 7:59 PM, Shaohua Li wrote:
> >I'm wondering how we could use the perf to implament a clock_gettime.
> >reading the perf fd or using ioctl is slow so reading the mmap
> >ringbuffer is the only option. But as far as I know the ringbuffer has
> >data only when an event is generated. Between two events, there is
> >nothing we can read from the ringbuffer. Then how can application get
> >time info in the interval?
>
> Are you wanting to read perf_clock from userspace?

Yep, in some sort of form. Basically I want to read the time a task
runs. Peter suggests we can read the activation time of a perf event.
But I don't want to use any system call, as it's slow and likes
clock_gettime.

Thanks,
Shaohua


\
 
 \ /
  Last update: 2015-01-02 18:21    [W:0.108 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site