From: Tom Zanussi <tom.zanussi@linux.intel.com>
To: rostedt@goodmis.org
Cc: daniel.wagner@bmw-carit.de, masami.hiramatsu.pt@hitachi.com,
namhyung@kernel.org, josh@joshtriplett.org, andi@firstfloor.org,
linux-kernel@vger.kernel.org,
Tom Zanussi <tom.zanussi@linux.intel.com>
Subject: [PATCH v8 03/23] tracing: Make event trigger functions available
Date: Mon, 29 Jun 2015 15:34:05 -0500 [thread overview]
Message-ID: <2d793f516f2d2272e9f178cb1b9d8efe465be6f2.1435607463.git.tom.zanussi@linux.intel.com> (raw)
In-Reply-To: <cover.1435607463.git.tom.zanussi@linux.intel.com>
In-Reply-To: <cover.1435607463.git.tom.zanussi@linux.intel.com>
Make various event trigger utility functions available outside of
trace_events_trigger.c so that new triggers can be defined outside of
that file.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
kernel/trace/trace.h | 14 ++++++++++++++
kernel/trace/trace_events_trigger.c | 28 +++++++++++++---------------
2 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 891c5b0..4ff33b7 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -1113,6 +1113,20 @@ struct event_trigger_data {
struct list_head list;
};
+extern void trigger_data_free(struct event_trigger_data *data);
+extern int event_trigger_init(struct event_trigger_ops *ops,
+ struct event_trigger_data *data);
+extern int trace_event_trigger_enable_disable(struct trace_event_file *file,
+ int trigger_enable);
+extern void update_cond_flag(struct trace_event_file *file);
+extern void unregister_trigger(char *glob, struct event_trigger_ops *ops,
+ struct event_trigger_data *test,
+ struct trace_event_file *file);
+extern int set_trigger_filter(char *filter_str,
+ struct event_trigger_data *trigger_data,
+ struct trace_event_file *file);
+extern int register_event_command(struct event_command *cmd);
+
/**
* struct event_trigger_ops - callbacks for trace event triggers
*
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
index 4d2f3cc..6087052 100644
--- a/kernel/trace/trace_events_trigger.c
+++ b/kernel/trace/trace_events_trigger.c
@@ -28,8 +28,7 @@
static LIST_HEAD(trigger_commands);
static DEFINE_MUTEX(trigger_cmd_mutex);
-static void
-trigger_data_free(struct event_trigger_data *data)
+void trigger_data_free(struct event_trigger_data *data)
{
if (data->cmd_ops->set_filter)
data->cmd_ops->set_filter(NULL, data, NULL);
@@ -311,7 +310,7 @@ const struct file_operations event_trigger_fops = {
* Currently we only register event commands from __init, so mark this
* __init too.
*/
-static __init int register_event_command(struct event_command *cmd)
+__init int register_event_command(struct event_command *cmd)
{
struct event_command *p;
int ret = 0;
@@ -400,9 +399,8 @@ event_trigger_print(const char *name, struct seq_file *m,
*
* Return: 0 on success, errno otherwise
*/
-static int
-event_trigger_init(struct event_trigger_ops *ops,
- struct event_trigger_data *data)
+int event_trigger_init(struct event_trigger_ops *ops,
+ struct event_trigger_data *data)
{
data->ref++;
return 0;
@@ -430,8 +428,8 @@ event_trigger_free(struct event_trigger_ops *ops,
trigger_data_free(data);
}
-static int trace_event_trigger_enable_disable(struct trace_event_file *file,
- int trigger_enable)
+int trace_event_trigger_enable_disable(struct trace_event_file *file,
+ int trigger_enable)
{
int ret = 0;
@@ -488,7 +486,7 @@ clear_event_triggers(struct trace_array *tr)
* its TRIGGER_COND bit set, otherwise the TRIGGER_COND bit should be
* cleared.
*/
-static void update_cond_flag(struct trace_event_file *file)
+void update_cond_flag(struct trace_event_file *file)
{
struct event_trigger_data *data;
bool set_cond = false;
@@ -565,9 +563,9 @@ out:
* Usually used directly as the @unreg method in event command
* implementations.
*/
-static void unregister_trigger(char *glob, struct event_trigger_ops *ops,
- struct event_trigger_data *test,
- struct trace_event_file *file)
+void unregister_trigger(char *glob, struct event_trigger_ops *ops,
+ struct event_trigger_data *test,
+ struct trace_event_file *file)
{
struct event_trigger_data *data;
bool unregistered = false;
@@ -701,9 +699,9 @@ event_trigger_callback(struct event_command *cmd_ops,
*
* Return: 0 on success, errno otherwise
*/
-static int set_trigger_filter(char *filter_str,
- struct event_trigger_data *trigger_data,
- struct trace_event_file *file)
+int set_trigger_filter(char *filter_str,
+ struct event_trigger_data *trigger_data,
+ struct trace_event_file *file)
{
struct event_trigger_data *data = trigger_data;
struct event_filter *filter = NULL, *tmp;
--
1.9.3
next prev parent reply other threads:[~2015-06-29 20:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 20:34 [PATCH v8 00/23] tracing: 'hist' triggers Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 01/23] tracing: Update cond flag when enabling or disabling a trigger Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 02/23] tracing: Make ftrace_event_field checking functions available Tom Zanussi
2015-06-29 20:34 ` Tom Zanussi [this message]
2015-06-29 20:34 ` [PATCH v8 04/23] tracing: Add event record param to trigger_ops.func() Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 05/23] tracing: Add get_syscall_name() Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 06/23] tracing: Add a per-event-trigger 'paused' field Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 07/23] tracing: Add lock-free tracing_map Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 08/23] tracing: Add 'hist' event trigger command Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 09/23] tracing: Add hist trigger support for multiple values ('vals=' param) Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 10/23] tracing: Add hist trigger support for compound keys Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 11/23] tracing: Add hist trigger support for user-defined sorting ('sort=' param) Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 12/23] tracing: Add hist trigger support for pausing and continuing a trace Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 13/23] tracing: Add hist trigger support for clearing " Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 14/23] tracing: Add hist trigger 'hex' modifier for displaying numeric fields Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 15/23] tracing: Add hist trigger 'sym' and 'sym-offset' modifiers Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 16/23] tracing: Add hist trigger 'execname' modifier Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 17/23] tracing: Add hist trigger 'syscall' modifier Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 18/23] tracing: Add hist trigger support for stacktraces as keys Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 19/23] tracing: Support string type key properly Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 20/23] tracing: Remove restriction on string position in hist trigger keys Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 21/23] tracing: Add enable_hist/disable_hist triggers Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 22/23] tracing: Add 'hist' trigger Documentation Tom Zanussi
2015-06-29 20:34 ` [PATCH v8 23/23] ftrace: Add function_hist tracer Tom Zanussi
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=2d793f516f2d2272e9f178cb1b9d8efe465be6f2.1435607463.git.tom.zanussi@linux.intel.com \
--to=tom.zanussi@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=daniel.wagner@bmw-carit.de \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
/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
all inboxes | Powered by JetHome®