lkml.org 
[lkml]   [2013]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Adding an error message to indicate perf_event cgroup subsys not mounted.
From
Date
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




\
 
 \ /
  Last update: 2013-03-21 21:02    [W:0.018 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site