-
Notifications
You must be signed in to change notification settings - Fork 752
Add Exception Stacks view when viewing a .nettrace with exceptions #2223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
src/PerfView/PerfViewData.cs
Outdated
|
|
||
| var stackSource = new MutableTraceEventStackSource(eventLog); | ||
| // EventPipe currently only has managed code stacks. | ||
| stackSource.OnlyManagedCodeStacks = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| stackSource.OnlyManagedCodeStacks = true; | |
| stackSource.OnlyManagedCodeStacks = !hasUniversalSystem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the setting to use !hasUniversalSystem to include native stacks when available, matching the ETL implementation behavior. Change implemented in commit 33fe190.
…salSystem Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
src/PerfView/PerfViewData.cs
Outdated
|
|
||
| var stackSource = new MutableTraceEventStackSource(eventLog); | ||
| // EventPipe currently only has managed code stacks. | ||
| stackSource.OnlyManagedCodeStacks = !hasUniversalSystem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| stackSource.OnlyManagedCodeStacks = !hasUniversalSystem; | |
| stackSource.OnlyManagedCodeStacks = !m_supportsProcesses; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use !m_supportsProcesses which provides a more comprehensive check that includes both system and CPU events, better aligning with the logic for determining stack information availability. Change implemented in commit 2604ed6.
…sUniversalSystem Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
|
Copilot Post-Mortem:
|
marklio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable
mconnew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
When collecting a trace using
dotnet-trace collect, the generated .nettrace file contains call stacks for any exceptions thrown. Previously, while users could see exception events in the Events view and find associated stacks in the Any Stacks view by time filtering, there was no dedicated Exception Stacks view like the one available for .etl files.This PR adds Exception Stacks view support for .nettrace files by porting the logic from the ETL implementation to the EventPipe implementation.
Changes Made
EventPipePerfViewData.OpenImpl()to set thehasExceptionsflagEventPipePerfViewData.OpenStackSourceImpl()that:MutableTraceEventStackSourcewith managed-only stacksExceptionStartevents"Throw(ExceptionType) ExceptionMessage"Implementation Details
The implementation follows the exact same pattern as the existing ETL exception handling to ensure consistency:
Users will now see the "Exceptions" stack source in the Advanced Group when opening .nettrace files that contain exception events, providing the same exception analysis capabilities available for .etl files.
Fixes #1797.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.