History log of /art/compiler/dex/mir_analysis.cc
Revision Date Author Comments
41b175aba41c9365a1c53b8a1afbd17129c87c14 19-May-2015 Vladimir Marko <vmarko@google.com> ART: Clean up arm64 kNumberOfXRegisters usage.

Avoid undefined behavior for arm64 stemming from 1u << 32 in
loops with upper bound kNumberOfXRegisters.

Create iterators for enumerating bits in an integer either
from high to low or from low to high and use them for
<arch>Context::FillCalleeSaves() on all architectures.

Refactor runtime/utils.{h,cc} by moving all bit-fiddling
functions to runtime/base/bit_utils.{h,cc} (together with
the new bit iterators) and all time-related functions to
runtime/base/time_utils.{h,cc}. Improve test coverage and
fix some corner cases for the bit-fiddling functions.

Bug: 13925192

(cherry picked from commit 80afd02024d20e60b197d3adfbb43cc303cf29e0)

Change-Id: I905257a21de90b5860ebe1e39563758f721eab82
2cebb24bfc3247d3e9be138a3350106737455918 22-Apr-2015 Mathieu Chartier <mathieuc@google.com> Replace NULL with nullptr

Also fixed some lines that were too long, and a few other minor
details.

Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
d7cbf8a6629942e7bd315ffae7e1c77b082f3e11 19-Mar-2015 Mathieu Chartier <mathieuc@google.com> Change RETURN_VOID_BARRIER to RETURN_VOID_NO_BARRIER

We want to default to having a barrier for the case where we don't
dex to dex.

Bug: 19762303
Change-Id: I60348d89eaf0b9e1e480298afcecbb5f52e8661b
e5f13e57ff8fa36342beb33830b3ec5942a61cca 24-Feb-2015 Mathieu Chartier <mathieuc@google.com> Revert "Revert "Add JIT""

Added missing EntryPointToCodePointer.

This reverts commit a5ca888d715cd0c6c421313211caa1928be3e399.

Change-Id: Ia74df0ef3a7babbdcb0466fd24da28e304e3f5af
a5ca888d715cd0c6c421313211caa1928be3e399 24-Feb-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Add JIT"

Sorry, run-test crashes on target:
0-05 12:15:51.633 I/DEBUG (27995): Abort message: 'art/runtime/mirror/art_method.cc:349] Check failed: PcIsWithinQuickCode(reinterpret_cast<uintptr_t>(code), pc) java.lang.Throwable java.lang.Throwable.fillInStackTrace() pc=71e3366b code=0x71e3362d size=ad000000'
10-05 12:15:51.633 I/DEBUG (27995): r0 00000000 r1 0000542b r2 00000006 r3 00000000
10-05 12:15:51.633 I/DEBUG (27995): r4 00000006 r5 b6f9addc r6 00000002 r7 0000010c
10-05 12:15:51.633 I/DEBUG (27995): r8 b63fe1e8 r9 be8e1418 sl b6427400 fp b63fcce0
10-05 12:15:51.633 I/DEBUG (27995): ip 0000542b sp be8e1358 lr b6e9a27b pc b6e9c280 cpsr 40070010
10-05 12:15:51.633 I/DEBUG (27995):

Bug: 17950037
This reverts commit 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.

Change-Id: I6f88849bc6f2befed0c0aaa0b7b2a08c967a83c3
2535abe7d1fcdd0e6aca782b1f1932a703ed50a4 17-Feb-2015 Mathieu Chartier <mathieuc@google.com> Add JIT

Currently disabled by default unless -Xjit is passed in.

The proposed JIT is a method JIT which works by utilizing interpreter
instrumentation to request compilation of hot methods async during
runtime.

JIT options:
-Xjit / -Xnojit
-Xjitcodecachesize:N
-Xjitthreshold:integervalue

The JIT has a shared copy of a compiler driver which is accessed
by worker threads to compile individual methods.

Added JIT code cache and data cache, currently sized at 2 MB
capacity by default. Most apps will only fill a small fraction of
this cache however.

Added support to the compiler for compiling interpreter quickened
byte codes.

Added test target ART_TEST_JIT=TRUE and --jit for run-test.

TODO:
Clean up code cache.
Delete compiled methods after they are added to code cache.
Add more optimizations related to runtime checks e.g. direct pointers
for invokes.
Add method recompilation.
Move instrumentation to DexFile to improve performance and reduce
memory usage.

Bug: 17950037

