Search code examples
javaandroidgarbage-collectiondalvik

Android 5: No more Garbage Collection message?


I know Dalvik is dead for Android 5 lollipop, which was replaced with ART, but where are the GC messages?

I need to see the heap size changes in the logcat!

I know that there is a tool in DDMS, where I can see the heap stats, but it's not developer friendly! Once the process is started, the whole application starts lagging, sometimes it's freezing.

Is there a way to see heap's update changes?


Solution

  • There are, but they are different.

    I/art ( 5258): GcCauseExplicit concurrent mark sweep GC freed 16(800B) AllocSpace objects, 1(16KB) LOS objects, 0% free, 27MB/28MB, paused 5.035ms total 39.367ms
    

    Make sure you have the right filter. Also, with ART not all heap messages are logged and garbage collection seems to happen far less frequently.