- System requirements
- Profiler architecture
- Profiler installation
- Uninstall profiler
- Running the profiler
- Profiler activation
- Welcome screen
- Start profiling
- Profiling overhead
- Snapshots
- Solving performance problems
- CPU profiling
- Thread profiling
- Object allocation profiling
- Memory profiling
- Exception profiling
- Telemetry
- Probes: monitor higher level events
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Automatic deobfuscation
- Summary, automatic deobfuscation
- Filters
- Profiler command line
- Command line tool to control profiling
- Export of profiling results to external formats
- Profiler .NET API
- Profiler HTTP API
- Settings
- Troubleshooting
Exception profiling
Goals of exception profiling
Exceptions in .NET can be performance killers, especially when thrown and caught frequently. YourKit .NET Profiler captures data on exceptions that have been thrown and provides stack traces and other contextual information. This data allows you to identify exception-related bottlenecks, which can be especially useful for debugging or optimizing error-prone areas of your application.
Exception profiling helps to discover performance issues and logic errors. In most cases, there is no significant overhead of collecting this information. However, you may want to stop it in order to ensure minimum profiling overhead.
You can compare exception statistics of two snapshots with the help of File | Compare Snapshot with....
Controlling exception profiling
Profiler UI
When the profiler is connected to the profiled application, the toolbar contains the following exception profiling controls:
Toolbar Button | Description |
![]() ![]() |
Start/Stop exception profiling. |
![]() |
Clear exception profiling results. |
When exception profiling is started, previous results are cleared automatically.
Agent startup options
Exception profiling is enabled by default, but this can be adjusted with the following agent startup options:
-
exceptions=on
Immediately start the exception profiling. This is the default mode. -
exceptions=off
Do not immediately start the exception profiling that can instead be started later in runtime. -
exceptions=disable
Fully disable exception profiling and totally eliminate related overhead. The exception profiling will not be available.
HTTP API
For users requiring remote control or automation within their profiling workflows, YourKit .NET Profiler offers control over the exception profiling through HTTP API endpoints. The documentation outlines startExceptionProfiling, stopExceptionProfiling and resetExceptionProfiling methods available for this purpose.
.NET API
The YourKit .NET Profiler also provides a
.NET API
for deep integration with .NET applications.
The YourKit.Profiler.Api.Controller
includes methods for starting,
stopping, and resetting the exception profiling, similar to the toolbar buttons.
Exceptions tab
Exception profiling results can be analyzed from different perspectives:
- as Telemetry charts.
- as an Exception tree - All threads merged, with method exception counts in a single call tree.
- as an Exception tree - By thread, with method exception counts in call trees grouped by individual threads.
- as a Flame graph of thrown exceptions.