Error: PMU resources are not available.

Error: PMU resources are not available.

Intel VTune Amplifier XE 2013

Windows 8 64 bits. VS 2010 & VS 2012. IvyBridge, i7, GT2.

when I try to run bandwidth - Sandy Bridge / Ivy Bridge analysis, I get this error:

Error: PMU resources are not available. Hardware Event-based Sampling is not supported on this operating system.

Then I checked driver status - here's what I got. In admin commandline of coz.

C:\Program Files (x86)\Intel\VTune Amplifier XE 2013\bin32>amplxe-sepreg -c
Checking platform...
Platform is genuine Intel: OK
Platform has SSE2: OK
Platform architecture: INTEL64
User has admin rights: OK
Drivers will be installed to C:\Windows\System32\Drivers\
Checking sepdrv3_10 driver path...OK
Checking sepdrv3_10 service...
Driver status: the sepdrv3_10 service is running
Checking sepdal driver path...OK
Checking sepdal service...
Driver status: the sepdal service is running

C:\Program Files (x86)\Intel\VTune Amplifier XE 2013\bin32>amplxe-sepreg -i -v

Stopping service sepdrv3_10...OK
Copying file C:\Program Files (x86)\Intel\VTune Amplifier XE 2013\bin64\sepdrv\w
in7\sepdrv3_10.sys to C:\Windows\System32\Drivers\sepdrv3_10.sys...OK
Installing service sepdrv3_10...OK
Warning: service sepdrv3_10 already exists
Starting service sepdrv3_10...OK
Writing startup key to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sepdrv3_10...OK
Stopping service sepdal...OK
Copying file C:\Program Files (x86)\Intel\VTune Amplifier XE 2013\bin64\sepdrv\w
in7\sepdal.sys to C:\Windows\System32\Drivers\sepdal.sys...OK
Installing service sepdal...OK
Warning: service sepdal already exists
Starting service sepdal...OK
Writing startup key to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sepdal...OK
VTSS++ driver found
Deleting system32/drivers/vtss.sys file...OK
Forming source path for vtss.sys...OK
Forming destination path for vtss.sys...OK
Copying file C:\Program Files (x86)\Intel\VTune Amplifier XE 2013\bin32\.\..\bin64\sepdrv\vtss.sys to C:\Windows\system32\drivers\vtss.sys...OK
Installing and starting VTSS++ driver...FAILED

40 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de Peter Wang (Intel)

It seemed that drivers were installed correctly except vtss++, but it doesn't matter.

Was it possible one of below reasons? You may verify:

1.You may install Windows* 8 on Virtual Machine, the tool cannot access PMU resource?

2.You may install other tool, which already uses PMU resource? 

If none of above, you can try:

a. Open a cmd with administrator privilege 

b. C:\temp>"\Program Files (x86)\intel\VTune Amplifier XE 2013\amplxe-vars.bat"

Copyright (C) 2009-2013 Intel Corporation. All rights reserved.
Intel(R) VTune(TM) Amplifier XE 2013 (build 274450)

c. C:\temp>amplxe-cl -collect snb-bandwidth -duration 20

What happens?

1 more possible reason is that you would have previously run vtune and its sampling session might be still going on in the background and when you again run vtune for new sampling session .

It will give this kind of error.

try killing the previous running session the rerun vtune

 

imagem de iliyapolak

It is quite possible explanation for the error.The question is does VTune can run multiple sampling sessions?

imagem de Peter Wang (Intel)

Quote:

iliyapolak wrote:

It is quite possible explanation for the error.The question is does VTune can run multiple sampling sessions?

Only one PMU event-based sampling can run at a time. If you invoke PMU event-based sampling for another session, the tool will report error. However if you invoke user-mode sampling for another session - it is allowed.

imagem de iliyapolak

>>>Installing and starting VTSS++ driver...FAILED>>>

If this standard WDM driver then I/O manager is responsible for calling driver entry function.Not going too deep you can at least monitor registry calls with regmon during the VTune session and look for driver related queries.

Quote:

Peter Wang (Intel) wrote:

Quote:

