On 1/22/21 2:38 PM, Jan Hubicka wrote:
This looks like reasonable solution for Linux (i was thinking of it too) but I wonder what about setups w/o mmap support, like mingw32?
The code still uses malloc approach then.
I think we need some fallback there. I was wondering if simply disabling topn profiling until gcov_init time (where we seems to assume that malloc already works) would work in that case. We may lose some speculation during program construction, but that does not seem very bad...
This does not help you as we may still potentially call malloc during context when alternative allocator locks malloc/free functions. Note that situation is very rare and assuming mmap seems to me a reasonable. Martin