History log of /art/compiler/driver/compiler_driver.cc
Revision Date Author Comments
0e49b42e03af56521d8ce2c9c84ac5b79e6241c9 08-Nov-2013 Jeff Hao <jeffhao@google.com> Fix handling of duplicate class definitions in boot classpath.

The compiler driver would get the wrong class references if a class
is defined multiple times in the boot classpath. It will now skip the
extra definitions.

Bug: 11598481
Samsung bug: 11539656
Change-Id: I4d9ae2b6d11190e6e6b89261d5f87c802def8810
d3c20c1a46863841c866b64a4c21e8bf9396b54c 30-Oct-2013 Jeff Hao <jeffhao@google.com> Update compiler blacklist to include java.net.NetworkInterface.

Bug: 11411129
Change-Id: Ib93d2f75024b3def54eadc11547990150deccf4d
(cherry picked from commit a52454455048d04d12e4da637a103412a55e579b)
39d0c0d02dc11d10974d368ffd18068ad7d2029a 28-Oct-2013 Brian Carlstrom <bdc@google.com> Update black list with android.os.Bundle

Bug: 11415283
Change-Id: I5a8c580f0e1d029c995faac3ec332083de7b8646
cb5f5e53b580023fa2c1d8235c2e9aa1ff67d1dc 24-Sep-2013 Brian Carlstrom <bdc@google.com> Make sure CompilerDriver actually resolves types

Bug: 10750824
Change-Id: Ie61881f24196e851d87822798a7e9abdf9678aa3
ee39a10e45a6a0880e8b829525c40d6055818560 19-Sep-2013 Ian Rogers <irogers@google.com> Use class def index from java.lang.Class.

Bug: 10244719
This removes the computation of the dex file index, when necessary this is
computed by searching the dex file. Its only necessary in
dalvik.system.DexFile.defineClassNative and DexFile::FindInClassPath, the
latter not showing up significantly in profiling with this change.

(cherry-picked from 8b2c0b9abc3f520495f4387ea040132ba85cae69)
Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
193bad9b9cfd10642043fa2ebbfc68bd5f9ede4b 30-Aug-2013 Mathieu Chartier <mathieuc@google.com> Multi threaded hashed deduplication during compilation.

Moved deduplication to be in the compiler driver instead of oat
writer. This enables deduplication to be performed on multiple
threads. Also added a hash function to avoid excessive comparison
of byte arrays.

Improvements:
Before (alloats host):
real 1m6.967s
user 4m22.940s
sys 1m22.610s

Thinkfree.apk (target mako):
0m23.74s real 0m50.95s user 0m9.50s system
0m24.62s real 0m50.61s user 0m10.07s system
0m24.22s real 0m51.44s user 0m10.09s system
0m23.70s real 0m51.05s user 0m9.97s system
0m23.50s real 0m50.74s user 0m10.63s system

After (alloats host):
real 1m5.705s
user 4m44.030s
sys 1m29.990s

Thinkfree.apk (target mako):
0m23.32s real 0m51.38s user 0m10.00s system
0m23.49s real 0m51.20s user 0m9.80s system
0m23.18s real 0m50.80s user 0m9.77s system
0m23.52s real 0m51.22s user 0m10.02s system
0m23.50s real 0m51.55s user 0m9.46s system

Bug: 10552630

Change-Id: Ia6d06a747b86b0bfc4473b3cd68f8ce1a1c7eb22
4bf1c8d4f2127caf769573d7c762a5d460a2781f 29-Aug-2013 Brian Carlstrom <bdc@google.com> Update blacklist for klp-dev

Change-Id: I5308f71b4c2ccdd7f6ac422ccb2a2d78141d1ce3
a436fde2762664a3ecdda5eefcadd20b2e104f59 28-Aug-2013 Ian Rogers <irogers@google.com> Handle OOMEs in class linker with grace.

Check for OOMEs and then fail due to them in class loading.
Make the compiler driver spot OOMEs during resolution and abort compilation to
avoid needless GC thrash then eventual death.
Allocate the pre-allocated OOME during Runtime::Init as Runtime::Start isn't
called in the context of the compiler/tools.

