How to perform Xperf callstack capture on 64b OS? - windows

I have installed Xperf performance analyzer from Windows SDK and captured a trace as described in the documentation using following command:
xperf -on SysProf -stackwalk profile
Still, the stack trace does not contain any callstack data.
My platform is Vista 64b. Are there any special settings or tricks needed to capture callstacks on 64b Windows?

After some more searching I have found one setting:
Set registry value DisablePagingExecutive = 1 and reboot (see Windows Performance Toolkit FAQ).
While this sounds great, it does not seem to help at my system, still no call-stacks.
After contacting Microsoft support their reply was with x64 Vista you can capture only callstacks of x64 native applications, not 32b ones.
Windows 7 seems to have removed the limitation and it works fine on Win 7 x64, at least this says Valve presentation on Xperf.

Related

Error viewing xperf ETL file on another machine

I have a machine with Windows 8.1 and the ADK (xperf 6.3.9600) installed.
I have another machine with Windows 7 SP1 and the 8.1 ADK (xperf 6.3.9600) installed.
If I use xperf to generate a trace on the 8.1 machine, I cannot load that trace on the Win7 machine; it gives me the error The file or directory is corrupted and unreadable. (0x80070570).
The ETL file can successfully be loaded on the machine that generated it and on another machine that is also running Windows 8.1.
Is it only possible to load trace files on an equal or higher OS than the one that generated them? Why doesn't it just require the same xperf/WPA version? Or does this work for other people and there's something I've overlooked?
The error message means the trace is corrupted (ERROR_METADATA_MISSING). Microsoft told me it can happen when you use a 32Bit WPT instead of a 64Bit WPT on a 64Bit Windows.
A normal ETL trace opens fine under Windows 7:
I routinely load traces from other machines and analyze them. I am running Windows 7 SP1 64-bit and I can analyze traces from Windows 8.1, and any other post-XP version of Windows.
You are probably not recording the traces correctly -- perhaps you are missing the merge step? I recommend using UIforETW, as discussed here:
https://randomascii.wordpress.com/2015/09/01/xperf-basics-recording-a-trace-the-ultimate-easy-way/
If it doesn't work then it's a bug, but it should work.
I assume that you are running 64-bit Windows. Some traces take a lot of memory to load so I recommend that you be using a 64-bit OS.
It could also happen if you compress the trace when recording it on Windows 8+, because Windows 7 doesn't support loading compressed ETW traces. However that's not something you would do accidentally -- you need to add the -compress option when doing "xperf -merge". However, if you switch to using UIforETW then you do have to be aware of this. UIforETW defaults to compressing traces and this has to be disabled if you want to view them on Windows 7.

Windows 8 emulator not working

Emulator not running
I am using windows phone sdk 8.0 but I am unable to run emulator in visual studio 2012, is there any case to run it,
I checked my machine and its SLAT capable...
I tried using various links provided but IT would be great help if any ne give me a direct solution, I check the Hyper-v also not enabling in the windows turn on and off features.
You probably forgot to enable in the BIOS:
Hardware-assisted virtualization.
Second Level Address Translation (SLAT).
Hardware-based Data Execution Prevention (DEP).
or you don't have:
4 GB or more of RAM.
64-bit version of Windows 8 Pro edition or higher.
Based on the wording of your question I'm guessing you have a problem with enabling Hyper-V. Even if your computer is SLAT capable, you still need to enable it along with DEP and hardware-assisted virtualization in the BIOS like Goran said. This procedure is slightly different for AMD and Intel computers. The full information is here in the "Enabling BIOS settings required by Hyper-V" section.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj863509(v=vs.105).aspx
Also just to be sure you don't actually need 4gb of RAM :). I only have 3.
IF you have gone through this whole procedure, sometimes you will still get an error that you are not part of the local Hyper-V administrators group. Just click retry and enter the admin password and everything should be ok.

Windows Phone 7 Emulator runs in slow mode... even tho my system supports VT

Windows Phone 7 Emulator runs in slow mode... even tho my system supports VT
I just updated my Sony Vaio FW21E's bios update, now VT is enabled, but emulator still runs in same old slow mode.
How can I run the emulator in VT mode.
Please advise.
Make sure your system meets the requirements laid out here.
Setup and System Requirements for Windows Phone Emulator
In particular, verify your gpu is being recognised by the emualtor by checking the frame rate counters are visible.
This will not happen if your display driver is not WDDM1.1 compliant and minimum Directx 10.
I also recommend trying a Win7 install on a spare hard disk if you're running Vista. This consistently produces positive results when problems of this nature are reported on hardware compliant systems.
I had this issue on my Mac running bootcamp. I read in some forum what appeared to be the weirdest solution ever.
If I had Netflix open, streaming a movie, my emulator would work perfectly. When I did not, it would just be the slowest thing.
I read somewhere that could be related to drivers and hardware acceleration. So Windows Phone was not 'hardcore' enough to trigger turning on the acceleration on the video card but when you had the streaming ON it was using it, making it fast.
You might try that out... I know it sounds dumb but it worked for me.
The HD3450 should be ok as its a DirectX 10 card I beleive
As said above the card needs to be WDDM1.1
you can check this by running 'dxdiag' in the run or search box in vista. go to 'Display 1' (or just Dispaly) tab, and on the right there will be DDI Version - should be 10, and Driver Model - should be WDDM 1.1.
If its not compliant with WDDM1.1/DX10, it will work ok but you wont get things like aminmations on page transitions etc.

assembly on windows 7

how can i make a device input and output control program on windows 7??
Previously there was an option called debug where we wrote our programs. but as far as i know this feature is no more in windows 7. how can i do assembly on windows7??
You can use an assembler such as NASM, YASM, etc., or MASM which is free with Visual Studio Express (for non-commercial use).
I was thinking of Grdb, but it is only available for 32-bit, as a debug alternative.
I'm not sure what you are asking for with your first question, so I cannot answer it. I hope the above answers your second question.
It sounds more like you want to write a device driver? If so, download the Windows Driver Kit from Microsoft.
You can use this to write your driver in assmbly code if you wish. Be aware that this is NOT a trivial task.
What may be a better idea for you is to either install the WinXP virtual machine feature that comes with Windows7, or install WinXP/98/95 on an old machine, and do your coding on that. Under those OSes the driver model was simpler, and you could easily access the interrupts directly and/or easily elevate yourself into Ring 0 if you needed to.
Debug is available on Windows 7 32 bit, but not 64 bit.

how do I launch another process in XP compatibility mode?

Our application requires HASP SRM device driver to be installed in order for ours to install and run.
At this time, only their 5.50 drivers work consistently on all tested platforms (both their 5.75 (official) and 5.86 (beta) drivers crash on about 1 in 3 computers tested).
Hence, their 5.50 drivers are good, anything else currently available is broken, and the 5.50 drivers refuse to load under Vista and Windows 7. However, if I set the exe's properties to "XP compatibility mode" then their 5.50 driver installs and runs successfully.
I dug around in the registry under Windows 7, and I've found that there is at least one entry made when I ask for compatibility mode:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\
full-path REG_SZ WINXPSP3
I should be able to add that key from our installer, before attempting to launch the 5.50 driver installer.
Questions:
Where I can find a more complete discussion of compatibility modes?
Are the keys/settings different under Vista vs. Windows 7?
Are the keys/settings different under 32 bit vs. 64 bit?
Is there a way to directly ask for this when I call CreateProcess()?
You can set the __COMPAT_LAYER environment variable (By setting it in your process before calling CreateProcess, or build a new environment block for CreateProcess)

Resources