History log of /art/dex2oat/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c54e12a413e16f90526318f1f466a900a717fbb0 15-Oct-2014 Mathieu Chartier <mathieuc@google.com> Change MemMap::maps_ to not be global variable

Runtime.exit() was causing globals to get destructed at the same time
that another thread was using it for allocating a new mem map.

(cherry picked from commit 6e88ef6b604a7a945a466784580c42e6554c1289)

Bug: 17962201
Change-Id: I400cb7b8141d858f3c08a6fe59a02838c04c6962
ex2oat.cc
aa93129ca54cc897fdc2c8ddd0a7136f7b5632ed 24-Sep-2014 Brian Carlstrom <bdc@google.com> dex2oat should truncate files opened from file descriptors

Bug: 17622827
Change-Id: Iff7df6219d517d140f77d2585d32559b440ac497
ex2oat.cc
035592c51fee2995a3d90a9043f91a7a3128df2b 17-Sep-2014 Andreas Gampe <agampe@google.com> ART: Sync oat file to disk before patching

Bug: 15567083, 17439961, 17510489, 17478752
Change-Id: I828dc6775044b5050c2520eb097abe6a920fd3ee
ex2oat.cc
afa6b8e93a0dc0de33c9d404945c7c5621e20b1a 13-Sep-2014 Andreas Gampe <agampe@google.com> ART: Make elf loading not abort

Changes elf_file code to use less CHECKs and instead return error
values (usually nullptr). This avoids aborts.

In oat_file, when loading an oat file fails, try to unlink at. If
this succeeds, on the next run we may compile again.

Bug: 17491333
Change-Id: I50fdd2edacd86f25d4dacf2180ce2a6105eaf4af
ex2oat.cc
0bff4f375d8013a4a59cf70b3427fb461a17e6de 10-Sep-2014 Mathieu Chartier <mathieuc@google.com> Increase dex2oat timeouts for debug builds

Should fix the 056-const-string-jumbo test.

Change-Id: I04d98dfd59003b964c1feee6eee31079f9f4a476
ex2oat.cc
c739de01b905729b8587003a52a55b62358e979d 13-Aug-2014 Ian Rogers <irogers@google.com> Merge "Avoid use of std::string where we have const char*." into lmp-dev
cb6b0f31ede2275e79e6199ec391147585a37a2a 12-Aug-2014 Ian Rogers <irogers@google.com> Avoid use of std::string where we have const char*.

Removing the ClassHelper caused std::string creation for all calls to
Class::GetDescriptor and a significant performance regression. Make the
std::string an out argument so the caller can maintain it and its life time
while allowing GetDescriptor to return the common const char* case.

Don't generate GC maps when compilation is disabled.

Remove other uses of std::string that are occuring on critical paths.
Use the cheaper SkipClass in CompileMethod in CompilerDriver.
Specialize the utf8 as utf16 comparison code for the common shorter byte
encoding.
Force a bit of inlining, remove some UNLIKELYs (they are prone to pessimizing
code), add some LIKELYs.

x86-64 host 1-thread interpret-only of 57 apks:
Before: 29.539s
After: 23.467s

Regular compile:
Before: 1m35.347s
After: 1m20.056s

Bug: 16853450
Change-Id: Ic705ea24784bee24ab80084d06174cbf87d557ad

Conflicts:
runtime/utils.cc
ex2oat.cc
b0f05b9654eb005bc8c8e15f615a7f5a312f640c 17-Jul-2014 Dave Allison <dallison@google.com> Add implicit checks for x86_64 architecture.

This combines the x86 and x86_64 fault handlers into one. It also
merges in the change to the entrypoints for X86_64.

Replaces generic instruction length calculator with one that only
works with the specific instructions we use.

Bug: 16256184

Change-Id: I1e8ab5ad43f46060de9597615b423c89a836035c
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
ex2oat.cc
b28a16147f5b3503d9ca9e95ff56bdeb449e17d6 17-Jul-2014 Andreas Gampe <agampe@google.com> ART: Turn on dex2oat watchdog on target

Activates the watchdog on device.

Bug: 16364458

(cherry picked from commit bf40ddb83e1ea05ba4bc101149cd79f0160c8996)

Change-Id: I06deafa4436991f07bce44ecc6fd9df333f905ee
ex2oat.cc
7204c04dd86ae8ce05690e38737b2abf017a0a69 11-Jun-2014 Stuart Monteith <stuart.monteith@arm.com> AArch64: Implicit StackOverflow/NPE/Suspend checks.

This implements implicit stack overflow checks and null pointer exceptions
for AArch64. Suspend checks are implemented but not switched on yet.

Bug: 16256184
Change-Id: I2eb076f2c0c9d94793d5a898fea49cf409b4eb66
Signed-off-by: Stuart Monteith <stuart.monteith@arm.com>
ex2oat.cc
a62a588a9202f69e53fbeb3045ea8ea5ec2587f8 28-Apr-2014 Jim_Guo <jim_guo@htc.com> ART: Fix memory unmapped twice issue in ElfFile::Load(bool)

Root Cause:
The overlapped memory region will be unmapped by
(1) ~MemMap() of reservation MemMap (reserve) and
(2) ~MemMap() of "reuse" MemMap (segment).
Someone takes the memory region after (1) and it will be unmapped in (2).
So, SIGSEGV occurs when using the unmapped memory region.

Solution:
Fixes this issue by skip unmap "reuse" MemMap in destructor.
And always create reservation MemMap before "reuse" MemMap. (It also solved
the fixupELF case which does not reserve the whole needed memory region).

Bug: 16486685
Change-Id: I8f2538861d5c3fa7b9a04d2c3f516319cc060291
ex2oat.cc
cf4bf386ef3f527825c70e01130b9276da4f786a 24-Jul-2014 Alex Light <allight@google.com> Tweaks to patchoat and other related things.

Removed some flags from patchoat that were poorly specified and fixed
some other issues with the relocation system.

Bug: 15358152

Change-Id: Ia6d47b1a008f02373307d833ba45f00ea408d76f
ex2oat.cc
a59dd80f9f48cb750d329d4d4af2d99d72b484d1 03-Jul-2014 Alex Light <allight@google.com> Runtime can now be set to require relocation

Add a pair of runtime flags -Xrelocate and -Xnorelocate that can force
the runtime to require that all files that are run are relocated, to
prevent attacks based on the known art base address.

Add support for running patchoat on oat files compiled without an image.

Change run-test to have new --prebuild and --relocate flags.

Bug: 15358152