iliyapolakwrote:

It is quite possible explanation for the error.The question is does VTune can run multiple sampling sessions?

Only one PMU event-based sampling can run at a time. If you invoke PMU event-based sampling for another session, the tool will report error. However if you invoke user-mode sampling for another session - it is allowed.

No other vtune session running, at least not I aware. How to confirm?

And it's running on physical machine, no VM.

here's result for amplxe-cl:

C:\Windows\system32>amplxe-cl -collect snb-bandwidth -duration 20
amplxe: Error: PMU resources are not available. Hardware Event-based Sampling is
not supported on this operating system.
amplxe: Internal Error

imagem de iliyapolak

>>>No other vtune session running, at least not I aware. How to confirm?>>>

You can look at task manager or process explorer(process explorer is a better option) and look for the instances of VTune process.I do not know how exactly VTune session can be recognized , but i suppose that at least some thread will be created solely for this and you can track such a thread with process explorer.

imagem de iliyapolak

Hi Peter

what is the purpose of vtss.sys driver?

imagem de Peter Wang (Intel)

Quote:

iliyapolak wrote:

Hi Peter

what is the purpose of vtss.sys driver?

that is the driver to capture call stack info when doing PMU event-based sampling collections.

imagem de iliyapolak

Could this driver loading and initialization failure be responsible for the error?

Failure of this driver can also explain the error message.

imagem de Peter Wang (Intel)

Loading vtss++ driver failure should not impact on PMU event-based sampling (without stack info in result). Not sure if the user worked on old XE 2013 version which might not support new silicon or new OS. Strongly suggest to try latest XE 2013 Update 6.

imagem de iliyapolak

Loading vtss++ driver failure should not impact on PMU event-based sampling (without stack info in result).

I agree with you.

>>...Strongly suggest to try latest XE 2013 Update 6...

I didn't know that a new update was released and it would be nice to have a sticky post on the forum to inform everybody about new updates. Thanks in advance.

imagem de Peter Wang (Intel)

Quote:

Sergey Kostrov wrote:

>>...Strongly suggest to try latest XE 2013 Update 6...

I didn't know that a new update was released and it would be nice to have a sticky post on the forum to inform everybody about new updates. Thanks in advance.

All product registered users will receive a notice in their email box, when VTune(TM) Amplifier XE 2013 new update is ready. Also the user can view/get new package from Intel Register Center Download -

https://registrationcenter.intel.com/RegCenter/Download.aspx?productid=1686, for Windows*

https://registrationcenter.intel.com/RegCenter/Download.aspx?productid=1682, for Linux*

I'm using XE 2013 Update 5, will try update 6... Thanks!

I have the same problem, Win8 x64, i7-4770, vtune update8.

imagem de Peter Wang (Intel)

Latest build is Update 8. vtss+ driver failure will not impact on using Event-base sampling collection - again.

I strongly suggest to submit this problem to Intel Premier support with system info - "amplxe-feedback.exe -create-bug-report logfile" can generate log file for investigating.

No idea how to do that, email says there will be a link below the vtune download, but there is not.

"On the download page, click the "Click here for technical support" link below the Download Now button to start your 30 days of free support."

Maybe someone on the dev team should try to run it on Windows 8 x64 on a new Haswell and see? I know it is hard to move from XP.

More weird stuff is happening here. 

cpuid(7) => 0x281, it does not look like a valid answer, AVX2/BMI1/BMI2 flags aren't set, but the related new instructions execute just fine.

Attached a picture of CPU-Z.

Anexos: 

AnexoTamanho
Download cpuz.png25.04 KB

Alright, here is what I figured out.

If you are developing for Windows Phone, the SDK enables the built-in Hypervisor of Windows 8. It blocks something for vtune to work with hardware events and it is not up-to-date enough to set the right cpuid feature bits if you want to detect Haswell.

imagem de Peter Wang (Intel)

Quote:

gabest wrote:

Alright, here is what I figured out.

If you are developing for Windows Phone, the SDK enables the built-in Hypervisor of Windows 8. It blocks something for vtune to work with hardware events and it is not up-to-date enough to set the right cpuid feature bits if you want to detect Haswell.