Change-Id: Id72199d0fe82001b5bf22758b3cdc9cc4b8efbb9
0b3eb39f8bc92f955f875ef50929c439aafe35fb 23-Aug-2013 Mathieu Chartier <mathieuc@google.com> Use atomic integer for compiler driver work balancing.

Before, we divided the work by dividing the total work by the number
of threads. This did not balance work well since some threads could
finish much earlier than others. The new method uses a shared atomic
integer to balance work. This makes it that a thread can process at
most one item after the other worker threads are finished.

Changed the number of threads to take into account the main thread
also doing work. This means that we subtract one from the number of
threads when we make the thread pool.

Change-Id: I0147b0403c6214800ed6bfcdac4f1e5486330996
7dfb28c066159e6cde8181720f0c451a700ef966 22-Aug-2013 Ian Rogers <irogers@google.com> Don't scan image space when starting runtime.

Bug 10432288.
Find Classes and Strings from dex caches lazily rather than when the image is
loaded.
Make class status changes do notifies when there can be waiters.
For Class lookup there's a pathology if we always search dex caches and
so after 1000 failures move all classes into the class table.
Be consistent in using "const char*" for class linker descriptors as this
most easily agrees with the type in the dex file.
Improve the intern run-test so that it has a case of a literal contained in the
image.
Modify image_test to allow any valid lock word rather than expecting 0, ideally
we wouldn't see inflated monitors but we do due to NotifyAll (see bug 6961405).

Change-Id: Ia9bfa748eeccb9b4498784b97c6823141b1f6db8
42b32404abdd9f66b4b168ad8b17bccebfeb99f3 22-Aug-2013 Brian Carlstrom <bdc@google.com> Update black list with Landroid/webkit/WebViewFactory;

Change-Id: I6689d116930e862826527adad9a4000ebe9a5d28
8f3c9ae38df2460940a26dff889a84430b6c38d3 21-Aug-2013 Ian Rogers <irogers@google.com> Don't allow class status to go backward except for error.

Allow greater parallelism of initialization.
Bug 10393546.

Change-Id: Ic194ed490bb0a986250c09fcf335eb1be9714657
be7149fc2e7cc607937209f2819e3c1d672e2668 20-Aug-2013 Ian Rogers <irogers@google.com> Avoid throwing NoClassDefFoundError at compile time.

Change-Id: I8ba56a8750e1718babcb1f94e0408d89f58ea9b5
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
f96b21728e8b10e2060ad2d0de46fcacf5974260 20-Aug-2013 Brian Carlstrom <bdc@google.com> Tolerate both old and new java.util.concurrent.ConcurrentHashMap

Change-Id: I87397bbb662d7dd8cb0683fc08bd35b401034357
958aba1421f2234aeafb22219d45a561e109a445 19-Aug-2013 Ian Rogers <irogers@google.com> Build fix.

A static field was moved from an inner to an outer class in ConcurrentHashMap
leading to a disallowed call.
Also, tidy comments on other java.util.concurrent black listed classes.

(cherry picked from commit 65530499a0169b3b0b153008e2d187c9f4939541)

Change-Id: I918f567c5b84d9f16f91772bee89cda29f058750
65530499a0169b3b0b153008e2d187c9f4939541 19-Aug-2013 Ian Rogers <irogers@google.com> Build fix.

A static field was moved from an inner to an outer class in ConcurrentHashMap
leading to a disallowed call.
Also, tidy comments on other java.util.concurrent black listed classes.

Change-Id: Iccd808766dcd5406a5bb49a4b98f570606730250
90af14d2743614e3e1453984b14258a6f145501d 16-Aug-2013 Dragos Sbirlea <dragoss@google.com> Get SEA fibonacci running in interpreter mode.

