All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, hpa@zytor.com,
	mingo@redhat.com, peterz@infradead.org,
	masami.hiramatsu.pt@hitachi.com, fweisbec@gmail.com,
	rostedt@goodmis.org, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] tracing/kprobes: Rename probe_* to trace_probe_*
Date: Thu, 21 Jul 2011 10:01:10 GMT	[thread overview]
Message-ID: <tip-7143f168e2aa4bc7f8a8bcfe46d8dc52f7be869a@git.kernel.org> (raw)
In-Reply-To: <20110627072636.6528.60374.stgit@fedora15>

Commit-ID:  7143f168e2aa4bc7f8a8bcfe46d8dc52f7be869a
Gitweb:     http://git.kernel.org/tip/7143f168e2aa4bc7f8a8bcfe46d8dc52f7be869a
Author:     Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
AuthorDate: Mon, 27 Jun 2011 16:26:36 +0900
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Thu, 14 Jul 2011 17:44:43 -0400

tracing/kprobes: Rename probe_* to trace_probe_*

Rename probe_* to trace_probe_* for avoiding namespace
confliction. This also fixes improper names of find_probe_event()
and cleanup_all_probes() to find_trace_probe() and
release_all_trace_probes() respectively.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/20110627072636.6528.60374.stgit@fedora15
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_kprobe.c |   43 ++++++++++++++++++++++---------------------
 1 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 7db7b68..14b88ed 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -555,12 +555,12 @@ struct trace_probe {
 	(sizeof(struct probe_arg) * (n)))
 
 
-static __kprobes int probe_is_return(struct trace_probe *tp)
+static __kprobes int trace_probe_is_return(struct trace_probe *tp)
 {
 	return tp->rp.handler != NULL;
 }
 
-static __kprobes const char *probe_symbol(struct trace_probe *tp)
+static __kprobes const char *trace_probe_symbol(struct trace_probe *tp)
 {
 	return tp->symbol ? tp->symbol : "unknown";
 }
@@ -671,7 +671,7 @@ static void free_trace_probe(struct trace_probe *tp)
 	kfree(tp);
 }
 
