Skip to content

Commit f5701a4

Browse files
authored
Documentation Updates (#2083)
* Scenario Documentation. Describe to would-be users whether they should start with PerfView or TraceEvent based on their ultimate goal. * README clean-up pass. * Remove extra spaces.
1 parent e68f1b5 commit f5701a4

File tree

2 files changed

+35
-31
lines changed

2 files changed

+35
-31
lines changed

README.md

+15-31
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ PerfView requires .NET Framework 4.7.2 or later, which is widely available for a
1313

1414
### Are you here about the TraceEvent Library?
1515

16-
PerfView is built on a library called Microsoft.Diagnostics.Tracing.TraceEvent, that knows how to both collect and parse Event Tracing for Windows (ETW) data. Thus if there is any information that PerfView collects and processes that you would like to manipulate yourself programmatically, you would probably be interested in the [TraceEvent Library Documentation](documentation/TraceEvent/TraceEventLibrary.md)
16+
PerfView is built on a library called Microsoft.Diagnostics.Tracing.TraceEvent, that knows how to both collect and parse Event Tracing for Windows (ETW) and EventPipe (.NET Core trace) data. Thus if there is any information that PerfView collects and processes that you would like to manipulate yourself programmatically, you would probably be interested in the [TraceEvent Library Documentation](documentation/TraceEvent/TraceEventLibrary.md)
17+
18+
### Not Sure if you should use PerfView or TraceEvent?
19+
20+
See the [scenarios](documentation/Scenarios.md) document to determine which is the best choice for what you're trying to do.
1721

1822
### Learning about PerfView
1923

@@ -26,7 +30,7 @@ download PerfView using the instructions above and select the Help -> User's Gui
2630

2731
When you have question about PerfView, your first reaction should be to search the Users Guide (Help -> User's Guide) and
2832
see if you can find the answer already. If that does not work you can ask a question by creating a [new PerfView Issue](https://github.com/Microsoft/perfview/issues/new).
29-
State your question succinctly in the title, and if necessary give details in the body of the issue, there is a issue tag
33+
State your question succinctly in the title, and if necessary give details in the body of the issue, there is an issue tag
3034
called 'question' that you should use as well that marks your issue as a question rather than some bug report.
3135
If the question is specific to a particular trace (*.ETL.ZIP file) you can drag that file onto the issue and it will be downloaded.
3236
This allows those watching for issues to reproduce your environment and give much more detailed and useful answers.
@@ -58,15 +62,13 @@ to download Visual Studio 2022 Community Edition if you don't already have Visua
5862
PerfView is mostly C# code, however there is a small amount of C++ code to implement some advanced features of PerfView
5963
(The ETWCLrProfiler dlls that allow PerfView to intercept the .NET Method calls; see .NET Call in the Collect dialog).
6064
If you downloaded the Visual Studio 2022 Community Edition, it does not install the C++ compilation tools by default and
61-
it also does not include the Windows 10 SDK by default (we build PerfView so it can run on Win8 as well as Win10). Thus
62-
when you install Visual Studio 2022 check the 'Desktop Development with C++' option and then look the right pane to see
65+
it also does not include the Windows 10 SDK by default. Thus
66+
when you install Visual Studio 2022 check the 'Desktop Development with C++' option and then look in the right pane to see
6367
the optional sub-components, and make sure the Windows 10 SDK is also checked (it typically is not). Installing the latest version should be OK. If you have
64-
already installed Visual Studio 2022, you can add these options by going to Control Panel -> Programs and Features -> Visual Studio 2022, and click 'Modify'. This will get you to the place where you can selecte the Desktop Development with C++ and the Windows 10 SDK.
68+
already installed Visual Studio 2022, you can add these options by launching the Visual Studio Installer and modifying the installation. This will get you to the place where you can select the 'Desktop Development with C++' and the 'Windows 10 SDK' options.
6569
If you get any errors compiling the ETWClrProfiler* dlls, it is likely associated with getting this Win 10.0 SDK. See
6670
the troubleshooting sections below for more if you need it.
6771

68-
The .NET Core SDK should be part of the default Visual Studio 2022 installation now, but if not it can be installed easily from [here](https://www.microsoft.com/net/download/windows).
69-
7072
### Cloning the PerfView GitHub Repository.
7173

7274
The first step in getting started with the PerfView source code is to clone the PerfView GitHub repository.
@@ -84,11 +86,10 @@ PerfView is developed in Visual Studio 2022 using features through C# 6.
8486
The build follows standard Visual Studio conventions, and the resulting PerfView.exe file ends up in
8587
src/PerfView/bin/*BuildType*/PerfView.exe. You need only deploy this one EXE to use it.
8688

87-
* The solution consists of 11 projects, representing support DLLs and the main EXE. To run PerfView in the
89+
* The solution consists of several projects, representing support DLLs and the main EXE. To run PerfView in the
8890
debugger **you need to make sure that the 'Startup Project' is set to the 'PerfView' project** so that it launches
8991
the main EXE. If the PerfView project in the Solution Explorer (on the right) is not bold, right click on the PerfView project
9092
and select 'Set as Startup Project'. After doing this 'Start Debugging' (F5) should work.
91-
(It is annoying that this is not part of the .sln file...).
9293

9394
### Deploying your new version of Perfview
9495

@@ -128,8 +129,7 @@ among other things a PerfView.exe. This one file is all you need to deploy.
128129
* If you get an error "MSB8036: The Windows SDK version 10.0.17763.0 was not found", Or you get a 'assert.h' not found error, or
129130
frankly any error associated with building the ETWClrProfiler dlls, you should make sure that you have the Windows 10.0.17763.0
130131
SDK installed. Unfortunately this library tends not to be
131-
installed with Visual Studio anymore unless you ask for it explicitly. To fix it
132-
* windows-Key -> type Control panel -> Programs and Features, and right click on your VS2019 and select 'Modify'. Then look under the C++ Desktop Development and check that the Windows SDK 10.0.17763.0 option is selected. If not, select it and have the setup install this. Then try building PerfView again.
132+
installed with Visual Studio anymore unless you ask for it explicitly. To fix it launch the Visual Studio Installer, modify the installation, and then look under the C++ Desktop Development and check that the Windows SDK 10.0.17763.0 option is selected. If not, select it and continue. Then try building PerfView again.
133133

134134
### Running Tests
135135

@@ -141,17 +141,12 @@ the debugger to figure out what went wrong.
141141

142142
### Check in testing and code coverage statistica
143143

144-
This repository uses [AppVeyor](https://www.appveyor.com/) and Azure DevOps to automatically build and test pull requests, which allows
145-
the community to easily view build results. Code coverage is provided by [codecov.io](https://codecov.io). The build and
146-
coverage status reflected here is the AppVeyor and Azure DevOps build status of the **main** branch.
144+
This repository uses Azure DevOps to automatically build and test pull requests, which allows
145+
the community to easily view build results. The build and status reflected here is the Azure DevOps build status of the **main** branch.
147146

148147
[![Build Status](https://dev.azure.com/ms/perfview/_apis/build/status%2FCI?branchName=main)](https://dev.azure.com/ms/perfview/_build/latest?definitionId=332&branchName=main)
149148

150-
[![Build status](https://ci.appveyor.com/api/projects/status/fxtu3xa874whk2w0?svg=true)](https://ci.appveyor.com/project/sharwell/perfview)
151-
152-
[![codecov](https://codecov.io/gh/Microsoft/perfview/branch/main/graph/badge.svg)](https://codecov.io/gh/Microsoft/perfview)
153-
154-
> :warning: Builds produced by AppVeyor and Azure DevOps CI are not considered official builds of PerfView, and are not signed or otherwise
149+
> :warning: Builds produced by Azure DevOps CI are not considered official builds of PerfView, and are not signed or otherwise
155150
> validated for safety or security in any way. This build integration is provided as a convenience for community
156151
> participants, but is not endorsed by Microsoft nor is it considered an official release channel in any way. For
157152
> information about official builds, see the [PerfView Download Page](documentation/Downloading.md) page.
@@ -184,15 +179,4 @@ The code is broken into several main sections:
184179
heap using Microsoft.Diagnostics.Runtime APIs. This allows getting heap dumps from debugger process dumps.
185180
* Global - An example of using PerfView's extensibility mechanism
186181
* CSVReader - old code that lets PerfView read .ETL.CSV files generated by XPERF (probably will delete)
187-
* Zip - a clone of System.IO.Compression.dll so that PerfView can run on pre V4.5 runtimes (probably will delete)
188-
189-
### Other Documentation
190-
191-
These docs are for specialized scenarios
192-
193-
* [Updating SupportFiles](documentation/MakingSupportFilesNugetPackages.md) PerfView uses some binary files that it
194-
does not build itself. We created two nuget packages to hold these. This document tells you how to update this
195-
nuget package when these files need to be updated. Very few people should care about these instructions.
196-
197-
* [Internal Docs](https://devdiv.visualstudio.com/DevDiv/_git/perfview?_a=preview&path=%2Fdocumentation%2Finternal%2FinternalDocs.md&version=GBmain) This is documentation that is only
198-
useful for internal Microsoft users. By design the link will not work for most people.
182+
* Zip - a clone of System.IO.Compression.dll so that PerfView can run on pre V4.5 runtimes (probably will delete)

documentation/Scenarios.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# PerfView vs. TraceEvent
2+
3+
Not sure which you should use? This document aims to point you in the right direction.
4+
5+
## Start With PerfView If Your Goal Is To...
6+
- Collect an adhoc Event Tracing for Windows (ETW) trace to analyze program behavior or a performance issue.
7+
- Collect an adhoc heap snapshot to analyze a managed memory issue such as a managed memory leak.
8+
- Use the flight recorder mode to capture an ETW trace of hard to reproduce behavior.
9+
- Perform adhoc analysis of a previously collected performance trace.
10+
- Diff two performance traces to or managed memory heap snapshots to root cause a performance issue.
11+
- Use a GUI-based performance analysis tool.
12+
13+
## Start With TraceEvent If Your Goal Is To...
14+
- Have programmatic access to trace collection and/or trace processing and analysis.
15+
- Implement a service that captures or processes traces at scale.
16+
- Build collection and/or processing capabilities into an existing application.
17+
18+
## PerfView Limitations
19+
- PerfView is not designed to be used as a capture or processing agent in services. It is designed for use in user-interactive sessions.
20+
- PerfView is not supported on operating system SKUs such as nanoserver that do not have GUI libraries installed. See PerfViewCollect if you need to capture adhoc traces on these SKUs.

0 commit comments

Comments
 (0)