OSDN Git Service

Separately report thread suspension and garbage collection times.
authorCarl Shapiro <cshapiro@google.com>
Wed, 28 Jul 2010 00:25:31 +0000 (17:25 -0700)
committerCarl Shapiro <cshapiro@google.com>
Wed, 28 Jul 2010 00:25:31 +0000 (17:25 -0700)
commit03f3b1394cc8421d125fd00455858944f0e9808d
treea7288da4a1b71c837629a0ffe03e0331516f12ed
parenta70cba43c94c8cb4fa3c16ede868d9df8eb18458
Separately report thread suspension and garbage collection times.

The GC elapsed time written to the log used to be the sum of the time
spent suspending threads and the time spent executing the rest of the
garbage collector code.  With this change we account for each of these
phases separately.  With the concurrent GC, thread suspension can
dominate the GC pause times so breaking this number out gives a clear
picture of the efficiency of the underlying GC algorithm.

Also, accounting for the concurrent garbage collector is more
accurate.  The start and end times did not subtract the amount of time
spent during the concurrent mark.  The clock is now stopped and
restarted during the concurrent phase of the collector.

Change-Id: Icf3f8c0e183166a62ca1bf32fc77f17e3b5aa963
vm/Misc.h
vm/alloc/Heap.c
vm/alloc/HeapInternal.h