lkml.org 
[lkml]   [2013]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v10 04/12] tracing: Add 'snapshot' event trigger command
From
Date
On Fri, 2013-10-11 at 22:47 +0900, Masami Hiramatsu wrote:
> (2013/10/11 9:48), Tom Zanussi wrote:
> > /**
> > + * tracing_alloc_snapshot - allocate snapshot buffer.
> > + *
> > + * This only allocates the snapshot buffer if it isn't already
> > + * allocated - it doesn't also take a snapshot.
> > + *
> > + * This is meant to be used in cases where the snapshot buffer needs
> > + * to be set up for events that can't sleep but need to be able to
> > + * trigger a snapshot.
> > + */
> > +int tracing_alloc_snapshot(void)
> > +{
> > + struct trace_array *tr = &global_trace;
> > + int ret;
> > +
> > + ret = alloc_snapshot(tr);
> > + WARN_ON(ret < 0);
> > +
> > + return ret;
> > +}
> > +EXPORT_SYMBOL_GPL(tracing_alloc_snapshot);
>
> Out of curiously, why this symbol is exported to modules?
> The functions which are called directly from trace_event macros
> should be exported because those macros can be used in module code,
> but I couldn't find this in such code, at a glance.
>

tracing_alloc_snapshot() goes along with tracing_snapshot() and
tracing_snapshot_alloc() which are already exported - you should be able
to take a snapshot from a module, or do a combined snapshot/alloc or
(now) just the alloc.

Tom

> Thank you,
>
>
>




\
 
 \ /
  Last update: 2013-10-11 16:21    [W:0.087 / U:1.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site