Messages in this thread | | | Date | Thu, 30 Apr 2015 10:48:02 -0400 | From | Steven Rostedt <> | Subject | Re: [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> > ---
| |