mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Will Auld <will.auld.intel@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: acme@redhat.com, eranian@google.com, andi.kleen@intel.com,
	will.auld@intel.com
Subject: [PATCH] Adding an error message to indicate perf_event cgroup subsys not mounted.
Date: Thu, 21 Mar 2013 11:29:20 -0700	[thread overview]
Message-ID: <1363890560.21957.4.camel@WGA-RHEL6.3> (raw)

Adding an error message to indicate that there is no mounted perf_event
cgroup while using -G or --cgroup options with perf.

Signed-off-by: Will Auld <will.auld@intel.com>
---
 tools/perf/util/cgroup.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c
index 96bbda1..4126beb 100644
--- a/tools/perf/util/cgroup.c
+++ b/tools/perf/util/cgroup.c
@@ -44,8 +44,10 @@ cgroupfs_find_mountpoint(char *buf, size_t maxlen)
 			break;
 	}
 	fclose(fp);
-	if (!found)
+	if (!found) {
+		error("No cgroup mounted with \'perf_event\' type");
 		return -1;
+	}
 
 	if (strlen(mountpoint) < maxlen) {
 		strcpy(buf, mountpoint);
-- 
1.7.1




                 reply	other threads:[~2013-03-21 18:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1363890560.21957.4.camel@WGA-RHEL6.3 \
    --to=will.auld.intel@gmail.com \
    --cc=acme@redhat.com \
    --cc=andi.kleen@intel.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.auld@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

all inboxes | Powered by JetHome®