Bug 1203811 - Clarify two error messages in tools/power/rapl. r=heycam.

This commit is contained in:
Nicholas Nethercote 2015-09-10 23:12:31 -07:00
parent 9d86749340
commit 2cbfe95103

View File

@ -472,7 +472,9 @@ public:
&config)) {
// Failure is allowed for optional domains.
if (aOptional == NonOptional) {
Abort("failed to open file for non-optional domain '%s'", aName);
Abort("failed to open file for non-optional domain '%s'\n"
"- Is your kernel version 3.14 or later, as required? "
"Run |uname -r| to see.", aName);
}
mIsSupported = false;
return;
@ -501,8 +503,8 @@ public:
/* group_fd = */ -1, /* flags = */ 0);
if (mFd < 0) {
Abort("perf_event_open() failed\n"
"Did you run as root or "
"set /proc/sys/kernel/perf_event_paranoid to 0?");
"- Did you run as root (e.g. with |sudo|) or set\n"
" /proc/sys/kernel/perf_event_paranoid to 0, as required?");
}
mPrevTicks = 0;