From 2cd4aa3442e7eea4c4bbdfa216d1d24779db4ed0 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 5e98cff4..0e7e36fa 100644 --- a/src/cpucounters.cpp +++ b/src/cpucounters.cpp @@ -1620,7 +1620,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)