1

Does anybody know whether GC log below, "paused 1.439ms", means pause time on background thread that CMS is working on, or pause time on main thread?

I/art: Background sticky concurrent mark sweep GC freed 266189(12MB) AllocSpace objects, 0(0B) LOS objects, 14% free, 46MB/54MB, paused 1.439ms total 179.694m

Thanks a lot in advance!!

  • http://developer.android.com/tools/debugging/debugging-memory.html – Rohit Arya Feb 25 '16 at 07:08
  • https://source.android.com/devices/tech/dalvik/gc-debug.html – Doug Stevenson Feb 25 '16 at 07:10
  • Thanks guys for your comments. However, those posts do not mention whether the pause is the pause in main thread or worker thread – Kyungmin Lee Feb 25 '16 at 07:28
  • Did you check my [answer](http://stackoverflow.com/questions/35620473/android-in-art-garbage-collection-pause-time-indicates-main-thread-or-worker-thr/35790729#35790729)? – Rohit Arya Apr 14 '16 at 17:25
  • @RohitArya Hey Rohit, sorry for the late check up. So, are you saying that pause time are foreground call -- main thread pause time background call -- background thread pause time? But, even if you do the background GC, at first, you need to mark the lived heap resources, which is STOP THE WORLD operation. I wonder if the pause time showing on the log includes the first mark operation.. – Kyungmin Lee Apr 15 '16 at 23:26
  • @KyungminLee, yes you are right. – Rohit Arya Apr 16 '16 at 07:14

1 Answers1

2

There are two kind of GC pauses in ART:

1) In the log below Explicit concurrent mark sweep GC indicates foreground call.

I/art(801): Explicit concurrent mark sweep GC freed 65595(3MB) AllocSpace objects, 9(4MB) LOS objects, 810% free, 38MB/58MB, paused 1.195ms total 87.219ms

2) In the logs below Background partial concurrent mark sweep GC and Background sticky concurrent mark sweep GC indicate background call.

I/art(29197): Background partial concurrent mark sweep GC freed 74626(3MB) AllocSpace objects, 39(4MB) LOS objects, 1496% free, 25MB/32MB, paused 4.422ms total 1.371747s

I/art(29197): Background sticky concurrent mark sweep GC freed 70319(3MB) AllocSpace objects, 59(5MB) LOS objects, 825% free, 49MB/56MB, paused 6.139ms total 52.868ms

Hope this helps you out!

Rohit Arya
  • 6,751
  • 1
  • 26
  • 40