From bbbe552a31f7229708bfc748480ce538218ae076 Mon Sep 17 00:00:00 2001 From: buzbee Date: Thu, 23 May 2013 13:53:50 -0700 Subject: JIT tuning; set cache size on command line The tuning knobs for triggering trace compilation for the JIT had not been revisited for several years. In that time, the working set of some applications have significantly increased, leading to frequent cache overlows & flushes. This CL adds the ability to set the maximum size of the JIT's cache on the command line, and we expect to use different settings depending on device configuration (rule of thumb: 1K for each 1M for system RAM, with 2M limit). Additionally, the trace compilation trigger has been tightened to limit the compilation of cold traces. Change-Id: Ice22c5d9d46a93e465c57dd83f50ca3912f1672e --- vm/compiler/codegen/arm/Assemble.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vm/compiler/codegen/arm/Assemble.cpp') diff --git a/vm/compiler/codegen/arm/Assemble.cpp b/vm/compiler/codegen/arm/Assemble.cpp index 7406d3e88..ac4e64c11 100644 --- a/vm/compiler/codegen/arm/Assemble.cpp +++ b/vm/compiler/codegen/arm/Assemble.cpp @@ -2148,6 +2148,8 @@ void dvmCompilerSortAndPrintTraceProfiles() } ALOGD("JIT: Average execution count -> %d",(int)(sum / numTraces)); + // How efficiently are we using code cache memory? Bigger is better. + ALOGD("JIT: CodeCache efficiency -> %.2f",(float)sum / (float)gDvmJit.codeCacheByteUsed); /* Dump the sorted entries. The count of each trace will be reset to 0. */ for (i=0; i < gDvmJit.jitTableSize; i++) { -- cgit v1.2.3