- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have download the PCM code from the below URL
http://software.intel.com/zh-cn/articles/intel-performance-counter-monitor
I need to build msr.sys and pcm.exe and intelpcm.dll
some can give me detail info to indicate me how to build these drivers?
I have install VS2008 and WDK7.0
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello pengfei,
What steps have you taken so far?
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Patrick Fay (Intel) wrote:
Hello pengfei,
What steps have you taken so far?
Pat
according to "windows howto.rtf"
1. Compile the windows MSR driver
I used WDK7.0 to compile msr.sys in win7 x64 free build environment.
I just follow the step of the below URL
http://www.rage3d.com/board/showthread.php?t=33920573
2. Copy msr.sys into the c:\windows\system32 directory
I copy a internal msr.sys offerd by the author into the c:\windows\system32 directory
3. Build intelpcm.dll in the intelpcm.dll directory using Microsoft* Visual Studio
In the doc "intelpcm.dll", I just open intelpcm.dll.vcproj and convert it to my VS2008 with default versions, press "build"
There ars 84 errors.
4.
In the doc "PCM_WIN", I just open PCM.vcproj and convert it to my VS2008 with default versions, press "build"
There ars 84 errors.
What should I do?
1>------ Build started: Project: pcm, Configuration: Debug Win32 ------
1>Compiling...
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>client_bw.cpp
1>cpucounters.cpp
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(386) : error C3861: 'GetActiveProcessorCount': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(387) : error C3861: 'GetActiveProcessorCount': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(388) : error C3861: 'GetActiveProcessorCount': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(389) : error C2065: 'ALL_PROCESSOR_GROUPS' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(389) : error C3861: 'GetActiveProcessorCount': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(390) : error C2065: 'ALL_PROCESSOR_GROUPS' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(390) : error C3861: 'GetActiveProcessorCount': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(390) : error C3861: 'GetActiveProcessorCount': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(396) : error C2065: 'SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(396) : error C2070: ''unknown-type'': illegal sizeof operand
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(397) : error C2065: 'SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(397) : error C2070: ''unknown-type'': illegal sizeof operand
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(398) : error C2065: 'RelationAll' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(398) : error C2065: 'PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(398) : error C2146: syntax error : missing ')' before identifier 'slpi'
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(398) : error C3861: 'GetLogicalProcessorInformationEx': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(398) : error C2059: syntax error : ')'
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(407) : error C2065: 'RelationAll' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(407) : error C2065: 'PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(407) : error C2146: syntax error : missing ')' before identifier 'slpi'
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(407) : error C2059: syntax error : ')'
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(407) : error C3861: 'GetLogicalProcessorInformationEx': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(418) : error C2065: 'PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(418) : error C2146: syntax error : missing ';' before identifier 'pi'
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(418) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(420) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(420) : error C2227: left of '->Size' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(422) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(422) : error C2065: 'PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(422) : error C2146: syntax error : missing ';' before identifier 'slpi'
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(423) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(423) : error C2227: left of '->Relationship' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(425) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(425) : error C2227: left of '->Processor' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(425) : error C2228: left of '.Flags' must have class/struct/union
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(432) : error C2065: 'ALL_PROCESSOR_GROUPS' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(432) : error C3861: 'GetActiveProcessorCount': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(434) : error C2065: 'ALL_PROCESSOR_GROUPS' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(434) : error C3861: 'GetActiveProcessorCount': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(442) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(444) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(444) : error C2227: left of '->Size' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(446) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(446) : error C2065: 'PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(446) : error C2146: syntax error : missing ';' before identifier 'slpi'
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(447) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(447) : error C2227: left of '->Relationship' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(453) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(453) : error C2227: left of '->NumaNode' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(453) : error C2228: left of '.GroupMask' must have class/struct/union
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(453) : error C2228: left of '.Group' must have class/struct/union
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(453) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(453) : error C2227: left of '->NumaNode' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(453) : error C2228: left of '.GroupMask' must have class/struct/union
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(453) : error C2228: left of '.Group' must have class/struct/union
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(458) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(458) : error C2227: left of '->NumaNode' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(458) : error C2228: left of '.GroupMask' must have class/struct/union
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(458) : error C2228: left of '.Group' must have class/struct/union
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(458) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(458) : error C2227: left of '->NumaNode' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(458) : error C2228: left of '.GroupMask' must have class/struct/union
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(458) : error C2228: left of '.Mask' must have class/struct/union
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(462) : error C2065: 'pi' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(462) : error C2227: left of '->NumaNode' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounters.cpp(462) : error C2228: left of '.NodeNumber' must have class/struct/union
1>msr.cpp
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(54) : error C2146: syntax error : missing ';' before identifier 'PreviousGroupAffinity'
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(54) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(54) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(61) : error C2065: 'GROUP_AFFINITY' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(61) : error C2146: syntax error : missing ';' before identifier 'NewGroupAffinity'
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(61) : error C2065: 'NewGroupAffinity' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(62) : error C2065: 'NewGroupAffinity' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(62) : error C2065: 'GROUP_AFFINITY' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(62) : error C2070: ''unknown-type'': illegal sizeof operand
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(63) : error C2065: 'PreviousGroupAffinity' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(63) : error C2065: 'GROUP_AFFINITY' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(63) : error C2070: ''unknown-type'': illegal sizeof operand
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(66) : error C2065: 'NewGroupAffinity' : undeclared identifier
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(66) : error C2228: left of '.Group' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(66) : error C3861: 'GetMaximumProcessorCount': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\msr.cpp(66) : fatal error C1903: unable to recover from previous error(s); stopping compilation
1>pci.cpp
1>pcm.cpp
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounterstest.cpp(567) : error C3861: 'time': identifier not found
1>c:\users\pengfe1x\desktop\intelperformancecountermonitorv2.5.1\cpucounterstest.cpp(568) : error C3861: 'localtime': identifier not found
1>stdafx.cpp
1>Generating Code...
1>Build log was saved at "file://c:\Users\pengfe1x\Desktop\IntelPerformanceCounterMonitorV2.5.1\PCM_Win\Debug\BuildLog.htm"
1>pcm - 84 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi patrick
could you tell me how to build pcm-service?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1>.\PCMService.cpp(55) : error C2664: 'int System::AppDomain::ExecuteAssembly(System::String ^,System::Security::Policy::Evidence ^)' : cannot convert parameter 2 from 'cli::array<Type> ^' to 'System::Security::Policy::Evidence ^'
1> with
1> [
1> Type=System::String ^
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
I just open PCMService.vcproj with vs2008 and press "build"
this error info show in the error list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What version of windows are you using?
GetActiveProcessorCount() is a Microsoft OS routine available since desktop OS Win7 and server OS Server 2008 R2.
If your OS is recent enough, you might need to upgrade your compiler.
The web page http://msdn.microsoft.com/en-us/library/windows/desktop/dd405485%28v=vs.85%29.aspx for GetActiveProcessorCount() talks about needing to do "set _WIN32_WINNT >= 0x0601" and gives a link.
This is one of the categories of error like: it builds fine for me (vs2012, win8). You need to figure out why it doesn't work for you. I personally don't have time to debug your issues. "Just trying stuff" isn't really debugging the issues.
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here on this forum is lenghty thread with the instruction how to build the driver.Try to build with WDK built utility.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quick question did you include all header files with all needed declarations?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page