Thank you to figure out this. Yes, VTune cannot access hardware PMU resource in Hyper-V environment! 

how do I know if Hyper-V is enabled? I didn't insteall SDK for windows Phone.

And I've tried Update 8, no luck :( will try to contact premier support.

imagem de Peter Wang (Intel)

Quote:

qually j. wrote:

how do I know if Hyper-V is enabled? I didn't insteall SDK for windows Phone.

And I've tried Update 8, no luck :( will try to contact premier support.

You might check BIOS to know Hyper-V disabled or enabled, read this article and you can explore more from web...

In Windows, you can enable/disable it at: Control Panel / Programs and Features / Turn Windows Features on or off / Hyper V.

imagem de iliyapolak

@Peter

Congratulations for receiving Black Belt status :)

imagem de Peter Wang (Intel)

Quote:

iliyapolak wrote:

@Peter

Congratulations for receiving Black Belt status :)

Thank you. I would like to take this chance to thank you, Sergey and Tim for your contributions of helping others on the forums.  

imagem de iliyapolak

@Peter

You are welcome:)

I really enjoy sharing my knowledge with others and learn from the others.

fixed after turned off hyper-V... Million thanks! :)

is it possible to add that hint to this error message?

imagem de iliyapolak

Glad that this works.

imagem de Peter Wang (Intel)

Quote:

qually j. wrote:

fixed after turned off hyper-V... Million thanks! :)

is it possible to add that hint to this error message?

Have report this request to Dev team. Hopefully it might be supported in future releases. 

imagem de Peter Wang (Intel)

Quote:

Peter Wang (Intel) wrote:

Quote:

qually j.wrote:

fixed after turned off hyper-V... Million thanks! :)

is it possible to add that hint to this error message?

Have report this request to Dev team. Hopefully it might be supported in future releases. 

In future releases, error message has been updated as requested. 

cool! thanks a lot!

I am still getting the original error message "amplxe: Error: PMU resource(s) currently being used by another profiling tool" when trying to monitor bandwidth for an MPI application on Windows 8.1 with VS 2013. I have disabled VT-D and Virtualization in the Bios. Coreinfo shows as further below. I have Update 16 of Vtune. Coreinfo shows that there is  HyperVisor on my machine, but I can not find a way to get rid of this. Hypervisor is not showing up as a feature with dism /online /Get-Features

Any suggestions on how I can get the bandwidth profiling to work ??  Coreinfo below.

Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz

Intel64 Family 6 Model 60 Stepping 3, GenuineIntel

HTT * Hyperthreading enabled

HYPERVISOR - Hypervisor is present

VMX * Supports Intel hardware-assisted virtualization

SVM - Supports AMD hardware-assisted virtualization

EM64T * Supports 64-bit mode

SMX - Supports Intel trusted execution

SKINIT - Supports AMD SKINIT

NX * Supports no-execute page protection

SMEP * Supports Supervisor Mode Execution Prevention

SMAP - Supports Supervisor Mode Access Prevention

PAGE1GB * Supports 1 GB large pages

PAE * Supports > 32-bit physical addresses

PAT * Supports Page Attribute Table

PSE * Supports 4 MB pages

PSE36 * Supports > 32-bit address 4 MB pages

PGE * Supports global bit in page tables

SS * Supports bus snooping for cache operations

VME * Supports Virtual-8086 mode

RDWRFSGSBASE * Supports direct GS/FS base access

FPU * Implements i387 floating point instructions

MMX * Supports MMX instruction set

MMXEXT - Implements AMD MMX extensions

3DNOW - Supports 3DNow! instructions

3DNOWEXT - Supports 3DNow! extension instructions

SSE * Supports Streaming SIMD Extensions

SSE2 * Supports Streaming SIMD Extensions 2

SSE3 * Supports Streaming SIMD Extensions 3

SSSE3 * Supports Supplemental SIMD Extensions 3

SSE4a - Supports Sreaming SIMDR Extensions 4a

