summaryrefslogtreecommitdiffstats
path: root/runtime/atomic.h
Commit message (Collapse)AuthorAgeFilesLines
* ART: Mips64 runtime supportAndreas Gampe2015-01-151-0/+3
| | | | | | Interpret-only Mips64 runtime support. Change-Id: Iee22d0c8c77105d9b2f03a67dc4e09957fe0ab0a
* ART: Replace COMPILE_ASSERT with static_assert (runtime)Andreas Gampe2014-11-031-6/+6
| | | | | | Replace all occurrences of COMPILE_ASSERT in the runtime tree. Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
* Merge "Revert "Revert "Remove GCC atomic workarounds."""Dan Albert2014-08-121-346/+5
|\
| * Revert "Revert "Remove GCC atomic workarounds.""Dan Albert2014-08-111-346/+5
| | | | | | | | This reverts commit 626a2468e4e4f39db7b0f35a4fee87293e360e92.
* | Initialize art::Atomic's value to 0.Dan Albert2014-08-121-1/+1
|/ | | | | | | | | | art::Mutex and art::ConditionVariable were DCHECKing that the value was zero on entering the constructor without ever initializing the value. Since 0 is a sensible default, make it the default for art::Atomic rather than initializing for each use. Bug: 16301104 Change-Id: I9c98b82c80670b7a6c53d46a08236bbed6a64f8f
* Revert "Remove GCC atomic workarounds."Jeff Hao2014-08-111-5/+346
| | | | | | This reverts commit a29ffd505328b3d580c25fff054e463b7cac08a8. Change-Id: Ibb4845b8a1378f3d1fb0975f9677758f420f843f
* Remove GCC atomic workarounds.Ian Rogers2014-08-111-346/+5
| | | | | | | libcxx now has compatibility with GCC atomic support. Bug: 16301104 Change-Id: I0ba5abf7147e999a8329c9e8a48b3712370ee4a6
* Merge "Use memory chunks for monitors on LP64"Andreas Gampe2014-07-091-6/+19
|\
| * Use memory chunks for monitors on LP64Andreas Gampe2014-07-101-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Monitor IDs in lock words are only 30b. On a 32b system that works fine, as memory is usually aligned enough that shifting works out. On 64b systems, the virtual memory space is too large for that. This adds memory chunks into which we allocate the monitors so that we have base_addr + offset and can use the offset as the monitor ID. To allow for relatively compact but growable storage, we use a list of chunks. Added a global lock for the monitor pool. Change-Id: I0e290c4914a2556e0b2eef9902422d7c4dcf536d
* | Missed use of android_atomic and thread state_.Ian Rogers2014-07-091-0/+32
| | | | | | | | | | | | Move to using art::Atomic, add necessary FetchAnd... operations to art::Atomic. Change-Id: I32f1cdc4e0a2037b73f459bf4bb4d544f357f41b
* | Move thread state to art::Atomic.Ian Rogers2014-07-091-1/+1
|/ | | | | | | Leaves the CAS operations as relaxed although art::Atomic treats relaxed CAS as a strong CAS when not compiling with clang. Change-Id: I6d37c22173540d166b624385e52e4ad05e592adc
* ART: Fix casts in atomic.h to please GCCAndreas Gampe2014-06-061-4/+4
| | | | | | | | | | | GCC 4.9 for ARM64 is not happy about reinterpret_cast-ing between int64_t and uint64_t, which is according to spec. Change the concrete casts to static_cast. However, we also use this for pointers, and we cannot static_cast those to int64_t. So add a reinterpret_cast to uintptr_t. Change-Id: If6513fbcbb8ee8f610f172310af61cf2e9ab0c43
* Don't assert int64_t alignment on x86.Hans Boehm2014-06-061-2/+6
| | | | | | Fix build. Change-Id: I1b798bb3c5ab4954b46d54cda8f8c237ab4ae53e
* Fix white space issues and long long use in assertion.Hans Boehm2014-06-061-13/+11
| | | | | | Fix Build. Change-Id: If67a910ffed25c03c46638d6c132dc0e3a20ef62
* Clean up and augment Atomic class. Replace QuasiAtomic MemBars.Hans Boehm2014-06-061-163/+386
| | | | | | | | | | | | | | | | | | 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
* Begin migration of art::Atomic to std::atomic.Ian Rogers2014-05-201-21/+138
| | | | Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333
* Fix the sense of when mutexes are used for longs in atomic support.Ian Rogers2014-05-191-1/+1
| | | | Change-Id: Ice50519a511e98fdc2fe74cd9eb77c32872022b4
* Avoid volatile 64-bit tearing on 32-bit architectures.Ian Rogers2014-04-281-4/+63
| | | | | | | | | Change b122a4bbed34ab22b4c1541ee25e5cf22f12a926 removed inline assembly for volatile 64bit read/writes. This isn't sound in the general case, reinstate. Motivating change: https://android-review.googlesource.com/91250 Add optimizations for ARM in the case of LPAE support. Change-Id: Ie86d8885d27c8f0da75f0c3bd50d4553a331282f
* Merge "Upcall support for x86-64."Ian Rogers2014-02-201-1/+1
|\
| * Upcall support for x86-64.Ian Rogers2014-02-201-1/+1
| | | | | | | | | | | | Sufficient to pass jni_internal_test. Change-Id: Ia0d9b8241ab8450e04765b9c32eb6dc8fc1a8733
* | Aarch64: Add aarch64 memory barriers.Stuart Monteith2014-02-201-4/+4
|/ | | | | | | Aarch64 memory barriers are essentially the same as on ARMv7. Change-Id: Id3e7ee5341833cae5062eec95dad888e1f60ae8d Signed-off-by: Stuart Monteith <stuart.monteith@arm.com>
* Object model changes to support 64bit.Ian Rogers2014-02-061-4/+67
| | | | | | | | | | | | | | | | | | | | | | | 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
* Tidy up memory barriers.Ian Rogers2013-12-201-4/+90
| | | | Change-Id: I937ea93e6df1835ecfe2d4bb7d84c24fe7fc097b
* Fix multiple inclusion guards to match new pathnamesBrian Carlstrom2013-07-171-3/+3
| | | | Change-Id: Id7735be1d75bc315733b1773fba45c1deb8ace43
* Create separate Android.mk for main build targetsBrian Carlstrom2013-07-121-0/+57
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