1.2 release which can now include Perfetto support. (#66)
* Changes for 1.2 release which can now include Perfetto support. Also compatible with public Store Windows Performance Analyzer Preview which supports 1.0 RC SDK. Rev version to 1.2 and standardize package version, AssemblyVersion, and FileVersion into just 1 version.
This commit is contained in:
Родитель
6ad4b0781e
Коммит
9c5b963c17
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<AssemblyVersion>1.1.1.0</AssemblyVersion>
|
||||
<FileVersion>1.1.1.0</FileVersion>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<AssemblyVersion>1.1.1.0</AssemblyVersion>
|
||||
<FileVersion>1.1.0.0</FileVersion>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
|
@ -18,6 +18,9 @@ Param(
|
|||
$LinuxPerfToolsPluginFolder
|
||||
)
|
||||
|
||||
$MinStoreWPAVersion = New-Object -TypeName System.Version -ArgumentList "10.0.22500.0"
|
||||
$WPAPreviewStoreLink = "https://www.microsoft.com/en-us/p/windows-performance-analyzer-preview/9n58qrw40dfw"
|
||||
|
||||
Write-Host "Please see https://aka.ms/linuxperftools for help"
|
||||
|
||||
if (-not $LinuxPerfToolsPluginFolder -or -not (Test-Path -Path $LinuxPerfToolsPluginFolder -ErrorAction Ignore | Out-Null))
|
||||
|
@ -42,16 +45,36 @@ if ($LinuxPerfToolsPluginFolder -and -not (Test-Path -Path $localLinuxPerfWpaAdd
|
|||
Exit
|
||||
}
|
||||
|
||||
$wpaProcess = "wpa.exe"
|
||||
|
||||
if (-not (Test-Path -Path $wpaProcess))
|
||||
$wpaPreviewStorePkg = Get-AppPackage -Name Microsoft.WindowsPerformanceAnalyzerPreview
|
||||
if (-not $wpaPreviewStorePkg -or $wpaPreviewStorePkg.Status -ne "Ok")
|
||||
{
|
||||
Write-Host "Please download the latest Store Windows Performance Analyzer (Preview)"
|
||||
Start-Process "https://www.microsoft.com/en-us/p/windows-performance-analyzer-preview/9n58qrw40dfw"
|
||||
Write-Error -Category NotInstalled -Message "REQUIRED PREREQUISITE Store Windows Performance Analyzer (Preview) is not installed. Please install it from the Store. Launching $WPAPreviewStoreLink"
|
||||
Start-Process "$WPAPreviewStoreLink"
|
||||
Pause
|
||||
Exit
|
||||
}
|
||||
|
||||
$v = New-Object -TypeName System.Version -ArgumentList $wpaPreviewStorePkg.Version
|
||||
# Is MinStoreWPAVersion same, later, or earlier than current WPA version?
|
||||
$WpaVersionComparison = $MinStoreWPAVersion.CompareTo($v);
|
||||
switch ($WpaVersionComparison )
|
||||
{
|
||||
# MinStoreWPAVersion the same as current WPA
|
||||
0 { break }
|
||||
# MinStoreWPAVersion later than current WPA
|
||||
1
|
||||
{
|
||||
Write-Error -Category NotInstalled -Message "Current WPA version is $v. Need minimum of WPA $MinStoreWPAVersion. Redirecting to Store WPA so that you can update...";
|
||||
Start-Process "$WPAPreviewStoreLink"
|
||||
Pause
|
||||
Exit
|
||||
}
|
||||
# MinStoreWPAVersion earlier than current WPA. That's ok
|
||||
-1 { break }
|
||||
}
|
||||
|
||||
$wpaProcess = "$env:LOCALAPPDATA\Microsoft\WindowsApps\wpa.exe"
|
||||
|
||||
$startInfo = New-Object System.Diagnostics.ProcessStartInfo
|
||||
$startInfo.FileName = $wpaProcess
|
||||
|
||||
|
@ -73,8 +96,6 @@ if ($InputFile)
|
|||
else
|
||||
{
|
||||
$startInfo.Arguments = "-addsearchdir `"$localLinuxPerfWpaAddins`""
|
||||
Pause
|
||||
Exit
|
||||
}
|
||||
|
||||
Write-Host "Launching" $wpaProcess $startInfo.Arguments
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<AssemblyName>Cloud-InitMPTPlugin</AssemblyName>
|
||||
<RootNamespace>Cloud-InitMPTPlugin</RootNamespace>
|
||||
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<RootNamespace>DMesg</RootNamespace>
|
||||
<Authors>Microsoft</Authors>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<AssemblyName>WaLinuxAgent</AssemblyName>
|
||||
<RootNamespace>WaLinuxAgent</RootNamespace>
|
||||
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<AssemblyVersion>1.1.1.0</AssemblyVersion>
|
||||
<FileVersion>1.1.1.0</FileVersion>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<AssemblyVersion>1.1.1.0</AssemblyVersion>
|
||||
<FileVersion>1.1.1.0</FileVersion>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
22
README.md
22
README.md
|
@ -9,7 +9,7 @@
|
|||
> Tracing supported:
|
||||
- [LTTng](https://lttng.org) (Kernel CPU scheduling, Processes, Threads, Block IO/Disk, Syscalls, File events, etc)
|
||||
- [perf](https://perf.wiki.kernel.org/) CPU Sampling(cpu-clock)
|
||||
- [Perfetto](https://perfetto.dev/) Android & Chromium (CPU Scheduling, CPU Frequency, FTrace, Android Logs, Generic Events / Default Tracks)
|
||||
- [Perfetto](https://perfetto.dev/) Android & Chromium (CPU Scheduling, CPU Sampling, CPU Frequency, FTrace, Android Logs, Generic Events / Default Tracks, GPU Counters)
|
||||
|
||||
> Logs supported:
|
||||
- [Dmesg](https://en.wikipedia.org/wiki/Dmesg)
|
||||
|
@ -36,6 +36,8 @@ If you want to see a demo or get more in-depth info on using these tools check o
|
|||
# Download
|
||||
- **For plugins Download** see [Releases](https://github.com/microsoft/Microsoft-Performance-Tools-Linux/releases)
|
||||
|
||||
- **NuGet Pkgs** see [PerformanceToolkitPlugins](https://www.nuget.org/profiles/PerformanceToolkitPlugins)
|
||||
|
||||
- **(Windows Only GUI - Install)** Using the WPA GUI to load these tools as plugins
|
||||
- Download the latest Store [Windows Performance Analyzer (Preview)](https://www.microsoft.com/en-us/p/windows-performance-analyzer-preview/9n58qrw40dfw)
|
||||
|
||||
|
@ -43,7 +45,7 @@ If you want to see a demo or get more in-depth info on using these tools check o
|
|||
The tools can be run in several modes:
|
||||
|
||||
- **Cross-platform with .NET Core** (Any OS that .NET Core supports)
|
||||
- Used as a library to process traces / logs programatically
|
||||
- Used as a library to process traces / logs programatically in a .NET Core language like C#
|
||||
- Examples:
|
||||
- [LTTng 1](LTTngDriver/Program.cs), [LTTng 2](LTTngDataExtUnitTest/LTTngUnitTest.cs)
|
||||
- [Perf](PerfUnitTest/PerfUnitTest.cs)
|
||||
|
@ -61,25 +63,25 @@ The tools can be run in several modes:
|
|||
- -LinuxPerfToolsPluginFolder path may need to be specified if not auto-found correctly
|
||||
- In Command Prompt with -addsearchdir and -i trace file:
|
||||
```dos
|
||||
wpa.exe -addsearchdir %HOMEDRIVE%%HOMEPATH%\Downloads\Microsoft-Performance-Tools-Linux-Android-0.9\Microsoft-Performance-Tools-Linux-Android\MicrosoftPerfToolkitAddins -i c:\PATH\TO\lttng-kernel-trace.ctf
|
||||
wpa.exe -addsearchdir %HOMEDRIVE%%HOMEPATH%\Downloads\Microsoft-Performance-Tools-Linux-Android-1.2\Microsoft-Performance-Tools-Linux-Android\MicrosoftPerfToolkitAddins -i c:\PATH\TO\lttng-kernel-trace.ctf
|
||||
```
|
||||
- OR with Env Variable to pick file from UI (Env variable not currently working in current ADK version)
|
||||
- OR with Env Variable to pick file from UI
|
||||
```dos
|
||||
SET WPA_ADDITIONAL_SEARCH_DIRECTORIES=%HOMEDRIVE%%HOMEPATH%\Downloads\Microsoft-Performance-Tools-Linux-Android-0.9\Microsoft-Performance-Tools-Linux-Android\MicrosoftPerfToolkitAddins
|
||||
SET WPA_ADDITIONAL_SEARCH_DIRECTORIES=%HOMEDRIVE%%HOMEPATH%\Downloads\Microsoft-Performance-Tools-Linux-Android-1.2\Microsoft-Performance-Tools-Linux-Android\MicrosoftPerfToolkitAddins
|
||||
wpa.exe
|
||||
```
|
||||
- Optional Troubleshooting - Verify that this WPA version supports plugins
|
||||
- In Command Prompt - Example:
|
||||
```dos
|
||||
wpa.exe /?
|
||||
"C:\Program Files\WindowsApps\Microsoft.WindowsPerformanceAnalyzerPreview_10.0.22000.0_x64__8wekyb3d8bbwe\10\Windows Performance Toolkit\wpa.exe" /?
|
||||
"C:\Program Files\WindowsApps\Microsoft.WindowsPerformanceAnalyzerPreview_10.0.22504.0_x64__8wekyb3d8bbwe\10\Windows Performance Toolkit\wpa.exe" /?
|
||||
```
|
||||
- Verify that these 2 command line WPA options are supported:
|
||||
- OPTIONS: **-addsearchdir PATH**. Adds a directory path to the plugin search path. ....
|
||||
- ENVIRONMENT VARIABLES: **WPA_ADDITIONAL_SEARCH_DIRECTORIES** - A semicolon (;) delimited list of additional directories to search for plugins. Equivalent to the -addsearchdir option.
|
||||
- **(Windows) Command-line dumping to a text format** based on the WPA UI (say CSV) (wpaexporter.exe)
|
||||
```dos
|
||||
"C:\Program Files\WindowsApps\Microsoft.WindowsPerformanceAnalyzerPreview_10.0.22000.0_x64__8wekyb3d8bbwe\10\Windows Performance Toolkit\wpaexporter.exe" -addsearchdir PLUGIN_FOLDER -i traceFile
|
||||
"C:\Program Files\WindowsApps\Microsoft.WindowsPerformanceAnalyzerPreview_10.0.22504.0_x64__8wekyb3d8bbwe\10\Windows Performance Toolkit\wpaexporter.exe" -addsearchdir PLUGIN_FOLDER -i traceFile
|
||||
```
|
||||
|
||||
# How to capture a trace or logs
|
||||
|
@ -94,10 +96,10 @@ The tools can be run in several modes:
|
|||
# How to load the logs in the UI
|
||||
|
||||
- LTTng - If you just need to open only a LTTng trace by itself in folder format
|
||||
- WPA -> Open -> Folder (Select CTF folder)
|
||||
- Note: Requires >= 0.9 release AND WPA >= 10.6.20.1
|
||||
- WPA -> Open -> Folder -> (Select CTF folder)
|
||||
- Note: Requires >= 1.2 release AND WPA >= 10.6.20.1 (via WPA Help -> About)
|
||||
- Perfetto
|
||||
- WPA -> Open -> Folder (Select Perfetto trace file)
|
||||
- WPA -> Open -> (Select Perfetto trace file)
|
||||
- Note: The Perfetto plugin explicitly supports the _.perfetto-trace_ and _.pftrace_ file types, but it does support more (e.g. Protobuf, Chrome JSON). You just need to rename to one of the stated supported types
|
||||
- Unified (LTTng, Perfetto, or other multiple different logs files together)
|
||||
- Once you gather the data, there is a tiny bit of prep needed to open them in a single unified timeline (like the screenshot above)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.2</Version>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Company>Microsoft Corp.</Company>
|
||||
|
|
Загрузка…
Ссылка в новой задаче