Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Intel PCM - How To on Windows

pranith
Beginner
6,799 Views
Hi,
I previously used Intel PCM on linux and now am trying it out on windows.
I have to say that it was so much easier to use on linux because of the structure.
For windows, I am having trouble finding what I have to do to use the PCM API. I see IntelPcm.dll but I do not know where to place it! And how do I use the API from my applications? What all headers do I need?
It would be really helpful if you could provide such a document!
Thanks,
Pranith
0 Kudos
1 Solution
Patrick_F_Intel1
Employee
6,799 Views
Hello Pranith,
Roman has listed how to build PCM on Windows.
My experience is below...
I followed the instructions in the WINDOWS_HOWTO.rtf file.
Short version:
1) cd PCM_Win
2) type 'pcm.vcproj'
Visual Studio loads (maybe convertsthe project file)
3) Hit the 'Build->Build Solution' visual studio menu item
This should build pcm.exe
4) cd .. # now you should be back in the main PCM dir
5) copy PCM_Win\Debug\pcm.exe .
Now we've built the executable... we still need a Ring0 level driver
You can build your own but on Win7 64bit the driver has to be signed or you have to run in debug mode.
Below I get a prebuilt, signed WinRing0 driver from Open-Hardware-Monitor.
6) download Open-Hardware-Monitor (from http://code.google.com/p/open-hardware-monitor/downloads/list)
I picked the latest version ver 0.4.0-beta URL http://open-hardware-monitor.googlecode.com/files/openhardwaremonitor-v0.4.0-beta.zip
7) unzip openhardwaremonitor-v0.4.0-beta.zip
8) copyOpenHardwareMonitor\winring* .
So now the winring0*.dll and winring0*.sys files should be in same dir as pcm.exe
9) now pcm is ready to go. You should be able to do:
.\pcm.exe 1

View solution in original post

0 Kudos
4 Replies
Roman_D_Intel
Employee
6,799 Views
Pranith,

on Windows please look at the MSVC project in the PCM_Win directory. It contains all you need to compile pcm.exe on Windows from the example source file cpucounterstest.cpp . Same as on Linuxit compiles the sameCPP files into object files and linkes them into a single executable. The only difference is the "Driver" class that loads Windows msr kernel driver: #include "../PCM_Win/windriver.h". See the usage of the driver class in the cpucounterstest.cpp

Best regards,
Roman
0 Kudos
Patrick_F_Intel1
Employee
6,800 Views
Hello Pranith,
Roman has listed how to build PCM on Windows.
My experience is below...
I followed the instructions in the WINDOWS_HOWTO.rtf file.
Short version:
1) cd PCM_Win
2) type 'pcm.vcproj'
Visual Studio loads (maybe convertsthe project file)
3) Hit the 'Build->Build Solution' visual studio menu item
This should build pcm.exe
4) cd .. # now you should be back in the main PCM dir
5) copy PCM_Win\Debug\pcm.exe .
Now we've built the executable... we still need a Ring0 level driver
You can build your own but on Win7 64bit the driver has to be signed or you have to run in debug mode.
Below I get a prebuilt, signed WinRing0 driver from Open-Hardware-Monitor.
6) download Open-Hardware-Monitor (from http://code.google.com/p/open-hardware-monitor/downloads/list)
I picked the latest version ver 0.4.0-beta URL http://open-hardware-monitor.googlecode.com/files/openhardwaremonitor-v0.4.0-beta.zip
7) unzip openhardwaremonitor-v0.4.0-beta.zip
8) copyOpenHardwareMonitor\winring* .
So now the winring0*.dll and winring0*.sys files should be in same dir as pcm.exe
9) now pcm is ready to go. You should be able to do:
.\pcm.exe 1
0 Kudos
pranith
Beginner
6,799 Views
Thanks Roman and Patrick for the information.

Patrick,

I was able to follow you until 6) where you tell me to copy winring0* from openhardwaremonitor. I downloaded the zip file and did not find any winrin0* files. Maybe they have been moved? Is there anywhere else I can find them?

Thanks,
Pranith
0 Kudos
IDZ_A_Intel
Employee
6,799 Views

open-hardware-monitor has apparently stopped shipping winring0.

RealTemp still has it.
You can go to http://www.techpowerup.com/downloads/SysInfo/Real_Temp and click on 'Real Temp 3.70' or
see http://www.techpowerup.com/downloads/2089/Real_Temp_3.70.html
and click on the 'Download Now'icon.

0 Kudos
Reply