summaryrefslogtreecommitdiff
path: root/runtime/linear_alloc-inl.h
AgeCommit message (Collapse)Author
2024-01-24Add visibility attributes in runtime/l* Dmitrii Ishcheikin
Bug: 260881207 Test: presubmit Test: abtd app_compat_drm Test: abtd app_compat_top_100 Test: abtd app_compat_banking Change-Id: I0a3d7b31dbe87e78ddf663b0914829913d3d3021
2023-09-28Correct handling ArtMethod array during class linking Lokesh Gidra
In case of userfaultfd, we were setting declaring_class_ of all ArtMethods to nullptr. This could cause problem if a GC is taking place simultaneously and it is visiting the ArtMethod array at the same time. Instead, we should convert the array to a 'no gc-root array' so that compaction code skips it. The marking-phase will simply skips it as it will no longer be pointed by the class. Bug: 301880194 Test: test infra Change-Id: I72007dd94ad71aa9ccc6005eb6d99b5a8c1ad7ee
2022-12-05Maintain pre-zygote fork linear-alloc pages as shared-clean Lokesh Gidra
Userfaultfd tends to dirty all the pages of the space it is used on. However, we want to maintain the shared-clean trait of the pages allocated in zygote process prior to first fork. This CL separates the pre-zygote fork arenas from the userfaultfd visited ones, thereby reataining the former's shared-clean trait. Bug: 160737021 Test: module install and enable uffd GC Change-Id: Iddffb2c8d2d234ce7b20c069d86341dda5443a9b
2022-12-05Make native GC-root updation concurrent with userfaultfd Lokesh Gidra
Additionally also uses userfaultfd's minor-fault feature for moving space. Bug: 160737021 Test: ART_USE_READ_BARRIER=false art/test/testrunner/testrunner.py and module install Change-Id: I98b0c69fba4aec1263b1f38cc9f31494fd5c8cf5
2022-10-05Update native GC roots page-by-page Lokesh Gidra
This CL enables updating native GC-roots during compaction page by page. It does so by using a single-space linear allocator for allocating ArtMethods/ArtFields/DexCache etc. and using a per-object header to describe the kind of object/array and its size. Under the hood it still uses arena allocator but the arenas are page-aligned regions taken from a single-space. This allows us in a future CL to use userfaultfd to protect this space during the compaction pause and then concurrently update the pages independently. Bug: 160737021 Test: ART_USE_READ_BARRIER art/test/testrunner/testrunner.py --host Change-Id: Ie52243741360f6008feccec76117d34c77ab1dcf