Android.mk: Added new file to build.
compile_driver.cc: Moved SE_IR usage test in the block
protected by bool compile, which is enabled by
adding a sepatate test in IsCnadidateForCompilation.
class_linker.cc: Added check in NeedsInterpreter to enable SEA_IR.
art_method-inl.h: DIsabled check in SEA_IR mode.
method_verifier.cc: Added check for SEA_IR mode.
method_verifier.h: Chenged IsCandidateForCompilation signature to
allow testing the function name (for SEA_IR selective
compilation).
dot_gen.h: Updated ART file API usage to altest version.
sea_ir/frontend.cc: Passing function symbol name to CompileMethod.
instruction_Nodes.h: Added accessor for method index for
InvokeStatic IR node.
sea.cc: Added additional IR SignatureNode for function calls (extra
Method parameter). Fixed UnnamedConstant constant value.
sea.h: Passing function_name to GenerateLLVM.
type_inference_visitor.cc: Aded type for first (placeholder) method
parameter.

Change-Id: I295858ea0761a3dffb36f35748d8b93d4919d6a9
02e25119b15a6f619f17db99f5d05124a5807ff3 15-Aug-2013 Mathieu Chartier <mathieuc@google.com> Fix up TODO: c++0x, update cpplint.

Needed to update cpplint to handle const auto.

Fixed a few cpplint errors that were being missed before.

Replaced most of the TODO c++0x with ranged based loops. Loops which
do not have a descriptive container name have a concrete type instead
of auto.

Change-Id: Id7cc0f27030f56057c544e94277300b3f298c9c5
bd136a29f08486525d6abc7d0a0006ce5b4011c1 14-Aug-2013 Dragos Sbirlea <dragoss@google.com> Get PORTABLE + SMALL on x86.

Implemented the portable resolution trampoline and
the portable to interpreter bridge.
Also work on integrating SEA_IR in the PORTABLE+SMALL framework.
Refactor some naming and correct indenting.

Change-Id: Ibd97da5e5b6f5148274c9bff368e3654b661ef51
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
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
67f99418f648c3a95256ed3dcd8e8b64eef0b372 12-Aug-2013 Anwar Ghuloum <anwarg@google.com> Yet more timing logger cleanup

Some cleanup of timing logger placement, additional systrace placement for
threaded compilation work, tweaking/hiding of some type names per previous
review comments.

Change-Id: Ic7db2e02747282ac7f474b9a060df9803bfdfa5e
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
468532ea115657709bc32ee498e701a4c71762d4 05-Aug-2013 Ian Rogers <irogers@google.com> Entry point clean up.

Create set of entry points needed for image methods to avoid fix-up at load time:
- interpreter - bridge to interpreter, bridge to compiled code
- jni - dlsym lookup
- quick - resolution and bridge to interpreter
- portable - resolution and bridge to interpreter

Fix JNI work around to use JNI work around argument rewriting code that'd been
accidentally disabled.
Remove abstact method error stub, use interpreter bridge instead.
Consolidate trampoline (previously stub) generation in generic helper.
Simplify trampolines to jump directly into assembly code, keeps stack crawlable.
Dex: replace use of int with ThreadOffset for values that are thread offsets.
Tidy entry point routines between interpreter, jni, quick and portable.

Change-Id: I52a7c2bbb1b7e0ff8a3c3100b774212309d0828e
(cherry picked from commit 848871b4d8481229c32e0d048a9856e5a9a17ef9)
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
848871b4d8481229c32e0d048a9856e5a9a17ef9 05-Aug-2013 Ian Rogers <irogers@google.com> Entry point clean up.

Create set of entry points needed for image methods to avoid fix-up at load time:
- interpreter - bridge to interpreter, bridge to compiled code
- jni - dlsym lookup
- quick - resolution and bridge to interpreter
- portable - resolution and bridge to interpreter

Fix JNI work around to use JNI work around argument rewriting code that'd been
accidentally disabled.
Remove abstact method error stub, use interpreter bridge instead.
Consolidate trampoline (previously stub) generation in generic helper.
Simplify trampolines to jump directly into assembly code, keeps stack crawlable.
Dex: replace use of int with ThreadOffset for values that are thread offsets.
Tidy entry point routines between interpreter, jni, quick and portable.