Change-Id: Ifa5b2684a2d5059ec5a5210733900aafa3c51bca
b666f4805c8ae707ea6fd7f6c7f375e0b000dba8 18-Feb-2015 Mathieu Chartier <mathieuc@google.com> Move arenas into runtime

Moved arena pool into the runtime.

Motivation:
Allow GC to use arena allocators, recycle arena pool for linear alloc.

Bug: 19264997
Change-Id: I8ddbb6d55ee923a980b28fb656c758c5d7697c2f
e4fcc5ba2284c201c022b52d27f7a1201d696324 13-Feb-2015 Vladimir Marko <vmarko@google.com> Clean up Scoped-/ArenaAlocator array allocations.

Change-Id: Id718f8a4450adf1608306286fa4e6b9194022532
0b9203e7996ee1856f620f95d95d8a273c43a3df 23-Jan-2015 Andreas Gampe <agampe@google.com> ART: Some Quick cleanup

Make several fields const in CompilationUnit. May benefit some Mir2Lir
code that repeats tests, and in general immutability is good.

Remove compiler_internals.h and refactor some other headers to reduce
overly broad imports (and thus forced recompiles on changes).

Change-Id: I898405907c68923581373b5981d8a85d2e5d185a
ffda4993af78484feb7a4ce5497c1796463c0ba1 18-Dec-2014 Vladimir Marko <vmarko@google.com> Clean up post-opt passes, perform only those we need.

Change-Id: If802074d780d91151d236ef52236b6f33ca47258
af6925b7fe5dc5a3c8d52ee3370e86e75400f873 31-Oct-2014 Vladimir Marko <vmarko@google.com> Rewrite GVN's field id and field type handling.

Create a helper unit for dex insn classification and cache
dex field type (as encoded in the insn) in the MirFieldInfo.
Use this for cleanup and a few additional DCHECKs.

Change the GVN's field id to match the field lowering info
index (MIR::meta::{i,s}field_lowering_info), except where
multiple indexes refer to the same field and we use the
lowest of the applicable indexes. Use the MirMethodInfo from
MIRGraph to retrieve field type for GVN using this index.
This slightly reduces GVN compilation time and prepares for
further compilation time improvements.

Change-Id: I1b1247cdb8e8b6897254e2180f3230f10159bed5
aaf29b32d1aefd10980820a67b2f36f168e68ca8 08-Nov-2014 Ian Rogers <irogers@google.com> Tidy some uses of IsCompilationEnabled.

We should be checking IsCompilationEnabled in the compiler, we wouldn't be in
the compiler were compilation disabled.

Change-Id: Ib498fb6d610e4ed517494df01efa4b64a8c12528
750359753444498d509a756fa9a042e9f3c432df 12-Sep-2014 Razvan A Lupusoru <razvan.a.lupusoru@intel.com> ART: Deprecate CompilationUnit's code_item

The code_item field is tracked in both the CompilationUnit and the MIRGraph.
However, the existence of this field in CompilationUnit promotes bad practice
because it creates assumption only a single code_item can be part of method.

This patch deprecates this field and updates MIRGraph methods to make it
easy to get same information as before. Part of this is the update to
interface GetNumDalvikInsn which ensures to count all code_items in MIRGraph.

Some dead code was also removed because it was not friendly to these updates.

Change-Id: Ie979be73cc56350321506cfea58f06d688a7fe99
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
584cc791cd0e352fb54ad54e72ba002a35dc758f 29-Sep-2014 Ian Rogers <irogers@google.com> Reduce scope of MIR analysis attributes.

MIR analaysis attributes are only used in MIRGraph::AnalyzeBlock. Reduce the
scope to just the file that defines that function.
Reduce the size of the attributes from int32 to int16.
Remove the use of #defines in favor of enums.

Change-Id: I45ba3aa08beae67240507917b584d537a029838e
e39c54ea575ec710d5e84277fcdcc049f8acb3c9 22-Sep-2014 Vladimir Marko <vmarko@google.com> Deprecate GrowableArray, use ArenaVector instead.

Purge GrowableArray from Quick and Portable.
Remove GrowableArray<T>::Iterator.

Change-Id: I92157d3a6ea5975f295662809585b2dc15caa1c6
88157efc1e16707d4ae10775d4acb15121c50fe7 12-Sep-2014 Nicolas Geoffray <ngeoffray@google.com> Add the "time" compilation filter and output compilation stats.

A "time" compiler filter means the compiler optimizes for
compile time.

