Bug 29608 - [Profiler] FullAOT allocation profiling won't work when managed allocator is used
Summary: [Profiler] FullAOT allocation profiling won't work when managed allocator is ...
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Alex Rønne Petersen
Depends on:
Reported: 2015-04-30 11:20 UTC by Rodrigo Kumpera
Modified: 2016-01-14 00:05 UTC (History)
6 users (show)

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 GitHub or Developer Community 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:

Description Rodrigo Kumpera 2015-04-30 11:20:26 UTC
Mono 4.2 under FullAOT (as with iOS) has now the ability to use the managed allocator.

The managed allocator doesn't handle profiling which means we can't do alloc profiling when it's been used.

For debug build profiling, we can disable it, for release builds it will require something else.

Vlad / Zoltan, is my understanding of 4.2 correct?
What should we do to address this?
Comment 1 Vlad Brezae 2015-04-30 19:09:06 UTC
We could have all the calls that go to the managed allocator through the plt and also have another allocator that just jit icalls to mono_object_new_specific. At runtime when we decode  MONO_WRAPPER_ALLOC, we just select the new allocator if the alloc profiling is enabled.
Comment 2 Zoltan Varga 2015-04-30 20:02:38 UTC
Why do we want to support allocation profiling in release mode ?
Comment 3 Rodrigo Kumpera 2015-05-01 11:47:12 UTC
The profiler team wants to support profiling release builds.

Another solution  is to rebuild the app for profiling which would disable the managed allocator.
Comment 4 Alex Rønne Petersen 2016-01-14 00:05:30 UTC
This is supported since this commit: https://github.com/mono/mono/commit/398b9e66b0cb10c55c02d77aec80148c73979bde