public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v10 04/12] tracing: Add 'snapshot' event trigger command
Date: Tue, 15 Oct 2013 18:23:41 +0900	[thread overview]
Message-ID: <525D099D.1010005@hitachi.com> (raw)
In-Reply-To: <1381500268.19281.19.camel@empanada>

(2013/10/11 23:04), Tom Zanussi wrote:
> 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.

Hmm, it seems that Steven added these EXPORT_SYMBOL_GPL at commit 1b22e382.
Steven, would you have any idea to call these functions from outside of
the ftrace?

Thank you,

-- 
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



  reply	other threads:[~2013-10-15  9:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11  0:48 [PATCH v10 00/12] tracing: trace event triggers Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 01/12] tracing: Add support for SOFT_DISABLE to syscall events Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 02/12] tracing: Add basic event trigger framework Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 03/12] tracing: Add 'traceon' and 'traceoff' event trigger commands Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 04/12] tracing: Add 'snapshot' event trigger command Tom Zanussi
2013-10-11 13:47   ` Masami Hiramatsu
2013-10-11 14:04     ` Tom Zanussi
2013-10-15  9:23       ` Masami Hiramatsu [this message]
2013-10-11  0:48 ` [PATCH v10 05/12] tracing: Add 'stacktrace' " Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 06/12] tracing: Add 'enable_event' and 'disable_event' event trigger commands Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 07/12] tracing: Add and use generic set_trigger_filter() implementation Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 08/12] tracing: Update event filters for multibuffer Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 09/12] tracing: Add documentation for trace event triggers Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 10/12] tracing: Make register/unregister_ftrace_command __init Tom Zanussi
2013-10-11  0:48 ` [PATCH v10 11/12] tracing: fix tracing_snapshot kerneldoc Tom Zanussi
2013-10-11 12:50   ` Masami Hiramatsu
2013-10-11 13:29     ` Tom Zanussi
2013-10-11 20:57       ` Steven Rostedt
2013-10-11  0:48 ` [PATCH v10 12/12] tracing: define trace_dump_stack() if !CONFIG_STACKTRACE Tom Zanussi
2013-10-11 13:00   ` Masami Hiramatsu
2013-10-11 13:32     ` Tom Zanussi
2013-10-11 20:04       ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=525D099D.1010005@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tom.zanussi@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox