Re: [PATCH] tracing: Export tracing clock functions

From: Steven Rostedt
Date: Thu Apr 30 2015 - 10:48:11 EST


On Thu, 30 Apr 2015 07:36:40 -0700
Jerry Snitselaar <jsnitsel@xxxxxxxxxx> 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@xxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Signed-off-by: Jerry Snitselaar <jsnitsel@xxxxxxxxxx>
> ---
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/