SSE4.1 * Supports Streaming SIMD Extensions 4.1

SSE4.2 * Supports Streaming SIMD Extensions 4.2

AES * Supports AES extensions

AVX * Supports AVX intruction extensions

FMA * Supports FMA extensions using YMM state

MSR * Implements RDMSR/WRMSR instructions

MTRR * Supports Memory Type Range Registers

XSAVE * Supports XSAVE/XRSTOR instructions

OSXSAVE * Supports XSETBV/XGETBV instructions

RDRAND * Supports RDRAND instruction

RDSEED - Supports RDSEED instruction

CMOV * Supports CMOVcc instruction

CLFSH * Supports CLFLUSH instruction

CX8 * Supports compare and exchange 8-byte instructions

CX16 * Supports CMPXCHG16B instruction

BMI1 * Supports bit manipulation extensions 1

BMI2 * Supports bit manipulation extensions 2

ADX - Supports ADCX/ADOX instructions

DCA - Supports prefetch from memory-mapped device

F16C * Supports half-precision instruction

FXSR * Supports FXSAVE/FXSTOR instructions

FFXSR - Supports optimized FXSAVE/FSRSTOR instruction

MONITOR * Supports MONITOR and MWAIT instructions

MOVBE * Supports MOVBE instruction

ERMSB * Supports Enhanced REP MOVSB/STOSB

PCLULDQ * Supports PCLMULDQ instruction

POPCNT * Supports POPCNT instruction

LZCNT * Supports LZCNT instruction

SEP * Supports fast system call instructions

LAHF-SAHF * Supports LAHF/SAHF instructions in 64-bit mode

HLE - Supports Hardware Lock Elision instructions

RTM - Supports Restricted Transactional Memory instructions

DE * Supports I/O breakpoints including CR4.DE

DTES64 * Can write history of 64-bit branch addresses

DS * Implements memory-resident debug buffer

DS-CPL * Supports Debug Store feature with CPL

PCID * Supports PCIDs and settable CR4.PCIDE

INVPCID * Supports INVPCID instruction

PDCM * Supports Performance Capabilities MSR

RDTSCP * Supports RDTSCP instruction

TSC * Supports RDTSC instruction

TSC-DEADLINE * Local APIC supports one-shot deadline timer

TSC-INVARIANT * TSC runs at constant rate

xTPR * Supports disabling task priority messages

EIST * Supports Enhanced Intel Speedstep

ACPI * Implements MSR for power management

TM * Implements thermal monitor circuitry

TM2 * Implements Thermal Monitor 2 control

APIC * Implements software-accessible local APIC

x2APIC * Supports x2APIC

CNXT-ID - L1 data cache mode adaptive or BIOS

MCE * Supports Machine Check, INT18 and CR4.MCE

MCA * Implements Machine Check Architecture

PBE * Supports use of FERR#/PBE# pin

PSN - Implements 96-bit processor serial number

PREFETCHW * Supports PREFETCHW instruction

Maximum implemented CPUID leaves: 0000000D (Basic), 80000008 (Extended).

Logical to Physical Processor Map:

*--- Physical Processor 0

-*-- Physical Processor 1

--*- Physical Processor 2

---* Physical Processor 3

Logical Processor to Socket Map:

**** Socket 0

Logical Processor to NUMA Node Map:

**** NUMA Node 0

Logical Processor to Cache Map:

*--- Data Cache 0, Level 1, 32 KB, Assoc 8, LineSize 64

*--- Instruction Cache 0, Level 1, 32 KB, Assoc 8, LineSize 64

*--- Unified Cache 0, Level 2, 256 KB, Assoc 8, LineSize 64

**** Unified Cache 1, Level 3, 6 MB, Assoc 12, LineSize 64

-*-- Data Cache 1, Level 1, 32 KB, Assoc 8, LineSize 64

-*-- Instruction Cache 1, Level 1, 32 KB, Assoc 8, LineSize 64

-*-- Unified Cache 2, Level 2, 256 KB, Assoc 8, LineSize 64

--*- Data Cache 2, Level 1, 32 KB, Assoc 8, LineSize 64