Change-Id: I91166c62dd1ab80e5cbcb7883a2cd0d56afca32d
ex2oat.cc
69dfe51b684dd9d510dbcb63295fe180f998efde 11-Jul-2014 Dave Allison <dallison@google.com> Revert "Revert "Revert "Revert "Add implicit null and stack checks for x86""""

This reverts commit 0025a86411145eb7cd4971f9234fc21c7b4aced1.

Bug: 16256184
Change-Id: Ie0760a0c293aa3b62e2885398a8c512b7a946a73
ex2oat.cc
22d5e735f403c57525fe868304c7123f0ce66399 16-Jul-2014 Ian Rogers <irogers@google.com> Remove object_utils.h.

Break into object_lock, field_helper and method_helper.
Clean up header files following this.
Also tidy some of the Handle code in response to compiler errors when resolving
the changes in this CL.

Change-Id: I73e63015a0f02a754d0866bfaf58208aebcaa295
ex2oat.cc
e63db27db913f1a88e2095a1ee8239b2bb9124e8 16-Jul-2014 Ian Rogers <irogers@google.com> Break apart header files.

Create libart-gtest for common runtime and compiler gtest routines.
Rename CompilerCallbacksImpl that is quick compiler specific.
Rename trace clock source constants to not use the overloaded profiler term.

Change-Id: I4aac4bdc7e7850c68335f81e59a390133b54e933
ex2oat.cc
22f8e5c82d12951be38cd893426e13bee33fd69d 09-Jul-2014 Andreas Gampe <agampe@google.com> Revert "Revert "ART: Key-Value Store in Oat header""

This reverts commit 452bee5da9811f62123978e142bd67b385e9ff82.

Heap-allocate a couple of objects in dex2oat to avoid large frame
size.

Includes fixes originally in 100596 and 100605.

Change-Id: Id51a44198c973c91f0a3f87b9d992a5dc110c6f8
ex2oat.cc
4e99b3d8955131f3fc71aa113f0fa71f0092cb6f 24-Jun-2014 Sebastien Hertz <shertz@google.com> Add missing class initialization during compilation and tests

Adds missing class initialization during compilation and tests, especially
java.lang.Class. Otherwise, we'd be able to execute code while the referring
class is not initialized or initializing.

Also adds mirror::Class::AssertInitializedOrInitializingInThread method to
check class initialization when entering the interpreter: the called method's
declaring class must either be initialized or be initializing by the current
thread (other threads must be waiting for the class initialization to complete
holding its lock). Note we only do this check in debug build.

Bump oat version to force compilation.

Bug: 15899971
Change-Id: I9a4edd3739a3ca4cf1c4929dcbb44cdf7a1ca1fe
ex2oat.cc
3d14eb620716e92c21c4d2c2d11a95be53319791 10-Jul-2014 Dave Allison <dallison@google.com> Revert "Add implicit null and stack checks for x86"

It breaks cross compilation with x86_64.

This reverts commit 34e826ccc80dc1cf7c4c045de6b7f8360d504ccf.

Change-Id: I34ba07821fc0a022fda33a7ae21850957bbec5e7
ex2oat.cc
34e826ccc80dc1cf7c4c045de6b7f8360d504ccf 29-May-2014 Dave Allison <dallison@google.com> Add implicit null and stack checks for x86

This adds compiler and runtime changes for x86
implicit checks. 32 bit only.

Both host and target are supported.
By default, on the host, the implicit checks are null pointer and
stack overflow. Suspend is implemented but not switched on.

Change-Id: I88a609e98d6bf32f283eaa4e6ec8bbf8dc1df78a
ex2oat.cc
452bee5da9811f62123978e142bd67b385e9ff82 09-Jul-2014 Nicolas Geoffray <ngeoffray@google.com> Revert "ART: Key-Value Store in Oat header"

Broke arm64 build.

This reverts commit c87d27b25994da8670d82a8f7bad6327b693bfff.

Change-Id: I4c2ade295d2b5aa77fc3ad810e0e859629a5bf09
ex2oat.cc
c87d27b25994da8670d82a8f7bad6327b693bfff 27-Jun-2014 Andreas Gampe <agampe@google.com> ART: Key-Value Store in Oat header

Allows the storage of string-string pairs in the oat header. The
first significant use of this is storing the implicit-check flags,
so that an oat file can be rejected if it doesn't agree with the
current runtime.

Bump the oat version as the header structure changes.

Change-Id: I15a1c16886e6b8fa7b881c918c19c1efa5c7c00f
ex2oat.cc
53cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3c 12-Jun-2014 Alex Light <allight@google.com> Add patchoat tool to Art.

Add a new executable called patchoat to art. This tool takes already
compiled images and oat files and changes their base address, acting as
a cheap form of relocation.

Add a --include-patch-information flag to dex2oat and code to add
required patch information to oat files created with the quick compiler.

Bug: 15358152

Change-Id: Ie0c580db45bb14ec180deb84930def6c3628d97d
ex2oat.cc
44c5ee7a14bde25207032ac7c2427e8629b8ff42 02-Jul-2014 Calin Juravle <calin@google.com> Relax limits for profiler based compilation options.

Change-Id: I57a7b11588f5c5b5f12217239ecf58f59ae02e2b
ex2oat.cc
f9872f0b5f713af867b4e32e647a1b92f94fb01a 02-Jul-2014 Andreas Gampe <agampe@google.com> ART: Fix size error reported by ARM64 backend

Also removes a spurious LOG in dex2oat.

Change-Id: Ia264fbfb3cb8d59978f3a61e814eb6940e272ece
ex2oat.cc
3470ab4011b5e18d590d5375e2f13a1e3bd69222 18-Jun-2014 Alex Light <allight@google.com> Fixed gdb support and added some ElfFile functions

Fixed gdb support so that it would continue working even when debug
symbols or other sections are included in the elf file. Also made it
actually read parts of the DWARF information so it should work even if
there are minor changes to how and where DWARF information is written
out.

Added a dwarf.h file with the dwarf constants.

Added a FindSectionByName function, a FindDynamicSymbol function, and
the ability to specify the mmap protection and flags directly if we are
mapping in the whole file.

Modified elf_writer_quick.cc to use the dwarf constants from dwarf.h.

Change-Id: I09e15c425fab252b331a2e4719863552e8b6b137
ex2oat.cc
2db3e269e3051dacb3c8a4af8f03fdad9b0fd740 26-Jun-2014 Douglas Leung <douglas@mips.com> Fix quick mode bugs for Mips.

This patch enable quick mode for Mips and allows the emulator to boot.
However the emulator is still not 100% functional. It still have problems
launching some apps.

Change-Id: Id46a39a649a2fd431a9f13b06ecf34cbd1d20930
Signed-off-by: Douglas Leung <douglas@mips.com>
ex2oat.cc
833a48501d560c9fa7fc78ef619888138c2d374f 22-May-2014 Andreas Gampe <agampe@google.com> ART: Native support for multidex

Native support for zip files with multiple classesX.dex.

Works by explicitly looking for those files in ascending order. As
these files have no file system representation for themselves,
introduce synthetic dex locations: the name of the originating file
plus a colon plus the name of the dex file, e.g., test.jar:classes2.dex.

Opening a zip dex file will return all dex files in this way. This
keeps the changes to dex2oat minimal.

To hide multidex/synthetic names from the Java layer, let the handle
of dalvik.system.DexFile refer to a vector of DexFile objects. When
opening a location, test possible synthetic names and add them to the
vector. Thus, the original multidex jar in the classpath will be
associated with all embedded dex files.

Change-Id: I0de107e1369cbc94416c544aca3b17525c9eac8b
ex2oat.cc
f5997b4d3f889569d5a2b724d83d764bfbb8d106 20-Jun-2014 Mathieu Chartier <mathieuc@google.com> More advanced timing loggers.

The new timing loggers have lower overhead since they only push into
a vector. The new format has two types, a start timing and a stop
timing. You can thing of these as brackets associated with a
timestamp. It uses these to construct various statistics when needed,
such as: Total time, exclusive time, and nesting depth.

Changed PrettyDuration to have a default of 3 digits after the decimal
point.

Exaple of a GC dump with exclusive / total times and indenting:
I/art (23546): GC iteration timing logger [Exclusive time] [Total time]
I/art (23546): 0ms InitializePhase
I/art (23546): 0.305ms/167.746ms MarkingPhase
I/art (23546): 0ms BindBitmaps
I/art (23546): 0ms FindDefaultSpaceBitmap
I/art (23546): 0ms/1.709ms ProcessCards
I/art (23546): 0.183ms ImageModUnionClearCards
I/art (23546): 0.916ms ZygoteModUnionClearCards
I/art (23546): 0.610ms AllocSpaceClearCards
I/art (23546): 1.373ms AllocSpaceClearCards
I/art (23546): 0.305ms/6.318ms MarkRoots
I/art (23546): 2.106ms MarkRootsCheckpoint
I/art (23546): 0.153ms MarkNonThreadRoots
I/art (23546): 4.287ms MarkConcurrentRoots
I/art (23546): 43.461ms UpdateAndMarkImageModUnionTable
I/art (23546): 0ms/112.712ms RecursiveMark
I/art (23546): 112.712ms ProcessMarkStack
I/art (23546): 0.610ms/2.777ms PreCleanCards
I/art (23546): 0.305ms/0.855ms ProcessCards
I/art (23546): 0.153ms ImageModUnionClearCards
I/art (23546): 0.610ms ZygoteModUnionClearCards
I/art (23546): 0.610ms AllocSpaceClearCards
I/art (23546): 0.549ms AllocSpaceClearCards
I/art (23546): 0.549ms MarkRootsCheckpoint
I/art (23546): 0.610ms MarkNonThreadRoots
I/art (23546): 0ms MarkConcurrentRoots
I/art (23546): 0.610ms ScanGrayImageSpaceObjects
I/art (23546): 0.305ms ScanGrayZygoteSpaceObjects
I/art (23546): 0.305ms ScanGrayAllocSpaceObjects
I/art (23546): 1.129ms ScanGrayAllocSpaceObjects
I/art (23546): 0ms ProcessMarkStack
I/art (23546): 0ms/0.977ms (Paused)PausePhase
I/art (23546): 0.244ms ReMarkRoots
I/art (23546): 0.672ms (Paused)ScanGrayObjects
I/art (23546): 0ms (Paused)ProcessMarkStack
I/art (23546): 0ms/0.610ms SwapStacks
I/art (23546): 0.610ms RevokeAllThreadLocalAllocationStacks
I/art (23546): 0ms PreSweepingGcVerification
I/art (23546): 0ms/10.621ms ReclaimPhase
I/art (23546): 0.610ms/0.702ms ProcessReferences
I/art (23546): 0.214ms/0.641ms EnqueueFinalizerReferences
I/art (23546): 0.427ms ProcessMarkStack
I/art (23546): 0.488ms SweepSystemWeaks
I/art (23546): 0.824ms/9.400ms Sweep
I/art (23546): 0ms SweepMallocSpace
I/art (23546): 0.214ms SweepZygoteSpace
I/art (23546): 0.122ms SweepMallocSpace
I/art (23546): 6.226ms SweepMallocSpace
I/art (23546): 0ms SweepMallocSpace
I/art (23546): 2.144ms SweepLargeObjects
I/art (23546): 0.305ms SwapBitmaps
I/art (23546): 0ms UnBindBitmaps
I/art (23546): 0.275ms FinishPhase
I/art (23546): GC iteration timing logger: end, 178.971ms

Change-Id: Ia55b65609468f212b3cd65cda66b843da42be645
ex2oat.cc
b03a0ec8cf841bf49d2e146e140cb3ca21eca752 24-Jun-2014 Alex Light <allight@google.com> Fixed ImageWriter timings not being written out.

During host runs of dex2oat the timings for ImageWriter would not be
written out.

Change-Id: I74ce8bae724d1e732a6a1efb1c82804473081693
ex2oat.cc
ca3aabac5748c256c42839dd16e8c80a09d99a48 23-Jun-2014 Dave Allison <dallison@google.com> Fix implicit check option handling for non-cross-compiles

This fixes an issue where the compiler was not being told to
generate implicit checks but the runtime was expecting them.

Bug: 15747876
Change-Id: I65e7475bac245c44d5094eb666d67bc1af327ab1
ex2oat.cc
5c1ad33701beac62afbfb144bb6f52755503c9f2 22-Jun-2014 Ian Rogers <irogers@google.com> Merge "Use command line android root in dex2oat to find image."
9cad72d80603b3ff59be66b2cffd3f6dcbd9947f 20-Jun-2014 buzbee <buzbee@google.com> Quick compiler: enable Arm64 compilation

Change-Id: I19058defaff1c60b4b6b4d1ad82e0a42d50506a6
ex2oat.cc
4f975b9e2cb7eb50db27093eaa842b7400e52834 19-Jun-2014 Bill Buzbee <buzbee@android.com> Merge "x86_64: Enable core.oat/boot.oat compilation"
0c416fe40f675a3bff4d8cfb591d66fb69b73958 13-Jun-2014 Dmitry Petrochenko <dmitry.petrochenko@intel.com> x86_64: Enable core.oat/boot.oat compilation

This patch enabled compilation of image.

Change-Id: Idacce4a3898964d3a05762925dba236d7254a254
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
ex2oat.cc
5655e84e8d71697d8ef3ea901a0b853af42c559e 18-Jun-2014 Andreas Gampe <agampe@google.com> ART: Implicit checks in the compiler are independent from Runtime

When cross-compiling, those flags are independent. This is an
initial CL that helps bypass fatal failures when cross-compiling,
as not all architectures support (and have turned on) implicit
checks.

The actual transport for the target architecture when it is
different from the runtime needs to be implemented in a follow-up
CL.

Bug: 15703710
Change-Id: Idc881a9a4abfd38643b862a491a5af9b8841f693
ex2oat.cc
33ae5583bdd69847a7316ab38a8fa8ccd63093ef 12-Jun-2014 buzbee <buzbee@google.com> Arm64 hard-float

Basic enabling of hard-float for Arm64. In future CLs we'll
consolidate the various targets - there is a lot of overlap.

Compilation remains turned off in this CL, but I expect
to enable a subset shortly. With compilation fully enabled
(including the EXPERIMENTAL opcodes with the exception of
REM and THROW), we get the following run-test results:

003-omnibus-opcode failures:
Classes.checkCast
Classes.arrayInstance
UnresTest2
Haven't gone deep, but these appear to be related to throw/catch and/or
stacktrace.

For REM, the generated code looks reasonable to me - my guess is that
we've got something wrong on the transition to the runtime. Haven't
looked deeper yet, though.

The bulk of the other failure also appear to be related to transitioning
to the runtime system, or handling try/catch.

run-test status:
Status with optimizations disabled, REM_FLOAT/DOUBLE and THROW disabled:
succeeded tests: 94
failed tests: 22
failed: 003-omnibus-opcodes
failed: 004-annotations
failed: 009-instanceof2
failed: 024-illegal-access
failed: 025-access-controller
failed: 031-class-attributes
failed: 044-proxy
failed: 045-reflect-array
failed: 046-reflect
failed: 058-enum-order
failed: 062-character-encodings
failed: 063-process-manager
failed: 064-field-access
failed: 068-classloader
failed: 071-dexfile
failed: 083-compiler-regressions
failed: 084-class-init
failed: 086-null-super
failed: 087-gc-after-link
failed: 100-reflect2
failed: 107-int-math2
failed: 201-built-in-exception-detail-messages

Change-Id: Ib66209285cad8998d77a14781de300af02a96b15
ex2oat.cc
887235845e203fce046c17120e86d4cac4c56035 13-Jun-2014 Ian Rogers <irogers@google.com> Use command line android root in dex2oat to find image.

Change-Id: I20a025e07da3792131d7126ef0e5863b923c794b
ex2oat.cc
df88a9e44673655009cc560947d29c1400516f12 14-Jun-2014 Ian Rogers <irogers@google.com> Merge "x86_64: Enable compilation"
136aaee2993a4a5fd93eb9371584161c6d1c7445 06-Jun-2014 Dmitry Petrochenko <dmitry.petrochenko@intel.com> x86_64: Enable compilation

This patch enables compilation of all methods for x86_64
except image.

Change-Id: Ie210809f2595cc25da688a4ad0363c258bcf8233
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
ex2oat.cc
78382fa44ee505cf16835e4d22515e7252a90864 07-Jun-2014 Alex Light <allight@google.com> Optionally add debug symbols to ELF files made by quick compiler.

Added debug symbols to ELF files created by dex2oat using
the quick compiler. Adds two flags --include-debug-symbols and
--no-include-debug-symbols for dex2oat that control the inclusion of these
debug symbols. Debug info is added by default if kIsDebugBuild is true.

Fixed bug where Intel DWARF information would not correctly deal with
deduplicated code the binary.

Changed the portable compiler code path in dex2oat.cc so that symbols
will not be stripped when run with --include-debug-symbols.

Change-Id: Ia2eb2f654dedf0e5e8606f7744e05b8d14155fb1
ex2oat.cc
c5f17732d8144491c642776b6b48c85dfadf4b52 06-Jun-2014 Ian Rogers <irogers@google.com> Remove deprecated WITH_HOST_DALVIK.

Bug: 13751317
Fix the Mac build:
- disable x86 selector removal that causes OS/X 10.9 kernel panics,
- madvise don't need does zero memory on the Mac, factor into MemMap
routine,
- switch to the elf.h in elfutils to avoid Linux kernel dependencies,
- we can't rely on exclusive_owner_ being available from other pthread
libraries so maintain our own when futexes aren't available (we
can't rely on the OS/X 10.8 hack any more),
- fix symbol naming in assembly code,
- work around C library differences,
- disable backtrace in DumpNativeStack to avoid a broken libbacktrace
dependency,
- disable main thread signal handling logic,
- align the stack in stub_test,
- use $(HOST_SHLIB_SUFFIX) rather than .so in host make file variables.

Not all host tests are passing on the Mac with this change. dex2oat
works as does running HelloWorld.
Change-Id: I5a232aedfb2028524d49daa6397a8e60f3ee40d3
ndroid.mk
20aa7cbe93d782e0e756a36e70d610fe84b4bbb4 06-Jun-2014 Calin Juravle <calin@google.com> Merge "Fixed and refactored profiler options handling"
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
ex2oat.cc
f94b781745e715463482695e22addfa95198b548 05-Jun-2014 Vladimir Marko <vmarko@google.com> Workaround for running out of address space on N7v1.

Bug: 13564922
Change-Id: I2ac466f613e465691078c41b2693f2327d07a0a8
ex2oat.cc
2469e60e6ff08c2a0b4cd1e209246c5d91027679 07-May-2014 Jean Christophe Beyler <jean.christophe.beyler@intel.com> ART: Setting up cleanup

- Moved code around to actually have the clean-up code in a PassDriver format.
This allows us to better control what is being called after an optimization
It also allows the use of a centralized pass system for both optimizations
and cleanup.

Change-Id: I9d21e9bb9ee663739722f440d82adf04f73e380c
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Signed-off-by: Yixin Shou <yixin.shou@intel.com>
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
ex2oat.cc
a9f1ce6fbe8a9247d0d8e20727f590b091e816da 28-May-2014 Vladimir Marko <vmarko@google.com> Fix pass driver's dump_pass_list_ and print_pass_list_.

The lists were allocated with new char[], so they should
have been held by std::unique_ptr<const char[]> rather than
std::unique_ptr<const char>. However, it's much cleaner with
std::string.

Change-Id: Ie7c604773272194345f5e6e3c4803c3a914edf99
ex2oat.cc
6d25996baef5037d0aa8beb2f517755f2fb7b91f 28-May-2014 Ian Rogers <irogers@google.com> Merge "ART: Print and dump functionalities per pass"
8bceccec7eddff8cd872aa20505b4a3a6be60a16 29-Apr-2014 Jean Christophe Beyler <jean.christophe.beyler@intel.com> ART: Print and dump functionalities per pass

LOG is a great logging tool but sometimes a pass has some debugging text it
want to be able to turn on/off easily.

By going via a print_pass flag, we can actually turn it on/off easily per pass
when debugging/instrumenting.

- Added a pass printer to help debug messages for future passes.
- Added a print_pass flag in CompilationUnit to filter out messages.

At the same time, did a similar system for dumping the CFG.

- Also moved some API into public from protected.

Change-Id: Ie0e89a8fc773e8583f3e4ffd6e4bd2eebdbb2bf4
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Signed-off-by: Yixin Shou <yixin.shou@intel.com>
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
ex2oat.cc
0aa504b5bb19f0944d50941b20c8eeaca4165328 23-May-2014 Brian Carlstrom <bdc@google.com> Fix ExtractToMemMap to show original zip file name in ashmem

(cherry picked from commit 1fca8e91f32dc8b13d3129b7ef4a0194839736e6)

Change-Id: Id7d22600496b090ac32150c8c6424da89964b6be
ex2oat.cc
4f59668b3d51f63601ebe59dbd2b7e8a7c5bd093 01-May-2014 James C Scott <james.c.scott@intel.com> ART: Pass driver generalization

- Generalizing Pass Driver.
- Migrating ME Pass Driver to use the new generalized Pass Driver.

There will be some more changes after in the compiler code to generalize
it a bit more by separating what is being done by the optimizing passes
and post-pass cleanups.

Change-Id: I140a70e88483d7c3991b7d336bd593b2613ae194
Signed-off-by: James C Scott <james.c.scott@intel.com>
ex2oat.cc
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
ex2oat.cc
6cd2845c8697074c97b01a68f241314aded9f492 17-May-2014 Andreas Gampe <agampe@google.com> ART: Turn off ARM64 compilation for now

When no compiler filter string is given to dex2oat for ARM64,
default to interpreter.

Change-Id: I2a97e07b1d9b75a04aafe4aaa4437e500bdaf202
ex2oat.cc
3ac05bba3eadccb33d26b41d9797f63e8378125f 14-May-2014 Brian Carlstrom <bdc@google.com> Remove ISA from boot image name.

Partially reverts b9beb2e2efb6a204a69ca660d478b45f851e8f09

Bug: 14882223

(cherry picked from commit 3da44327c8306bb354c0163a7c7779dea6eeb38a)

Change-Id: Idc9266a97d1047434c110ef140e2f2708c4aadef
ex2oat.cc
5131638f826b74c4e2af62b8ac70eeef1232c99b 13-May-2014 Kenny Root <kroot@google.com> dex2oat: convert NULL to nullptr

Change-Id: I658511212f7ab265de473e198f8fe3625bbc9b46
ex2oat.cc
20cdc069f06f34828e51bcf89597bebe5df445d5 14-May-2014 Kenny Root <kroot@google.com> Merge "Changes for vogar compatibility"
d5185344e19d9feb7ac268369e0af6a467d1cb48 13-May-2014 Kenny Root <kroot@google.com> Changes for vogar compatibility

Make sure dex2oat can make an image with an empty list of image_classes.
Add in some checks to make sure that no bad arguments sneak into
CompilerDriver.

If we're not on the ART_TARGET, we should check for the "hostdex"
versions of the libraries to substitute in our libart version.

Change-Id: I5e8485c6089d25664492f0217b43ef64ca84c061
ex2oat.cc
eb8167a4f4d27fce0530f6724ab8032610cd146b 08-May-2014 Mathieu Chartier <mathieuc@google.com> Add Handle/HandleScope and delete SirtRef.

Delete SirtRef and replaced it with Handle. Handles are value types
which wrap around StackReference*.

Renamed StackIndirectReferenceTable to HandleScope.

Added a scoped handle wrapper which wraps around an Object** and
restores it in its destructor.

Renamed Handle::get -> Get.

Bug: 8473721

Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
ex2oat.cc
ad930da1d67968600aab8441c24f5c4cc6e001bd 13-May-2014 Vladimir Marko <vmarko@google.com> Merge "Move quick frame info to OatQuickMethodHeader."
7624d25dad2d1ba25969ae704fccf68649103ae5 02-May-2014 Vladimir Marko <vmarko@google.com> Move quick frame info to OatQuickMethodHeader.

Rename OatMethodHeader to OatQuickMethodHeader, move frame
info from OatMethodOffsets to OatQuickMethodHeader. Retrieve
the info from other places for non-quick methods (portable
compiled bytecode or jni stub, generic jni, runtime,
abstract and proxy).

This change has a libcore/ companion CL
"Remove ArtMethod's quick fields for frame size and spills."
https://android-review.googlesource.com/94164

Bug: 11767815
Change-Id: I0e31a7875d76732e1ec479c86b9b5ca01203507f
ex2oat.cc
b9beb2e2efb6a204a69ca660d478b45f851e8f09 10-May-2014 Ian Rogers <irogers@google.com> Place ISA into boot image name.

Depends upon:
https://android-review.googlesource.com/94078

Change-Id: I22c18b03b2c0db7a3f792920064e7710363b58b4
ex2oat.cc
674744e635ddbdfb311fbd25b5a27356560d30c3 24-Apr-2014 Vladimir Marko <vmarko@google.com> Use atomic load/store for volatile IGET/IPUT/SGET/SPUT.

Bug: 14112919
Change-Id: I79316f438dd3adea9b2653ffc968af83671ad282
ex2oat.cc
9e06c8cd4a2e1471754470e09aaab63c0795b4af 06-May-2014 Zheng Xu <zheng.xu@arm.com> AArch64: Add fake arm64 backend, and disable it by method filter.

Just create an ArmCodeGenerator for arm64, but currently no code will
be generated for arm64.

The method filter can:
1. Skip methods with unsupported prototype.
2. Skip methods with unsupported dalvik byte code.
3. Skip methods with invocation to unsupported prototype.

These are temporary codes and should be removed later. But with this
patch, it won't break anything when we merge partly implemented arm64
backend later.

Change-Id: Ib9180d7b8a978f0a5ebaf6b4893e7e3724897113
ex2oat.cc
43221f789244a898dc9f14e8b063d4c73326b47a 02-May-2014 Ian Rogers <irogers@google.com> Merge "Disable the ahead-of-time compilation for MIPS."
7ca278be5f6f15681350e9f05af434df4aab59ca 01-May-2014 Ian Rogers <irogers@google.com> Disable the ahead-of-time compilation for MIPS.

Bug: 14464004

Change-Id: I551c0dc4122853a1a9ab566d03bac74cc057cba5
ex2oat.cc
11d9f06a96a6909905c248ed684366190140095c 23-Apr-2014 Narayan Kamath <narayan@google.com> Use instruction specific dalvik cache dirs.

- All oat & art files are now placed under /data/dalvik-cache/<isa>/.
- GetDalvikCacheOrDie now requires a mandatory subdirectory argument,
and is implicitly rooted under /data/.
- Added helper methods to convert InstructionSet enums into strings
and vice versa.

(cherry picked from commit 2974bc3d8a5d161d449dd66826d668d87bdc3cbe)

Change-Id: Ic7986938e6a7091a2af675ebafec768f7b5fb8cd
ex2oat.cc
bf25f7e3a007ecfe4b2bcfa0a9abcb784ff54e26 28-Apr-2014 Brian Carlstrom <bdc@google.com> Merge "Fix typo of --oat-fd description in help"
9cb554a7784307d97c20991d90c76d9cf8a12e01 28-Apr-2014 Wonil Kim <wonil.kim@gmail.com> Fix typo of --oat-fd description in help

--oat-fd description in help was copied from --oat-file description.

Change-Id: Idbf36018af58db169f6d65382a7602ec950cce99
Signed-off-by: Wonil Kim <wonil.kim@gmail.com>
ex2oat.cc
09881a85579cab1779ddf6ba9a91eed861a13cb2 19-Apr-2014 Brian Carlstrom <bdc@google.com> Do not require dexopt when previous profile does not exist

Also turn down some dex2oat related noise

Bug: 14184659
Change-Id: I134890f2c452d7f85ca4b736b5724f42533c2a7f
ex2oat.cc
5a9cef81718465118662b22cfa616457cf91b27a 17-Apr-2014 Andreas Gampe <agampe@google.com> Build dex2oat as 64b for the target when using zygote64

In single-zygote 64b builds we should build dex2oat as 64b to
avoid installd issues

Change-Id: I5f281d90fbd44abbca4182e39162b184be9f1b35
ndroid.mk
04ae1630adb4d4f10bfa7fded595052a9124de76 11-Apr-2014 Stuart Monteith <stuart.monteith@arm.com> AArch64: List arm64 as instruction set option

When arm64 was added to dex2oat, it wasn't added to the list of
instruction sets in the help text. This adds it.

Change-Id: I9ffecb67a053b24ad624effd1853ff47331d2e91
Signed-off-by: Stuart Monteith <stuart.monteith@arm.com>
ex2oat.cc
d6ed642458c8820e1beca72f3d7b5f0be4a4b64b 10-Apr-2014 Dave Allison <dallison@google.com> Revert "Revert "Revert "Use trampolines for calls to helpers"""

