android-riscv64 icon indicating copy to clipboard operation
android-riscv64 copied to clipboard

ART: Implement System.arraycopy intrinsic

Open alpencolt opened this issue 2 years ago • 6 comments

Need to implement:

  • [x] SystemArrayCopy
  • [ ] SystemArrayCopyChar
  • [ ] SystemArrayCopyByte
  • [ ] SystemArrayCopyInt

@enh-google could you assign issue to me

alpencolt avatar Nov 03 '23 15:11 alpencolt

What the proper way for testing intrinsic implementation before submitting commit? I use

./art/test/testrunner/testrunner.py --target --no-prebuild  --jit-on-first-use -j 8 --64

Is it enough?

alpencolt avatar Nov 15 '23 18:11 alpencolt

i asked the ART folks, and one said:

I think using AOT would be better than JIT but you could also run both with testrunner.py --target --64 --ndebug --optimizing --jit.

Just to clarify, the way to use testrunner on device is to use the chroot method.

while another said:

I usually test only --optimizing but if there is some JIT-specific code, I also test with --jit. I must admit that I'm not using --jit-on-first-use but it may actually be better than plain --jit in most cases (except when testing inline caches and other stuff that needs to warm up).

On riscv64, we currently have

  • two failures with --optimizing: 137-cfi (needs investigation) and 640-checker-integer-valueof (missing Integer.valueOf() intrinsic).
  • four failures with --jit: 137-cfi64, 845-data-image, 846-multidex-data-image, 913-heaps (all need investigation)

enh-google avatar Nov 16 '23 19:11 enh-google

@enh-google thank you! Yes, I use chroot based testing on cuttlefisg, but have more failures even without my changes, probably because of have not latest source code. I'm going to rebase and check it with different plans.

alpencolt avatar Nov 17 '23 11:11 alpencolt

(yeah, it's always worth running the tests before for this exact reason, especially with riscv64 where the status basically changes from day to day!)

enh-google avatar Nov 17 '23 22:11 enh-google

Made PR https://android-review.googlesource.com/c/platform/art/+/2854660 for basic SystemArrayCopy

alpencolt avatar Dec 01 '23 20:12 alpencolt

SystemArrayCopyChar/Byte/Int implementation: https://android-review.googlesource.com/c/platform/art/+/2939599

alpencolt avatar Feb 01 '24 18:02 alpencolt