summaryrefslogtreecommitdiffstats
path: root/runtime/native
Commit message (Collapse)AuthorAgeFilesLines
* consolidate profiles and profile-cacheNick Kralevich2014-06-111-10/+1
| | | | | | | | | | | | | Ownership problems originally prevented using the same directory for /data/dalvik-cache/profiles and /data/dalvik-cache/profile-cache. Now that ownership is assigned via init.rc, we can consolidate these two directories. Old profile files are stored in /data/dalvik-cache/profiles/ with the "@old" extension. We use "@" instead of "." to avoid conflicts should someone create a package ending in ".old". Change-Id: Ic1b44009faa30d704855e97631006c4b990a4ad3
* Remove deprecated WITH_HOST_DALVIK.Ian Rogers2014-06-102-0/+11
| | | | | | | | | | | | | | | | | | | | | | | 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
* Merge "Clean up and augment Atomic class. Replace QuasiAtomic MemBars."Hans Boehm2014-06-061-3/+3
|\
| * Clean up and augment Atomic class. Replace QuasiAtomic MemBars.Hans Boehm2014-06-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a number of missing C++11 operations to Atomic class. Invoke the 64 bit routines in QuasiAtomic when necessary. Replace QuasiAtomic membars with fences that correspond to C++11 fences. QuasiAtomic was moved to the top of the file. Only fence implementations actually changed. This replaces some buggy uses of MembarStoreStore, as reported in b/14685856 . Avoid some redundant fences for long volatile operations. Incompletely converts low-level memory access operations to Atomic. Change-Id: Iea828431a0cea46540eb74fcaa02071cab6fdcda
* | Merge "Change FieldHelper to use a handle."Mathieu Chartier2014-06-061-32/+27
|\ \ | |/ |/|
| * Change FieldHelper to use a handle.Mathieu Chartier2014-06-061-32/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed compaction bugs related to FieldHelper::GetType in: artSet32InstanceFromCode SetFieldValueImpl CheckReceiver Field_set interpreter::DoFieldPut MethodVerifier::VerifyISGet MethodVerifier::VerifyISPut MethodVerifier::VerifyIGetQuick Bug: 13077697 Change-Id: I7de9ded2893b5568d43e4daa86fd135bf5508b72
* | Merge "Fixed and refactored profiler options handling"Calin Juravle2014-06-062-10/+8
|\ \
| * | Fixed and refactored profiler options handlingCalin Juravle2014-06-062-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | Merge "Clean up the sampling profiler"Calin Juravle2014-06-061-48/+30
|\ \ \ | |/ / | | / | |/ |/|
| * Clean up the sampling profilerCalin Juravle2014-06-061-48/+30
| | | | | | | | | | | | | | | | | | | | | | | | - rename variables/fields names to match the code style (use _underscore_names_) - extract common property parsing in utils.cc - fail to load profile file if any line is malformed - added ProfileFile to manage the profile data generate in the previous runs (replaces ProfileHelper and nests ProfileData) Bug: 12877748 Change-Id: Ie7bda30bfdeb7e78534c986615b0649eac12a97b
* | Merge "Use sendfile when copying profile file."Calin Juravle2014-06-041-20/+21
|\ \
| * | Use sendfile when copying profile file.Calin Juravle2014-06-041-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | This removes the 4k stack allocation and allow to activate -Wframe-larger-than=1728 compiler opion. Bug: 15278350 Change-Id: I389ffe06feb3c1c1bf620e20164cca04a0594788
* | | Merge "Fix a possible file descriptor leakage"Calin Juravle2014-06-041-8/+7
|\ \ \ | |/ /
| * | Fix a possible file descriptor leakageCalin Juravle2014-06-041-8/+7
| |/ | | | | | | | | Bug: 15279918 Change-Id: I7909a53f9028d2f445fb97a0a4293f36b3c012dd
* | Added workaround passing empty arg array for proxy invocation.Jeff Hao2014-06-021-3/+2
|/ | | | | | | | | | | This recreates old Dalvik behavior for older target sdk versions, but will still pass null for newer ones. Bug: 13247236 (cherry picked from commit 01d5a146e20660bd06f026c16f19ec080f8fdd7b) Change-Id: I911889cf559ad8d9f37ea9be3929387c86446851
* Merge "Compaction cleanup for FindArrayClass."Mathieu Chartier2014-05-302-4/+5
|\
| * Compaction cleanup for FindArrayClass.Mathieu Chartier2014-05-302-4/+5
| | | | | | | | | | | | | | | | We now pass double pointer in to signify that it can cause thread suspension, this double pointer gets wrapped by a handle if don't find the array class in the cache. Change-Id: I43436b6c35597c7252b65d1180baddb5ac4caabb
* | ART: Use StackReference in Quick Stack FrameAndreas Gampe2014-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method reference at the bottom of a quick frame is a stack reference and not a native pointer. This is important for 64b architectures, where the notions do not coincide. Change key methods to have StackReference<mirror::ArtMethod>* parameter instead of mirror::ArtMethod**. Make changes to invoke stubs for 64b archs, change the frame setup for JNI code (both generic JNI and compilers), tie up loose ends. Tested on x86 and x86-64 with host tests. On x86-64, tests succeed with jni compiler activated. x86-64 QCG was not tested. Tested on ARM32 with device tests. Fix ARM64 not saving x19 (used for wSUSPEND) on upcalls. Tested on ARM64 in interpreter-only + generic-jni mode. Fix ARM64 JNI Compiler to work with the CL. Tested on ARM64 in interpreter-only + jni compiler. Change-Id: I77931a0cbadd04d163b3eb8d6f6a6f8740578f13
* | Fix DexFile.entries to return class names, not class descriptorsBrian Carlstrom2014-05-281-2/+2
|/ | | | | | | | Bug: 15141726 (cherry picked from commit f2f9daf9ba33b15abddfc8f8d03a708a7908b765) Change-Id: I28ce8aae1713a9826a3373e1eb60e0edf267f64c
* Merge "Revert "Revert "Fix an outstanding compaction bug in interpreter."""Mathieu Chartier2014-05-231-5/+3
|\
| * Revert "Revert "Fix an outstanding compaction bug in interpreter.""Mathieu Chartier2014-05-231-5/+3
| | | | | | | | | | | | | | | | | | | | Fixed the generic trampoline to not use ToJObject when unnecessary. Bug: 15167269 This reverts commit 3bdb873122964da7937eb070cbcf2ef638a8e459. Change-Id: I0525d0e0f3afb753c770e1572070a0fa22b02271
* | Merge "Add a check for null thread before trying to suspend"Sebastien Hertz2014-05-231-1/+7
|\ \ | |/ |/|
| * Add a check for null thread before trying to suspendJohnnie Birch2014-05-221-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | The patch fixes a jpda test failure due to a failed assertion in SuspendThreadByThreadId. There should be a check for a null thread before the assertion check. This was the behavior of previous code (4.4.2) where this test passes, but this check was removed during some refactoring of the code. Change-Id: Ia63de5f159ce1e51110bf9dc604011d07b2f048e Signed-off-by: Johnnie Birch <johnnie.l.birch.jr@intel.com>
* | Revert "Fix an outstanding compaction bug in interpreter."Mathieu Chartier2014-05-221-3/+5
| | | | | | | | | | | | This reverts commit e09ae0920be57760fb390b6944bce420fa0b5582. Change-Id: I48036306130d5ccfec683d0dc3e9a642a02ee9c1
* | Fix an outstanding compaction bug in interpreter.Mathieu Chartier2014-05-221-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a bug in DoFieldPut where the FieldHelper GetType could cause thread suspension which would result in a stale obj. Added more handles in the class linker to facilitate moving fiels and methods in the future. Removed un-necessarly passing handle references since these are value types and don't need to be passed by reference. Added a special NullHandle type which allows null handles without a handle scope. Change-Id: I1b51723920a2e4f4f8b2907066f578a3e879fd5b
* | Merge "Support new VMRuntime native methods"Sebastien Hertz2014-05-221-0/+18
|\ \
| * | Support new VMRuntime native methodsSebastien Hertz2014-05-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Implements vmInstructionSet, is64Bit and isCheckJniEnabled methods. Bug: 14888999 Bug: 14888124 Change-Id: I8a2d3f22f84a093be2fbc74464af6aa7b2a2bebb
* | | Up-to-date odex files should take precedence over profile checksBrian Carlstrom2014-05-191-46/+46
| | | | | | | | | | | | Change-Id: I70b1e2537dc7c45334a70a4b9ec75329221090bc
* | | Fix DexFile.getClassNameList.Ian Rogers2014-05-191-1/+1
| | | | | | | | | | | | | | | Bug: 15086891 Change-Id: I8eaf0d19a56ecaea236e93e84131f5e4ff0843f6
* | | Merge "Now we have a proper C++ library, use std::unique_ptr."Ian Rogers2014-05-202-3/+3
|\ \ \
| * | | Now we have a proper C++ library, use std::unique_ptr.Ian Rogers2014-05-192-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
* | | | Don't get and restore thread state for ScopedFastNativeObjectAccess.Mathieu Chartier2014-05-191-2/+2
|/ / / | | | | | | | | | | | | | | | | | | Before we would ensure that we were runnable for fast native object access. However, these are done when you are already runnable. Change-Id: Ia4c6e4c83d146fe2a988b37b3133ca46b0f0fa42
* | | Merge "Add ISA directory to image and odex pathnames."Brian Carlstrom2014-05-191-2/+4
|\ \ \ | |/ / |/| |
| * | Add ISA directory to image and odex pathnames.Brian Carlstrom2014-05-161-2/+4
| | | | | | | | | | | | | | | | | | Bug: 14882223 Bug: 14694978 Change-Id: Ic1b5ae836b8e91ea461dcd4f3da8e38dc3bec00f
* | | Delete ClassHelper and fix compaction bug in GetDirectInterfaceMathieu Chartier2014-05-183-6/+9
|/ / | | | | | | | | | | | | | | | | | | | | Cleanup helps to prevent compaction bugs. Fixed a fairly serious compaction error caused by calling ClassHelper::GetDirectInterface without handling the case where it causes thread suspension due to ResolveType. Bug: 8981901 Change-Id: I82b3bb6dd48d21eb6ece7aae0733c4a23c2bc408
* | Avoid some unnecessary use of stl types.Ian Rogers2014-05-152-21/+40
|/ | | | | | | May be a minor performance win but really done for libc++ as this removes a dependency on a library function whose prototype includes a std::string. Change-Id: Ifc07a9caef1206caf2a69a6e1b0bfc0ba56c8c62
* Merge "Ensure JNI primitive array type is appropriate."Ian Rogers2014-05-141-8/+0
|\
| * Ensure JNI primitive array type is appropriate.Ian Rogers2014-05-141-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the primitive array type for GetPrimitiveArray, ReleasePrimitiveArray, GetPrimitiveArrayRegion and SetPrimitiveArrayRegion matches the given array type. Check the GetPrimitiveArrayCritical and ReleasePrimitiveArrayCritical are given a primitive array. Add unit tests that null parameters lead to fatal errors, not crashes. Fix issues where CheckJNI assumed non-null arguments. Tidy testing code via the use of nullptr. Add a few extra checks. Ensure arrays of void are not able to be created, use RI compatible NoClassDefError. Bug: 14817823 Change-Id: I9903bcd800d0da1988ced07f61fb97b783c5deab
* | Add Handle/HandleScope and delete SirtRef.Mathieu Chartier2014-05-137-30/+39
|/ | | | | | | | | | | | | | | | 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
* Restore "Late-enable" loggingBrian Carlstrom2014-05-121-2/+2
| | | | | | It is referenced from "Debugging Android JNI with CheckJNI" Change-Id: I155138df4a894b33f0a1ae03344442a144a5fced
* Remove all LOG(DEBUG) which is not intended to be checked inBrian Carlstrom2014-05-091-2/+2
| | | | | Bug: 14632493 Change-Id: Id9da8b87798af0a1b2bd2c178133e5f1ba47d43d
* Add concurrent reference processing.Mathieu Chartier2014-05-071-0/+42
| | | | | | | | | | | | | | | | | Concurrent reference processing currently works by going into native code from java.lang.ref.Reference.get(). From there, we have a fast path if the references aren't being processed which returns the referent without needing to access any locks. In the slow path we block until reference processing is complete. It may be possible to improve the slow path if the referent is blackened. TODO: Investigate doing the fast path in java code by using racy reads of a static volatile boolean. This will work as long as there are no suspend points inbetween the boolean read and referent read. Bug: 14381653 Change-Id: I1546b55be4691fe4ff4aa6d857b234cce7187d87
* Prevent spurious dexopts in 32-64 builds.Narayan Kamath2014-05-021-28/+4
| | | | | | | | | | | When we're checking if a file needs to be dexopted, we need to compare oat file checksums with the image checksum for the oat file's target instruction set and not the current runtime's target instruction set. bug:14475807 Change-Id: Ib44d8e3c6cdf3a37fce6332c694a6602c658e925
* Use instruction specific dalvik cache dirs.Narayan Kamath2014-05-011-34/+50
| | | | | | | | | | | | - 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
* Force inlining on trivial accessors.Ian Rogers2014-04-293-16/+17
| | | | | | | | | Make volatility for GetFieldObject a template parameter. Move some trivial mirror::String routines to a -inl.h. Bug: 14285442 Change-Id: Ie23b11d4f18cb15a62c3bbb42837a8aaf6b68f92
* Do not require dexopt when previous profile does not existBrian Carlstrom2014-04-251-14/+13
| | | | | | | Also turn down some dex2oat related noise Bug: 14184659 Change-Id: I134890f2c452d7f85ca4b736b5724f42533c2a7f
* Merge "Remove support for app JNI workarounds."Ian Rogers2014-04-221-15/+4
|\
| * Remove support for app JNI workarounds.Ian Rogers2014-04-221-15/+4
| | | | | | | | Change-Id: I4396df7e93fcace4b5b19c2c387e5c30089182a6
* | Warn when thread state lookup fails.Ian Rogers2014-04-221-0/+1
|/ | | | Change-Id: I06781caddcade26148921bc225f28db8b3a63a35
* Better error reporting when loading dex filesAndreas Gampe2014-04-081-5/+12
| | | | | | | Collect all partial error messages and return them as cause exceptions for the top-level exception returned. Change-Id: I9661b8aed2a571dc88bf0f06d447108eeaed1409