summaryrefslogtreecommitdiff
path: root/runtime/obj_ptr-inl.h
Commit message (Collapse)AuthorAgeFilesLines
* Clean up explicit conversions to ObjPtr<>.Vladimir Marko2019-03-291-10/+8
| | | | | | | | | | | | Add an ObjPtr<>::DownCast() overload that takes a plain pointer and remove unnecessary calls to MakeObjPtr(), usually preceding DownCast(). Move the MakeObjPtr() to common_art_test.h . Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: I2a243b6d8f3b2e773396dfc53b659c5f7d9ea44a
* ObjPtr<>-ify mirror::Throwable.Vladimir Marko2019-03-271-6/+6
| | | | | | | | | And do some cleanup after previously submitted changes. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: I4f8e118bb385a9cba464a564b15addc1c7306ac2
* ART: Clean up obj_ptr.h and obj_ptr-inl.h .Vladimir Marko2019-03-261-0/+115
| | | | | | | | | | | | | | | | Move ObjPtr<> member function definitions that depend on other functions in obj_ptr-inl.h also to the obj_ptr-inl.h. Use C++14 std::enable_if_t<> and C++17 std::is_base_of_v<>. Improve kObjPtrPoisoningValidateOnCopy code readability (avoid ternary operator). Move relational opeators to namespace scope and reimplement != as negation of ==. Also move PtrCompression<>::Compress(ObjPtr<>) to the object_reference-inl.h which includes obj_ptr-inl.h. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I5116c0e322775c19a88687f30742ef654a8be873
* ART: Use iosfwd moreAndreas Gampe2019-01-091-0/+2
| | | | | | | | | Use iosfwd where an include of ostream is unnecessary. Also move callee_save_type.h to runtime. Bug: 119869270 Test: mmma art Change-Id: Id8995d6f524e4c491eb6f57fdffb940cf35d291f
* Revert^2 "Load boot image at a random address."Vladimir Marko2018-09-281-5/+12
| | | | | | | | | | | | | | | This reverts commit f3d077373536c54824e4449759dff2f18369eab3. Fixed Heap constructor to reserve extra space for GSS. Change-Id: I6a65be35f4aa183304db5491da4a4810d8e3b266 Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --relocate --no-relocate Test: Pixel 2 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing --relocate --no-relocate Test: art/test/testrunner/run_build_test_target.py -j48 art-gtest-gss-gc-tlab Bug: 77856493
* Revert "Load boot image at a random address."Vladimir Marko2018-09-271-12/+5
| | | | | | | | | This reverts commit 5ad79d85d77a42456728897ac3e2e7d4530e618e. Reason for revert: Breaks GSS garbage collection config. Bug: 77856493 Change-Id: Ifa39966ac2470154f8ba093de4804689d545219b
* Load boot image at a random address.Vladimir Marko2018-09-261-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And perform in-place fixup of references and pointers. This dirties all the boot image memory loaded by zygote, so there shall be no "shared clean" boot image pages anymore, these shall change to "shared dirty". However, as we're using a profile-based boot image, these pages are presumably used often enough and unlikely to be paged out anyway. The in-place fixup takes around 60-120ms when starting the zygote on aosp_taimen-userdebug. However, an experiment with MAP_POPULATE pushes the raw fixup down to around 12-15ms. If we used compressed images, this would be the actual time for fixup as the data would be already present in memory. If we keep using uncompressed images, we shall need to tune the loading with MAP_POPULATE or MADV_WILLNEED. The -Xrelocate/-Xno-relocate option is re-interpreted from "use patchoat if needed" to "relocate the boot image in memory if possible". We do not allow relocation for the AOT compilation to speed up dex2oat execution and help producing deterministic output. The patchoat tool shall be removed in a follow-up CL. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --relocate --no-relocate Test: Pixel 2 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing --relocate --no-relocate Bug: 77856493 Change-Id: I2db1fabefb5d4b85c798cd51e04c78cb232bff4a
* ART: Clean up allocator.hAndreas Gampe2017-06-081-0/+1
| | | | | | | | Move the single-use typedefs to their users. Remove now-unused includes. Fix up transitive includes. Test: m Change-Id: I953d774b28f1e4f3191f96943e3a69ce66aa398a
* ART: Introduce thread-current-inl.hAndreas Gampe2017-06-021-1/+1
| | | | | | | | | | | Factor out Thread::Current() code into its own -inl file to remove transitive includes. This requires at the same time correcting mutex.h, i.e., moving some functions into mutex-inl.h. Test: m test-art-host Change-Id: I88f888b604e0897368d9b483edce6ce4332dd9c9
* ART: Remove ObjPtr kPoison template parameterAndreas Gampe2017-02-221-11/+11
| | | | | | | | | | Move to a global constexpr, so that object pointer poisoning can be explicitly turned off for lower debug build overhead. Bug: 35644797 Test: m Test: m test-art-host Change-Id: I2412b67cbec144f2aee206fb48591abe581fd00a
* Move Heap parameters to ObjPtrMathieu Chartier2016-10-121-1/+1
| | | | | | | | | | Deleted some unused object dumping code. Test: test-art-host Bug: 31113334 Change-Id: I747220caafe6679591fd4b361d7f50383a046164
* Rename ObjPtr::Decode to ObjPtr::PtrMathieu Chartier2016-10-041-2/+2
| | | | | | | | | Done to prevent ambiguity with ScopedObjectAccess::Decode. Bug: 31113334 Test: test-art-host Change-Id: I07a2497cc9cf66386311798933547471987fc316
* Clean up ScopedThreadStateChange to use ObjPtrMathieu Chartier2016-09-291-0/+7
| | | | | | | | | | | | | | | Also fixed inclusion of -inl.h files in .h files by adding scoped_object_access-inl.h and scoped_fast_natvie_object_access-inl.h Changed AddLocalReference / Decode to use ObjPtr. Changed libartbenchmark to be debug to avoid linkage errors. Bug: 31113334 Test: test-art-host Change-Id: I4d2e160483a29d21e1e0e440585ed328b9811483
* Use ObjPtr for reflection.cc/h/inlMathieu Chartier2016-09-271-0/+57
Changed Pretty helpers to use this to reduce usage of Decode. The eventual goal is not have almost any calls to ObjPtr::Decode. Moved ObjPtr out of mirror namespace for convenience. Added more PoisonObjectPointers calls in class linker, thread suspension. Bug: 31113334 Test: test-art-host Change-Id: I44d08db5143d95ed1b65e2f00f9749ef5cf379f7