Add tools for PowerShell perf analysis (#7595)

This commit is contained in:
Jason Shirk
2018-08-31 16:55:42 -07:00
committed by Travis Plunk
parent 087de5b5f1
commit eae6d50d7a
9 changed files with 1040 additions and 0 deletions
+17
View File
@@ -1096,3 +1096,20 @@ interactivetesting
allowprerelease
prereleases
url
- tools/performance/README.md
analyze
wpa
wpaProfile
PerfView
etl
perfview
wpr
wprui.exe
perfview.exe
GC.Regions.xml
JIT.Regions.xml
PowerShell.Regions.xml
PowerShell.stacktags
PowerShell.wpaProfile
PowerShell.wprp
Invoke-PerfviewPS
+106
View File
@@ -0,0 +1,106 @@
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<!-- See definitions in C:\Windows\Microsoft.NET\Framework\v4.0.30319\CLR-ETW.man for .NET events -->
<!--
Unlike JIT GC is largely single threaded and the times correlate very well with PerfView where we can drill down into each GC
generation in the region graph in WPA.
We use bascially the GC Start/Stop events where the GC Start event has also the generation traced which enables us to create
regions for each GC type.
GC suspensions work a bit different were I use the GCSuspendEE_V1 as start and GCRestartEEEnd as end event. This allows us
to capture in principle also the time where the suspension or resumption itself takes an abnormally long time whic would indicate
a GC bug or a thread priority problem.
-->
<InstrumentationManifest>
<Instrumentation>
<Regions>
<RegionRoot Guid="{d8d639a0-cf4c-45fb-976a-0000DEADBEEF}" Name="GC" FriendlyName="GC Activity">
<Region Guid="{d8d639a1-cf4c-45fb-976a-100000000101}" Name="Gen 0" FriendlyName="GCs">
<Region Guid="{d8d639a1-cf4c-45fb-976a-000000000001}" Name="Gen 0" FriendlyName="Gen 0">
<Start>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="1" Version="1"/>
<PayloadIdentifier FieldName="Depth" FieldValue="0"/>
<!-- Depth is the Generation number -->
</Start>
<Start>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="1" Version="2"/>
<!-- .NET 4.6 has a new GC Start event -->
<PayloadIdentifier FieldName="Depth" FieldValue="0"/>
</Start>
<Stop>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="2" Version="1"/>
</Stop>
<Match>
<Event PID="true"/>
</Match>
<Naming>
<PayloadBased NameField="Depth"/>
</Naming>
</Region>
</Region>
<Region Guid="{d8d639a1-cf4c-45fb-976b-100000000101}" Name="Gen 1" FriendlyName="GCs">
<Region Guid="{d8d639a1-cf4c-45fb-976a-000000000005}" Name="Gen 1" FriendlyName="Gen 1">
<Start>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="1" Version="1"/>
<PayloadIdentifier FieldName="Depth" FieldValue="1"/>
</Start>
<Start>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="1" Version="2"/>
<!-- .NET 4.6 has a new GC Start event -->
<PayloadIdentifier FieldName="Depth" FieldValue="1"/>
</Start>
<Stop>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="2" Version="1"/>
</Stop>
<Match>
<Event PID="true"/>
</Match>
<Naming>
<PayloadBased NameField="Depth"/>
</Naming>
</Region>
</Region>
<Region Guid="{d8d639a1-cf4c-45fb-976c-100000000101}" Name="Gen 2" FriendlyName="GCs">
<Region Guid="{d8d639a1-cf4c-45fb-976a-000000000006}" Name="Gen 2" FriendlyName="Gen 2">
<Start>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="1" Version="1"/>
<PayloadIdentifier FieldName="Depth" FieldValue="2"/>
</Start>
<Start>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="1" Version="2"/>
<!-- .NET 4.6 has a new GC Start event -->
<PayloadIdentifier FieldName="Depth" FieldValue="2"/>
</Start>
<Stop>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="2" Version="1"/>
</Stop>
<Match>
<Event PID="true"/>
</Match>
<Naming>
<PayloadBased NameField="Depth"/>
</Naming>
</Region>
</Region>
<Region Guid="{d8d639a2-cf4c-45fb-976a-000000000003}" Name="GCSuspends" FriendlyName="GC Suspensions">
<Region Guid="{d8d639a2-cf4c-45fb-976a-000000000002}" Name="GCSuspend" FriendlyName="GC Suspension">
<Start>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="9" Version="1"/>
</Start>
<Stop>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="3" Version="1"/>
</Stop>
<Match>
<Event PID="true"/>
</Match>
</Region>
</Region>
</RegionRoot>
</Regions>
</Instrumentation>
</InstrumentationManifest>
+55
View File
@@ -0,0 +1,55 @@
#requires -RunAsAdministrator
param(
$ETLFileName = '.\PerfViewData.etl',
[Parameter(Mandatory)]
[scriptblock]
$ScriptBlock,
$LogFileName = '.\perfview.log',
$PowerShellPath = $(Get-Command pwsh.exe).Source)
$EncodedScriptBlock = [System.Convert]::ToBase64String([System.Text.Encoding]::UNICODE.GetBytes($ScriptBlock.ToString()))
$perfViewArgs = @(
'/AcceptEula'
'/ThreadTime'
"/LogFile=$LogFileName"
"/DataFile:$ETLFileName"
'/noRundown'
'/Merge'
'/Zip:False'
# GCSampledObjectAllocationHigh is sometimes useful, but quite expensive so not included by default
# '/ClrEvents=default+GCSampledObjectAllocationHigh'
'/Providers:*Microsoft-PowerShell-Runspaces,*Microsoft-PowerShell-CommandDiscovery,*Microsoft-PowerShell-Parser,*Microsoft.Windows.PowerShell'
'run'
"""$PowerShellPath"""
'-NoProfile'
'-EncodedCommand'
$EncodedScriptBlock
)
$process = Start-Process -FilePath (Get-Command PerfView.exe).Source -ArgumentList $perfViewArgs -PassThru
$rs = [runspacefactory]::CreateRunspace($host)
$rs.Open()
$ps = [powershell]::Create()
$ps.Runspace = $rs
$null = $ps.AddCommand("Get-Content").
AddArgument($LogFileName).
AddParameter("Wait").
AddParameter("Tail", 0)
$null = $ps.AddCommand("Out-Host")
# If log file doesn't exist yet, wait a little bit so Get-Content doesn't fail
while (!(Test-Path $LogFileName))
{
Start-Sleep -Seconds 1
}
$null = $ps.BeginInvoke()
$process.WaitForExit()
$ps.Stop()
+34
View File
@@ -0,0 +1,34 @@
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<!-- See definitions in C:\Windows\Microsoft.NET\Framework\v4.0.30319\CLR-ETW.man for .NET events -->
<!-- Created by Alois Kraus. Free for public use.
The JIT time is determined by the MethodJitStart event and the directly on this thread following MethodLoadUnload event which signals when the JIT compilation for this
method is complete.
Unfortunately the Region sums as it is currently in WPA it will sum not the JIT times of all threads but if e.g. 2 threads JIT for one second each then the WPA sum accross all threads will be only 1s.
WPA seems to sum on a timeline only the active time accross all threads and uses this as sum which is not a good measure to compare results. This should be changed although this logic might
be well suited for regions where each region signals a bottleneck on which others have to wait e.g. during boot.
-->
<InstrumentationManifest>
<Instrumentation>
<Regions>
<RegionRoot Guid="{d8d639a0-1f4c-45fb-976a-0000DEADBEEF}" Name="JIT" FriendlyName="JIT Activity">
<Region Guid="{d8d639a1-2f4c-45fb-976a-100000000101}" Name="JITs" FriendlyName="JITs">
<Region Guid="{d8d639a1-3f4c-45fb-976a-000000000001}" Name="Method" FriendlyName="Method">
<Start>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="145" Version="1"/> <!-- MethodJittingStarted_V1 -->
</Start>
<Stop>
<Event Provider="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}" Id="143" Version="1"/> <!-- MethodLoadUnloadVerbose_V1 -->
</Stop>
<Match>
<Event TID="true"/>
</Match>
<Naming>
<PayloadBased NameField="MethodNamespace" />
</Naming>
</Region>
</Region>
</RegionRoot>
</Regions>
</Instrumentation>
</InstrumentationManifest>
+318
View File
@@ -0,0 +1,318 @@
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<?Copyright (c) Microsoft Corporation. All rights reserved.?>
<InstrumentationManifest>
<Instrumentation>
<Regions>
<RegionRoot Guid="{41b77e93-5bf5-4244-9591-7cd70c20ae98}" Name="PowerShell" FriendlyName="PowerShell">
<Region Guid="{8e8b111e-c2b7-40e5-b652-6504163c89a0}" Name="PowerShell-Startup" FriendlyName="PowerShell Startup">
<Start>
<Event Provider="{A0C1853B-5C40-4B15-8766-3CF1C58F985A}" Id="40961" Version="1" />
</Start>
<Stop>
<Event Provider="{A0C1853B-5C40-4B15-8766-3CF1C58F985A}" Id="40962" Version="1" />
</Stop>
</Region>
<Region Guid="{659ff11f-ad6f-4cae-b6be-f3fc58fa9a18}" Name="Load-User-Profiles" FriendlyName="Loading user profiles">
<Start>
<!-- This is the telemetry event we report on startup -->
<Duration Provider="{816ebd75-f7ab-59c0-e2f0-bddfeed66ac2}" Id="30" Version="0" Duration="ProfileLoadTime" Multiplier="1000000" />
</Start>
<Stop>
<!-- This is the same event as in Start, which is extremely close, but not precisely when we recorded -->
<Event Provider="{816ebd75-f7ab-59c0-e2f0-bddfeed66ac2}" Id="30" Version="0"/>
</Stop>
</Region>
<Region Guid="{5d05192d-21ff-42ec-a041-0a0249337cd2}" Name="PowerShell-Parser" FriendlyName="Parser">
<Start>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="1" Version="0" />
</Start>
<Stop>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="2" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Naming>
<PayloadBased NameField="FileName" />
</Naming>
<Region Guid="{eca842f1-501e-4fee-b7df-a142768c4ad3}" Name="Resolve Symbols" FriendlyName="Resolve Symbols">
<Start>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="3" Version="0" />
</Start>
<Stop>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="4" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
</Region>
<Region Guid="{1ce3dcde-19fc-456a-ade3-4c151927dd4c}" Name="Semantic Checks" FriendlyName="Semantic Checks">
<Start>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="5" Version="0" />
</Start>
<Stop>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="6" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
</Region>
</Region>
<Region Guid="{5aaa40ce-eca9-43a4-af3d-c7b7df367d27}" Name="PowerShell-SecurityChecks" FriendlyName="Security Checks">
<Start>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="7" Version="0" />
</Start>
<Stop>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="8" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Naming>
<PayloadBased NameField="FileName" />
</Naming>
</Region>
<Region Guid="{ca0599aa-f074-44a8-b725-d5c077f87dd0}" Name="PowerShell-ScriptCompilation" FriendlyName="Compile Script">
<Start>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="9" Version="0" />
</Start>
<Stop>
<Event Provider="{eba789d9-533b-58d4-cd1f-2e6520e3a9c2}" Id="10" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Naming>
<PayloadBased NameField="FileName" />
</Naming>
</Region>
<Region Guid="{6a40c960-b798-48e4-bd07-b1379948bb5d}" Name="PowerShell-CommandDiscovery" FriendlyName="Command Discovery">
<Start>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="1" Version="0" />
</Start>
<Stop>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="2" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Naming>
<PayloadBased NameField="CommandName" />
</Naming>
</Region>
<Region Guid="{3c4f9c88-5dbc-4005-879c-32f3df8d9f90}" Name="PowerShell-Module-Autoloading" FriendlyName="Module Autoloading">
<Start>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="3" Version="0" />
</Start>
<Stop>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="4" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Naming>
<PayloadBased NameField="CommandName" />
</Naming>
</Region>
<Region Guid="{47b337ef-df01-43ea-b411-f6206c7f0ff8}" Name="PowerShell-Module-Autodiscovery" FriendlyName="Module Auto Discovery">
<Start>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="5" Version="0" />
</Start>
<Stop>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="6" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Naming>
<PayloadBased NameField="CommandName" />
</Naming>
<Region Guid="{7b18786f-8721-4261-84a6-ddc23a78b088}" Name="PowerShell-SearchForModuleFiles" FriendlyName="Search for module files">
<Start>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="7" Version="0" />
</Start>
<Stop>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="8" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
</Region>
<Region Guid="{02b2288e-3618-4ed4-8a15-d2ed3b54b781}" Name="PowerShell-GetModuleExportedCommands" FriendlyName="Get module exported commands">
<Start>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="9" Version="0" />
</Start>
<Stop>
<Event Provider="{ea9e8155-5042-5537-0b73-8c0e6b53f398}" Id="10" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Naming>
<PayloadBased NameField="ModulePath" />
</Naming>
</Region>
</Region>
<Region Guid="{1874d1b3-e60d-48f9-a3cd-6943c82a125b}" Name="PowerShell-Runspaces" FriendlyName="Runspace Open">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="1" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="2" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Region Guid="{c825b361-d105-46a3-9218-7804cdc8edc2}" Name="Load Assemblies" FriendlyName="Load Assemblies">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="3" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="4" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Region Guid="{4a60e08a-b956-4496-99e5-e66b88eadf9d}" Name="Load Assembly" FriendlyName="Load Assembly">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="17" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="28" Version="0" />
</Stop>
<Naming>
<PayloadBased NameField="Name" />
</Naming>
<Match>
<Event TID="true" />
</Match>
</Region>
</Region>
<Region Guid="{29528eb8-b872-4661-9532-6fbc20c42514}" Name="Process Formats" FriendlyName="Process Formats">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="5" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="6" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Region Guid="{dd55e27f-d493-4ab3-8ec5-6ae1d317c969}" Name="Process Format" FriendlyName="Format PS1XML">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="19" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="20" Version="0" />
</Stop>
<Naming>
<PayloadBased NameField="fileName" />
</Naming>
<Match>
<Event TID="true" />
</Match>
</Region>
</Region>
<Region Guid="{a3e73e17-a1f1-4ac1-97bf-97761801a38e}" Name="Process Types" FriendlyName="Process Types">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="7" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="8" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Region Guid="{68d491ca-8bca-441e-a65c-f1aef4589ddf}" Name="Process Type" FriendlyName="Type PS1XML">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="21" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="22" Version="0" />
</Stop>
<Naming>
<PayloadBased NameField="fileName" />
</Naming>
<Match>
<Event TID="true" />
</Match>
</Region>
</Region>
<Region Guid="{38039aeb-36cf-4fb3-a5a7-c7da18663e2b}" Name="Load Providers" FriendlyName="Load Providers">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="9" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="10" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Region Guid="{9f929beb-0a2a-4ddf-b017-390d141e1f00}" Name="Load Provider" FriendlyName="Load Provider">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="23" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="24" Version="0" />
</Stop>
<Naming>
<PayloadBased NameField="Name" />
</Naming>
<Match>
<Event TID="true" />
</Match>
</Region>
</Region>
<Region Guid="{6d99b787-8ae3-4e06-aa79-5666a587cf9a}" Name="Load Commands" FriendlyName="Load Commands">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="11" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="12" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
<Region Guid="{bde0893f-e255-4877-ac71-285455b2f26c}" Name="Load Command" FriendlyName="Load Command">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="25" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="26" Version="0" />
</Stop>
<Naming>
<PayloadBased NameField="Name" />
</Naming>
<Match>
<Event TID="true" />
</Match>
</Region>
</Region>
<Region Guid="{bbcdbdde-5e0e-4343-a0af-8acec4acc58b}" Name="Load Variables" FriendlyName="Load Variables">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="13" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="14" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
</Region>
<Region Guid="{f16a63bc-e226-434b-979e-3501082ef28f}" Name="Load Environment Variables" FriendlyName="Load Environment Variables">
<Start>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="15" Version="0" />
</Start>
<Stop>
<Event Provider="{15d4c170-2f29-5689-a0e2-d95b0c7b4ea0}" Id="16" Version="0" />
</Stop>
<Match>
<Event TID="true" />
</Match>
</Region>
</Region>
</RegionRoot>
</Regions>
</Instrumentation>
</InstrumentationManifest>
+40
View File
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- To work with ngen'd images and non-ngen'd images, entries are duplicated,
once with .dll, and again with .ni.dll -->
<Tag Name="PowerShell">
<Tag Name="Pipeline Execution">
<Tag Name="Interpreter">
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.Interpreter.*"/>
<Entrypoint Module="System.Core.dll" Method="System.Dynamic.UpdateDelegates.*"/>
<Entrypoint Module="System.Core.dll" Method="System.Runtime.CompilerServices.CallSiteBinder.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.Interpreter.*"/>
<Entrypoint Module="System.Core.ni.dll" Method="System.Dynamic.UpdateDelegates.*"/>
<Entrypoint Module="System.Core.ni.dll" Method="System.Runtime.CompilerServices.CallSiteBinder.*"/>
</Tag>
<Tag Name="CommandDiscovery">
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.CommandDiscovery.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.CommandDiscovery.*"/>
</Tag>
<Tag Name="Formatting">
<Entrypoint Module="System.Management.Automation.dll" Method="Microsoft.PowerShell.Commands.Internal.Format.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="Microsoft.PowerShell.Commands.Internal.Format.*"/>
</Tag>
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.Runspaces.PipelineThread.WorkerProc*"/>
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.Runspaces.LocalPipeline.*"/>
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.Internal.PipelineProcessor.*"/>
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.Runspaces.PipelineProcessor.*"/>
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.CommandProcessor.*"/>
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.CommandProcessorBase.*"/>
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.DlrScriptCommandProcessor.*"/>
<Entrypoint Module="System.Management.Automation.dll" Method="System.Management.Automation.PipelineOps.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.Runspaces.PipelineThread.WorkerProc*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.Runspaces.LocalPipeline.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.Internal.PipelineProcessor.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.Runspaces.PipelineProcessor.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.CommandProcessor.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.CommandProcessorBase.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.DlrScriptCommandProcessor.*"/>
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.PipelineOps.*"/>
</Tag>
</Tag>
+272
View File
@@ -0,0 +1,272 @@
<?xml version="1.0" encoding="utf-8"?>
<WpaProfileContainer xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2" xmlns="http://tempuri.org/SerializableElement.xsd">
<Content xsi:type="WpaProfile2">
<Sessions>
<Session Index="0">
<FileReferences>
<FileReference FileName="PowerShell.Regions.xml" ServiceMoniker="Regions.{51EF6868-EFEC-42A3-B284-1838673CC095}" />
<FileReference FileName="PowerShell.stacktags" ServiceMoniker="StackFrameTag.{67F56EBD-2E82-493B-BF4F-712A1D0F018B}" />
<FileReference FileName="JIT.Regions.xml" ServiceMoniker="Regions.{51EF6868-EFEC-42A3-B284-1838673CC095}" />
<FileReference FileName="GC.Regions.xml" ServiceMoniker="Regions.{51EF6868-EFEC-42A3-B284-1838673CC095}" />
<FileReference FileName="default.stacktags" FileNameBase="Catalog" ServiceMoniker="StackFrameTag.{67F56EBD-2E82-493B-BF4F-712A1D0F018B}" />
</FileReferences>
</Session>
</Sessions>
<Views>
<View Guid="67b8486a-9cc3-4d36-978b-cfc07051f750" IsVisible="true" Title="Analysis">
<Graphs>
<Graph Guid="1ce7fd53-2344-4ea8-acd6-1a0722a51427" LayoutStyle="All" Color="#FF005DE0" GraphHeight="125" IsMinimized="false" IsShown="true" IsExpanded="false" HelpText="{}{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch Lets the application apply user-friendly labels to portions of the trace.}\li0\ri0\sa0\sb0\fi0\ql\par}&#xD;&#xA;}&#xD;&#xA;}">
<Preset Name="Regions of Interest" BarGraphIntervalCount="50" IsThreadActivityTable="false" GraphColumnCount="31" KeyColumnCount="4" LeftFrozenColumnCount="5" RightFrozenColumnCount="30" InitialFilterShouldKeep="true" GraphFilterTopValue="0" GraphFilterThresholdValue="0" HelpText="{}{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch Uses a Regions of Interest file to apply additional markup to an open trace in WPA. These labels are applied by finding events that define the start and stop of a given region. The XML file contains these regions as well as their events.}\li0\ri0\sa0\sb0\fi0\ql\par}&#xD;&#xA;}&#xD;&#xA;}">
<MetadataEntries>
<MetadataEntry Guid="052aa8a8-ce86-486b-8cc9-158ac7d27113" Name="Stop Thread" ColumnMetadata="EndThreadId" />
<MetadataEntry Guid="93b276b8-d183-41b7-a16e-19eb9373dbf3" Name="Start Time" ColumnMetadata="StartTime" />
<MetadataEntry Guid="03facf2d-1d9f-43c7-b8e8-aed46477f348" Name="Stop Time" ColumnMetadata="EndTime" />
</MetadataEntries>
<HighlightEntries />
<Columns>
<Column Guid="07ec3178-e4ce-4729-a918-f1cc44ee55b9" Name="Region Friendly Name" SortPriority="0" Width="263" IsVisible="true" />
<Column Guid="a310de95-c012-4af7-be28-f78dd2f71247" Name="Instance Name" SortPriority="1" Width="200" IsVisible="true" />
<Column Guid="d96b19f7-d47a-40f3-ba80-fe0b9fae4616" Name="Region" SortPriority="2" Width="300" IsVisible="false" />
<Column Guid="d11ae606-c15c-4c87-a001-6d93a76465c3" Name="Opcode" SortPriority="0" Width="253" IsVisible="true" />
<Column Guid="d683f423-cea9-4275-b67e-1aadd496289d" Name="Provider" SortPriority="4" Width="200" IsVisible="false" />
<Column Guid="b521d564-9030-485d-97ae-3bd638a979bb" Name="Event Name" SortPriority="5" Width="92" IsVisible="true" />
<Column Guid="9fd0ec98-a6a4-432d-b0f9-b032609923e5" Name="Payload" SortPriority="6" Width="180" IsVisible="true" />
<Column Guid="cb796d44-2927-5ac1-d231-4b71904c18f5" Name="Thread Name" SortPriority="7" Width="80" IsVisible="false" />
<Column Guid="82ddfdff-ee93-5f35-08ac-4705069618dc" Name="Thread Activity Tag" SortPriority="8" Width="80" IsVisible="false" />
<Column Guid="2818954f-2d30-5569-4510-dade0a5a605c" Name="Annotation" SortPriority="9" Width="80" IsVisible="false">
<AnnotationsOptionsParameter>
<AnnotationQueryEntries />
</AnnotationsOptionsParameter>
</Column>
<Column Guid="abfa45ec-ef0f-4fdd-8a6d-1c93a140032b" Name="Duration" AggregationMode="Sum" SortPriority="10" TextAlignment="Right" Width="100" IsVisible="true" />
<Column Guid="d0b2a5cb-1966-4fe9-919f-1383932b2d84" Name="Start Process" SortPriority="11" Width="195" IsVisible="false">
<ProcessOptionsParameter />
</Column>
<Column Guid="6d945afa-988e-4be4-906b-023fb72eda92" Name="Start Process Name" SortPriority="12" Width="150" IsVisible="false" />
<Column Guid="c74dbb74-97bf-4c5a-9b21-d967ce08df00" Name="Start Thread" SortPriority="13" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="b9e5e33d-d875-4fb2-b4f9-7e9d14d8d370" Name="Stop Process" SortPriority="14" Width="195" IsVisible="false">
<ProcessOptionsParameter />
</Column>
<Column Guid="04222b11-b8be-49e1-9c52-a6d1f820a6d3" Name="Stop Process Name" SortPriority="15" Width="150" IsVisible="false" />
<Column Guid="052aa8a8-ce86-486b-8cc9-158ac7d27113" Name="Stop Thread" SortPriority="16" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="471b850d-c2bc-482d-871d-13fb7c13bd2a" Name="Region Guid" AggregationMode="Count" SortPriority="17" Width="223" IsVisible="false" />
<Column Guid="0c5cf8cd-9b9e-5798-1a5d-09d429f7fa3c" Name="Field 1" SortPriority="18" Width="80" IsVisible="true" />
<Column Guid="71badd11-26e5-56bc-44ec-12f4cc6a8f3e" Name="Field 2" SortPriority="19" Width="80" IsVisible="true" />
<Column Guid="411dba2d-5d6e-5272-8287-636d0841768c" Name="Field 3" SortPriority="20" Width="80" IsVisible="false" />
<Column Guid="048f5050-1f17-59b3-fa22-4b0781ee630b" Name="Field 4" SortPriority="21" Width="80" IsVisible="false" />
<Column Guid="94e48f22-d499-5227-bb04-be011b4159b0" Name="Field 5" SortPriority="22" Width="80" IsVisible="false" />
<Column Guid="c1054028-424a-59ba-e760-6d30abbd69c5" Name="Field 6" SortPriority="23" Width="80" IsVisible="false" />
<Column Guid="5cbc4b58-2de1-5449-55b2-4651d4edf90a" Name="Field 7" SortPriority="24" Width="80" IsVisible="false" />
<Column Guid="fc01e6c9-a43b-51a1-fd2e-112ba48aff65" Name="Field 8" SortPriority="25" Width="80" IsVisible="false" />
<Column Guid="e3dcf300-46e2-5c43-ef4b-2c3db489ec25" Name="Field 9" SortPriority="26" Width="80" IsVisible="false" />
<Column Guid="87c21ddb-4b29-58e3-5ddc-f114c5ca209a" Name="Field 10" SortPriority="27" Width="80" IsVisible="false" />
<Column Guid="93b276b8-d183-41b7-a16e-19eb9373dbf3" Name="Start Time" AggregationMode="Min" SortPriority="28" TextAlignment="Right" Width="100" IsVisible="true">
<DateTimeTimestampOptionsParameter DateTimeEnabled="false" />
</Column>
<Column Guid="03facf2d-1d9f-43c7-b8e8-aed46477f348" Name="Stop Time" AggregationMode="Max" SortPriority="29" TextAlignment="Right" Width="100" IsVisible="true">
<DateTimeTimestampOptionsParameter DateTimeEnabled="false" />
</Column>
</Columns>
</Preset>
</Graph>
<Graph Guid="b855361e-7be0-4bc8-a754-3e8507715ca5" LayoutStyle="All" Color="#FFFF0000" GraphHeight="125" IsMinimized="false" IsShown="true" IsExpanded="false" HelpText="{}{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch This graph shows CPU usage events logged at a regular sampling interval, usually about 1ms. Each event logs the CPU, thread, address and optionally the call stack.}\li0\ri0\sa0\sb0\fi0\ql\par}&#xD;&#xA;}&#xD;&#xA;}">
<Preset Name="Utilization by Process, Stack" BarGraphIntervalCount="50" IsThreadActivityTable="false" GraphColumnCount="26" KeyColumnCount="12" LeftFrozenColumnCount="0" RightFrozenColumnCount="22" InitialFilterQuery="[DPC/ISR]:=&quot;DPC&quot; OR [DPC/ISR]:=&quot;ISR&quot;" InitialFilterShouldKeep="false" InitialSelectionQuery="([Series Name]:=&quot;Process&quot; AND NOT ([Process]:=&quot;Idle (0)&quot;))" GraphFilterColumnGuid="01a82c2c-5048-4c9d-ac37-eaf6556f6af5" GraphFilterTopValue="0" GraphFilterThresholdValue="0" HelpText="{}{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch Shows how much CPU is used by each stack. The stack column is hierarchical - you expand its contents to drill down into where (in the stack) time was spent.}\li0\ri0\sa0\sb0\fi0\ql\par}&#xD;&#xA;}&#xD;&#xA;}">
<MetadataEntries>
<MetadataEntry Guid="05100ece-df05-40c7-aad6-ffff99b60491" Name="Thread ID" ColumnMetadata="EndThreadId" />
<MetadataEntry Guid="0bbf4299-0176-445e-b1d9-991df475d631" Name="TimeStamp" ColumnMetadata="EndTime" />
<MetadataEntry Guid="e0c6cb9e-04c2-4bb5-ba5f-4ed765f4ecaa" Name="Weight" ColumnMetadata="Duration" />
<MetadataEntry Guid="55d56ebb-77af-4af5-a056-6122751ea093" Name="CPU" ColumnMetadata="ResourceId" />
</MetadataEntries>
<HighlightEntries />
<Columns>
<Column Guid="9c1ceec3-ef4a-4865-b678-d774881187b9" Name="Process Name" SortPriority="2" Width="180" IsVisible="false" />
<Column Guid="00875e0c-482f-418d-ab40-decf05030541" Name="Display Name" SortPriority="3" Width="200" IsVisible="false" />
<Column Guid="5b77e48f-6d24-4f29-8972-69c30e32f87d" Name="Process" SortPriority="4" Width="200" IsVisible="true">
<ProcessOptionsParameter SeparateDpcIsr="false" />
</Column>
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="5" Width="200" IsVisible="false">
<StackOptionsParameter Mode="StackTag" />
</Column>
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="6" Width="200" IsVisible="false">
<StackOptionsParameter Mode="FrameTags" />
</Column>
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="7" Width="439" IsVisible="true">
<StackOptionsParameter />
</Column>
<Column Guid="ccdb05c1-04a9-4289-aaa6-a376d1d66012" Name="Module" SortPriority="8" Width="124" IsVisible="false" />
<Column Guid="7ad93780-708c-471c-9e3f-5a497cbefdd7" Name="Function" SortPriority="9" Width="184" IsVisible="false" />
<Column Guid="d0028ea0-aa66-452a-882a-616fd8b9fdce" Name="DPC/ISR" SortPriority="10" Width="184" IsVisible="false" />
<Column Guid="9aa2e00d-db0a-4207-a0bd-964aa492356e" Name="Address" SortPriority="11" TextAlignment="Right" Width="140" IsVisible="false" />
<Column Guid="05100ece-df05-40c7-aad6-ffff99b60491" Name="Thread ID" SortPriority="12" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="cb796d44-2927-5ac1-d231-4b71904c18f5" Name="Thread Name" SortPriority="13" Width="80" IsVisible="false" />
<Column Guid="82ddfdff-ee93-5f35-08ac-4705069618dc" Name="Thread Activity Tag" SortPriority="14" Width="80" IsVisible="false" />
<Column Guid="2818954f-2d30-5569-4510-dade0a5a605c" Name="Annotation" SortPriority="15" Width="80" IsVisible="false">
<AnnotationsOptionsParameter>
<AnnotationQueryEntries />
</AnnotationsOptionsParameter>
</Column>
<Column Guid="32acf445-36b3-456e-a54e-19bcad276a4f" Name="WorkOnBehalf Thread ID" SortPriority="16" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="303f4b83-026a-4142-979a-247296c5f4cb" Name="WorkOnBehalf Process Name" SortPriority="17" TextAlignment="Right" Width="180" IsVisible="false" />
<Column Guid="56e0aeb4-5ed0-44a6-a60b-9db4e918e5a1" Name="WorkOnBehalf Process" SortPriority="18" TextAlignment="Right" Width="200" IsVisible="false">
<ProcessOptionsParameter />
</Column>
<Column Guid="55d56ebb-77af-4af5-a056-6122751ea093" Name="CPU" SortPriority="19" TextAlignment="Right" Width="40" IsVisible="false" />
<Column Guid="01a82c2c-5048-4c9d-ac37-eaf6556f6af5" Name="Count" AggregationMode="Sum" SortOrder="Descending" SortPriority="1" TextAlignment="Right" Width="60" IsVisible="true" />
<Column Guid="63cfb4e2-a24c-4e9d-80f2-393f03794d60" Name="Weight (in view)" AggregationMode="Sum" SortPriority="20" TextAlignment="Right" Width="100" IsVisible="true">
<DurationInViewOptionsParameter TimeStampType="Start" InViewEnabled="false" />
</Column>
<Column Guid="0bbf4299-0176-445e-b1d9-991df475d631" Name="TimeStamp" SortPriority="21" TextAlignment="Right" Width="100" IsVisible="true">
<DateTimeTimestampOptionsParameter DateTimeEnabled="false" />
</Column>
<Column Guid="ab54241e-ce5d-4ef7-a28c-bbcb5b8d39d4" Name="Rank" SortPriority="22" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="5a1e1ba4-6a14-43e5-96eb-3b462be470fe" Name="Priority" SortPriority="23" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="f5ebf01b-f7cb-4afb-877d-c36edb2a62b6" Name="% Weight" AggregationMode="Sum" SortOrder="Descending" SortPriority="0" TextAlignment="Right" Width="80" IsVisible="true" />
</Columns>
</Preset>
</Graph>
</Graphs>
<SessionIndices>
<SessionIndex>0</SessionIndex>
</SessionIndices>
</View>
</Views>
<ModifiedGraphs>
<GraphSchema Guid="b855361e-7be0-4bc8-a754-3e8507715ca5" HelpText="{}{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch This graph shows CPU usage events logged at a regular sampling interval, usually about 1ms. Each event logs the CPU, thread, address and optionally the call stack.}\li0\ri0\sa0\sb0\fi0\ql\par}&#xD;&#xA;}&#xD;&#xA;}">
<ModifiedPresets>
<Preset Name="Randomascii Inclusive (stack)" BarGraphIntervalCount="50" IsThreadActivityTable="false" GraphColumnCount="23" KeyColumnCount="12" LeftFrozenColumnCount="0" RightFrozenColumnCount="22" InitialFilterQuery="[DPC/ISR]:=&quot;DPC&quot; OR [DPC/ISR]:=&quot;ISR&quot;" InitialFilterShouldKeep="false" InitialSelectionQuery="([Series Name]:=&quot;Process&quot; AND NOT ([Process]:=&quot;Idle (0)&quot;))" GraphFilterTopValue="0" GraphFilterThresholdValue="0">
<MetadataEntries>
<MetadataEntry Guid="05100ece-df05-40c7-aad6-ffff99b60491" Name="Thread ID" ColumnMetadata="EndThreadId" />
<MetadataEntry Guid="0bbf4299-0176-445e-b1d9-991df475d631" Name="TimeStamp" ColumnMetadata="EndTime" />
<MetadataEntry Guid="e0c6cb9e-04c2-4bb5-ba5f-4ed765f4ecaa" Name="Weight" ColumnMetadata="Duration" />
<MetadataEntry Guid="55d56ebb-77af-4af5-a056-6122751ea093" Name="CPU" ColumnMetadata="ResourceId" />
</MetadataEntries>
<HighlightEntries />
<Columns>
<Column Guid="9c1ceec3-ef4a-4865-b678-d774881187b9" Name="Process Name" SortPriority="1" Width="180" IsVisible="false" />
<Column Guid="00875e0c-482f-418d-ab40-decf05030541" Name="Display Name" SortPriority="2" Width="200" IsVisible="false" />
<Column Guid="5b77e48f-6d24-4f29-8972-69c30e32f87d" Name="Process" SortPriority="3" Width="200" IsVisible="true" />
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="4" Width="200" IsVisible="false">
<StackOptionsParameter Mode="StackTag" />
</Column>
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="5" Width="200" IsVisible="false">
<StackOptionsParameter Mode="FrameTags" />
</Column>
<Column Guid="05100ece-df05-40c7-aad6-ffff99b60491" Name="Thread ID" SortPriority="11" TextAlignment="Right" Width="80" IsVisible="true" />
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="6" Width="535" IsVisible="true">
<StackOptionsParameter />
</Column>
<Column Guid="ccdb05c1-04a9-4289-aaa6-a376d1d66012" Name="Module" SortPriority="7" Width="124" IsVisible="false" />
<Column Guid="7ad93780-708c-471c-9e3f-5a497cbefdd7" Name="Function" SortPriority="8" Width="184" IsVisible="false" />
<Column Guid="d0028ea0-aa66-452a-882a-616fd8b9fdce" Name="DPC/ISR" SortPriority="9" Width="184" IsVisible="false" />
<Column Guid="9aa2e00d-db0a-4207-a0bd-964aa492356e" Name="Address" SortPriority="10" TextAlignment="Right" Width="140" IsVisible="false" />
<Column Guid="cb796d44-2927-5ac1-d231-4b71904c18f5" Name="Thread Name" SortPriority="12" Width="80" IsVisible="false" />
<Column Guid="82ddfdff-ee93-5f35-08ac-4705069618dc" Name="Thread Activity Tag" SortPriority="13" Width="80" IsVisible="false" />
<Column Guid="2818954f-2d30-5569-4510-dade0a5a605c" Name="Annotation" SortPriority="14" Width="80" IsVisible="false" />
<Column Guid="55d56ebb-77af-4af5-a056-6122751ea093" Name="CPU" SortPriority="15" TextAlignment="Right" Width="40" IsVisible="false" />
<Column Guid="01a82c2c-5048-4c9d-ac37-eaf6556f6af5" Name="Count" AggregationMode="Sum" SortOrder="Descending" SortPriority="0" TextAlignment="Right" Width="60" IsVisible="true" />
<Column Guid="63cfb4e2-a24c-4e9d-80f2-393f03794d60" Name="Weight (in view)" AggregationMode="Sum" SortPriority="16" TextAlignment="Right" Width="100" IsVisible="true" />
<Column Guid="0bbf4299-0176-445e-b1d9-991df475d631" Name="TimeStamp" SortPriority="17" TextAlignment="Right" Width="100" IsVisible="false" />
<Column Guid="ab54241e-ce5d-4ef7-a28c-bbcb5b8d39d4" Name="Rank" SortPriority="18" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="5a1e1ba4-6a14-43e5-96eb-3b462be470fe" Name="Priority" SortPriority="19" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="f5ebf01b-f7cb-4afb-877d-c36edb2a62b6" Name="% Weight" AggregationMode="Sum" SortOrder="Descending" SortPriority="20" TextAlignment="Right" Width="80" IsVisible="false" />
</Columns>
</Preset>
<Preset Name="Randomascii Exclusive (module and function)" BarGraphIntervalCount="50" IsThreadActivityTable="false" GraphColumnCount="23" KeyColumnCount="12" LeftFrozenColumnCount="0" RightFrozenColumnCount="22" InitialFilterQuery="[DPC/ISR]:=&quot;DPC&quot; OR [DPC/ISR]:=&quot;ISR&quot;" InitialFilterShouldKeep="false" InitialSelectionQuery="([Series Name]:=&quot;Process&quot; AND NOT ([Process]:=&quot;Idle (0)&quot;))" GraphFilterTopValue="0" GraphFilterThresholdValue="0">
<MetadataEntries>
<MetadataEntry Guid="05100ece-df05-40c7-aad6-ffff99b60491" Name="Thread ID" ColumnMetadata="EndThreadId" />
<MetadataEntry Guid="0bbf4299-0176-445e-b1d9-991df475d631" Name="TimeStamp" ColumnMetadata="EndTime" />
<MetadataEntry Guid="e0c6cb9e-04c2-4bb5-ba5f-4ed765f4ecaa" Name="Weight" ColumnMetadata="Duration" />
<MetadataEntry Guid="55d56ebb-77af-4af5-a056-6122751ea093" Name="CPU" ColumnMetadata="ResourceId" />
</MetadataEntries>
<HighlightEntries />
<Columns>
<Column Guid="9c1ceec3-ef4a-4865-b678-d774881187b9" Name="Process Name" SortPriority="1" Width="180" IsVisible="false" />
<Column Guid="00875e0c-482f-418d-ab40-decf05030541" Name="Display Name" SortPriority="2" Width="200" IsVisible="false" />
<Column Guid="5b77e48f-6d24-4f29-8972-69c30e32f87d" Name="Process" SortPriority="3" Width="200" IsVisible="true" />
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="4" Width="200" IsVisible="false">
<StackOptionsParameter Mode="StackTag" />
</Column>
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="5" Width="200" IsVisible="false">
<StackOptionsParameter Mode="FrameTags" />
</Column>
<Column Guid="05100ece-df05-40c7-aad6-ffff99b60491" Name="Thread ID" SortPriority="11" TextAlignment="Right" Width="80" IsVisible="true" />
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="6" Width="535" IsVisible="false">
<StackOptionsParameter />
</Column>
<Column Guid="ccdb05c1-04a9-4289-aaa6-a376d1d66012" Name="Module" SortPriority="7" Width="124" IsVisible="true" />
<Column Guid="7ad93780-708c-471c-9e3f-5a497cbefdd7" Name="Function" SortPriority="8" Width="240" IsVisible="true" />
<Column Guid="d0028ea0-aa66-452a-882a-616fd8b9fdce" Name="DPC/ISR" SortPriority="9" Width="184" IsVisible="false" />
<Column Guid="9aa2e00d-db0a-4207-a0bd-964aa492356e" Name="Address" SortPriority="10" TextAlignment="Right" Width="140" IsVisible="false" />
<Column Guid="cb796d44-2927-5ac1-d231-4b71904c18f5" Name="Thread Name" SortPriority="12" Width="80" IsVisible="false" />
<Column Guid="82ddfdff-ee93-5f35-08ac-4705069618dc" Name="Thread Activity Tag" SortPriority="13" Width="80" IsVisible="false" />
<Column Guid="2818954f-2d30-5569-4510-dade0a5a605c" Name="Annotation" SortPriority="14" Width="80" IsVisible="false" />
<Column Guid="55d56ebb-77af-4af5-a056-6122751ea093" Name="CPU" SortPriority="15" TextAlignment="Right" Width="40" IsVisible="false" />
<Column Guid="01a82c2c-5048-4c9d-ac37-eaf6556f6af5" Name="Count" AggregationMode="Sum" SortOrder="Descending" SortPriority="0" TextAlignment="Right" Width="60" IsVisible="true" />
<Column Guid="63cfb4e2-a24c-4e9d-80f2-393f03794d60" Name="Weight (in view)" AggregationMode="Sum" SortPriority="16" TextAlignment="Right" Width="100" IsVisible="true" />
<Column Guid="0bbf4299-0176-445e-b1d9-991df475d631" Name="TimeStamp" SortPriority="17" TextAlignment="Right" Width="100" IsVisible="false" />
<Column Guid="ab54241e-ce5d-4ef7-a28c-bbcb5b8d39d4" Name="Rank" SortPriority="18" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="5a1e1ba4-6a14-43e5-96eb-3b462be470fe" Name="Priority" SortPriority="19" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="f5ebf01b-f7cb-4afb-877d-c36edb2a62b6" Name="% Weight" AggregationMode="Sum" SortOrder="Descending" SortPriority="20" TextAlignment="Right" Width="80" IsVisible="false" />
</Columns>
</Preset>
</ModifiedPresets>
<PersistedPresets>
<Preset Name="Utilization by Process, Stack" BarGraphIntervalCount="50" IsThreadActivityTable="false" GraphColumnCount="26" KeyColumnCount="12" LeftFrozenColumnCount="0" RightFrozenColumnCount="22" InitialFilterQuery="[DPC/ISR]:=&quot;DPC&quot; OR [DPC/ISR]:=&quot;ISR&quot;" InitialFilterShouldKeep="false" InitialSelectionQuery="([Series Name]:=&quot;Process&quot; AND NOT ([Process]:=&quot;Idle (0)&quot;))" GraphFilterColumnGuid="01a82c2c-5048-4c9d-ac37-eaf6556f6af5" GraphFilterTopValue="0" GraphFilterThresholdValue="0" HelpText="{}{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch Shows how much CPU is used by each stack. The stack column is hierarchical - you expand its contents to drill down into where (in the stack) time was spent.}\li0\ri0\sa0\sb0\fi0\ql\par}&#xD;&#xA;}&#xD;&#xA;}">
<MetadataEntries>
<MetadataEntry Guid="05100ece-df05-40c7-aad6-ffff99b60491" Name="Thread ID" ColumnMetadata="EndThreadId" />
<MetadataEntry Guid="0bbf4299-0176-445e-b1d9-991df475d631" Name="TimeStamp" ColumnMetadata="EndTime" />
<MetadataEntry Guid="e0c6cb9e-04c2-4bb5-ba5f-4ed765f4ecaa" Name="Weight" ColumnMetadata="Duration" />
<MetadataEntry Guid="55d56ebb-77af-4af5-a056-6122751ea093" Name="CPU" ColumnMetadata="ResourceId" />
</MetadataEntries>
<HighlightEntries />
<Columns>
<Column Guid="9c1ceec3-ef4a-4865-b678-d774881187b9" Name="Process Name" SortPriority="2" Width="180" IsVisible="false" />
<Column Guid="00875e0c-482f-418d-ab40-decf05030541" Name="Display Name" SortPriority="3" Width="200" IsVisible="false" />
<Column Guid="5b77e48f-6d24-4f29-8972-69c30e32f87d" Name="Process" SortPriority="4" Width="200" IsVisible="true">
<ProcessOptionsParameter SeparateDpcIsr="false" />
</Column>
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="5" Width="200" IsVisible="false">
<StackOptionsParameter Mode="StackTag" />
</Column>
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="6" Width="200" IsVisible="false">
<StackOptionsParameter Mode="FrameTags" />
</Column>
<Column Guid="842af11e-661d-477e-b7b6-556ed8181177" Name="Stack" SortPriority="7" Width="439" IsVisible="true">
<StackOptionsParameter />
</Column>
<Column Guid="ccdb05c1-04a9-4289-aaa6-a376d1d66012" Name="Module" SortPriority="8" Width="124" IsVisible="false" />
<Column Guid="7ad93780-708c-471c-9e3f-5a497cbefdd7" Name="Function" SortPriority="9" Width="184" IsVisible="false" />
<Column Guid="d0028ea0-aa66-452a-882a-616fd8b9fdce" Name="DPC/ISR" SortPriority="10" Width="184" IsVisible="false" />
<Column Guid="9aa2e00d-db0a-4207-a0bd-964aa492356e" Name="Address" SortPriority="11" TextAlignment="Right" Width="140" IsVisible="false" />
<Column Guid="05100ece-df05-40c7-aad6-ffff99b60491" Name="Thread ID" SortPriority="12" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="cb796d44-2927-5ac1-d231-4b71904c18f5" Name="Thread Name" SortPriority="13" Width="80" IsVisible="false" />
<Column Guid="82ddfdff-ee93-5f35-08ac-4705069618dc" Name="Thread Activity Tag" SortPriority="14" Width="80" IsVisible="false" />
<Column Guid="2818954f-2d30-5569-4510-dade0a5a605c" Name="Annotation" SortPriority="15" Width="80" IsVisible="false">
<AnnotationsOptionsParameter>
<AnnotationQueryEntries />
</AnnotationsOptionsParameter>
</Column>
<Column Guid="32acf445-36b3-456e-a54e-19bcad276a4f" Name="WorkOnBehalf Thread ID" SortPriority="16" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="303f4b83-026a-4142-979a-247296c5f4cb" Name="WorkOnBehalf Process Name" SortPriority="17" TextAlignment="Right" Width="180" IsVisible="false" />
<Column Guid="56e0aeb4-5ed0-44a6-a60b-9db4e918e5a1" Name="WorkOnBehalf Process" SortPriority="18" TextAlignment="Right" Width="200" IsVisible="false">
<ProcessOptionsParameter />
</Column>
<Column Guid="55d56ebb-77af-4af5-a056-6122751ea093" Name="CPU" SortPriority="19" TextAlignment="Right" Width="40" IsVisible="false" />
<Column Guid="01a82c2c-5048-4c9d-ac37-eaf6556f6af5" Name="Count" AggregationMode="Sum" SortOrder="Descending" SortPriority="1" TextAlignment="Right" Width="60" IsVisible="true" />
<Column Guid="63cfb4e2-a24c-4e9d-80f2-393f03794d60" Name="Weight (in view)" AggregationMode="Sum" SortPriority="20" TextAlignment="Right" Width="100" IsVisible="true">
<DurationInViewOptionsParameter TimeStampType="Start" InViewEnabled="false" />
</Column>
<Column Guid="0bbf4299-0176-445e-b1d9-991df475d631" Name="TimeStamp" SortPriority="21" TextAlignment="Right" Width="100" IsVisible="true">
<DateTimeTimestampOptionsParameter DateTimeEnabled="false" />
</Column>
<Column Guid="ab54241e-ce5d-4ef7-a28c-bbcb5b8d39d4" Name="Rank" SortPriority="22" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="5a1e1ba4-6a14-43e5-96eb-3b462be470fe" Name="Priority" SortPriority="23" TextAlignment="Right" Width="80" IsVisible="false" />
<Column Guid="f5ebf01b-f7cb-4afb-877d-c36edb2a62b6" Name="% Weight" AggregationMode="Sum" SortOrder="Descending" SortPriority="0" TextAlignment="Right" Width="80" IsVisible="true" />
</Columns>
</Preset>
</PersistedPresets>
</GraphSchema>
</ModifiedGraphs>
</Content>
</WpaProfileContainer>
+149
View File
@@ -0,0 +1,149 @@
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<WindowsPerformanceRecorder
Author="PowerShell Performance"
Comments="PowerShell Performance"
Company="Microsoft Corporation"
Copyright="Microsoft Corporation"
Team="PowerShell Performance"
Version="1.0"
>
<Profiles>
<SystemCollector Id="SystemCollector">
<!-- 1MB * 100 buffers = 100 MB -->
<BufferSize Value="1024"/>
<Buffers Value="100"/>
</SystemCollector>
<EventCollector Id="EventCollector" Name="EventCollector">
<BufferSize Value="1024" />
<Buffers Value="100" />
</EventCollector>
<SystemProvider Id="SystemProviderVerbose">
<Keywords>
<!-- CPU -->
<Keyword Value="ProcessThread"/>
<Keyword Value="Loader"/>
<Keyword Value="Power"/>
<Keyword Value="CSwitch"/>
<Keyword Value="ReadyThread"/>
<Keyword Value="SampledProfile"/>
<Keyword Value="DPC"/>
<Keyword Value="Interrupt"/>
<Keyword Value="IdleStates"/>
<Keyword Value="DiskIO"/>
<Keyword Value="FileIO"/>
</Keywords>
<Stacks>
<Stack Value="CSwitch"/>
<Stack Value="ReadyThread"/>
<Stack Value="SampledProfile"/>
</Stacks>
</SystemProvider>
<EventProvider Id="Microsoft-Windows-PowerShell" Name="Microsoft-Windows-PowerShell"/>
<EventProvider Id="Microsoft-PowerShell-Parser" Name="*Microsoft-PowerShell-Parser"/>
<EventProvider Id="Microsoft-PowerShell-Runspaces" Name="*Microsoft-PowerShell-Runspaces"/>
<EventProvider Id="Microsoft-PowerShell-CommandDiscovery" Name="*Microsoft-PowerShell-CommandDiscovery"/>
<EventProvider Id="Microsoft-PowerShell-Telemetry" Name="*Microsoft-PowerShell-Telemetry"/>
<EventProvider Id="Microsoft-Windows-DotNETRuntime" Name="e13c0d23-ccbc-4e12-931b-d9cc2eee27e4">
<Keywords>
<!--
###############
### Enabled ###
###############
GC = 0x000000001 # Logging when garbage collections and finalization happen.
Binder = 0x000000004
Loader = 0x000000008 # Logging when modules actually get loaded and unloaded.
Jit = 0x000000010 # Logging when Just in time (JIT) compilation occurs.
NGen = 0x000000020 # Logging when precompiled native (NGEN) images are loaded.
StopEnumeration = 0x000000080 # Indicates that on detach or process shutdown, a rundown of all existing methods should be done
Security = 0x000000400 # Events associated with validating security restrictions.
AppDomainResourceManagement = 0x000000800 # Events for logging resource consumption on an app-domain level granularity
Contention = 0x000004000 # Log when lock contention occurs. (Monitor.Enters actually blocks)
Exception = 0x000008000 # Log exception processing.
Threading = 0x000010000 # Log events associated with the threadpool, and other threading events.
JittedMethodILToNativeMap = 0x000020000 # Dump the native to IL mapping of any method that is JIT compiled. (V4.5 runtimes and above).
OverrideAndSuppressNGenEvents = 0x000040000 # If enabled will suppress the rundown of NGEN events on V4.0 runtime (has no effect on Pre-V4.0 runtimes).
Type = 0x000080000 # Enables the 'BulkType' event
GCHeapSurvivalAndMovement = 0x000400000 # Enables events associate with object movement or survival with each GC.
GCHeapAndTypeNames = 0x001000000 # Indicates that you want type names looked up and put into the events (not just meta-data tokens).
Stack = 0x040000000 # Also log the stack trace of events for which this is valuable.
ThreadTransfer = 0x080000000 # This allows tracing work item transfer events (thread pool enqueue/dequeue/ioenqueue/iodequeue/a.o.)
Codesymbols = 0x400000000 # Events that will dump PDBs of dynamically generated assemblies to the ETW stream.
###################
### Not enabled ###
###################
GCHandle = 0x000000002 # Events when GC handles are set or destroyed.
StartEnumeration = 0x000000040 # Indicates that on attach or module load , a rundown of all existing methods should be done
JitTracing = 0x000001000 # Logging of the internal workings of the Just In Time compiler. This is fairly verbose.
Interop = 0x000002000 # Log information about code thunks that transition between managed and unmanaged code.
GCHeapDump = 0x000100000 # Enables the events associated with dumping the GC heap
/// Enables allocation sampling with the 'fast'. Sample to limit to 100 allocations per second per type.
/// This is good for most detailed performance investigations. Note that this DOES update the allocation
/// path to be slower and only works if the process start with this on.
GCSampledObjectAllocationHigh = 0x000200000
GCHeapCollect = 0x000800000 # Triggers a GC. Can pass a 64 bit value that will be logged with the GC Start event so you know which GC you actually triggered.
PerfTrack = 0x020000000
Debugger = 0x100000000 # .NET Debugger events
Monitoring = 0x200000000 # Events intended for monitoring on an ongoing basis.
/// Enables allocation sampling with the 'slow' rate, Sample to limit to 5 allocations per second per type.
/// This is reasonable for monitoring. Note that this DOES update the allocation path to be slower
/// and only works if the process start with this on.
GCSampledObjectAllocationLow = 0x002000000
/// Turns on capturing the stack and type of object allocation made by the .NET Runtime. This is only
/// supported after V4.5.3 (Late 2014) This can be very verbose and you should seriously using GCSampledObjectAllocationHigh
/// instead (and GCSampledObjectAllocationLow for production scenarios).
GCAllObjectAllocation = GCSampledObjectAllocationHigh | GCSampledObjectAllocationLow,
-->
<Keyword Value="4C14FCCBD"/>
</Keywords>
</EventProvider>
<Profile
Id="PowerShellPerformance.Verbose.File"
Name="PowerShellPerformance"
Description="PowerShell Performance Trace"
LoggingMode="File"
DetailLevel="Verbose"
>
<ProblemCategories>
<ProblemCategory Value="Computation"/>
</ProblemCategories>
<Collectors>
<SystemCollectorId Value="SystemCollector">
<SystemProviderId Value="SystemProviderVerbose"/>
</SystemCollectorId>
<EventCollectorId Value="EventCollector">
<EventProviders>
<EventProviderId Value="Microsoft-Windows-PowerShell" />
<EventProviderId Value="Microsoft-PowerShell-Parser" />
<EventProviderId Value="Microsoft-PowerShell-Runspaces" />
<EventProviderId Value="Microsoft-PowerShell-CommandDiscovery" />
<EventProviderId Value="Microsoft-PowerShell-Telemetry" />
<EventProviderId Value="Microsoft-Windows-DotNETRuntime" />
</EventProviders>
</EventCollectorId>
</Collectors>
</Profile>
</Profiles>
<TraceMergeProperties>
<TraceMergeProperty
Id="TraceMerge_Default"
Name="TraceMerge_Default"
>
<CustomEvents>
<CustomEvent Value="ImageId"/>
<CustomEvent Value="BuildInfo"/>
<CustomEvent Value="VolumeMapping"/>
<CustomEvent Value="EventMetadata"/>
<CustomEvent Value="PerfTrackMetadata"/>
<CustomEvent Value="WinSAT"/>
</CustomEvents>
</TraceMergeProperty>
</TraceMergeProperties>
</WindowsPerformanceRecorder>
+49
View File
@@ -0,0 +1,49 @@
# PowerShell Performance Analysis
This directory contains useful scripts and related files for analyzing PowerShell performance.
If you use the [Windows Performance Toolkit](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk), you can use the following to collect data and analyze a trace.
```PowerShell
$PowerShellGitRepo = "D:\PowerShell"
wpr -start $PowerShellGitRepo\tools\performance\PowerShell.wprp -filemode
pwsh.exe -NoProfile -Command "echo 1"
wpr -stop PowerShellTrace.etl
wpa -i wpa://.\PowerShellTrace.etl?profile=$PowerShellGitRepo\tools\performance\PowerShell.wpaProfile
```
When wpa opens, under System Activity, you'll find a section "Regions of Interest".
With the above wpaProfile, you should see a bunch of PowerShell related regions as well as GC and JIT activity.
If you use [PerfView](https://github.com/microsoft/perfview), you can collect a trace by running
```PowerShell
Invoke-PerfviewPS.ps1 -scenario { echo 1 }
perfview .\perfviewdata.etl
```
The etl files collected with perfview or wpr should contain roughly the same events.
Also note that you can collect the trace with one tool and analyze with the other.
## Symbols
PDB files are not published for PowerShell Core,
so the current recommendation is to build PowerShell yourself passing `-CrossGen` to `Start-Build`.
If profiling Windows PowerShell, symbols are generated from GAC.
wprui.exe and perfview.exe will both generate the PDB files needed.
## Files
| File | Description |
| ---- | ----------- |
| GC.Regions.xml | WPA regions of interest for GC |
| JIT.Regions.xml | WPA regions of interest for JIT |
| PowerShell.Regions.xml | WPA regions of interest for PowerShell |
| PowerShell.stacktags | PowerShell stack tags |
| PowerShell.wpaProfile | WPA profile to load regions of interest and stack tags |
| PowerShell.wprp | WPR profile to enable CLR and PowerShell ETW events |
| Invoke-PerfviewPS.ps1 | Script to run perfview and with PowerShell ETW events enabled |