Bug 41428 - [profiler] Build libmono-profiler-log.dylib using bitcode-marker
Summary: [profiler] Build libmono-profiler-log.dylib using bitcode-marker
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: master
Hardware: PC Mac OS
: --- minor
Target Milestone: 10.0.0 (C8)
Assignee: Alex Rønne Petersen
URL:
Depends on:
Blocks:
 
Reported: 2016-06-01 10:54 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2016-09-12 15:53 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

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:
Status:
VERIFIED FIXED

Description Rolf Bjarne Kvinge [MSFT] 2016-06-01 10:54:06 UTC
Due to this: https://github.com/mono/mono/commit/cfd9870f8345d2e3e6354e3deebced443809ee2f Mono does no longer create any libmono-profiler-log.dylib when we're building a bitcode-capable runtime.

The problem is that this means we don't have the dylib even when we're not using the bitcode part of the runtime.

This means that we can't support incremental builds + profiling when using any bitcode-capable Mono runtime, even though we don't need the bitcode bits (because the user is building/profiling locally on his own devices).

So would it be possible to make the mono runtime build libmono-profiler-log.dylib without bitcode support? I believe this is done by building with -fembed-bitcode-marker.
Comment 1 Rodrigo Kumpera 2016-06-03 18:42:19 UTC
It would nice to fix that. But that won't get the profiler working on watchOS as it doesn't support coop.
Comment 2 Alex Rønne Petersen 2016-06-03 22:02:29 UTC
The big problem here was that libmono-profiler-log.dylib failed to build in the bitcode case because undefined references are not allowed there. That's why we now only build the static library in that case. I don't think -fembed-bitcode-marker would solve this problem.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2016-06-04 11:29:40 UTC
This affects tvOS as well, not just watchOS.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2016-06-06 08:44:49 UTC
Maybe it would be possible to embed the profiler inside libmonosngen-2.0.dylib (if enabled at configure time)? That should solve the undefined references.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2016-06-07 11:33:29 UTC
Embedding the profiler inside libmonosgen-2.0.dylib only makes sense for debug builds, but unfortunately we use the dylib for release builds as well (when renamed to Mono.framework/Mono).
Comment 6 Alex Rønne Petersen 2016-08-30 08:12:06 UTC
The linked commit has been reverted, so there should no longer be an issue. Marking this bug as resolved.