History log of /art/runtime/atomic.h
Revision Date Author Comments
bc4d218ce2ceef0c4f308d4ff42f7ec1ec43c40e 22-Feb-2016 Andreas Gampe <agampe@google.com> ART: Add unstarted-runtime functions

Add more functions to allow compile-time initialization of
code.

Bug: 27248115

(cherry picked from commit 0866f4ed6338faa4a193b7e819fc7cd72bd7b0ae)

Change-Id: Iaf8d92deb73547ccd31c0d6dde68da3bc14c3985
0866f4ed6338faa4a193b7e819fc7cd72bd7b0ae 22-Feb-2016 Andreas Gampe <agampe@google.com> ART: Add unstarted-runtime functions

Add more functions to allow compile-time initialization of
code.

Bug: 27248115
Change-Id: Iaf8d92deb73547ccd31c0d6dde68da3bc14c3985
b0171b9573c446724c10c86d41887d0133590b6c 29-Jan-2016 Hans Boehm <hboehm@google.com> Do not use atomic increment in allocation as fence.

A sequentially consistent fetch_and_add implemented with ARM v8 acquire
release operations is not a fence. Don't use it as one.

The result may also be somewhat faster, since a sequentially consistent
increment requires more fencing than needed for the increment.

Bug: 16377103
Change-Id: I5b1add098d3488aa755f140612e54521b80aa749
4d77b6a511659f26fdc711e23825ffa6e7feed7a 01-Dec-2015 Calin Juravle <calin@google.com> Save profile information in a separate thread.

Previously we would save the profiling information only when the app
was sent to background. This missed on an important number of updates
on the jit code cache and it didn't work for background processes.

Bug: 26080105

Change-Id: I84075629870e69b3ed372f00f4806af1e9391e0f
1a5c40672783fac98aca5a04ac798a0a0014de65 15-Jan-2015 Andreas Gampe <agampe@google.com> ART: Mips64 runtime support

Interpret-only Mips64 runtime support.

Change-Id: Iee22d0c8c77105d9b2f03a67dc4e09957fe0ab0a
575e78c41ece0dec969d31f46be563d4eb7ae43b 04-Nov-2014 Andreas Gampe <agampe@google.com> ART: Replace COMPILE_ASSERT with static_assert (runtime)

Replace all occurrences of COMPILE_ASSERT in the runtime tree.

Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
c85a899b23327c3d5693c8dabf5b482c3fb5ded8 12-Aug-2014 Dan Albert <danalbert@google.com> Revert "Revert "Remove GCC atomic workarounds.""

This reverts commit 626a2468e4e4f39db7b0f35a4fee87293e360e92.

(cherry picked from commit aab0f86e3b079598d41c3a00bfa765a7589c5110)

Change-Id: I2333b54dcfd5ee8227a6479d2e3814b25377bdfd
f0a37663309e468f11858bffa3221e7223cf577d 12-Aug-2014 Dan Albert <danalbert@google.com> Initialize art::Atomic's value to 0.

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

(cherry picked from commit 6a3f8d93ddf09b5f6667820089e488958cba8361)

Change-Id: Iab69bccac9f904111a72eff8162c7f0ca979a08a
6a3f8d93ddf09b5f6667820089e488958cba8361 12-Aug-2014 Dan Albert <danalbert@google.com> Initialize art::Atomic's value to 0.

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
aab0f86e3b079598d41c3a00bfa765a7589c5110 12-Aug-2014 Dan Albert <danalbert@google.com> Revert "Revert "Remove GCC atomic workarounds.""

This reverts commit 626a2468e4e4f39db7b0f35a4fee87293e360e92.
626a2468e4e4f39db7b0f35a4fee87293e360e92 12-Aug-2014 Jeff Hao <jeffhao@google.com> Revert "Remove GCC atomic workarounds."

This reverts commit a29ffd505328b3d580c25fff054e463b7cac08a8.

Change-Id: Ibb4845b8a1378f3d1fb0975f9677758f420f843f
a29ffd505328b3d580c25fff054e463b7cac08a8 11-Aug-2014 Ian Rogers <irogers@google.com> Remove GCC atomic workarounds.