This reverts commit f9487c039efb4112616d438593a2ab02792e0304.

Change-Id: Id48a4aae4ecce73db468587967968a3f7618b700
ex2oat.cc
f9487c039efb4112616d438593a2ab02792e0304 09-Apr-2014 Dave Allison <dallison@google.com> Revert "Revert "Use trampolines for calls to helpers""

This reverts commit 081f73e888b3c246cf7635db37b7f1105cf1a2ff.

Change-Id: Ibd777f8ce73cf8ed6c4cb81d50bf6437ac28cb61

Conflicts:
compiler/dex/quick/mir_to_lir.h
ex2oat.cc
081f73e888b3c246cf7635db37b7f1105cf1a2ff 07-Apr-2014 Dave Allison <dallison@google.com> Revert "Use trampolines for calls to helpers"

This reverts commit 754ddad084ccb610d0cf486f6131bdc69bae5bc6.

Change-Id: Icd979adee1d8d781b40a5e75daf3719444cb72e8
ex2oat.cc
754ddad084ccb610d0cf486f6131bdc69bae5bc6 19-Feb-2014 Dave Allison <dallison@google.com> Use trampolines for calls to helpers

This is an ARM specific optimization to the compiler
that uses trampoline islands to make calls to runtime
helper functions. The intention is to reduce the size
of the generated code (by 2 bytes per call) without
affecting performance.

