From d2ff40fc41026775080dfdad0e89f00f39b1ad70 Mon Sep 17 00:00:00 2001 From: opcm Date: Sun, 17 Dec 2023 18:38:47 +0000 Subject: [PATCH] add MSRH hndle to OS thread on OSX --- src/cpucounters.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cpucounters.cpp b/src/cpucounters.cpp index e2b4609e..d842a04f 100644 --- a/src/cpucounters.cpp +++ b/src/cpucounters.cpp @@ -1602,7 +1602,12 @@ void PCM::printSystemTopology() const bool PCM::initMSR() { -#ifndef __APPLE__ +#ifdef __APPLE__ + for (size_t i=0; i < MSR.size(); ++i) + { + systemTopology->addMSRHandleToOSThread(MSR[i], (uint32)i); + } +#else try { for (int i = 0; i < (int)num_cores; ++i)