OSDN Git Service

Add VMDebug.countInstancesOfClasses
authorMathieu Chartier <mathieuc@google.com>
Fri, 10 Jul 2015 20:19:51 +0000 (13:19 -0700)
committerMathieu Chartier <mathieuc@google.com>
Fri, 10 Jul 2015 23:31:08 +0000 (16:31 -0700)
commitf1820850307f7c2940c758f1232e1c40888a111a
treecb04d286428af5950f18d033ae84f8ea93f57df2
parenteaffe35038dc7b9e9e95ec997d32d19571973f54
Add VMDebug.countInstancesOfClasses

countInstancesOfClasses allows passing multiple classes unlike
countInstanceOfClass instead of needing to do one at a time.

This is going to be used to speed up string mode checking.

Also changed the logic to not do a GC, this was the old Dalvik
behavior. It is the job of the caller to do this.

Added test.

https://code.google.com/p/android/issues/detail?id=177552

Change-Id: Ia85684f40cf59a52aa71a8479c711a994651209b
runtime/gc/heap.cc
runtime/native/dalvik_system_VMDebug.cc
test/099-vmdebug/expected.txt
test/099-vmdebug/src/Main.java