By default this is on when generating an OAT file. It is
off when compiling to memory.

To switch this off in dex2oat, use the command line option:
--no-helper-trampolines

Enhances disassembler to print the trampoline entry on the
BL instruction like this:

0xb6a850c0: f7ffff9e bl -196 (0xb6a85000) ; pTestSuspend

Bug: 12607709
Change-Id: I9202bdb7cf21252ad807bd48701f1f6ce8e3d0fe
ex2oat.cc
91268c1afd6c0d4fad55b7c86d907233d4660205 04-Apr-2014 Andreas Gampe <agampe@google.com> Check the machine type of an ELF file when loading.

This ensures that we reject wrong target ELF files,
and should result in a recompile for the right
target.

Change-Id: I898dddc4f2bb9b1607a7436083d0ba7619b6007b
ex2oat.cc
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
ex2oat.cc
a7a49dd64b2cce5cd3918a01c9cd372931f90dd8 03-Apr-2014 Ian Rogers <irogers@google.com> Merge "Pass instruction-set from runtime through to spawned dex2oat."
8afeb85d3def12b559b7565fb6d3956f81b55132 02-Apr-2014 Ian Rogers <irogers@google.com> Pass instruction-set from runtime through to spawned dex2oat.

Change-Id: I1727af7beb9f710c29124d4d6bc9175e4856f3cc
ex2oat.cc
d74754320e4706796ebb1d4b413dc1fede6e4854 20-Mar-2014 Colin Cross <ccross@android.com> force dex2oat target executables to be compiled for 32-bit

