Skip to content

Sprinkle SuppressGCTransition across Unix shim P/Invokes - #39206

Merged
stephentoub merged 3 commits into
dotnet:masterfrom
stephentoub:suppressshims
Jul 16, 2020
Merged

stephentoub merged 3 commits into
dotnet:masterfrom
stephentoub:suppressshims

Conversation

@stephentoub

Copy link
Copy Markdown
Member

Did a quick audit and added it to all the trivial functions that just return a constant or return some static or map one value to another or such things.

@AaronRobinsonMSFT, can you help:

  1. Confirm that we actually want to do this, i.e. that it's beneficial even for functions invoked rarely or even once and worth any maintenance headache.
  2. That the ones I attributed look approriate.

Thanks.

@Dotnet-GitSync-Bot

Copy link
Copy Markdown
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@AaronRobinsonMSFT AaronRobinsonMSFT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P/Invokes that aren't inlinable don't benefit as much from SuppressGCTransition. This means that making the signature blittable is ideal. Some of the signatures below aren't so I don't think it is appropriate.

Did a quick audit and added it to all the trivial functions that just return a constant or return some static or map one value to another or such things.
@stephentoub

Copy link
Copy Markdown
Member Author

Thanks, @AaronRobinsonMSFT! Updated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants