summaryrefslogtreecommitdiffstats
path: root/compiler/image_writer.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge "Implement Interface Method Tables (IMT)." into dalvik-devJeff Hao2013-10-291-0/+12
|\ \
| * | Implement Interface Method Tables (IMT).Jeff Hao2013-10-291-0/+12
| |/ | | | | | | Change-Id: Idf7fe85e1293453a8ad862ff2380dcd5db4e3a39
* | Fix object identity hash.Mathieu Chartier2013-10-291-1/+25
|/ | | | | | | | | | | | | The object identity hash is now stored in the monitor word after being computed. Hashes are computed by a pseudo random number generator. When we write the image, we eagerly compute object hashes to prevent pages getting dirtied. Bug: 8981901 Change-Id: Ic8edacbacb0afc7055fd740a52444929f88ed564
* Throw IOException at source of failing to open a dex file.Ian Rogers2013-10-211-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* StringPiece clean up.Ian Rogers2013-09-241-2/+2
| | | | | | | | | | | Profile guided clean up. Try to avoid creating StringPieces with the contents of a dex file where the length is known. Try to avoid RegTypeCache::FromDescriptor when there's a class available. Make ConstantType::ConstantValue inlinable. Saving of about 50ms from a 2 threaded ThinkFree compile on host. Change-Id: I47a12c3c76f46e2c9805be1c3a3e3870fe1f5d85
* Use class def index from java.lang.Class.Ian Rogers2013-09-191-0/+1
| | | | | | | | | | | | Bug: 10244719 Depends on: https://googleplex-android-review.git.corp.google.com/362363 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. Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
* Write out image bitmap inside of image file.Mathieu Chartier2013-08-291-4/+38
| | | | | | | | | | | | We now create the image bitmap when we generate the image. The image bitmap is written after the image inside of the image file. This speeds up dex2oat by making walking the image during heap creation unnecessary. This should also help memory pressure by enabling the image bitmap to be swappable. Bug: 10432288 Change-Id: Idebf459ed15edbb41a7d9b9b353934155bce2f19
* Fix up TODO: c++0x, update cpplint.Mathieu Chartier2013-08-161-35/+13
| | | | | | | | | | | | 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
* Add flock(2)ing on dex-cache files to prevent racesBrian Carlstrom2013-08-151-2/+2
| | | | | Bug: 9071417 Change-Id: I1ee9ff281867f90fba7a8ed8bbf06b33ac29d511
* Refactor java.lang.reflect implementationBrian Carlstrom2013-08-131-23/+23
| | | | | | | | | | | 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
* Uleb128 compression of vmap and mapping table.Ian Rogers2013-08-091-2/+2
| | | | | | Bug 9437697. Change-Id: I30bcb97d12cd8b46d3b2cdcbdd358f08fbb9947a
* Entry point clean up.Ian Rogers2013-08-071-45/+62
| | | | | | | | | | | | | | | | | | 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
* Fix cpplint whitespace/comments issuesBrian Carlstrom2013-07-261-3/+3
| | | | Change-Id: Iae286862c85fb8fd8901eae1204cd6d271d69496
* Remove OatWriter buffering to memory for ElfWriterQuickBrian Carlstrom2013-07-241-0/+4
| | | | | | This allows the oat contents to be directly written to the file. Change-Id: Ibc7ddf57477b152f07784b52f7334be73fd22833
* Fix cpplint build/namespaces issuesBrian Carlstrom2013-07-181-1/+8
| | | | Change-Id: I19c68703270c1482d6c6aad8cdf97d3d2924360a
* Fix cpplint whitespace/braces issuesBrian Carlstrom2013-07-171-1/+1
| | | | Change-Id: Ide80939faf8e8690d8842dde8133902ac725ed1a
* Create separate Android.mk for main build targetsBrian Carlstrom2013-07-121-0/+680
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