64-bit dex2oat doesn't support 32-bit targets yet, force dex2oat
target executables to compile 32-bit for now by passing in a
value for LOCAL_MULTILIB to build-art-executable.

Bug: 13764385
Change-Id: I41adba1e64f373e4b61a3c13af2592ed4f7d0b57
ndroid.mk
b95a5345ae4217b70ca36f0cced92f68dda7caf5 12-Mar-2014 Stuart Monteith <stuart.monteith@arm.com> AArch64: Add arm64 runtime support.

Adds support for arm64 to ART. Assembler stubs are sufficient for
down calls into interpreter. JNI compiler and generics are not finished.

Basic Generic JNI functionality.

Change-Id: I4a07c79d1e037b9f5746673480e32cf456867b82
ex2oat.cc
0cecf494999cc35e13ff2104145c1d9229bf8776 13-Mar-2014 Vladimir Marko <vmarko@google.com> Merge "Add dex2oat --print-pass-names and --disable-passes= options."
b34f69ab43aaf7a6e6045c95f398baf566ef5023 07-Mar-2014 Nicolas Geoffray <ngeoffray@google.com> Add command line support for enabling the optimizing compiler.

Also run tests with the optimizing compiler enabled when
the file art/USE_OPTIMIZING_COMPILER is present.

Change-Id: Ibc33eed62a43547bc3b9fe786d014c0d81b5add8
ex2oat.cc
ffb939a0709ccb100d450e6e30d4c1ca85132163 12-Mar-2014 Ian Rogers <irogers@google.com> Set default dex2oat instruction set for x86-64 and ARM64.

Change-Id: I43062dfadb8a4f51304fd06f0105d6af81cf0331
ex2oat.cc
cd8ce66a83af05d5ecb59aa6a8aad89a29e0a844 11-Mar-2014 Chao-ying Fu <chao-ying.fu@intel.com> Add dex2oat --print-pass-names and --disable-passes= options.

Add --print-pass-names to print a list of pass names.
Add --disable-passes= to disable one ore more passes
separated by comma.
Ex: Using --disable-passes=UseCount,BBOptimizations can disable UseCount
and BBOptimizations passes.

Change-Id: I0dffaf10547afdcca78a20d8e0e6b358bfb2ee8c
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
ex2oat.cc
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
ex2oat.cc
c645f1ddb7c40bea6a38eda4b3f83f6b6dec405b 07-Mar-2014 Mathieu Chartier <mathieuc@google.com> Add more VerifyObject calls.

Added verify object calls to SirtRef, IndirectReferenceTable,
ReferenceTable.

Removed un-needed verify object in ScopedObjectAccess / DecodeJObject
since object sources are handled.

Bug: 12934910
Change-Id: I55a46a8ea61fed2a77526eda27fd2cce97a9b125
ex2oat.cc
befbd5731ecca08f08780ee28a913d08ffb14656 06-Mar-2014 Ian Rogers <irogers@google.com> Fix host architecture for 64bit.

Also, hack x86 assembler for use as a x86-64 trampoline compiler's assembler.
Implement missing x86-64 quick resolution trampoline.
Add x86-64 to the quick elf writer.

Change-Id: I08216c67014a83492ada12898ab8000218ba7bb4
ex2oat.cc
5e754d88c73f1f1fafbbf87d564df000d5a0a12c 05-Mar-2014 Brian Carlstrom <bdc@google.com> Revert "Revert "Avoid compiling monster methods in boot image""

This reverts commit f679fab9be8905505d26a62bea257641f0bb0168.

(cherry picked from commit 9d0bdfe63bec5a43d7668d9094a52caf77b6ed53)

Change-Id: I72af1d44483edbd2a5f2e6b678e43f740d4613fd
ex2oat.cc
449fa6e44b220e48dee20f569b46161f3a056add 05-Mar-2014 Brian Carlstrom <bdc@google.com> Revert "Avoid compiling monster methods in boot image"

This reverts commit 217e789288d5a321460ea2399e0eb7f3af6fc91b.

(cherry picked from commit f679fab9be8905505d26a62bea257641f0bb0168)

Change-Id: I058dd461d97bc5992b69941c7597a0aca25df38c
ex2oat.cc
217e789288d5a321460ea2399e0eb7f3af6fc91b 06-Feb-2014 buzbee <buzbee@google.com> Avoid compiling monster methods in boot image

The Quick compiler normally avoids compiling extremely large
methods (which are usually auto-generated initialization
routines) because they take too long to compile, and generally
aren't executed frequently enough to benefit from compilation.

However, we'd previously compiled even large methods in the
boot image - because it is normally cross-compiled on the host.
However, we are currently compiling it on the target in some
situations. This change moves the default for image creation
from "compile everything" to "compile most things".

Change-Id: If096e1ae5db2e3a394880e36e19607358e77d677
ex2oat.cc
2ec6520d57479d393bffa05defa1479b25ca8382 04-Mar-2014 Brian Carlstrom <bdc@google.com> Support compiler filters for boot classpath

image_writer.cc
Remove assumption that all methods in the boot classpath are compiled

oat_writer.cc
Don't skip writing ArtMethod::quick_code_offset_ for methods that need resolution, leave that to ImageWriter

dex2oat.cc
Allow dex2dex compilation of image dex files by making the in memory pages writable in all cases, not just app case.

oatdump.cc
dump new OatHeader fields
use ImageSpace.GetImageFilename, not command line image filename, since location may be in dalvik-cache
remove inaccurate check about non-null GC map

quick_trampoline_entrypoints.cc
add and improve some DCHECKS that were useful while debugging

class_linker.cc
image_space.cc
fix double facepalm

parsed_options.cc
fix zygote logging to not skip values to two part options like -classpath <foo>

runtime.cc
wireup parsed compiler options to runtime