Change-Id: I52a7c2bbb1b7e0ff8a3c3100b774212309d0828e
834b394ee759ed31c5371d8093d7cd8cd90014a8 31-Jul-2013 Brian Carlstrom <bdc@google.com> Merge remote-tracking branch 'goog/dalvik-dev' into merge-art-to-dalvik-dev

Change-Id: I323e9e8c29c3e39d50d9aba93121b26266c52a46
75021222d9c03a80fa5c136db0d5fb8d82d04031 16-Jul-2013 Sebastien Hertz <shertz@google.com> Adds a DEX-to-DEX compilation level.

This CL adds a DEX-to-DEX compilation level which allows the DEX-to-DEX
compiler to ensure correctness on classes with soft-failed verification.

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

Change-Id: Iae286862c85fb8fd8901eae1204cd6d271d69496
4d4adb1dae07bb7421e863732ab789413a3b43f0 24-Jul-2013 Sebastien Hertz <shertz@google.com> Prevent verifier from creating unused compilation data.

The verifier used to create data which may be unused like GC map. This is the
case for non-compiled method (which are interpreted). This CL aims to optimize
this.

Here are the changes:
- Move compilation selection to MethodVerifier::IsCandidateForCompilation.
- Compiler and verifier use this method to know if a method must be compiled.
- Only create compilation data while compiling using Runtime::IsCompiler.
- Do not create internal structures concerning GC map, ... in Runtime::Init and
Runtime::Shutdown when we are not compiling.
- Checks we are compiling when accessing these structures.
- Add missing destruction of MethodVerifier::safecast_map_lock_ and
MethodVerifier::safecast_map_ in Runtime::Shutdown.
- Call Runtime::Shutdown just before Runtime instance is destroyed to avoid a
crash.
- Add missing "GUARDED_BY" macro for MethodVerifier::rejected_classes_ field.
- Add "has_check_casts" to avoid the safecast pass if there is no check-cast
instruction.
- Add "has_virtual_or_interface_invokes" to avoid the devirtualization pass if
there is no invoke-virtual/range nor invoke-interface/range instructions.

Bug: 9987437
Change-Id: I418ee99f63e4203409cf5b7d2c2295b22fcf24c1
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
d792cc1569c3505d68352c11a72447419ee6eaaf 25-Jul-2013 Brian Carlstrom <bdc@google.com> Add art support for Zygote NoPreloadHolder which black lists early initialization.

Change-Id: I9c68f6d7a1f230aba6382b1331d413d4cb92be12
21a5f6959d1429100e1c16ddabe10cde2bfeb121 24-Jul-2013 Brian Carlstrom <bdc@google.com> Update blacklist with HttpsURLConnection$DefaultHolder

(cherry picked from commit 8f20ff4354fd3fdd7604a299b7bf4446e5f4584c)

Change-Id: I8fbdd87977d8d320178854b956845ed8dc6d14d0
8f20ff4354fd3fdd7604a299b7bf4446e5f4584c 24-Jul-2013 Brian Carlstrom <bdc@google.com> Update blacklist with HttpsURLConnection$DefaultHolder

Change-Id: Ib0a8b9511dc8e63d14f11ba48b80dfb78e32d25e
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
4560248d4c85cade7f4fc7b30c3fb41b95a04a7f 22-Jul-2013 Brian Carlstrom <bdc@google.com> Move TimingLogger creation to dex2oat

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

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

Change-Id: Ice937e95e23dd622c17054551d4ae4cebd0ef8a2
2ce745c06271d5223d57dbf08117b20d5b60694a 18-Jul-2013 Brian Carlstrom <bdc@google.com> Fix cpplint whitespace/braces issues

Change-Id: Ide80939faf8e8690d8842dde8133902ac725ed1a
56d947fbc9bc2992e2f93112fafb73e50d2aaa7a 15-Jul-2013 Brian Carlstrom <bdc@google.com> Add verification of boot.oat generated on device

Change-Id: I069586205a9a92fc7375ccf5cdde136bbbcfc800
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