libcxx now has compatibility with GCC atomic support.
Bug: 16301104

Change-Id: I0ba5abf7147e999a8329c9e8a48b3712370ee4a6
8c1b5f71a8005743756206120624121d7678381f 10-Jul-2014 Ian Rogers <irogers@google.com> Missed use of android_atomic and thread state_.

Move to using art::Atomic, add necessary FetchAnd... operations to art::Atomic.

Change-Id: I32f1cdc4e0a2037b73f459bf4bb4d544f357f41b
b8e087e0dfd619df90cbb56534478a60bc859ebf 10-Jul-2014 Ian Rogers <irogers@google.com> Move thread state to art::Atomic.

Leaves the CAS operations as relaxed although art::Atomic treats relaxed CAS
as a strong CAS when not compiling with clang.

Change-Id: I6d37c22173540d166b624385e52e4ad05e592adc
74240819ae09e29b2753ef38f4eb4be1c2762e2e 17-Apr-2014 Andreas Gampe <agampe@google.com> Use memory chunks for monitors on LP64

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
a55c697a8276b1c82b108a695bbd588725aa015e 07-Jun-2014 Andreas Gampe <agampe@google.com> ART: Fix casts in atomic.h to please GCC

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
2f4a2edda128bbee5c6ba6ba7e3cbca9260368c2 07-Jun-2014 Hans Boehm <hboehm@google.com> Don't assert int64_t alignment on x86.

Fix build.

Change-Id: I1b798bb3c5ab4954b46d54cda8f8c237ab4ae53e
a1ec065a4c5504d0619bde95e4da93c0564eafdb 07-Jun-2014 Hans Boehm <hboehm@google.com> Fix white space issues and long long use in assertion.

Fix Build.

Change-Id: If67a910ffed25c03c46638d6c132dc0e3a20ef62
3035961cb41865b80b927546be0c708b6389cec6 22-May-2014 Hans Boehm <hboehm@google.com> Clean up and augment Atomic class. Replace QuasiAtomic MemBars.

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
3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e 21-May-2014 Ian Rogers <irogers@google.com> Begin migration of art::Atomic to std::atomic.

Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333
63c5dd056fa20993b35ec5c8548b26c988445763 20-May-2014 Ian Rogers <irogers@google.com> Fix the sense of when mutexes are used for longs in atomic support.

Change-Id: Ice50519a511e98fdc2fe74cd9eb77c32872022b4
a984454098971739a1469d62cba02cda3600268b 22-Apr-2014 Ian Rogers <irogers@google.com> Avoid volatile 64-bit tearing on 32-bit architectures.

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
936b37f3a7f224d990a36b2ec66782a4462180d6 14-Feb-2014 Ian Rogers <irogers@google.com> Upcall support for x86-64.

Sufficient to pass jni_internal_test.

Change-Id: Ia0d9b8241ab8450e04765b9c32eb6dc8fc1a8733
5817e899c5dd5e82949433d7bfcbe61f63b2a5ff 18-Feb-2014 Stuart Monteith <stuart.monteith@arm.com> Aarch64: Add aarch64 memory barriers.

Aarch64 memory barriers are essentially the same as on ARMv7.

Change-Id: Id3e7ee5341833cae5062eec95dad888e1f60ae8d
Signed-off-by: Stuart Monteith <stuart.monteith@arm.com>
ef7d42fca18c16fbaf103822ad16f23246e2905d 06-Jan-2014 Ian Rogers <irogers@google.com> Object model changes to support 64bit.

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
b122a4bbed34ab22b4c1541ee25e5cf22f12a926 20-Nov-2013 Ian Rogers <irogers@google.com> Tidy up memory barriers.

Change-Id: I937ea93e6df1835ecfe2d4bb7d84c24fe7fc097b
fc0e3219edc9a5bf81b166e82fd5db2796eb6a0d 17-Jul-2013 Brian Carlstrom <bdc@google.com> Fix multiple inclusion guards to match new pathnames

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