Change-Id: Iad314df0b80623c0663d61713d5098297ab9ac87
ex2oat.cc
9583fbcf597eff6d0b3c5359b8e8d5f70ed82c40 28-Feb-2014 Nicolas Geoffray <ngeoffray@google.com> Remove oat file location in the image.

The oat file is now always in the same directory, and has the
same name as the image file. Only difference is the extension.

This also removes the need for host-prefix.

Change-Id: I16d1f7aeb1d58372d41921694664e9c321afc1ad
ex2oat.cc
ae9fd93c39a341e2dffe15c61cc7d9e841fa92c4 11-Feb-2014 Mark Mendell <mark.p.mendell@intel.com> Tell GDB about Quick ART generated code

This is actually a lot of work. To do this, we need:
.debug_info
.debug_abbrev
.debug_frame
.debug_str

These are generated into the OAT file by OatWriter and ElfWriterQuick.

Since the Quick ART runtime doesn't use dlopen to load the OAT files,
GDB can't find this information. Use the alternate GDB JIT interface,
which can be invoked at runtime. To use this interface, an ELF image
needs to be built in memory. Read the information from the OAT file,
fixup the addresses to point to the real locations, add a symbol table
to hold the .text symbol, and then let GDB know about the information,
which will be read from the runtime address space.

This is quite primitive now, and could be cleaned up considerably. It
probably needs symbol table entries for the methods, and descriptions of
parameters and return types.

Currently only supported for X86.

This defaults to enabled for debug builds. Added dexoat --gen-gdb-info
and --no-gen-gdb-info flags to override.

Change-Id: I4d18b2370f6dfaa00c8cc1925f10717be3bd1a62
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
ex2oat.cc
3d504075f7c1204d581923460754bf6d3714b13f 01-Mar-2014 Ian Rogers <irogers@google.com> Make out arguments non-reference types.

Also, tidy some portable related code.

Change-Id: I67c8aa52eef8b556ca117ecda1b1e75465ba06a5
ex2oat.cc
ae7083dac2db59dcdef869e35ac44a039d888ee9 25-Feb-2014 Brian Carlstrom <bdc@google.com> Add additional const

Change-Id: Ibf60cd4cfbb445189efe2439899f2a7084f1ea63
ex2oat.cc
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
ex2oat.cc
4e30541a92381fb280cd0be9a1763b713ee4d64c 19-Feb-2014 Mathieu Chartier <mathieuc@google.com> Fix and optimize verify object.

VerifyObject no longer resides in heap. You can now enable
VerifyObject for non-debug builds. VerifyStack is still slow, so it
is now guarded by its own flag.

Fixed the image writer to not use verification at places where
verification fails due to invalid reads.

Fixed RosAlloc to use SizeOf which doesn't call verify object.

Added a flag paremeter to some of the mirror getters / setters to
be able to selectively disable VerifyObject on certain calls.

Optimized the GC to not verify each object multiple times during
object scanning if verify object is enabled.

Added 3 verification options: verify reads, verify this, and verify
writes so that you can select how much verification you want for
mirror getters and setters.

Removed some useless DCHECKs which would slow debug builds without
providing any benefits.

TODO: RosAlloc verification doesn't currently work with verify
objects.

Bug: 12934910
Bug: 12879358

Change-Id: Ic61033104dfc334543f89b0fc0ad8cd4f4015d69
ex2oat.cc
5180cc1cddc5112ea544bf9d8323f1d27db56f75 21-Feb-2014 Ian Rogers <irogers@google.com> Fix a printf flag that breaks 64bit host builds.

Change-Id: I2dacf3adccde6a397530e91a541d39bcf92627d2
ex2oat.cc
f79fccbf8b5e59a0f48bec754cb7a53877b3c90f 20-Feb-2014 Brian Carlstrom <bdc@google.com> Add debug code for saving dex file inputs

Also improve some other logging.

Bug: 13078746
Change-Id: Ic7a7c201b935e2b117ddc38b652cf39152fe42dc
ex2oat.cc
f3e2cc4a38389aa75eb8ee3973a535254bf1c8d2 18-Feb-2014 Nicolas Geoffray <ngeoffray@google.com> Code cleanup to avoid LLVM dependency when building with quick only.

Change-Id: I0985c227d775c72fd23975d4c9bf673ba32615c2
ex2oat.cc
f5df8974173124faddb8e2b6a331959afdb94fdf 14-Feb-2014 Nicolas Geoffray <ngeoffray@google.com> Rewrite the compiler interface for CompilerDriver.

Change-Id: I15fa9afe7ffb7283ebda8d788a1e02793e3f75a6
ex2oat.cc
abaf927f29f6feceb3df3e6ced7d01970ba0dbe9 11-Feb-2014 Nicolas Geoffray <ngeoffray@google.com> Merge "Re-apply: Implement cumulative timings for CompilerDriver."
ea3fa0b4ba13d7bd7f7c1cd85202ccbe141a35ae 10-Feb-2014 Nicolas Geoffray <ngeoffray@google.com> Re-apply: Implement cumulative timings for CompilerDriver.

The bug was due to how the test infrastructure works:
a compiler driver surives the stack where it is allocated.

Change-Id: I345fe0e4afb2bd15937233db8afb350f09429558
ex2oat.cc
2bc47809febcf36369dd40877b8226318642b428 10-Feb-2014 Vladimir Marko <vmarko@google.com> Revert "Revert "Check FastInstance() early for special getters and setters.""

This reverts commit 632e458dc267fadfb8120be3ab02701e09e64875.

Change-Id: I5098c41ee84fbbb39397133a7ecfd367fecebe42
ex2oat.cc
632e458dc267fadfb8120be3ab02701e09e64875 08-Feb-2014 Ian Rogers <irogers@google.com> Revert "Check FastInstance() early for special getters and setters."

This reverts commit 5dc5727261e87ba8a418e2d0e970c75f67e4ab79.

Change-Id: I3299c8ca5c3ce3f2de994bab61ea16a734f1de33
ex2oat.cc
5dc5727261e87ba8a418e2d0e970c75f67e4ab79 05-Feb-2014 Vladimir Marko <vmarko@google.com> Check FastInstance() early for special getters and setters.

Perform the FastInstance() check for getters and setters
when they are detected by the inliner. This will help avoid
the FastInstance() check for inlining.

We also record the field offset and whether the field is
volatile and whether the method is static for use when
inlining or generating the special accessors.

Change-Id: I3f832fc9ae263883b8a984be89a3b7793398b55a
ex2oat.cc
ef7d42fca18c16fbaf103822ad16f23246e2905d 06-Jan-2014 Ian Rogers <irogers@google.com> Object model changes to support 64bit.

Modify mirror objects so that references between them use an ObjectReference
value type rather than an Object* so that functionality to compress larger
references can be captured in the ObjectRefererence implementation.
ObjectReferences are 32bit and all other aspects of object layout remain as
they are currently.

Expand fields in objects holding pointers so they can hold 64bit pointers. Its
expected the size of these will come down by improving where we hold compiler
meta-data.
Stub out x86_64 architecture specific runtime implementation.
Modify OutputStream so that reads and writes are of unsigned quantities.
Make the use of portable or quick code more explicit.
Templatize AtomicInteger to support more than just int32_t as a type.
Add missing, and fix issues relating to, missing annotalysis information on the
mutator lock.
Refactor and share implementations for array copy between System and uses
elsewhere in the runtime.
Fix numerous 64bit build issues.

Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
ex2oat.cc
65c23bbb25f069b3b49761468b848c4e5d1aa879 02-Feb-2014 Brian Carlstrom <bdc@google.com> Restore end of dex2oat logging

Change-Id: I808cc60e8bb84609f42c0262b10fa0f1b4962763
ex2oat.cc
b39d4b11421d7107be29dd17b39241571d822c21 30-Jan-2014 Stuart Monteith <Stuart.Monteith@arm.com> Enable debug build of dex2oatd on host

ART_BUILD_DEBUG is being ignored by the host build of dex2oatd.
This commit simple fixes what looks like a copy & paste error.

Change-Id: Ifb256df2c1f2be42032d1687e1740470f7cf5144
Signed-off-by: Stuart Monteith <Stuart.Monteith@arm.com>
ndroid.mk
c7f832061fea59fd6abd125f26c8ca1faec695a5 24-Jan-2014 Vladimir Marko <vmarko@google.com> Refactor verification results.

Rename VerificationMethodsData to VerificationResults.
Create new class VerifiedMethod to hold all the data for
a given method.

Change-Id: Ife1ac67cede20f3a2f9c7f5345f08a851cf1ed20
ex2oat.cc
650be76eb3c38ff905ec1d9675d73e5cb9a82dac 20-Jan-2014 Brian Carlstrom <bdc@google.com> Revert "Implement cumulative timings for CompilerDriver."

This reverts commit df013175d1aa04641e5c6175f8c786e547d31654.
ex2oat.cc
df013175d1aa04641e5c6175f8c786e547d31654 13-Jan-2014 Nicolas Geoffray <ngeoffray@google.com> Implement cumulative timings for CompilerDriver.

Change-Id: I3b04de7f2717273f356b8120f68d69e2379bab2f
ex2oat.cc
740a11d0bfeaef36d910669844d01f3957dbe696 14-Jan-2014 Ian Rogers <irogers@google.com> Add systrace regions for file opening during setup.

When the non-parallel dex2oat setup is slow this will help to explain the major
culprit.

Change-Id: I20143a8c7fafb3f7b834902d95dd85dbfe358746
ex2oat.cc
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
ex2oat.cc
2b5eaa2b49f7489bafdadc4b4463ae27e4261817 13-Dec-2013 Vladimir Marko <vmarko@google.com> Move compiler code out of method verifier.

We want to detect small methods for inlining at the end of
the method verification. Instead of adding more compiler
code to the runtime, we create a callback from the runtime
into the compiler, so that we can keep the code there.
Additionally, we move the compiler-related code that was
already in the method verifier to the compiler since it
doesn't really belong to the runtime in the first place.

Change-Id: I708ca13227c809e07917ff3879a89722017e83a9
ex2oat.cc
92572be7f754c213e615a62955cc5f65ca8c0c0e 28-Nov-2013 Narayan Kamath <narayan@google.com> Use libziparchive for art zip processing.

This is part of the effort to move all VM & framework
zip parsing to a common implementation. This also has
the side effect of fixing various TODOs related to
crc32 checking.

bug: 10193060

Change-Id: I407f9ad5a94fc91d96ff43556adde00a00df1f14
ex2oat.cc
ca368cb576cf6a436a32c357fca51fbb3082d7a9 16-Nov-2013 Ian Rogers <irogers@google.com> Break apart oat writing times.

Change-Id: I11045e29dc58ed1efbd19070ec1dcafc1044c95a
ex2oat.cc
5fe9af720048673e62ee29597a30bb9e54c903c5 14-Nov-2013 Ian Rogers <irogers@google.com> Fix memory leaks relating to timing logger.

Bug: 11670287.
We use pointers to uninitialized values for control-flow in the timing logger
code, add TODO comments to clean this up later.
Remove base namespace and other bits of tidying.

Change-Id: I1e6600a1e92f974c8f58f3a405a4e4abb4d9f80f
ex2oat.cc
d5aba599561d8d14bb8c19fd633bfcd05af3c264 12-Nov-2013 Brian Carlstrom <bdc@google.com> Fix CTS failures caused by ignoring malformed dex files in dex2oat

Bug: 11621003
Bug: 11599365
Change-Id: If1f62dff59346edcd60e4c4b5df58137609f7f19
ex2oat.cc
3cf59d567072562e120b9524f47ad2bd373f8333 11-Nov-2013 Brian Carlstrom <bdc@google.com> Revert "resolved conflicts for merge of ad93c622 to master"

This reverts commit 4f6a77d529ae295630e22d4636c2acc2ba2fbb6d, reversing
changes made to bcdbbfebc8f32566d4cb3f66405e89cdb7351992.
ex2oat.cc
4f6a77d529ae295630e22d4636c2acc2ba2fbb6d 09-Nov-2013 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of ad93c622 to master

Change-Id: I81dc207aa90a96cc46c8a929d745e9aefb0ad802
eb4d2ae2efdd186a01f3c91a3f6d44cc07e116ef 09-Nov-2013 Brian Carlstrom <bdc@google.com> Ignore missing files in dex2oat

Bug: 11599365
Change-Id: I43f7437d2574c3776f921472f38b5a03a87c2822
ex2oat.cc
1bd2ceb3a8c68ae6ea1f9627b588a7bc7a74487f 06-Nov-2013 Brian Carlstrom <bdc@google.com> Make missing DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES an error

Change-Id: I3ca23e4db80c8ab8a86da6408cf38daccd4cfaf1
ex2oat.cc
7020278bce98a0735dc6abcbd33bdf1ed2634f1d 23-Oct-2013 Dave Allison <dallison@google.com> Support hardware divide instruction

Bug: 11299025

Uses sdiv for division and a combo of sdiv, mul and sub for modulus.
Only does this on processors that are capable of the sdiv instruction, as determined
by the build system.

Also provides a command line arg --instruction-set-features= to allow cross compilation.
Makefile adds the --instruction-set-features= arg to build-time dex2oat runs and defaults
it to something obtained from the target architecture.

Provides a GetInstructionSetFeatures() function on CompilerDriver that can be
queried for various features. The only feature supported right now is hasDivideInstruction().

Also adds a few more instructions to the ARM disassembler

b/11535253 is an addition to this CL to be done later.

Change-Id: Ia8aaf801fd94bc71e476902749cf20f74eba9f68
ex2oat.cc
635733da0f67df1c979cc9764409d2a9dcbb20aa 31-Oct-2013 Brian Carlstrom <bdc@google.com> Fix --compiler-backend usage example

Change-Id: I2ebefe57e94d6a8103c71e86f7c6a302b7107fc4
ex2oat.cc
88474b416eb257078e590bf9bc7957cee604a186 24-Oct-2013 Jeff Hao <jeffhao@google.com> Implement Interface Method Tables (IMT).

Change-Id: Idf7fe85e1293453a8ad862ff2380dcd5db4e3a39
ex2oat.cc
8d31bbd3d6536de12bc20e3d29cfe03fe848f9da 13-Oct-2013 Ian Rogers <irogers@google.com> Throw IOException at source of failing to open a dex file.

Before is:
java.lang.ClassNotFoundException: Didn't find class "GCBench" on path: DexPathList[[zip file "/disk2/dalvik-dev/out/host/linux-x86/framework/GCBench.jar"],nativeLibraryDirectories=[/disk2/dalvik-dev/out/host/linux-x86/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
Suppressed: java.lang.ClassNotFoundException: GCBench
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 1 more
Caused by: java.lang.NoClassDefFoundError: Class "LGCBench;" not found
... 5 more
And after is:
java.lang.ClassNotFoundException: Didn't find class "GCBench" on path: DexPathList[[zip file "/disk2/dalvik-dev/out/host/linux-x86/framework/GCBench.jar"],nativeLibraryDirectories=[/disk2/dalvik-dev/out/host/linux-x86/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
Suppressed: java.io.IOException: Zip archive '/disk2/dalvik-dev/out/host/linux-x86/framework/GCBench.jar' doesn't contain classes.dex
at dalvik.system.DexFile.openDexFile(Native Method)
at dalvik.system.DexFile.<init>(DexFile.java:80)
at dalvik.system.DexFile.<init>(DexFile.java:59)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:268)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:235)
at dalvik.system.DexPathList.<init>(DexPathList.java:113)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:38)
at java.lang.ClassLoader.createSystemClassLoader(ClassLoader.java:128)
at java.lang.ClassLoader.access$000(ClassLoader.java:65)
at java.lang.ClassLoader$SystemClassLoader.<clinit>(ClassLoader.java:81)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:137)
Suppressed: java.lang.ClassNotFoundException: GCBench
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 1 more
Caused by: java.lang.NoClassDefFoundError: Class "LGCBench;" not found
... 5 more

Also, move dex file verifier messages out of logs.
In the process the ClassLinker::dex_lock_ needed tidying to cover a smaller
scope. Bug 11301553.

Change-Id: I80058652e11e7ea63457cc01a0cb48afe1c15543
ex2oat.cc
e732ef1c0192acd71925bd0ff1ab09640d45531d 10-Oct-2013 Ian Rogers <irogers@google.com> Make compiler stat dumping easier to use.

Previous needed -verbose:compiler + a debug build. Now specify --dump-stats to
dex2oat.

Change-Id: Ifde379e7cd06bbb0fe20149ce89c3b3789221eac
ex2oat.cc
51db7beb7faaea43d697321520732d1d71288f50 06-Sep-2013 Ian Rogers <irogers@google.com> Use exit to avoid destructors in dex2oat.

(cherry picked from commit 2672a9f93caa66add6ca48a8e38ba1661ef43959)

Bug: 10645725
Change-Id: I55c2a7b7f3bd105f1a6a8bf84db2204c6f87e642
ex2oat.cc
2672a9f93caa66add6ca48a8e38ba1661ef43959 06-Sep-2013 Ian Rogers <irogers@google.com> Use exit to avoid destructors in dex2oat.

Change-Id: I5f8b396dfa614af2935053c219b09b406a632618
ex2oat.cc
d76e08323893c60df77eccca6e882279e7246d8c 30-Aug-2013 Brian Carlstrom <bdc@google.com> Make files writable on the installd path as well

Bug: 9618388
Change-Id: Iabfdfe2bbc44de1fec733269c08a243af75c7dcd
ex2oat.cc
e0948e13d5a4552e6a2728087573c07961e4a4f9 29-Aug-2013 Brian Carlstrom <bdc@google.com> Make DexFiles opened from files readonly by default, but writable during dex2oat

