summaryrefslogtreecommitdiff
path: root/test/1974-resize-array/src
AgeCommit message (Collapse)Author
2019-09-17Fix test 1974Alex Light
Test 1974 would print different messages depending on if an object was freed or not. This could cause the test to incorrectly fail. Test: ./test.py --host Change-Id: Idbcfdb3c08412b7ea969b6ca6d95493342598e0c
2019-08-13Add obsolete object eventAlex Light
Add an extension event to notify agents that an object is becoming obsolete. This is meant to be used by agents performing allocation tracking using the VMObjectAlloc event to let them know that an object replacement is occurring. This event is only triggered by calls to JVMTI functions that create obsolete objects. Normal GC actions (including a moving compaction) will not cause this event to trigger. Test: ./test.py --host Bug: 134162467 Change-Id: If48b880814a751ba6c24c18d0ad116db4f8fdf64
2019-08-01Add resize arrays JVMTI extensionAlex Light
As a prototype for more general object replacement functionality add a new JVMTI extension that allows one to change the size of arrays. This extension is 'com.android.art.heap.change_array_size'. As far as any JVMTI agent, JNI or Java Language code can observer this extension atomically replaces every reference (strong and weak, global and local, etc.) with a newly allocated array with the same contents but a different length. Internally a whole new array will be created then the old array will have its contents (including lock-word) copied and all references to the old array will be replaced with the new array. Test: ./test.py --host Bug: 134162467 Change-Id: I92a0beabb02e0c92c8c8f9639836014ff1266878