-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[runtime] Move xamarin_create_managed_ref internal call to managed co…
…de. (#11271) Move the xamarin_create_managed_ref internal call to managed code, to ease things with CoreCLR. In order to preserve performance, this wasn't a straight forward port. * monotouch_create_managed_ref used to detect if there already was a GCHandle for a native object. To avoid a managed->native transition, this logic has now been moved into the code that sets the GCHandle (the xamarinSetGCHandle:flags: / xamarin_set_gchandle_trampoline code), and these methods return a value saying whether the GCHandle was set or not. * xamarin_create_gchandle will check the retain count to determine whether to create a weak or a strong GCHandle for the managed object. In this particular case we should never need to create a strong GCHandle, which means that we don't need to check the retain count (saving a managed->native transition). Using the new perftest (#11298), I get very similar numbers for both old code and new code: https://gist.github.com/rolfbjarne/e0fc2ae0f21da15062b4f051138679af (multiple runs). Sometimes the old code is faster, sometimes the new code is faster (although the old code tends to be the one who wins). In any case there aren't any significant performance hits due to this change, so it should be good to go.
- Loading branch information
1 parent
9afd2aa
commit 5d42c93
Showing
8 changed files
with
77 additions
and
51 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
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
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
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
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
5d42c93
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.
❌ Tests failed on Build ❌
Tests failed on Build.
API diff
✅ API Diff from stable
View API diff
Packages generated
View packages
Test results
3 tests failed, 190 tests passed.
Failed tests
No test log file was produced)
Pipeline on Agent XAMBOT-1028
[runtime] Move xamarin_create_managed_ref internal call to managed code. (#11271)
5d42c93
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.
Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.
Pipeline on Agent
[runtime] Move xamarin_create_managed_ref internal call to managed code. (#11271)
5d42c93
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.
Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.
Pipeline on Agent
[runtime] Move xamarin_create_managed_ref internal call to managed code. (#11271)
5d42c93
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.
Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.
Pipeline on Agent
[runtime] Move xamarin_create_managed_ref internal call to managed code. (#11271)