Change-Id: Id1a207ceb2d95f3548aae5e45d51b80695da2029
b3a84e2f308b3ed7d17b8e96fc7adfcac36ebe77 28-Jul-2014 Lupusoru, Razvan A <razvan.a.lupusoru@intel.com> ART: Vectorization opcode implementation fixes

This patch fixes the implementation of the x86 vectorization opcodes.

Change-Id: I0028d54a9fa6edce791b7e3a053002d076798748
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
Signed-off-by: Philbert Lin <philbert.lin@intel.com>
b5bce7cc9f1130ab4932ba8e6917c362bf871f24 25-Jul-2014 Jean Christophe Beyler <jean.christophe.beyler@intel.com> ART: Add non-temporal store support

Added non-temporal store support as a hint from the ME.
Added the implementation of the memory barrier
extended instruction that supports non-temporal stores
by explicitly serializing all previous store-to-memory instructions.

Change-Id: I8205a92083f9725253d8ce893671a133a0b6849d
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
e1fa1dd6924e53d10fbf9a2d8d4f7aa4de2d7fc0 04-Aug-2014 Junmo Park <junmoz.park@samsung.com> Fix analysis_attributes_ to update missing definitions.

There are some missing definitions for supporting vector opcodes.

Change-Id: Ifcddb8b8b7d9a6e93902864488f61721e65da972
Signed-off-by: Junmo Park <junmoz.park@samsung.com>
2ab40eb3c23559205ac7b9b039bd749458e8a761 02-Jun-2014 Jean Christophe Beyler <jean.christophe.beyler@intel.com> ART: Add Invokes to DecodedInstruction

Add a method Invokes to test for the kInvoke flag.
Also moved IsPseudoMirOp to DecodedInstruction to use it for the various
querry methods.

Change-Id: I59a2056b7b802b8393fa2b0d977304d252b38c89
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
060e6febbe2db5e1d754d2743d6534b217d868fe 19-Jun-2014 Andreas Gampe <agampe@google.com> ART: Log information when skipping method during compilation

Add a reason for skipping a method to the log.

Change-Id: I3b31ee64cce6b531b25397f646cdfee650704ad6
8c7a02a7d6eab177b0d34b732522ea6dc491e131 14-Jun-2014 buzbee <buzbee@google.com> Quick compiler:interpret on type mismatch

The Dex specification is a bit loose - particularly in regards
to types. The Quick compiler, though, makes some assumptions
about types. In particular, it doesn't expect to encounter the
use of a long or double virtual register pair that was defined
by two independent 32-bit operations.

dx does not create such patterns (at least in recent memory).
However, at least one such case exists in the wild. The next
version of the Dex specification will add more type constraints
and formally disallow such cases. Meanwhile, existing code will
be handled by identifying these cases an reverting to interpretation
for the offending method.

Fix for internal b/15616104

Change-Id: Ibe9c423be9a952ff58cf8d985aa164885b8dd2ae
c1b643cc6ac45dbd0eabdcd7425c7e86006c27d6 31-May-2014 Calin Juravle <calin@google.com> Fixed and refactored profiler options handling

- extracted profiler options in a separate class
- switched from system property reading to command line arguments
- added profile based compilation options to CompilerOptions
- removed no longer used kProfile compilation filter
- optimize dex files only if the profiler is enabled
- clean up unused arguments

Bug: 12877748
Bug: 15275634
Change-Id: I37ff68e7694370950ce8db2360562e9058ecebb7
ffddfdf6fec0b9d98a692e27242eecb15af5ead2 03-Jun-2014 Tim Murray <timmurray@google.com> DO NOT MERGE

Merge ART from AOSP to lmp-preview-dev.

Change-Id: I0f578733a4b8756fd780d4a052ad69b746f687a9
35ba7f3a78d38885ec54e61ed060d2771eeceea7 31-May-2014 buzbee <buzbee@google.com> Quick compiler: fix array overrun.

MIRGraph::InlineCalls() was using the MIR opcode to recover
Dalvik instruction flags - something that is only valid for
Dalvik opcodes and not the set of extended MIR opcodes.

