summaryrefslogtreecommitdiffstats
path: root/oatdump
Commit message (Collapse)AuthorAgeFilesLines
* Reuse NoopCompilerCallbacks in oatdumpBrian Carlstrom2014-03-041-8/+3
| | | | Change-Id: Icb4d3941196c1a236f0184fe4d0b7f5838bc13bd
* Support compiler filters for boot classpathBrian Carlstrom2014-03-041-35/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove oat file location in the image.Nicolas Geoffray2014-03-041-43/+9
| | | | | | | | | 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
* Remove started runtime check in RevokeAllThreadLocalAllocationStacksMathieu Chartier2014-02-251-4/+13
| | | | | | | | | | This check occasionally caused some thread local allocation stacks to incorrectly not get revoked when multiple threads were allocating without a started runtime. This showed up in image_test with compaction enabled when we were initializing classes in the compiler driver. Change-Id: I7f28d072feea333c2503e35265ba25c51a6308fe
* Adds 2 new option args to oatdump:Dave Allison2014-02-241-10/+35
| | | | | | --dump:raw_mapping_table --dump:raw_gc_map Change-Id: Ic4af5ae5714329da616240abbe64b137ed67d221
* Fix oatdumpd.Hiroshi Yamauchi2014-02-201-0/+4
| | | | | Bug: 13063529 Change-Id: I777cd7621ed522b8ab84c5bb1a9d2e5583817a08
* Object model changes to support 64bit.Ian Rogers2014-02-061-87/+119
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix oatdump "compilercallbacks" option for runtime.Vladimir Marko2014-01-021-1/+7
| | | | | | | | | The "compilercallbacks" runtime option replaced "compiler" in I708ca13227c809e07917ff3879a89722017e83a9 . Fix a comment in codegen_util.cc . Change-Id: I2c5ebd56dd96f0ee8e62b602bfe45357565471ff
* Compacting collector.Mathieu Chartier2013-11-111-30/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compacting collector is currently similar to semispace. It works by copying objects back and forth between two bump pointer spaces. There are types of objects which are "non-movable" due to current runtime limitations. These are Classes, Methods, and Fields. Bump pointer spaces are a new type of continuous alloc space which have no lock in the allocation code path. When you allocate from these it uses atomic operations to increase an index. Traversing the objects in the bump pointer space relies on Object::SizeOf matching the allocated size exactly. Runtime changes: JNI::GetArrayElements returns copies objects if you attempt to get the backing data of a movable array. For GetArrayElementsCritical, we return direct backing storage for any types of arrays, but temporarily disable the GC until the critical region is completed. Added a new runtime call called VisitObjects, this is used in place of the old pattern which was flushing the allocation stack and walking the bitmaps. Changed image writer to be compaction safe and use object monitor word for forwarding addresses. Added a bunch of added SIRTs to ClassLinker, MethodLinker, etc.. TODO: Enable switching allocators, compacting on background, etc.. Bug: 8981901 Change-Id: I3c886fd322a6eef2b99388d19a765042ec26ab99
* Merge "Fix oatdump and valgrind." into dalvik-devIan Rogers2013-11-061-4/+15
|\
| * Fix oatdump and valgrind.Ian Rogers2013-11-061-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 11531382 Move allocation instrumentation out of runtime into instrumentation. Don't attempt to suspend threads in unstarted runtimes. Make indentation support sputc returning eof, on which it will sync and try again. A further failure likely means the disk is full. Move the dump-oat output directory to be art as now there's too much output to fit all the dump-oat data in our standard /tmp. Change-Id: I8ea848ace318552c180e2efa46570288ff1ca62c
* | Support hardware divide instructionDave Allison2013-11-051-0/+3
|/ | | | | | | | | | | | | | | | | | | | | 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
* Implement Interface Method Tables (IMT).Jeff Hao2013-10-291-1/+4
| | | | Change-Id: Idf7fe85e1293453a8ad862ff2380dcd5db4e3a39
* Omit OatMethodOffsets for classes without compiled codeBrian Carlstrom2013-10-281-2/+4
| | | | Change-Id: If0d290f4aebc778ff12d8fed017c270ad2ac3220
* Throw IOException at source of failing to open a dex file.Ian Rogers2013-10-211-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* am ed51dca0: am 9fbe6cbd: am 8e3fb146: Revert "Add Jack modifier."Brian Carlstrom2013-10-101-4/+1
|\ | | | | | | | | * commit 'ed51dca05ca81dc753d86f26c3b372a6a87f5260': Revert "Add Jack modifier."
| * Revert "Add Jack modifier."Brian Carlstrom2013-10-091-4/+1
| | | | | | | | | | | | This reverts commit 6ffd0967027c092a62d7100ca42ceded369c8ca1. Change-Id: Ia69241a5100e8f740379e2ed944279de4daaf9ed
* | am 334d017c: am a968219b: am 6f277751: Make oatdump support image file ↵Brian Carlstrom2013-10-021-1/+11
|\ \ | |/ | | | | | | | | | | generated on device * commit '334d017c2c66731e545a416a76db7fcd621461e3': Make oatdump support image file generated on device
| * Make oatdump support image file generated on deviceBrian Carlstrom2013-09-301-1/+11
| | | | | | | | | | Bug: 11012947 Change-Id: Ic7bce4cbf1c00e219c2d312e85b27b980b1396f2
| * Use class def index from java.lang.Class.Ian Rogers2013-09-211-15/+17
| | | | | | | | | | | | | | | | | | | | | | 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
* | StringPiece clean up.Ian Rogers2013-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Move disassembler out of runtime.Ian Rogers2013-09-091-4/+4
|/ | | | | Bug: 9877500. Change-Id: Ica6d9f5ecfd20c86e5230a2213827bd78cd29a29
* Fix oatdump to take bitmap bytes into its accounting.Mathieu Chartier2013-08-301-1/+7
| | | | | | Bug: 10567842 Change-Id: I14d921343bc54598a83cfcf8d7185dca702c2739
* Merge "Write out image bitmap inside of image file." into klp-devMathieu Chartier2013-08-291-0/+3
|\
| * Write out image bitmap inside of image file.Mathieu Chartier2013-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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 sort order to make register promotion stableBrian Carlstrom2013-08-231-4/+4
|/ | | | | | Also some minor oatdump fixes Change-Id: I5679835bf684b98d130b77ecf00bda5f6547d383
* Fix up TODO: c++0x, update cpplint.Mathieu Chartier2013-08-161-22/+15
| | | | | | | | | | | | 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-1/+1
| | | | | 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
* Merge "Add a systrace support for lock contention logging." into dalvik-devHiroshi Yamauchi2013-08-131-2/+2
|\
| * Add a systrace support for lock contention logging.Hiroshi Yamauchi2013-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | - 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
* | Work on SMALL_ART and PORTABLE working at the same time.Dragos Sbirlea2013-08-131-1/+3
|/ | | | Change-Id: Iddedf63b6f9d908717a4d30f963e9b81a9604d49
* Uleb128 compression of vmap and mapping table.Ian Rogers2013-08-091-80/+64
| | | | | | Bug 9437697. Change-Id: I30bcb97d12cd8b46d3b2cdcbdd358f08fbb9947a
* Fix cpplint whitespace/comments issuesBrian Carlstrom2013-07-261-1/+1
| | | | Change-Id: Iae286862c85fb8fd8901eae1204cd6d271d69496
* am 55c0ac85: Merge "Enable darwin target build for art."Brian Carlstrom2013-07-231-5/+7
|\ | | | | | | | | * commit '55c0ac8528fb07c9f0900013b828ee8c60120860': Enable darwin target build for art.
| * Enable darwin target build for art.Brian Carlstrom2013-07-231-5/+7
| | | | | | | | Change-Id: I8fc04258360d663d2fcd07c307fdfdd2981cdd19
* | Fix oatdump to work after selinux OatFile installd changeBrian Carlstrom2013-07-181-0/+4
|/ | | | Change-Id: I993eceef726fca37fd4c79bc0872fb28899ae2f6
* Do not mark pages executable unnecessarily to play nice with selinuxBrian Carlstrom2013-07-121-1/+1
| | | | Change-Id: Ief4a5da38ac7c2cf7bf6f7a640cb63c5e8ed03bd
* Create separate Android.mk for main build targetsBrian Carlstrom2013-07-122-0/+1512
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