From: Masami Hiramatsu <mhiramat@redhat.com>
To: Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>
Cc: systemtap <systemtap@sources.redhat.com>,
DLE <dle-develop@lists.sourceforge.net>,
Masami Hiramatsu <mhiramat@redhat.com>,
Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Paul Mackerras <paulus@samba.org>, Mike Galbraith <efault@gmx.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH -tip 04/10] perf probe: Rename session to param
Date: Tue, 16 Mar 2010 18:05:44 -0400 [thread overview]
Message-ID: <20100316220544.32050.8788.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20100316220515.32050.82185.stgit@localhost6.localdomain6>
Since this name 'session' conflicts with 'perf_session', and
this structure just holds parameters anymore.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
tools/perf/builtin-probe.c | 54 ++++++++++++++++++++++----------------------
1 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 2087034..f577e14 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -56,20 +56,20 @@ static struct {
struct probe_point probes[MAX_PROBES];
struct strlist *dellist;
struct line_range line_range;
-} session;
+} params;
/* Parse an event definition. Note that any error must die. */
static void parse_probe_event(const char *str)
{
- struct probe_point *pp = &session.probes[session.nr_probe];
+ struct probe_point *pp = ¶ms.probes[params.nr_probe];
- pr_debug("probe-definition(%d): %s\n", session.nr_probe, str);
- if (++session.nr_probe == MAX_PROBES)
+ pr_debug("probe-definition(%d): %s\n", params.nr_probe, str);
+ if (++params.nr_probe == MAX_PROBES)
die("Too many probes (> %d) are specified.", MAX_PROBES);
/* Parse perf-probe event into probe_point */
- parse_perf_probe_event(str, pp, &session.need_dwarf);
+ parse_perf_probe_event(str, pp, ¶ms.need_dwarf);
pr_debug("%d arguments\n", pp->nr_args);
}
@@ -103,9 +103,9 @@ static int opt_del_probe_event(const struct option *opt __used,
const char *str, int unset __used)
{
if (str) {
- if (!session.dellist)
- session.dellist = strlist__new(true, NULL);
- strlist__add(session.dellist, str);
+ if (!params.dellist)
+ params.dellist = strlist__new(true, NULL);
+ strlist__add(params.dellist, str);
}
return 0;
}
@@ -115,9 +115,9 @@ static int opt_show_lines(const struct option *opt __used,
const char *str, int unset __used)
{
if (str)
- parse_line_range_desc(str, &session.line_range);
- INIT_LIST_HEAD(&session.line_range.line_list);
- session.show_lines = true;
+ parse_line_range_desc(str, ¶ms.line_range);
+ INIT_LIST_HEAD(¶ms.line_range.line_list);
+ params.show_lines = true;
return 0;
}
#endif
@@ -140,7 +140,7 @@ static const struct option options[] = {
OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
"file", "vmlinux pathname"),
#endif
- OPT_BOOLEAN('l', "list", &session.list_events,
+ OPT_BOOLEAN('l', "list", ¶ms.list_events,
"list up current probe events"),
OPT_CALLBACK('d', "del", NULL, "[GROUP:]EVENT", "delete a probe event.",
opt_del_probe_event),
@@ -168,7 +168,7 @@ static const struct option options[] = {
#endif
"\t\t\tkprobe-tracer argument format.)\n",
opt_add_probe_event),
- OPT_BOOLEAN('f', "force", &session.force_add, "forcibly add events"
+ OPT_BOOLEAN('f', "force", ¶ms.force_add, "forcibly add events"
" with existing name"),
#ifndef NO_DWARF_SUPPORT
OPT_CALLBACK('L', "line", NULL,
@@ -190,20 +190,20 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used)
parse_probe_event_argv(argc, argv);
}
- if ((!session.nr_probe && !session.dellist && !session.list_events &&
- !session.show_lines))
+ if ((!params.nr_probe && !params.dellist && !params.list_events &&
+ !params.show_lines))
usage_with_options(probe_usage, options);
if (debugfs_valid_mountpoint(debugfs_path) < 0)
die("Failed to find debugfs path.");
- if (session.list_events) {
- if (session.nr_probe != 0 || session.dellist) {
+ if (params.list_events) {
+ if (params.nr_probe != 0 || params.dellist) {
pr_warning(" Error: Don't use --list with"
" --add/--del.\n");
usage_with_options(probe_usage, options);
}
- if (session.show_lines) {
+ if (params.show_lines) {
pr_warning(" Error: Don't use --list with --line.\n");
usage_with_options(probe_usage, options);
}
@@ -212,27 +212,27 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used)
}
#ifndef NO_DWARF_SUPPORT
- if (session.show_lines) {
- if (session.nr_probe != 0 || session.dellist) {
+ if (params.show_lines) {
+ if (params.nr_probe != 0 || params.dellist) {
pr_warning(" Error: Don't use --line with"
" --add/--del.\n");
usage_with_options(probe_usage, options);
}
- show_line_range(&session.line_range);
+ show_line_range(¶ms.line_range);
return 0;
}
#endif
- if (session.dellist) {
- del_trace_kprobe_events(session.dellist);
- strlist__delete(session.dellist);
- if (session.nr_probe == 0)
+ if (params.dellist) {
+ del_trace_kprobe_events(params.dellist);
+ strlist__delete(params.dellist);
+ if (params.nr_probe == 0)
return 0;
}
- add_trace_kprobe_events(session.probes, session.nr_probe,
- session.force_add, session.need_dwarf);
+ add_trace_kprobe_events(params.probes, params.nr_probe,
+ params.force_add, params.need_dwarf);
return 0;
}
--
Masami Hiramatsu
e-mail: mhiramat@redhat.com
next prev parent reply other threads:[~2010-03-16 21:57 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 22:05 [PATCH -tip 00/10] perf-probe updates - data-structure support, etc Masami Hiramatsu
2010-03-16 22:05 ` [PATCH -tip 01/10] perf tools: Introduce xzalloc() for detecting out of memory Masami Hiramatsu
2010-03-17 11:27 ` [tip:perf/core] perf tools: Introduce xzalloc() for detecting out of memory conditions tip-bot for Masami Hiramatsu
2010-03-16 22:05 ` [PATCH -tip 02/10] perf probe: Use wrapper functions Masami Hiramatsu
2010-03-17 11:27 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-03-16 22:05 ` [PATCH -tip 03/10] perf probe: Move add-probe routine under util/ Masami Hiramatsu
2010-03-17 11:28 ` [tip:perf/core] perf probe: Move add-probe routine to util/ tip-bot for Masami Hiramatsu
2010-03-16 22:05 ` Masami Hiramatsu [this message]
2010-03-17 11:28 ` [tip:perf/core] perf probe: Rename session to param tip-bot for Masami Hiramatsu
2010-03-16 22:05 ` [PATCH -tip 05/10] perf probe: Rename some die_get_* functions Masami Hiramatsu
2010-03-17 11:28 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-03-16 22:05 ` [PATCH -tip 06/10] perf probe: Introduce die_find_child() function Masami Hiramatsu
2010-03-17 11:29 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-03-16 22:06 ` [PATCH -tip 07/10] perf probe: Add --dry-run option Masami Hiramatsu
2010-03-17 11:29 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-03-16 22:06 ` [PATCH -tip 08/10] perf probe: Introduce kprobe_trace_event and perf_probe_event Masami Hiramatsu
2010-03-17 11:29 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-03-17 11:30 ` [tip:perf/core] perf probe: Fix !dwarf build tip-bot for Ingo Molnar
2010-03-17 14:14 ` Masami Hiramatsu
2010-03-18 17:38 ` [tip:perf/core] perf events: Fix false positive build warning with older GCC's tip-bot for Ingo Molnar
2010-03-18 20:03 ` Masami Hiramatsu
2010-03-16 22:06 ` [PATCH -tip 09/10] perf probe: List probes with line number and file name Masami Hiramatsu
2010-03-17 11:29 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-03-16 22:06 ` [PATCH -tip 10/10] perf probe: Accessing members in data structures Masami Hiramatsu
2010-03-17 10:25 ` Mark Wielaard
2010-03-17 19:14 ` Masami Hiramatsu
2010-03-18 3:28 ` Frederic Weisbecker
2010-03-20 4:20 ` Masami Hiramatsu
2010-03-23 15:55 ` Peter Zijlstra
2010-03-23 16:27 ` Arnaldo Carvalho de Melo
2010-03-17 11:30 ` [tip:perf/core] perf probe: Add data structure member access support tip-bot for Masami Hiramatsu
2010-03-17 10:34 ` [PATCH -tip 00/10] perf-probe updates - data-structure support, etc Ingo Molnar
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=20100316220544.32050.8788.stgit@localhost6.localdomain6 \
--to=mhiramat@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dle-develop@lists.sourceforge.net \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=systemtap@sources.redhat.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
Powered by JetHome