Skip to contentSkip to conversation

Adding an error message to indicate perf_event cgroup subsys not mounted.

PATCH New Will Auld 1 participant 1 message Mar 21, 2013 perf events

lore
Share & tools
lore

Will Auld

author
#0 lore raw

PATCH 1/1 Adding an error message to indicate perf_event cgroup subsys not mounted.

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

---
 tools/perf/util/cgroup.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
tools/perf/util/cgroup.c +3 -1
index 96bbda1..4126beb 100644
@@ -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);
Signature · 1 line
1.7.1