History log of /art/runtime/mirror/object_reference.h
Revision Date Author Comments
8f4b056427a9d2321e3aa4f21ca8ffb18b3e5ae6 02-Mar-2018 David Sehr <sehr@google.com> Move most of runtime/base to libartbase/base

Enforce the layering that code in runtime/base should not depend on
runtime by separating it into libartbase. Some of the code in
runtime/base depends on the Runtime class, so it cannot be moved yet.
Also, some of the tests depend on CommonRuntimeTest, which itself needs
to be factored (in a subsequent CL).

Bug: 22322814
Test: make -j 50 checkbuild
make -j 50 test-art-host

Change-Id: I8b096c1e2542f829eb456b4b057c71421b77d7e2
Merged-In: c431b9dc4b23cc950eb313695258df5d89f53b22

(cherry picked from commit c431b9dc4b23cc950eb313695258df5d89f53b22)
09659c22dc2f2c85a0ade965d1fc5160944b8692 19-Sep-2017 Andreas Gampe <agampe@google.com> ART: Remove heap poisoning from globals.h

Remove mostly-unused include and move it to its users.

Test: m
Change-Id: Ibb40f919db64a490290c6e18cf1123aaf44199fc
ad8ebb38059b9fe47fde8b1390113eabba2ac888 10-Aug-2017 Mathieu Chartier <mathieuc@google.com> Use HeapReference for SafeGetClass

Make sure to use heap refernece here so the value read isn't bogus
for heap poisoning. Fixes heap poisoning tests that were broken for
implicit null checks.

Bug: 31023171
Test: test/testrunner/testrunner.py --interpreter --optimizing -j20 --host --verbose

Change-Id: Ia67cdb304be205773d781251235f8b0b4bf7c0bd
cc55e1dcdd2ec669c635420468b3cc4c99740f0a 28-Jul-2017 Hans Boehm <hboehm@google.com> Don't use fences to implement volatiles

Mixing the fence-based implementation with acquire/release instructions
on ARMv8 is not just ugly but incorrect. A volatile store; volatile
load sequence implemented as a release store followed by ld; dmb
does not prevent reordering.

This should remove the last places we were using fences to implement
volatiles.

The HeapReference representation is changed to be an Atomic,
thereby avoiding many casts. We no longer inherit from ObjectReference,
which was documented to be a value type. HeapReference is not, since
it contains an atomic.

Disentangle HeapReference and ObjectReference/CompressedReference
uses sufficiently to get the code to compile again. They were
previously used somewhat interchangably in a few places, in spite
of the different intended semantics (value-type vs. a concurrently-
updateable field). Further disentanglement might be useful.

Flag a strange fence use I haven't yet understood.

Test: Booted AOSP. Ran default tests. Some object code inspection.

Bug: 31023171

Test: Built AOSP
Change-Id: I7b3c3e624f480994541c8e3a79e585071c122a3d
65f5f247a367af9d6b9ac63767b69ecf3ab079bc 19-Dec-2016 Hiroshi Yamauchi <yamauchi@google.com> Fix race condition btw DelayReferenceRefernent vs Reference.clear().

Rename IsMarkedHeapReference to IsNullOrMarkedHeapReference.

Move the null check from the caller of IsMarkedHeapReference into
IsNullOrMarkedHeapReference.

Make sure that the referent is only loaded once between the null
check and the IsMarked call.

Use a CAS in ConcurrentCopying::IsNullOrMarkedHeapReference when
called from DelayReferenceRefernent.

Bug: 33389022
Test: test-art-host without and with CC.

Change-Id: I20edab4dac2a4bb02dbb72af0f09de77b55ac08e
1a5337fff2cc6cb9d563c8b32aca75f485d23373 13-Oct-2016 Mathieu Chartier <mathieuc@google.com> Move mirror::ObjectArray to ObjPtr

Also reduce calls to ObjPtr::Ptr.

Bug: 31113334

Test: test-art-host -j32

Change-Id: I73e1b356972bb079b66332f00f7f07451601044e
a058fdf0cf7435a13a6e8cae5e3a9bfa1513828d 07-Oct-2016 Mathieu Chartier <mathieuc@google.com> Move mirror::Object setters to ObjPtr