-static struct trace_probe *find_probe_event(const char *event,
+static struct trace_probe *find_trace_probe(const char *event,
 					    const char *group)
 {
 	struct trace_probe *tp;
@@ -686,7 +686,7 @@ static struct trace_probe *find_probe_event(const char *event,
 /* Unregister a trace_probe and probe_event: call with locking probe_lock */
 static void unregister_trace_probe(struct trace_probe *tp)
 {
-	if (probe_is_return(tp))
+	if (trace_probe_is_return(tp))
 		unregister_kretprobe(&tp->rp);
 	else
 		unregister_kprobe(&tp->rp.kp);
@@ -703,7 +703,7 @@ static int register_trace_probe(struct trace_probe *tp)
 	mutex_lock(&probe_lock);
 
 	/* register as an event */
-	old_tp = find_probe_event(tp->call.name, tp->call.class->system);
+	old_tp = find_trace_probe(tp->call.name, tp->call.class->system);
 	if (old_tp) {
 		/* delete old event */
 		unregister_trace_probe(old_tp);
@@ -716,7 +716,7 @@ static int register_trace_probe(struct trace_probe *tp)
 	}
 
 	tp->rp.kp.flags |= KPROBE_FLAG_DISABLED;
-	if (probe_is_return(tp))
+	if (trace_probe_is_return(tp))
 		ret = register_kretprobe(&tp->rp);
 	else
 		ret = register_kprobe(&tp->rp.kp);
@@ -1025,7 +1025,7 @@ static int create_trace_probe(int argc, char **argv)
 			return -EINVAL;
 		}
 		mutex_lock(&probe_lock);
-		tp = find_probe_event(event, group);
+		tp = find_trace_probe(event, group);
 		if (!tp) {
 			mutex_unlock(&probe_lock);
 			pr_info("Event %s/%s doesn't exist.\n", group, event);
@@ -1144,7 +1144,7 @@ error:
 	return ret;
 }
 
-static void cleanup_all_probes(void)
+static void release_all_trace_probes(void)
 {
 	struct trace_probe *tp;
 
@@ -1181,15 +1181,16 @@ static int probes_seq_show(struct seq_file *m, void *v)
 	struct trace_probe *tp = v;
 	int i;
 
-	seq_printf(m, "%c", probe_is_return(tp) ? 'r' : 'p');
+	seq_printf(m, "%c", trace_probe_is_return(tp) ? 'r' : 'p');
 	seq_printf(m, ":%s/%s", tp->call.class->system, tp->call.name);
 
 	if (!tp->symbol)
 		seq_printf(m, " 0x%p", tp->rp.kp.addr);
 	else if (tp->rp.kp.offset)
-		seq_printf(m, " %s+%u", probe_symbol(tp), tp->rp.kp.offset);
+		seq_printf(m, " %s+%u", trace_probe_symbol(tp),
+			   tp->rp.kp.offset);
 	else
-		seq_printf(m, " %s", probe_symbol(tp));
+		seq_printf(m, " %s", trace_probe_symbol(tp));
 
 	for (i = 0; i < tp->nr_args; i++)
 		seq_printf(m, " %s=%s", tp->args[i].name, tp->args[i].comm);
@@ -1209,7 +1210,7 @@ static int probes_open(struct inode *inode, struct file *file)
 {
 	if ((file->f_mode & FMODE_WRITE) &&
 	    (file->f_flags & O_TRUNC))
-		cleanup_all_probes();
+		release_all_trace_probes();
 
 	return seq_open(file, &probes_seq_op);
 }
@@ -1518,7 +1519,7 @@ static int probe_event_enable(struct ftrace_event_call *call)
 	struct trace_probe *tp = (struct trace_probe *)call->data;
 
 	tp->flags |= TP_FLAG_TRACE;
-	if (probe_is_return(tp))
+	if (trace_probe_is_return(tp))
 		return enable_kretprobe(&tp->rp);
 	else
 		return enable_kprobe(&tp->rp.kp);
@@ -1530,7 +1531,7 @@ static void probe_event_disable(struct ftrace_event_call *call)
 
 	tp->flags &= ~TP_FLAG_TRACE;
 	if (!(tp->flags & (TP_FLAG_TRACE | TP_FLAG_PROFILE))) {
-		if (probe_is_return(tp))
+		if (trace_probe_is_return(tp))
 			disable_kretprobe(&tp->rp);
 		else
 			disable_kprobe(&tp->rp.kp);
@@ -1598,7 +1599,7 @@ static int __set_print_fmt(struct trace_probe *tp, char *buf, int len)
 
 	const char *fmt, *arg;
 
-	if (!probe_is_return(tp)) {
+	if (!trace_probe_is_return(tp)) {
 		fmt = "(%lx)";
 		arg = "REC->" FIELD_STRING_IP;
 	} else {
@@ -1722,7 +1723,7 @@ static int probe_perf_enable(struct ftrace_event_call *call)
 
 	tp->flags |= TP_FLAG_PROFILE;
 
-	if (probe_is_return(tp))
+	if (trace_probe_is_return(tp))
 		return enable_kretprobe(&tp->rp);
 	else
 		return enable_kprobe(&tp->rp.kp);
@@ -1735,7 +1736,7 @@ static void probe_perf_disable(struct ftrace_event_call *call)
 	tp->flags &= ~TP_FLAG_PROFILE;
 
 	if (!(tp->flags & TP_FLAG_TRACE)) {
-		if (probe_is_return(tp))
+		if (trace_probe_is_return(tp))
 			disable_kretprobe(&tp->rp);
 		else
 			disable_kprobe(&tp->rp.kp);
@@ -1807,7 +1808,7 @@ static int register_probe_event(struct trace_probe *tp)
 
 	/* Initialize ftrace_event_call */
 	INIT_LIST_HEAD(&call->class->fields);
-	if (probe_is_return(tp)) {
+	if (trace_probe_is_return(tp)) {
 		call->event.funcs = &kretprobe_funcs;
 		call->class->define_fields = kretprobe_event_define_fields;
 	} else {
@@ -1899,7 +1900,7 @@ static __init int kprobe_trace_self_tests_init(void)
 		warn++;
 	} else {
 		/* Enable trace point */
-		tp = find_probe_event("testprobe", KPROBE_EVENT_SYSTEM);
+		tp = find_trace_probe("testprobe", KPROBE_EVENT_SYSTEM);
 		if (WARN_ON_ONCE(tp == NULL)) {
 			pr_warning("error on getting new probe.\n");
 			warn++;
@@ -1914,7 +1915,7 @@ static __init int kprobe_trace_self_tests_init(void)
 		warn++;
 	} else {
 		/* Enable trace point */
-		tp = find_probe_event("testprobe2", KPROBE_EVENT_SYSTEM);
+		tp = find_trace_probe("testprobe2", KPROBE_EVENT_SYSTEM);
 		if (WARN_ON_ONCE(tp == NULL)) {
 			pr_warning("error on getting new probe.\n");
 			warn++;
@@ -1940,7 +1941,7 @@ static __init int kprobe_trace_self_tests_init(void)
 	}
 
 end:
-	cleanup_all_probes();
+	release_all_trace_probes();
 	if (warn)
 		pr_cont("NG: Some tests are failed. Please check them.\n");
 	else

  reply	other threads:[~2011-07-21 10:01 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27  7:26 [PATCH -tip 00/13]tracing/kprobes: Dynamic events on module support Masami Hiramatsu
2011-06-27  7:26 ` [PATCH -tip 01/13] [CLEANUP]tracing/kprobes: Rename probe_* to trace_probe_* Masami Hiramatsu
2011-07-21 10:01   ` tip-bot for Masami Hiramatsu [this message]
2011-06-27  7:26 ` [PATCH -tip 02/13] [CLEANUP]tracing/kprobes: merge trace probe enable/disable functions Masami Hiramatsu
2011-07-08 16:37   ` Steven Rostedt
2011-07-09  4:41     ` Masami Hiramatsu
2011-07-15 17:27   ` Steven Rostedt
2011-07-16 10:30     ` Masami Hiramatsu
2011-07-16 10:33     ` [PATCH -tip v2] " Masami Hiramatsu
2011-07-16 11:11       ` Steven Rostedt
2011-07-21 10:01   ` [tip:perf/core] tracing/kprobes: Merge " tip-bot for Masami Hiramatsu
2011-06-27  7:26 ` [PATCH -tip 03/13] kprobes: Return -ENOENT if probe point doesn't exist Masami Hiramatsu
2011-06-28 13:03   ` Ananth N Mavinakayanahalli
2011-07-21 10:02   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-06-27  7:26 ` [PATCH -tip 04/13] tracing/kprobes: Support module init function probing Masami Hiramatsu
2011-07-21 10:02   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-06-27  7:27 ` [PATCH -tip 05/13] tracing/kprobe: Update symbol reference when loading module Masami Hiramatsu
2011-07-21 10:02   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-06-27  7:27 ` [PATCH -tip 06/13] [RESEND][CLEANUP]perf probe: Rename DIE_FIND_CB_FOUND to DIE_FIND_CB_END Masami Hiramatsu
2011-07-21 10:03   ` [tip:perf/core] perf " tip-bot for Masami Hiramatsu
2011-06-27  7:27 ` [PATCH -tip 07/13] [RESEND][CLEANUP]perf probe: Move strtailcmp to string.c Masami Hiramatsu
2011-07-21 10:03   ` [tip:perf/core] perf " tip-bot for Masami Hiramatsu
2011-06-27  7:27 ` [PATCH -tip 08/13] [RESEND][CLEANUP]perf probe: Remove redundant dwarf functions Masami Hiramatsu
2011-07-21 10:04   ` [tip:perf/core] perf " tip-bot for Masami Hiramatsu
2011-06-27  7:27 ` [PATCH -tip 09/13] [RESEND][CLEANUP]perf-probe: Move dwarf library routines to dwarf-aux.{c, h} Masami Hiramatsu
2011-07-21 10:04   ` [tip:perf/core] perf-probe: " tip-bot for Masami Hiramatsu
2011-06-27  7:27 ` [PATCH -tip 10/13] [RESEND]perf probe: Warn when more than two lines are given Masami Hiramatsu
2011-06-28 14:15   ` David Ahern
2011-06-29  5:14     ` Masami Hiramatsu
2011-06-27  7:27 ` [PATCH -tip 11/13] [RESEND]perf probe: Introduce debuginfo to encapsulate dwarf information Masami Hiramatsu
2011-07-21 10:05   ` [tip:perf/core] perf " tip-bot for Masami Hiramatsu
2011-06-27  7:27 ` [PATCH -tip 12/13] perf probe: Add probed module in front of function Masami Hiramatsu
2011-07-21 10:05   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-06-27  7:27 ` [PATCH -tip 13/13] perf probe: Support adding probes on offline kernel modules Masami Hiramatsu
2011-07-21 10:06   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-06-28 13:18 ` [PATCH -tip 00/13]tracing/kprobes: Dynamic events on module support Steven Rostedt
2011-07-15 11:28 ` Steven Rostedt
2011-07-15 12:26   ` Masami Hiramatsu

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=tip-7143f168e2aa4bc7f8a8bcfe46d8dc52f7be869a@git.kernel.org \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.