[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-96c96612e952f63cc0055db9df7d8b5b1ada02be@git.kernel.org>
Date: Thu, 17 Dec 2009 10:51:31 GMT
From: tip-bot for Masami Hiramatsu <mhiramat@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, mingo@...hat.com, peterz@...radead.org,
dle-develop@...ts.sourceforge.net, fweisbec@...il.com,
rostedt@...dmis.org, jbaron@...hat.com, tglx@...utronix.de,
mhiramat@...hat.com, systemtap@...rces.redhat.com,
linux-kernel@...r.kernel.org, hpa@...or.com, paulus@...ba.org,
jkenisto@...ibm.com, hch@...radead.org, ananth@...ibm.com,
srikar@...ux.vnet.ibm.com, mingo@...e.hu, prasad@...ux.vnet.ibm.com
Subject: [tip:perf/urgent] perf probe: Check whether debugfs path is correct
Commit-ID: 96c96612e952f63cc0055db9df7d8b5b1ada02be
Gitweb: http://git.kernel.org/tip/96c96612e952f63cc0055db9df7d8b5b1ada02be
Author: Masami Hiramatsu <mhiramat@...hat.com>
AuthorDate: Wed, 16 Dec 2009 17:24:00 -0500
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Thu, 17 Dec 2009 09:42:43 +0100
perf probe: Check whether debugfs path is correct
Check whether the debugfs path is correct before executing
a command, because perf-probe depends on debugfs.
Signed-off-by: Masami Hiramatsu <mhiramat@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Jim Keniston <jkenisto@...ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@...ibm.com>
Cc: Christoph Hellwig <hch@...radead.org>
Cc: Jason Baron <jbaron@...hat.com>
Cc: K.Prasad <prasad@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: systemtap <systemtap@...rces.redhat.com>
Cc: DLE <dle-develop@...ts.sourceforge.net>
LKML-Reference: <20091216222400.14459.48162.stgit@...p-100-2-132.bos.redhat.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
tools/perf/builtin-probe.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 7e741f5..c1e6774 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -38,6 +38,7 @@
#include "util/strlist.h"
#include "util/event.h"
#include "util/debug.h"
+#include "util/debugfs.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/session.h"
@@ -205,6 +206,9 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used)
if ((!session.nr_probe && !session.dellist && !session.list_events))
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) {
pr_warning(" Error: Don't use --list with"
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists