aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/arm/ArchUtility.c
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2009-08-21 12:01:31 -0700
committerAndy McFadden <fadden@android.com>2009-08-21 12:01:31 -0700
commitc26bb63b50c7a855d25b396b1bf23a3aa6929b48 (patch)
tree44b5ba2c7090e567be5e3a6593a3dcd062375f9d /vm/compiler/codegen/arm/ArchUtility.c
parentecd3115415793a6d39d3092bbba569bad77eb765 (diff)
Move array pinning out of global references table.
We have to pin primitive arrays for certain JNI operations (it's that or return a copy of the contents). We don't move objects around in the virtual heap, so simply creating a global reference is enough to ensure the correct behavior of the calls. The global reference implementation is changing in a way that makes this approach inconvenient, so we now have a separate table for pinned primitive arrays. As a bonus, if GREF tracking is enabled, we will scan through the table when a pin entry is added. If there are 10 or more entries for the same array, a complaint is logged. This should allow us to find mismatched Get/Release sequences much more easily (before you had to wait until the global reference table exploded). We currently scan pin table entries at the same time as the JNI global references, so they'll still show up in hprof dumps as such. (Could also add a new Android-specific hprof root category, but that seems like more trouble than it's worth.)
Diffstat (limited to 'vm/compiler/codegen/arm/ArchUtility.c')
0 files changed, 0 insertions, 0 deletions