microsoft / perfview

PerfView is a CPU and memory performance-analysis tool
http://channel9.msdn.com/Series/PerfView-Tutorial
MIT License
4.05k stars 695 forks source link

Backward compatibility for EventPipe trace is broken by bumping up MinVersion in TraceLog #604

Closed xiaomi7732 closed 6 years ago

xiaomi7732 commented 6 years ago

@vancem @brianrob In this commit, we bumped up the min-version for TraceLog to 69: https://github.com/Microsoft/perfview/commit/216108b7c27eea7526fb35d99337d7a54f5f04fe This breaks the scenario for PerfView to read EventPipe traces, which on CLR 2.0.4 is of version 68. Could you please take a look?

Here's the log when trying to open the netperf file

Started with command line: src\PerfView\bin\Release\net45\PerfView.exe
PerfView Version: 2.0.9  BuildDate: Wed, 14 Mar 2018 12:15:25 GMT
PerfView Start Time 3/14/2018 12:15:39 PM
Started: View
Warning: PdbScope not found at D:\Repos\fork-perfview\src\PerfView\bin\Release\net45\PerfViewExtensions\PdbScope.exe
Disabling the Image Size Menu Item.
Warning: ILSize not found at D:\Repos\fork-perfview\src\PerfView\bin\Release\net45\PerfViewExtensions\ILSize.dll
Disabling the IL Size Menu Item.
Completed: View   (Elapsed Time: 0.036 sec)
Started: Opening 7A60A56A-5589-4655-AA68-9D43D513472F.netperf
ETL Size 156.595 MB ETLX Size 164.758 MB
Completed: Opening 7A60A56A-5589-4655-AA68-9D43D513472F.netperf   (Elapsed Time: 0.031 sec)
Error: File format is version 68 App accepts formats >= 69.

The trace is caught by using the runtime container: aspnetcore:2.0.5 https://hub.docker.com/r/microsoft/aspnetcore/

vancem commented 6 years ago

Can you describe the repro a bit more? The version number you are describing is a version number for an ETLX file.

The output above looks like a PerfView log, but PerfView shoudl not respond in the way the log above indicates. It generates the ETLX file from the netperf file right on the spot and thus 'can't be wrong' (and if there was an exception, it throws the ETLX file away an tries again.

THus I can't reconcile what you show it how PerfView works. I also just tried opening a variety of version of *.netperf Files with PerfVIew and they opened fine (which is what I would have expected).

I WOULD expect the behavior you got if you were trying to open ETLX files that were generated earlier by some earlier version of PerfView/TraceEvent. Is this what is happening?

xiaomi7732 commented 6 years ago

@vancem You are correct, I had an old version of the etlx on the box. Sorry for the confusion.

However, I was trying to open a netperf file, it seems it does NOT throw away the deprecated etlx file in the temp folder. The issue reproed until I had the temp folder cleared by using menu 'File|Clear Temp Files' in the PerfViewer.

xiaomi7732 commented 6 years ago

So, this is a way smaller issue that shall be able to be fixed in #606 .