This is probably the 3rd or 4th time we've had a bug using
the MIR opcode in situations that are only valid for the Dalvik
opcode subset. I took the opportunity to scan the code for
other cases of this (didn't find any), and did some cleanup while
I was in the neighborhood.

We should probably rework the DalvikOpcode/MirOpcode model whenver we
get around to removing DalvikInstruction from MIR.

Internal bug b/15352667: out-of-bound access in mir_optimization.cc

Change-Id: I75f06780468880892151e3cdd313e14bfbbaa489
700a402244a1a423da4f3ba8032459f4b65fa18f 20-May-2014 Ian Rogers <irogers@google.com> Now we have a proper C++ library, use std::unique_ptr.

Also remove the Android.libcxx.mk and other bits of stlport compatibility
mechanics.

Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
507dfdd147c97bfbadebfd63584d094b6a4e7b47 16-May-2014 Ian Rogers <irogers@google.com> Compatibility layer to transition from UniquePtr to std::unique_ptr.

Use ART_WITH_STLPORT (enabled for the target) to cause the use of UniquePtr,
for the host switch to std::unique_ptr. For now the type remains called
UniquePtr.
Make dalvik compile with clang on the host, move its build to C++11.

Change-Id: I5ba8d2757904bc089ed62047ea03de3c0853fb12
69f08baaa4b70ce32a258f3da43cf12f2a034696 11-Apr-2014 Vladimir Marko <vmarko@google.com> Clean up ScopedArenaAllocatorAdapter.

Make the adapter equality-comparable, define aliases for
containers using the adapter and use those aliases.
Fix DebugStackIndirectTopRefImpl assignment.

Change-Id: I689aa8a93d169f63a659dec5040567d7b1343277
4a200f56b7075309316b04d550c9cc50f8314edd 01-Apr-2014 Jeff Hao <jeffhao@google.com> Add support for -Xverify:none mode.

This mode skips all verification and compilation.
Public bug: https://code.google.com/p/android/issues/detail?id=67664

Change-Id: Idd00ab8e9e46d129c02988b063c41a507e07bf5b
f096aad9203d7c50b2f9cbe1c1215a50c265a059 23-Jan-2014 Vladimir Marko <vmarko@google.com> Cache method lowering info in mir graph.

This should enable easy inlining checks. It should also
improve compilation time of methods that call the same
methods over and over - it is exactly such methods that
tend to exceed our 100ms time limit.

Change-Id: If01cd18e039071a74a1444570283c153429c9cd4
39c3bfbd03d85c63cfbe69f17ce5800ccc7d6c13 29-Jan-2014 Dave Allison <dallison@google.com> Make use of profiling information for dex2oat

If the profile file exists, the compiler driver will read it
and store the data in an internal map. Then, when we want to work
out whether to compile a method or not, the map is consulted and if
the method shows up with a high enough percentage of use we compile it.

The profile file itself is created by installd and is writeable by the
app. The file is in /data/dalvik-cache/profiles and is named by
the package name.

This also modifies the profiler itself to:

1. Only count runnable threads (not suspended threads) in the profile
2. Use system properties to allow tuning of the profile parameters
3. Merge profiles from multiple processes using file locking.

Bug: 12877748
Change-Id: Iab2f3a327a2860db2a80d5724277d6c626227f2b

Conflicts:
compiler/dex/frontend.cc
compiler/dex/mir_analysis.cc
compiler/dex/verification_results.cc
compiler/driver/compiler_driver.cc
dex2oat/dex2oat.cc
runtime/class_linker.cc
runtime/runtime.cc
runtime/runtime.h
a24122dc3aaa74b0385bb0ce30959f8a19c4a300 07-Mar-2014 Vladimir Marko <vmarko@google.com> Use ScopedArenaAllocator for CacheFieldLoweringInfo pass.

Change-Id: Idcc2edeb865e29b1bc42b108fc58a1f964295317
be0e546730e532ef0987cd4bde2c6f5a1b14dd2a 26-Feb-2014 Vladimir Marko <vmarko@google.com> Cache field lowering info in mir_graph.

Change-Id: I9f9d76e3ae6c31e88bdf3f59820d31a625da020f
b1f1d642093418612c0a27ce4203b421bb6eb767 27-Feb-2014 buzbee <buzbee@google.com> Workaround for range ops spanning vreg gap

The Dalvik runtime model includes two stacks: an interpreted stack
holding the Dalvik virtual registers, and a native stack used by
the runtime system itself. The interpreted stack closely follows
the Dalvik byte-code frame layout and invoke model, in which a
callee's incoming argument are physically located in the out region
of the caller's frame. Further, the non-argument vregs of a method
are contiguous with its in argument region.

The Art runtime model retains the notion of a callee's incoming
arguments being physically located in the out region of a caller's
frame. However, because Art uses a single-stack model, a method's
incoming argument region is not contiguous with its non-argument
virtual register storage. There is a gap between them that is used
to store the native return PC of the caller, as well as the callee
save register spill region.

The Dalvik's bytecode instruction set includes several "range"
format instructions (invoke-static-range, fill-array-data-range,
etc.). These instructions define a contiguous range of virtual
registers as arguments. Given the current Dalvik bytecode definition,
there is no rule preventing an operand range from spanning the
incoming argument and normal vregs. In Dalvik, this would not have
been an issue. In Art, it adds complexity to correctly copy a
range of arguments with a potential gap somewhere in the middle.

We don't believe this is a common situation. This workaround CL
ensures correct behavior by detecting the spanning case and falling
back to the interpreter.

If it turns out this is a more common case than expected, compiler
support can be added. More likely, though, is that we will disallow
spanning ranges in a future revision of the bytecode (going forward,
existing range-spanning bytecode will continue to be supported).

Fix for internal tracking bug 13216301
Fix for external bug https://code.google.com/p/android/issues/detail?id=66371

Change-Id: I9562aa5ab0aae8ebf333c8b72caac8a1be33ab3c
6449c62e40ef3a9bb75f664f922555affb532ee4 11-Feb-2014 Brian Carlstrom <bdc@google.com> Create CompilerOptions

Package up most compiler related options in CompilerOptions. Details include:
- Includes compiler filter, method thresholds, SEA IR mode.
- Excludes those needed during Runtime::Init such as CompilerCallbacks and VerificationResults.
- Pass CompilerOptions to CompilerDriver.
- Remove CompilerOptions from Runtime.
- Add ability to pass options for app and image dex2oat to runtime via
-Xcompiler-option and -Ximage-compiler-option respectively.

Other
- Replace 2x CompilerCallbacks implementations with one.
- Factor out execv code for use by both image and oat generation.
- More OatFile error_msg reporting.
- DCHECK for SuspendAll found trying to run valgrind.

Change-Id: Iecb57da907be0c856d00c3cd634b5042a229e620
9c86a0279aaf953377aa9e2277592e68bf814989 21-Feb-2014 Ian Rogers <irogers@google.com> Revert "Annotate used fields."

This reverts commit 7f6cf56942c8469958b273ea968db253051c5b05.

Change-Id: Ic389a194c3404ecb5bb563a405bf4a0d6336ea0d
7f6cf56942c8469958b273ea968db253051c5b05 29-Jan-2014 Vladimir Marko <vmarko@google.com> Annotate used fields.

Annotate all fields used by a method early during the
compilation, check acces rights and record field offset,
volatility, etc. Use these annotations when generating code
for IGET/IPUT/SGET/SPUT instructions.

Change-Id: I4bbf5cca4fecf53c9bf9c93ac1793e2f40c16b5f
5816ed48bc339c983b40dc493e96b97821ce7966 27-Nov-2013 Vladimir Marko <vmarko@google.com> Detect special methods at the end of verification.

This moves special method handling to method inliner
and prepares for eventual inlining of these methods.

Change-Id: I51c51b940fb7bc714e33135cd61be69467861352
0d82948094d9a198e01aa95f64012bdedd5b6fc9 12-Oct-2013 buzbee <buzbee@google.com> 64-bit prep

Preparation for 64-bit roll.
o Eliminated storing pointers in 32-bit int slots in LIR.
o General size reductions of common structures to reduce impact
of doubled pointer sizes:
- BasicBlock struct was 72 bytes, now is 48.
- MIR struct was 72 bytes, now is 64.
- RegLocation was 12 bytes, now is 8.
o Generally replaced uses of BasicBlock* pointers with 16-bit Ids.
o Replaced several doubly-linked lists with singly-linked to save
one stored pointer per node.
o We had quite a few uses of uintptr_t's that were a holdover from
the JIT (which used pointers to mapped dex & actual code cache
addresses rather than trace-relative offsets). Replaced those with
uint32_t's.
o Clean up handling of embedded data for switch tables and array data.
o Miscellaneous cleanup.

I anticipate one or two additional CLs to reduce the size of MIR and LIR
structs.

Change-Id: I58e426d3f8e5efe64c1146b2823453da99451230
b48819db07f9a0992a72173380c24249d7fc648a 15-Sep-2013 buzbee <buzbee@google.com> Compile-time tuning: assembly phase

Not as much compile-time gain from reworking the assembly phase as I'd
hoped, but still worthwhile. Should see ~2% improvement thanks to
the assembly rework. On the other hand, expect some huge gains for some
application thanks to better detection of large machine-generated init
methods. Thinkfree shows a 25% improvement.

The major assembly change was to establish thread the LIR nodes that
require fixup into a fixup chain. Only those are processed during the
final assembly pass(es). This doesn't help for methods which only
require a single pass to assemble, but does speed up the larger methods
which required multiple assembly passes.

Also replaced the block_map_ basic block lookup table (which contained
space for a BasicBlock* for each dex instruction unit) with a block id
map - cutting its space requirements by half in a 32-bit pointer
environment.

Changes:
o Reduce size of LIR struct by 12.5% (one of the big memory users)
o Repurpose the use/def portion of the LIR after optimization complete.
o Encode instruction bits to LIR
o Thread LIR nodes requiring pc fixup
o Change follow-on assembly passes to only consider fixup LIRs
o Switch on pc-rel fixup kind
o Fast-path for small methods - single pass assembly
o Avoid using cb[n]z for null checks (almost always exceed displacement)
o Improve detection of large initialization methods.
o Rework def/use flag setup.
o Remove a sequential search from FindBlock using lookup table of 16-bit
block ids rather than full block pointers.
o Eliminate pcRelFixup and use fixup kind instead.
o Add check for 16-bit overflow on dex offset.

Change-Id: I4c6615f83fed46f84629ad6cfe4237205a9562b4
56c717860df2d71d66fb77aa77f29dd346e559d3 06-Sep-2013 buzbee <buzbee@google.com> Compile-time tuning

Specialized the dataflow iterators and did a few other minor tweaks.
Showing ~5% compile-time improvement in a single-threaded environment;
less in multi-threaded (presumably because we're blocked by something
else).

Change-Id: I2e2ed58d881414b9fc97e04cd0623e188259afd2
fe9ca4028f379688ecba6132ac3738171176b3e4 21-Aug-2013 buzbee <buzbee@google.com> Compiler filter update

Tweak of the compiler filter to give better results for applications
which are not dominated by tight arithmetic loops. Deleted
the "DeferCompilation" setting - it didn't differ enough from the
"Space" setting. Added "Everything" setting to support forced
compilation (for images and testing). Previously used "Speed"
for that purpose, but in the speed setting there are some things we
don't want to compile.

Change-Id: Ia53b14f2044fc9738c1a4c1318f8204f2c25abe3
ee17e0aa4d24deb11c1766bfcc6a864519df1c1e 31-Jul-2013 buzbee <buzbee@google.com> Compilation filter

This CL introduces a static compilation filter mechanism intended
to allow us to reduce compilation time and space requirements until
we have a profiling mechanism in place.

It supports 5 modes of filtering:

o interpret-only (compile nothing)
o deferred-compilation (compile only those methods believe to be
compute-intensive)
o space (optimized for space)
o balanced (best return on space investment)
o speed (compile everything)

A future CL will allow the default filtering mode to be set
via system property. For now, you can pass it in via command
line as follows:

dalvikvm -compiler-filter:[interpret-only|defer-compilation|
space|balanced|speed]

or dex2oat --runtime-arg -compiler-filter:[one of the above modes]

Creating a file named art/SMALL_ART will force the filter
default to interpret-only. Later on we'll move this capability
to a persistent system property.

or modify kDefaultCompilerFilter in runtime.h

It also changes the compiler driver to allow the compilers to
decline to compile a method by return NULL.

Change-Id: Ic73411818f8bb845a4a19a05b0395c50902c534f
(cherry picked from commit a024a0686c3b0fea13f362bff70d65981e5febc5)
a024a0686c3b0fea13f362bff70d65981e5febc5 31-Jul-2013 buzbee <buzbee@google.com> Compilation filter

This CL introduces a static compilation filter mechanism intended
to allow us to reduce compilation time and space requirements until
we have a profiling mechanism in place.

It supports 5 modes of filtering:

o interpret-only (compile nothing)
o deferred-compilation (compile only those methods believe to be
compute-intensive)
o space (optimized for space)
o balanced (best return on space investment)
o speed (compile everything)

A future CL will allow the default filtering mode to be set
via system property. For now, you can pass it in via command
line as follows:

dalvikvm -compiler-filter:[interpret-only|defer-compilation|
space|balanced|speed]

or dex2oat --runtime-arg -compiler-filter:[one of the above modes]

Creating a file named art/SMALL_ART will force the filter
default to interpret-only. Later on we'll move this capability
to a persistent system property.

or modify kDefaultCompilerFilter in runtime.h

It also changes the compiler driver to allow the compilers to
decline to compile a method by return NULL.

Change-Id: Ic73411818f8bb845a4a19a05b0395c50902c534f