-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d0f70e
commit d1194cc
Showing
3 changed files
with
75 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
uid: Uno.Wasm.Bootstrap.ProfiledAOTValidation | ||
--- | ||
|
||
# Troubleshooting Profiled AOT | ||
|
||
The .NET WebAssembly AOT compiler uses the AOT profile to determine which methods to compile to WebAssembly. In some cases, which may change depending on the .NET SDK version, selected methods may not be AOT compiled silently and may fall back to the interpreter. | ||
|
||
In such cases, the runtime performance of the app may become slower than expected. | ||
|
||
The bootstrapper provides a way to log the methods that were not AOT compiled, by setting the following property: | ||
|
||
```xml | ||
<PropertyGroup> | ||
<WasmShellAOTProfileValidation>true</WasmShellAOTProfileValidation> | ||
</PropertyGroup> | ||
``` | ||
|
||
## Assemblies filtering | ||
|
||
Assemblies may be skipped entirely from the validation using the following property: | ||
|
||
```xml | ||
<PropertyGroup> | ||
<WasmShellAOTProfileValidationExcludedAssemblies>$(WasmShellAOTProfileValidationExcludedAssemblies);System.*</WasmShellAOTProfileValidationExcludedAssemblies> | ||
</PropertyGroup> | ||
``` | ||
|
||
Entries in the `WasmShellAOTProfileValidationExcludedAssemblies` property are semi-colon separated regular expressions. | ||
|
||
## Methods filtering | ||
|
||
Specific methods may be skipped entirely from the validation using the following property: | ||
|
||
```xml | ||
<PropertyGroup> | ||
<WasmShellAOTProfileValidationExcludedMethods>$(WasmShellAOTProfileValidationExcludedMethods);MyNamespace.MyType.MyMethod.*</WasmShellAOTProfileValidationExcludedMethods> | ||
</PropertyGroup> | ||
``` | ||
|
||
Entries in the `WasmShellAOTProfileValidationExcludedMethods` property are semi-colon separated regular expressions. | ||
|
||
## Conditions when methods are not AOT compiled | ||
|
||
### Methods with try/finally blocks | ||
|
||
Methods with `try/finally` or `using()` blocks are not AOT compiled, because WebAssembly does not support the `finally` block in the same way as the .NET runtime. In this case, the .NET runtime switches to the interpreter. | ||
|
||
To reduce the impact of the interpreter, while still keep the try/finally block, moving the code from the inside of the `try` block to another method will improve performance. | ||
|
||
## Build Errors | ||
|
||
### UNOW0001 | ||
|
||
The following error may be raised: | ||
|
||
``` | ||
UNOW0001: Method XXX from YYY has not been AOTed, even if present in the AOT profile. | ||
``` | ||
|
||
This error is raised when the AOT profile requested a method to be AOT compiled, but was not. | ||
|
||
### UNOW0002 | ||
|
||
The following error may be raised: | ||
|
||
``` | ||
UNOW0002: The method XXX from YYY is not present in the assembly. | ||
``` | ||
|
||
This error generally means that there's a problem in the bootstrapper when matching methods from the compiled assemblies. If you find this specific error, please report it by opening an issue. |
This file contains 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
This file contains 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