Skip to content

Commit 90a3339

Browse files
opcmrdementi
authored andcommitted
expose thread id and tile id on OSX
1 parent 40e76f7 commit 90a3339

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/MacMSRDriver/PcmMsr/PcmMsr.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void cpuWriteMSR(void* pIDatas){
5656

5757
void cpuGetTopoData(void* pTopos){
5858
TopologyEntry* entries = (TopologyEntry*)pTopos;
59-
int cpu = cpu_number();
59+
const int cpu = cpu_number();
6060

6161
TopologyEntry & entry = entries[cpu];
6262
entry.os_id = cpu;
@@ -190,8 +190,10 @@ IOReturn PcmMsrDriverClassName::buildTopology(TopologyEntry* odata, uint32_t inp
190190

191191
for(uint32_t i = 0; i < num_cores && i < input_num_cores; i++)
192192
{
193-
odata[i].core_id = topologies[i].core_id;
194193
odata[i].os_id = topologies[i].os_id;
194+
odata[i].thread_id = topologies[i].thread_id;
195+
odata[i].core_id = topologies[i].core_id;
196+
odata[i].tile_id = topologies[i].tile_id;
195197
odata[i].socket = topologies[i].socket;
196198
}
197199

0 commit comments

Comments
 (0)