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
Expose stack trace metadata stripping as a supported option #88235
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsCc @dotnet/ilc-contrib
|
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.
Just a thought — should we consider a different name than "StackTraceSupport" to make it easier to understand? I'm thinking that this name might make it look like you can "disable" stack traces entirely, which is not the case (since you still get them, just in a less nice way) 🤔
What about using a name similar to what .NET Native uses, but just changing it to use an affirmative form instead? That is: "EnableStackTraceMetadata". This would make it clearer that turning this off just strips additional stack trace metadata, but it's not like you can't use or see stack traces at all anymore 🙂
@@ -32,10 +32,6 @@ Native AOT supports enabling and disabling all [documented framework library fea | |||
|
|||
Since `PublishTrimmed` is implied to be true with Native AOT, some framework features such as binary serialization are disabled by default. |
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.
I assume that you are going to move this to https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/optimizing . Should we include a link to the official doc here?
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.
I'll delete this doc in a separate PR. I think we just need to pull out the part of the doc that talks about HW intrinsics and delete the rest. Everything else is redundant with the official docs.
@@ -32,10 +32,6 @@ Native AOT supports enabling and disabling all [documented framework library fea | |||
|
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.
I have noticed that the "By default, the compiler tries to maximize compatibility ..." paragraph above is outdated. You can delete it while you are on it.
@@ -34,7 +34,6 @@ The .NET Foundation licenses this file to you under the MIT license. | |||
|
|||
<!-- Set up the defaults for the compatibility mode --> |
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.
We do not have a thing called compatibility mode anymore. Delete this PropertyGround and change the IlcScanReflection condition polarity to imply the default?
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
Outdated
Show resolved
Hide resolved
We have considered naming it |
A slightly off-topic question: If I understand the If I am not mistaken default values for feature switches are somewhat configured in that fashion (depending on the target platform and the application type). |
Yes, we have opinionated defaults based on the app type. They should produce smallest size that is reasonable for given app type, balancing binary size, functionality, performance and diagnosability. It is up to the user to tune these defaults if they are not happy with them. |
$ ilc --help
...
-O, --optimize Enable optimizations
--optimize-space, --Os Enable optimizations, favor code space
--optimize-time, --Ot Enable optimizations, favor code speed
|
The idea is that we'd use the same feature switch for #34910 which also does something to stack traces, but different (affects IL-based trimming only whereas this one affects native-based trimming only). The docs will be vague enough that people will understand something will happen to stack traces, but what exactly is implementation-defined. We need to strike the right balance between having a billion options vs having a short enough list that people would be willing to read through it. The distinction is likely not meaningful.
|
This property was added in dotnet/runtime#88235.
Doc change at dotnet/docs#36080. |
Cc @dotnet/ilc-contrib