1

I'm trying to collect on my notebook using xperf. The .etl file is generated. i'm using the "Diag" that includes precise and sampled CPU profiles.

But, when open .etl on WPA, it did not show the "sampled" grap, just precise. Doing some searches, I found this can be related to Hardware Counters used to the sampled timing.

But, my xperf show that pmcsource timing is available:

[![xperf pmcsources output][1]][1]

Does someone have some idea how I can troubleshoot this missing sampled grap? [1]: https://i.stack.imgur.com/fVnNl.png

Rodrigo
  • 92
  • 6
  • which command do you use? try **wpr -start GPU** and **wpr -stop C:\cpuusage.etl** – magicandre1981 Jun 04 '21 at 13:26
  • Thanks @magicandre1981. Using this command you sent, not collected "CPU (sampled)" too. – Rodrigo Jun 04 '21 at 13:50
  • which windows do you use? Is DisablePagingExecutive set? https://wiki.mozilla.org/Using_XPerf#Installation_Notes – magicandre1981 Jun 04 '21 at 14:48
  • Windows 10 20h2, 19042.985 This paging setting seems affect stack trace collects. In my previous machine, I never need do this to get CPU (sampled) graps. – Rodrigo Jun 04 '21 at 20:14
  • 1
    ok, I'm still at 1909 (1 more year support with Enterprise Edition) and here it works. Looks like this is an [issue caused by a Windows Update](https://twitter.com/BruceDawson0xB/status/1398329340669030400) – magicandre1981 Jun 04 '21 at 20:50
  • Nice @magicandre1981. I'm got my old notebook, where xperf was working in past... I confirmed that using 20h2, and xperf also not generating "sampled" graps... Makes sense issue with newest version. Thanks. Can you reply the thread to I mark an answer? – Rodrigo Jun 04 '21 at 22:09

1 Answers1

1

According to Microsoft, it was caused by Windows Defender:

We have identified an underlying issue in Windows Defender which we believe to be the root cause for most folks. The fix has already been deployed to Windows Update, the steps to get / verify are below:

  1. From PowerShell run Get-MpComputerStatus Verify AntivirusSignatureVersion is >= 1.341.82.0 a.
  2. If the signature version is < 1.341.82.0 run Windows Update to get the latest version and then reverify
  3. Reboot

After this profiling should work in ETW based profilers.

magicandre1981
  • 27,895
  • 5
  • 86
  • 127
  • I do more tests. My previous test was incorrect. I test 3 machines. First machine, is windows 19042.985 and cpu is i7-10750H. Dont work. Second is a vm on azure, win 10, 19042.985 and cpu is Xeon Platinum 8171M. The sampled collect works. Thirdy is a win 10 19042.928 and cpu is i7-6700HQ. The sample also works. So, i keep investagint if the problem in just on my machine and some setup (Driver, softare, etc.) – – Rodrigo Jun 08 '21 at 18:31
  • yes, it could also be audio driver version. look if drivers are up to date and also try to disable audio devices – magicandre1981 Jun 08 '21 at 19:31
  • I updated to Winodws 21H1 and also noted that at startup, a lot of ETW sessions are started. Maybe, one of them, keep using the hardware counter used to sampling rate and when we use xperf, it is not able to use (this is my guess). Look at Performance Monitor > Data Collector Sets > Event Trace Session. Check session running there and try stopping the most of them and then ran xperf profile again. – Rodrigo Jun 09 '21 at 13:21
  • ok, Microsoft thinks it is a [Windows Defender issue](https://developercommunity.visualstudio.com/t/No-Data-in-CPU-Usage-Tool-Windows-Updat/1384519#T-N1447286). We run NOD32, so it worked for me – magicandre1981 Jun 11 '21 at 14:14