lkml.org 
[lkml]   [2015]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing: Export tracing clock functions
On Thu, 30 Apr 2015 07:36:40 -0700
Jerry Snitselaar <jsnitsel@redhat.com> wrote:

> Critical tracepoint hooks shoud never call anything that takes a lock,
> so they are unable to call getrawmonotonic() or ktime_get().
>
> Export the rest of the tracing clock functions so can be used in
> tracepoint hooks.

A little background needs to be explained here.

A customer adds their own module to do some analysis and hooks to
tracepoints to do so. They were using ktime_get() as their time source,
but as that grabs a seq lock, it was causing deadlocks.

The tracing clocks were made for this purpose, and I find nothing wrong
with letting users add their own modules (GPL of course) and adding
their own hooks to the tracepoint code. I created it for that purpose.
But if they need to do any timings, they must use lockless clocks,
which the trace clocks are good for.

-- Steve


>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
> ---


\
 
 \ /
  Last update: 2015-04-30 17:21    [W:0.036 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site