-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Regressions in Exceptions.Handling #84308
Comments
Run Information
Regressions in Exceptions.HandlingReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'Exceptions.Handling*' PayloadsHistogramExceptions.Handling.ThrowAndCatchDeepRecursive(kind: Hardware)
Description of detection logic
Exceptions.Handling.CatchAndThrowOtherDeep(kind: Hardware)
Description of detection logic
Exceptions.Handling.ThrowAndCatch(kind: ReflectionHardware)
Description of detection logic
Exceptions.Handling.MultipleNestedTryCatch_LastCatches(kind: Hardware)
Description of detection logic
Exceptions.Handling.MultipleNestedTryFinally(kind: Hardware)
Description of detection logic
Exceptions.Handling.CatchAndRethrowDeep(kind: Software)
Description of detection logic
Exceptions.Handling.ThrowAndCatch(kind: ReflectionSoftware)
Description of detection logic
Exceptions.Handling.CatchAndRethrowDeep(kind: Hardware)
Description of detection logic
Exceptions.Handling.ThrowAndCatchDeep(kind: ReflectionSoftware)
Description of detection logic
Exceptions.Handling.MultipleNestedTryCatch_FirstCatches(kind: Hardware)
Description of detection logic
Exceptions.Handling.ThrowAndCatch_ManyCatchBlocks(kind: ReflectionHardware)
Description of detection logic
Exceptions.Handling.ThrowAndCatchDeep(kind: Hardware)
Description of detection logic
Exceptions.Handling.ThrowAndCatchWhenFinally(kind: Software)
Description of detection logic
Exceptions.Handling.ThrowAndCatchDeepRecursive(kind: ReflectionSoftware)
Description of detection logic
Exceptions.Handling.ThrowAndCatch_ManyCatchBlocks(kind: ReflectionSoftware)
Description of detection logic
Exceptions.Handling.ThrowAndCatchDeepRecursive(kind: Software)
Description of detection logic
Exceptions.Handling.ThrowAndCatchDeepRecursive(kind: ReflectionHardware)
Description of detection logic
Exceptions.Handling.TryAndFinallyDeep(kind: Software)
Description of detection logic
Exceptions.Handling.TryAndFinallyDeep(kind: Hardware)
Description of detection logic
Exceptions.Handling.ThrowAndCatchWhen(kind: Hardware)
Description of detection logic
Exceptions.Handling.ThrowAndCatchDeep(kind: Software)
Description of detection logic
Exceptions.Handling.ThrowAndCatch_ManyCatchBlocks(kind: Hardware)
Description of detection logic
Exceptions.Handling.CatchAndThrowOtherDeep(kind: Software)
Description of detection logic
Exceptions.Handling.ThrowAndCatch_ManyCatchBlocks(kind: Software)
Description of detection logic
Exceptions.Handling.MultipleNestedTryCatch_FirstCatches(kind: Software)
Description of detection logic
Exceptions.Handling.ThrowAndCatchWhen(kind: Software)
Description of detection logic
Exceptions.Handling.ThrowAndCatch(kind: Software)
Description of detection logic
Exceptions.Handling.ThrowAndCatchFinally(kind: Hardware)
Description of detection logic
Exceptions.Handling.ThrowAndCatchWhenFinally(kind: Hardware)
Description of detection logic
Exceptions.Handling.TryAndCatchDeep_CaugtAtTheTop(kind: Hardware)
Description of detection logic
Exceptions.Handling.ThrowAndCatchFinally(kind: Software)
Description of detection logic
Exceptions.Handling.ThrowAndCatchDeep(kind: ReflectionHardware)
Description of detection logic
Exceptions.Handling.TryAndCatchDeep_CaugtAtTheTop(kind: Software)
Description of detection logic
DocsProfiling workflow for dotnet/runtime repository |
Regressed in #83784 cc @tannergooding |
@tannergooding, is this something you plan to look into for 8? |
I've done an experiment - adding custom copy constructor and assignment operator to the CONTEXT for amd64 and skipping copying of the ymm high / zmm registers based on the ContextFlags and XStateFeaturesMask of the source context. I can see 3..8% gain in the exception handling tests. |
Few months ago, a change to enable AVX512 on Unix was merged in. That change has enlarged the CONTEXT structure significantly and it was found that it has caused 6..17% regressions in exception handling microbenchmarks. This change gets some of the lost performance back by adding custom copy constructor and assignment operator to the CONTEXT structure and preventing copying of the AVX / AVX512 stuff if the source context doesn't have it. I have observed 3..9% gain on my machine. Close dotnet#84308
* Improve EH performance on Unix amd64 Few months ago, a change to enable AVX512 on Unix was merged in. That change has enlarged the CONTEXT structure significantly and it was found that it has caused 6..17% regressions in exception handling microbenchmarks. This change gets some of the lost performance back by adding custom copy constructor and assignment operator to the CONTEXT structure and preventing copying of the AVX / AVX512 stuff if the source context doesn't have it. I have observed 3..9% gain on my machine. Close #84308 * Fix gcc build and size for non-xstate case * Fix yet another gcc break * Fix build break * Revert the gcc fixes and disable the warning The zeroing of CONTEXT structure is used at too many places and it is valid, so rather than trying to modify all the places by using placement new, just disable the warning for gcc.
No description provided.
The text was updated successfully, but these errors were encountered: