Bug 17319 - Another case of generic_trampoline being invoked repeatedly.
Summary: Another case of generic_trampoline being invoked repeatedly.
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: master
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Zoltan Varga
Depends on:
Reported: 2014-01-19 18:15 UTC by Miguel de Icaza [MSFT]
Modified: 2017-08-02 07:07 UTC (History)
5 users (show)

Is this bug a regression?: No
Last known good build:

Screenshot showing the hot spot. (503.17 KB, image/png)
2014-01-19 18:16 UTC, Miguel de Icaza [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Comment 1 Miguel de Icaza [MSFT] 2014-01-19 18:16:14 UTC
Created attachment 5869 [details]
Screenshot showing the hot spot.
Comment 2 Zoltan Varga 2014-01-26 01:35:21 UTC
The problem here is that we have to do some work before a delegate is first called, like invoke the cctor of the called method, check or all kinds of corner cases like remoting, synchronized methods, closed delegates etc. This can be done when the delegate is created or when its first called. Currently, we do it when it is first called. This has the advantage of being more lazy, but it also means that we suffer the overhead of the trampoline infrastructure, which is not designed to be called a lot of times.
Comment 3 Jon Goldberger [MSFT] 2017-07-25 00:09:21 UTC
Thanks so much for taking the time to submit this report! I attempted to reproduce this issue based on the bug description with the latest Xamarin.iOS, but the Classic API is now obsolete and XS and VS4M won't even start to build the project. If this issue is still occurring for you with the XI Unified API, please reopen this report and attach a project that reproduces the issue, ideally starting with a new template project and then adding just the code necessary to demonstrate the issue.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2017-08-01 08:34:01 UTC
Reopening based on comment #2.