Skip to content

Commit 4309a0d

Browse files
committed
print error string if msr handle can't be open on Linux
1 parent a81806c commit 4309a0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/msr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ MsrHandle::MsrHandle(uint32 cpu) : fd(-1), cpu_id(cpu)
238238
delete[] path;
239239
if (handle < 0)
240240
{
241-
std::cerr << "PCM Error: can't open MSR handle for core " << cpu << "\n";
241+
std::cerr << "PCM Error: can't open MSR handle for core " << cpu << " (" << strerror(errno) << ")\n";
242242
std::cerr << "Try no-MSR mode by setting env variable PCM_NO_MSR=1\n";
243243
throw std::exception();
244244
}

0 commit comments

Comments
 (0)