Conversation
Prefer ImageSize from ImageID events (PE SizeOfImage from trace merge) over kernel ImageGroup events (mapped view size with slack pages). The kernel can report a larger size than the PE header, causing exact-match failures for local binaries and wrong symbol server lookup keys (404s). Also add an approximate match fallback that accepts binaries with matching timestamp but different size when all exact matches fail, and correct the ImageSize before symbol server lookups when a local file with matching timestamp provides the real PE SizeOfImage.
upgrade TraceEvent from 3.1.28 to 3.1.30 Gets SourceLink wildcard/exact path mapping fix and SHA-384/SHA-512 PDB checksum support for newer .NET tooling.
Source server for Windows OS PDBs uses Azure DevOps, which requires Azure AD authentication. Previously only symweb URLs were authenticated, causing source downloads to receive an HTML sign-in page instead of source code. Reuse the existing Azure AD credential chain to provide Bearer tokens for *.visualstudio.com and dev.azure.com URLs.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves Profile Explorer’s ability to locate the correct binaries/symbols for ETW traces (especially when ETW-reported image sizes don’t match PE headers) and adds Azure DevOps (Azure AD) authentication support for source server downloads.
Changes:
- Prefer PE-header-derived
ImageSizefrom ETW ImageID events and add fallback binary matching when timestamps match but sizes differ. - Add a user setting + UI toggle (
AllowApproximateBinaryMatch) to enable/disable approximate binary matches. - Add an Azure DevOps auth handler to supply Bearer tokens for Azure DevOps source server URLs; bump TraceEvent to 3.1.30.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/ProfileExplorerUI/ProfileExplorerUI.csproj | Bumps TraceEvent dependency to 3.1.30. |
| src/ProfileExplorerUI/OptionsPanels/SymbolOptionsPanel.xaml | Exposes “Allow approximate binary match” as a UI setting. |
| src/ProfileExplorerCore/Settings/SymbolFileSourceSettings.cs | Adds persisted setting AllowApproximateBinaryMatch. |
| src/ProfileExplorerCore/Providers/ICompilerInfoProvider.cs | Extends BinaryFileSearchResult to mark approximate matches. |
| src/ProfileExplorerCore/ProfileExplorerCore.csproj | Bumps TraceEvent dependency to 3.1.30. |
| src/ProfileExplorerCore/Profile/ETW/ETWEventProcessor.cs | Uses ImageID’s ImageSize when available to improve symbol lookup keys. |
| src/ProfileExplorerCore/Binary/PEBinaryInfoProvider.cs | Adds size-correction + approximate matching logic when locating binaries. |
| src/ProfileExplorerCore/Binary/PDBDebugInfoProvider.cs | Adds Azure DevOps source authentication handler into the auth pipeline. |
| src/PDBViewer/PDBViewer.csproj | Bumps TraceEvent dependency to 3.1.30. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nt length Guard against ArgumentOutOfRangeException when an IRElement's text offset is beyond the current document length, which can happen when a preview popup references elements from a different document context.
The details string was reporting the on-disk ImageSize instead of the trace-requested ImageSize after overwriting binaryFile. Also cache the result under the original trace descriptor so lookups for the same trace module hit the cache instead of repeating the search.
jhpohovey
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves binary file matching and symbol server authentication in the Profile Explorer. Especially for Windows ETW traces where kernel-reported image sizes may differ from the PE header (random) and would cause dissassembly to not load. Implements Azure DevOps authentication for source server access. It also brings alterate source link support. Last it introduces fallback logic to use binaries with matching timestamps but different sizes, adds user-configurable options for approximate matches.
ETW event processing improvements:
Symbol server authentication enhancements:
AzureDevOpsSourceHandlerfor Azure AD authentication, enabling access to source server URLs hosted on Azure DevOps that require Bearer tokens. Integrated this handler into the authentication pipeline for symbol file retrieval. [1] [2] [3] [4]Dependency updates:
Microsoft.Diagnostics.Tracing.TraceEventNuGet package from version 3.1.28 to 3.1.30 across all relevant projects which has sourceLink support found in some pdbs necessary to fetch source code. [1] [2] [3]Binary file matching improvements:
Enhanced the binary search logic to allow approximate matches when a binary with a matching timestamp but different image size is found, addressing common issues where the kernel-reported image size differs from the PE header. This includes correcting the image size for symbol server lookups and providing detailed logging and warnings when approximate matches are used. [1] [2] [3] [4] [5] [6] [7]
Added a new setting
AllowApproximateBinaryMatchto theSymbolFileSourceSettingsclass, exposed in the UI, allowing users to enable or disable the use of approximate binary matches. [1] [2]