Bug: 9618388
Change-Id: I83f2e16ee8446a79a94a84971146d807bb0c9ee0
ex2oat.cc
f30f6daf33a9671ff756befb673482d7f3717a18 29-Aug-2013 Ian Rogers <irogers@google.com> Set small ART override for image as an option.

Build fix for small art, avoids changing the compiler filter post runtime
initialization.

Change-Id: I359b5231adaa0331321dc6239305cf748d174a17
ex2oat.cc
3f3d22c8fc89d754172858d1770f16916b407d8b 28-Aug-2013 Ian Rogers <irogers@google.com> Reduce the scope of a ScopedObjectAccess in dex2oat.

Allow concurrent GCs during image writing, etc.

Change-Id: I89b70a6dfb17f58b156e164c91457337f1c2648f
ex2oat.cc
c6dfdacea2fd9e268f70328805b0366cdd6b7b9e 27-Aug-2013 Brian Carlstrom <bdc@google.com> Add buffering to ELF file generation

Bug: 10496017
Change-Id: I3cbad249e0fb33f726bd0a504b3b6bd9b4f759c8
ex2oat.cc
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
ex2oat.cc
46398608eaa47afe5a4cfb91e3f43211bf937d68 20-Aug-2013 Ian Rogers <irogers@google.com> dex2oat flag to always dump timing data.

Change-Id: I67fd10aff5cc5822ad119cd8b5a26c23e7a85cac
ex2oat.cc
e6bb3b2ce5a69c31c2adfc7eb2705633b7f966eb 20-Aug-2013 Ian Rogers <irogers@google.com> Reduce AOT initialization.

When compiling apps there is no need to resolve all types in the dex file, just
those declared in the dex file. There's also no need to initialize static
fields if we can only leave the class in a verified state.

Increase use of CompilerDriver::IsImage.
Move timing of dex2oat setup to before Runtime::Create.

On run-test 056 the performance improvement is an order of magnitude, for
ThinkFree dex2oat time is dominated by compilation and this change has no
effect.

Bug 10316099.

Change-Id: Ibdd7caa43284e7448e6a56d810967100ae4a7898
ex2oat.cc
7571e8b761ebc2c923525e12ea9fcf07e62cb33e 13-Aug-2013 Brian Carlstrom <bdc@google.com> Add flock(2)ing on dex-cache files to prevent races

Bug: 9071417
Change-Id: I1ee9ff281867f90fba7a8ed8bbf06b33ac29d511
ex2oat.cc
0f40ac31134d9ae0f059d4c448165599dc8459c1 14-Aug-2013 Ian Rogers <irogers@google.com> Fix races in small mode compiler filters setup

Fixes host tests in small art mode.

Change-Id: I2579f872583f425607f91c1e58df68b05b5098bb
ex2oat.cc
1d1e267136732c2b123470b05c06fa536fa6dbbb 14-Aug-2013 Ian Rogers <irogers@google.com> Merge "Refactor java.lang.reflect implementation" into dalvik-dev
75a43f10f55e2aa550de51e969cc1e60d583b632 14-Aug-2013 Anwar Ghuloum <anwarg@google.com> Clean up logcat spam from compiler and verifier

Moved to VLOG(...), adding verifer tag for VLOG.

Change-Id: Ia9ac8aeaf5aa1f4881e384003e82a66e560c5692
ex2oat.cc
ea46f950e7a51585db293cd7f047de190a482414 30-Jul-2013 Brian Carlstrom <bdc@google.com> Refactor java.lang.reflect implementation

Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1.

Move to ArtMethod/Field instead of AbstractMethod/Field and have
java.lang.reflect APIs delegate to ArtMethod/ArtField.

Bug: 10014286.

Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
ex2oat.cc
7b67bee4f6ca4e634f35f63d1e08e1b05f138e01 13-Aug-2013 Hiroshi Yamauchi <yamauchi@google.com> Merge "Add a systrace support for lock contention logging." into dalvik-dev
b3733086ab415088b97fac20b3eea24433a7d2c5 13-Aug-2013 Hiroshi Yamauchi <yamauchi@google.com> Add a systrace support for lock contention logging.

- Now several ART executables like oatdump need to link with libcutils
as the mutex code is shared among them.
- The blocking thread ID and lock owner thread ID are passed to
ScopedContentionRecorder in the correct order.

Bug: 9986464
Change-Id: Id766de23fbc4af1d8ba2de051595e365b04f5ae7
ndroid.mk
155ecba1c9b56ce1b468135e6a591a3fe9258c52 13-Aug-2013 buzbee <buzbee@google.com> Fix SMALL_ART

On all art builds, the images classes must be compiled. When doing
a small art build, it is necessary to override the default compiler
filter to force compilation. A merge mistake broke this logic
for dalvik-dev.

Change-Id: I88186bd89d0ccb4316ee0910e9324ddc3e6a1f75
ex2oat.cc
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
ex2oat.cc
0f055d11096cb02563e9c040cd03c791fd8f69a3 26-Jul-2013 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 7934ac28 to dalvik-dev

Change-Id: I8798a6f154463d3f92f6aca62f14130aec82d273
7934ac288acfb2552bb0b06ec1f61e5820d924a4 26-Jul-2013 Brian Carlstrom <bdc@google.com> Fix cpplint whitespace/comments issues

Change-Id: Iae286862c85fb8fd8901eae1204cd6d271d69496
ex2oat.cc
6f28d91aab952e3244fbb4e707fa38f85538f374 25-Jul-2013 Anwar Ghuloum <anwarg@google.com> Add systrace support to NewTimingLogger, migrate compiler timing logging to NewTimingLogger

Rpleaced old TimingLogger by NewTimingLogger, renamed NewTimingLogger to TimingLogger, added systrace support to TimingLogger.
Tests passing, phone booting, systrace working.

Change-Id: I2aeffb8bcb7f0fd979d8a2a3a8bcfbaa02413679
ex2oat.cc
b9a0324ab64cd25730f10151b064879af8915587 24-Jul-2013 Brian Carlstrom <bdc@google.com> Merge "Remove OatWriter buffering to memory for ElfWriterQuick" into dalvik-dev
c50d8e11a098cc5c6239aa86b47d4fcf8cbb4899 24-Jul-2013 Brian Carlstrom <bdc@google.com> Remove OatWriter buffering to memory for ElfWriterQuick

This allows the oat contents to be directly written to the file.

Change-Id: Ibc7ddf57477b152f07784b52f7334be73fd22833
ex2oat.cc
8a7bc17da633d3577eda040ac490cbd8351dc6b9 23-Jul-2013 Brian Carlstrom <bdc@google.com> am 55c0ac85: Merge "Enable darwin target build for art."

* commit '55c0ac8528fb07c9f0900013b828ee8c60120860':
Enable darwin target build for art.
19e776ceb178397661b0323a9a982f6db249a56d 23-Jul-2013 Brian Carlstrom <bdc@google.com> Enable darwin target build for art.

Change-Id: I8fc04258360d663d2fcd07c307fdfdd2981cdd19
ndroid.mk
7fcba11846d3320911aefdba6a20c1192e36fc2e 22-Jul-2013 Brian Carlstrom <bdc@google.com> Restore conditional oat file copying used by build system.

Change-Id: I40343e59902e894f7343e9d8bbf30f7b5602d786
ex2oat.cc
4560248d4c85cade7f4fc7b30c3fb41b95a04a7f 22-Jul-2013 Brian Carlstrom <bdc@google.com> Move TimingLogger creation to dex2oat

Change-Id: I4fdb6afd4ce2ac0d91c6c968893606d593b6ea18
ex2oat.cc
0177fe200efc1bf4d433955ee7920c683fdf5901 21-Jul-2013 Brian Carlstrom <bdc@google.com> Remove CompilerDriver::IsDebuggingSupported

Change-Id: Ib67e3ef67462fe5dae81148f7fe8cc76b3887f11
ex2oat.cc
0cd7ec2dcd8d7ba30bf3ca420b40dac52849876c 18-Jul-2013 Brian Carlstrom <bdc@google.com> Fix cpplint whitespace/blank_line issues

Change-Id: Ice937e95e23dd622c17054551d4ae4cebd0ef8a2
ex2oat.cc
93ba893c20532990a430741e0a97212900094e8c 18-Jul-2013 Brian Carlstrom <bdc@google.com> Fix cpplint runtime/explicit issues

Change-Id: I352ba0b427f1ff9b22887693952b180eae0839ba
ex2oat.cc
7940e44f4517de5e2634a7e07d58d0fb26160513 12-Jul-2013 Brian Carlstrom <bdc@google.com> Create separate Android.mk for main build targets

The runtime, compiler, dex2oat, and oatdump now are in seperate trees
to prevent dependency creep. They can now be individually built
without rebuilding the rest of the art projects. dalvikvm and jdwpspy
were already this way. Builds in the art directory should behave as
before, building everything including tests.

Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81
ndroid.mk
ex2oat.cc