mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Adding an error message to indicate perf_event cgroup subsys not mounted.
@ 2013-03-21 18:29 Will Auld
  0 siblings, 0 replies; only message in thread
From: Will Auld @ 2013-03-21 18:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: acme, eranian, andi.kleen, will.auld

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-21 18:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-21 18:29 [PATCH] Adding an error message to indicate perf_event cgroup subsys not mounted Will Auld

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®