Unity 4.6.6, iOS, IL2CPP - Profiler shows GC Alloc of 0 for everything

Unless I’m really misunderstanding what is going on, there should be some GC allocation going on, no? Even a call to Instantiate has 0 GC Alloc reported.

Assuming there is GC allocation going on, how are people working through reducing their allocations? Is it just build in Mono, minimize the allocations and just assume that its the same in IL2CPP?

@bigdaddy

Trying things with Mono is likely the best approach now. Although IL2CPP allocation will be different, they should be similar.

We did have the IL2CPP allocations hooked up to the Unity profiler, but we ran into some unexpected additional overheard, so we backed out those hooks for the time being. They will come back when we can sort out the overhead issues.

@JoshPeterson Hi, any updates on this? Just tried 4.6.9p3 which should have GC profiling enabled, but it actually doesn’t work. Still reports 0 allocations.

@Peecha

Yes something must still be wrong here. We corrected one bug report (case 735880) where GC allocations were being missing in 4.6 versions. Can you submit a new bug report with the project you are seeing? This should be working, but obviously we missed something.

@JoshPeterson
Oh silly me, i thought i made build with the p3, but i tested it with old build… so i didn’t see any allocations.
Made fresh build and i can confirm it works!
Thanks, have a nice day :slight_smile:

@Peecha

Excellent! You had me worried that we had missed something really obvious. I’m glad it is working now!