OSDN Git Service

Fix performance issues related to chaining and unchaining.
authorBen Cheng <bccheng@android.com>
Wed, 27 Jan 2010 00:46:15 +0000 (16:46 -0800)
committerBen Cheng <bccheng@android.com>
Wed, 3 Feb 2010 21:01:55 +0000 (13:01 -0800)
commit6999d84e2c55dc4a46a6c311b55bd5811336d9c4
tree809008af195a534bc5db4b9818a73d508e960903
parentb9126dddbc33bcc0467d753b0dc443296730c431
Fix performance issues related to chaining and unchaining.

1) Patching requests for predicted chaining cells (used by virtual/interface
methods) are now batched in a queue and processed when the VM is paused for GC.

2) When the code cache is full the reset operation is also conducted at the
end of GC pauses so this totally eliminates the need for the compiler thread
to issue suspend-all requests. This is a very rare event and when happening it
takes less than 5ms to finish.

3) Change the initial value of the branch in a predicted chaining cell from 0
(ie lsl r0, r0, #0) to 0xe7fe (ie branch to self) so that initializing a
predicted chaining cell doesn't need to suspend all threads. Together with 1)
seeing 20% speedup on some benchmarks.

4) Add TestCompability.c where defining "TEST_VM_IN_ECLAIR := true" in
buildspec.mk will activate dummy symbols needed to run libdvm.so in older
releases.

Bug: 2397689
Bug: 2396513
Bug: 2331313
18 files changed:
vm/Dvm.mk
vm/Globals.h
vm/TestCompability.c [new file with mode: 0644]
vm/Thread.c
vm/alloc/Heap.c
vm/compiler/Compiler.c
vm/compiler/Compiler.h
vm/compiler/codegen/CompilerCodegen.h
vm/compiler/codegen/arm/ArmLIR.h
vm/compiler/codegen/arm/Assemble.c
vm/compiler/codegen/arm/CodegenDriver.c
vm/interp/Jit.c
vm/mterp/armv5te/footer.S
vm/mterp/common/asm-constants.h
vm/mterp/out/InterpAsm-armv4t.S
vm/mterp/out/InterpAsm-armv5te-vfp.S
vm/mterp/out/InterpAsm-armv5te.S
vm/mterp/out/InterpAsm-armv7-a.S