--*- Instruction Cache 2, Level 1, 32 KB, Assoc 8, LineSize 64

--*- Unified Cache 3, Level 2, 256 KB, Assoc 8, LineSize 64

---* Data Cache 3, Level 1, 32 KB, Assoc 8, LineSize 64

---* Instruction Cache 3, Level 1, 32 KB, Assoc 8, LineSize 64

---* Unified Cache 4, Level 2, 256 KB, Assoc 8, LineSize 64

imagem de Peter Wang (Intel)

This is a known limitation that PMU event-based sampling cannot work if HyperVisor was enabled. But User mode sampling still can work (they are hotspots, concurrency, and locksandwaits analysis)

Can you disable HyperVisor on Windows 8 first then try again? It's easy to find a way by search internet, here is an example of URL - http://superuser.com/questions/540055/convenient-way-to-enable-disable-h... . Hope it helps! 

Quote:

Peter Wang (Intel) wrote:

This is a known limitation that PMU event-based sampling cannot work if HyperVisor was enabled. But User mode sampling still can work (they are hotspots, concurrency, and locksandwaits analysis)

Can you disable HyperVisor on Windows 8 first then try again? It's easy to find a way by search internet, here is an example of URL - http://superuser.com/questions/540055/convenient-way-to-enable-disable-h... . Hope it helps! 

Hi Peter,

PMU sampling with hotspots did not work, until I disabled hypervisor (2 reboots!). I was like "wow, I will enable hypervisor!" and there were consequences, so thank you for the link how to disable it.

My question is, what are advantages of enabled hypervisor and disadvantages (besides VTune doesn't like it)?

Is there any plan for VTune to work together with hypervisor enabled, or they are completely incompatible like water and fire?

-- With best regards, VooDooMan - If you find my post helpful, please rate it and/or select it as a best answer where applies. Thank you.
imagem de Peter Wang (Intel)

> My question is, what are advantages of enabled hypervisor and disadvantages (besides VTune doesn't like it)?

Microsoft* Hypervisor feature is Virtual Machine Manager in Windows* 8, it allows to install other operation system such as Windows* 7, or Linux*.  it interferes VTune to access PMU resource so please disable it.

I don't know if there is any recent plan to allow VTune with Hypervisor working together - that need to change code in VTune and Hypervisor both, I think. But I had a feature request to development team, last year.  

 

I know what hypervisor is, it is kind of "ring -1" (privilege level), so guest kernel in virtual machine can more or less run natively in ring 0, and hypervisor solves issues when something can't be done natively in the guest.

But I thought virtual machines like virtualbox have their own kernel driver which provides hypervisor (and exploits VT-X and similar technologies).

But my question is why hypervisor is built-in into Windows?!

PS: sorry for offtopic question.

TIA!

-- With best regards, VooDooMan - If you find my post helpful, please rate it and/or select it as a best answer where applies. Thank you.
imagem de MrAnderson (Intel)

That, obviously, is a question for Microsoft*. ;)

Windows is designed to detect VT (virtual technology) in Intel processors and loads the hypervisor to enable guest OSes. At this time, the hypervisor allocates the PMU resources and does NOT share them.  Thus, there is no way for VTune Amplifier to collect samples based on processor events.  If you disable VT in the BIOS, Windows will not load the hypervisor.

It is totally up to Microsoft to update their hypervisor (Hyper-V) to enable sharing of the PMU resources.  VMware* has done this with their Fusion* product line, so VTune Amplifier is able to collect event-based samples on the host and guest OSes.

Regards, MrAnderson
imagem de iliyapolak

@MrAnderson

Is there a posibillity to virtualize PMU as a collection of various MSRs? I was thinking about the possibility to virtualize CPU PMU by memory-mapping various MSR registers in the address space of Guest OS. VM monitor could intercept rdmsr and wrmsr priviledged instructions probably issued by VTune driver running on Guest OS and access coresponding MSR registers.Now the question is how to pass those results to Guest OS memory-mapped virtualized MSR registers.

Thanks in advance.

Faça login para deixar um comentário.