Bug: 31113334

Test: test-art-host

Change-Id: I2c4c84645e194c3c435a4a6fd670176b0e98671f
a5931185c97c7b17981a9fc5016834a0bdd9480b 02-Sep-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in art.

* Add explicit keyword to conversion constructors,
or NOLINT for implicit converters.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I1e1ee2661812944904fedadeff97b620506db47d
bdf7f1c3ab65ccb70f62db5ab31dba060632d458 31-Aug-2016 Andreas Gampe <agampe@google.com> ART: SHARED_REQUIRES to REQUIRES_SHARED

This coincides with the actual attribute name and upstream usage.
Preparation for deferring to libbase.

Test: m
Test: m test-art-host
Change-Id: Ia8986b5dfd926ba772bf00b0a35eaf83596d8518
90443477f9a0061581c420775ce3b7eeae7468bc 17-Jul-2015 Mathieu Chartier <mathieuc@google.com> Move to newer clang annotations

Also enable -Wthread-safety-negative.

Changes:
Switch to capabilities and negative capabilities.

Future work:
Use capabilities to implement uninterruptible annotations to work
with AssertNoThreadSuspension.

Bug: 20072211

Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
d3ed9a320a89cb9b91b2361892c043ab7e112717 10-Apr-2015 Mathieu Chartier <mathieuc@google.com> Fix DCHECK failures from Class::VisitFieldRoots

We now use GetDeclaringClassUnchecked when marking roots to fix
flaky test failures. Fixed a race condition in root marking where
we could have non zero field array length with a null pointer.
Fixed a race condition where we could be marking roots before
FixupTemporaryDeclaringClass had finished. The solution is to
only do the declaring class CHECK if we are at least resolved.
Fixed JDWP tests by changing FieldId / MethodId to be 64 bits.

Also some cleanup.

Change-Id: Ibac09519860d93c3f68a5cc964bbc91dc10a279a
bb87e0f1a52de656bc77cb01cb887e51a0e5198b 03-Apr-2015 Mathieu Chartier <mathieuc@google.com> Refactor and improve GC root handling

Changed GcRoot to use compressed references. Changed root visiting to
use virtual functions instead of function pointers. Changed root visting
interface to be an array of roots instead of a single root at a time.
Added buffered root marking helper to avoid dispatch overhead.

Root marking seems a bit faster on EvaluateAndApplyChanges due to batch
marking. Pause times unaffected.

Mips64 is untested but might work, maybe.

Before:
MarkConcurrentRoots: Sum: 67.678ms 99% C.I. 2us-664.999us Avg: 161.138us Max: 671us

After:
MarkConcurrentRoots: Sum: 54.806ms 99% C.I. 2us-499.986us Avg: 136.333us Max: 602us

Bug: 19264997

Change-Id: I0a71ebb5928f205b9b3f7945b25db6489d5657ca
b0fa5dc7769c1e054032f39de0a3f6d6dd06f8cf 29-Apr-2014 Ian Rogers <irogers@google.com> Force inlining on trivial accessors.

Make volatility for GetFieldObject a template parameter.
Move some trivial mirror::String routines to a -inl.h.

Bug: 14285442

Change-Id: Ie23b11d4f18cb15a62c3bbb42837a8aaf6b68f92
719d1a33f6569864f529e5a3fff59e7bca97aad0 06-Mar-2014 Ian Rogers <irogers@google.com> Enable annotalysis on clang ART builds.

Fix clang build errors aswell as restructure locking/mutex code for correct
thread safety analysis support.
Reorder make dependencies so that host builds build first as they should
provide better compilation errors than target.
Remove host's use of -fno-omit-frame-pointer as it has no value with correct
use of CFI, which we should have.

Change-Id: I72cea8da9a3757b1a0b3acb4081feccb7c6cef90
e63a745f26fec5a5b4162fc83f6e88a1f696c30c 27-Feb-2014 Hiroshi Yamauchi <yamauchi@google.com> Make heap reference poisoning work with the interpreter.

It is disabled by default.

Bug: 12687968
Change-Id: Iee0cad647f341a7b566f4cf74c2770d1c19312c9
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