The .NET continuous profiler builds on its previous parts by covering exceptions and lock contention profiling. The profiler fetches details on thrown exceptions, including exception type, thread ID, and message, using the `ICorProfilerCallback::ExceptionThrown` implementation and the `FrameStore`. To get the exception message, it uses a combination of metadata import, class layout, and field offset calculations. For lock contention, the profiler listens to CLR events, such as `ContentionStart` and `ContentionStop`, but these events are not yet supported for older versions of the .NET runtime. The profiler samples exceptions and lock contention events to minimize performance impact, using techniques like reservoir sampling and discrete PID controllers to control subsampling. It then upscales sampled values to provide estimates of real numbers, applying proportional ratios based on counts or durations. The goal is to provide a good statistical distribution of exception contexts and lock contention duration, allowing for accurate troubleshooting and analysis.