Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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

Discussion in 'iOS and tvOS' started by bigdaddy, Jun 30, 2015.

  1. bigdaddy

    bigdaddy

    Joined:
    May 24, 2011
    Posts:
    153
    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?
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @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.
     
  3. Peecha

    Peecha

    Joined:
    Dec 2, 2013
    Posts:
    22
    @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.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @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.
     
  5. Peecha

    Peecha

    Joined:
    Dec 2, 2013
    Posts:
    22
    @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 :)
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @Peecha

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