Age | Commit message (Collapse) | Author |
|
Restore the BigInteger.remainder fallback test to check for small
results. Use RemainderKnuth if either the divisor or result is
short, as was done before. Checking for a short dividend doesn't
really make much sense, since that makes the result short as well.
Failed BN context allocations used to just pass null to the next
operation. Looking at the BN_mul implementation, it doesn't appear
that ends well. Explicitly check for that case.
Remove some potentially useful but unused methods from NativeBN.
Bug: 163898786
Test: Build and boot AOSP
Change-Id: I97a46199d8cf69acf29bcfc2f614c2205ff16262
|
|
The main goal here is performance by avoiding JNI and especially
NativeAllocationRegistry overhead. We gain a factor of 10 or so
on small BigInteger arithmetic. For large computations, we gain
substantially in a few cases where OpenJDK seems to use better
algorithms. AFAIK, with this version we never lose by integral
factors relative to what we had before.
A secondary goal is to clean out open BigInteger bugs.
The base version is 8u252, which for this part of the tree is
identical to June 15 2020 ToT.
Note that this means we included the java.math part of
https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/a5f5d7fd9be6 (29 Oct 2019)
That appears to be a separable fix that makes no interface changes.
I re-added @NonNull annotations. We also removed some code to write
certain backwards-compatibility fields during serialization, since we
never had those.
This also adds a the <X>ValueExact Java 8 BigInteger methods that had
not been previously supported.
This removes a Harmony test for compatibility with the RI implementation
that the RI implementation itself apparently fails. And, IMO, the
observed behavior is better than what we previously tested for.
Fixed a bunch of comment spelling errors. All of these have now
been fixed in upstream ToT.
Benchmarking showed that a straight move to the RI version slowed down
large multiplications, divisions, and modular exponentiation enough to
make it problematic. Thus I reintroduced NativeBN to allow those to fall
back to boringssl, at least for sufficiently large inputs. It was moved
to a hopefully more appropriate location. The fallback is tuned for
64 bits; for 32 bits it's probably much less useful; much of the
boringssl performance advantage comes from 64-bit "digits".
The boringssl fallbacks are not completely free, since we need extra
conversions on each operation. But since we only do this for large
asymptotically expensive computations, we see at mosts tens of percents
regressions, which probably qualifies as "in the noise" here. If we
find additional performance issues, we can add more boringssl fallbacks;
the required code is now fairly straightforward.
Unlike the old version, this no longer uses NativeAllocationRegistry or
similar mechanisms at all. Native memory is only used on a short-term
basis, with explicit deallocation. We no longer use boringssl for
simple linear-time operations like addition.
Microbenchmark results for the newly added benchmark, and for a
close-to-final BigInteger version, listed as "combined":
Msecs/iteration
Digits: 5/10 50/100 500/1000 5000/10000
Inner product, 1000 terms, factors of larger indicated size:
current 2.1 2.5 6.4 168
RI 0.11 0.66 11.0 486
combined 0.12 0.67 9.1 189
Harmonic series, uses smaller indicated size
current 3.7 3.2 4.3 17.6
RI 0.16 0.34 1.4 14.3
combined 0.17 0.34 1.23 14.2
(1+1/100000)^100000, larger size
current 0.07 0.073 0.33 15.8
RI 0.011 0.049 1.553 63.6
combined 0.011 0.049 0.48 13.6
Single modPow() call, smaller size
current 0.005 0.011 1.1 583
RI 0.006 0.038 7.2 5580
combined 0.011 0.012 1.1 541
Single modInverse call, larger size
current 0.003 0.014 0.375 27.8
RI 0.003 0.003 0.026 1.6
combined 0.002 0.002 0.008 0.4
Bug: 160641142
Bug: 136887041
Bug: 119491938
Bug: 28214673
Bug: 28251030
Bug: 2950143
Test: AOSP Boots. Ran some manual Calculator tests on Cuttlefish.
Change-Id: Id577d99328013b1e3c389973dcb0195fa7f52b0b
|
|
... to nativeZygoteLongSuspendOk to reflect its changed semantics.
Bug: 192020504
Test: Boot and look at log with both options
Change-Id: Id8cf5f5b9924c34ff578bf19f53fee1561f7dda6
|
|
Bug: 159631815
Bug: 174211442
Test: Boot AOSP with zygote that needs this
Change-Id: I5f0626a74e43c8b1ac69164ce64b625f0654a7e2
|
|
Porting a part of StringFactory.newStringFromBytes from libcore to
native
for UTF-8 character set. It can improve the UX score of Antutu v8 a
little
bit.
Only watch UX score. We test 10 times and average the total score.
Bechmark results
- before(Java implementation):
10 times avg,: 13133.9
- after (Native implementation):
10 times avg.: 13324.2
Diff.: +1.4%
Bug: 176514597
Test: cts
Change-Id: I6b601c09663b21fdacde7f14b0db1ac4f0a94c0f
|
|
rvc-qpr3-release
Change-Id: Ia7ede8166d1e2ce6303fb080c3c368e58878c7fa
|
|
FileTest#test_createNewFile to match the behavior change on kernel version 5.7+" into pie-cts-dev am: 9dea0d0749 -s ours am: 3c4114c728 -s ours am: db8e5f97dd am: b3028c93d7 -s ours am: e51a869e7c
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1644263
Change-Id: Ifbcb12034e387f1fdb12b245ae2689d51891fd5e
|
|
FileTest#test_createNewFile to match the behavior change on kernel version 5.7+" into pie-cts-dev am: 9dea0d0749 -s ours am: 3c4114c728 -s ours am: db8e5f97dd am: b3028c93d7 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1644263
Change-Id: I507a793048e6250b82710fe2b1cd094b4dd01dc6
|
|
FileTest#test_createNewFile to match the behavior change on kernel version 5.7+" into pie-cts-dev am: 9dea0d0749 -s ours am: 3c4114c728 -s ours am: db8e5f97dd
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1644263
Change-Id: I3ec0cbd1a8a7bfc8602cccece32e60b53b3c67b6
|
|
FileTest#test_createNewFile to match the behavior change on kernel version 5.7+" into pie-cts-dev am: 9dea0d0749 -s ours am: 3c4114c728 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1644263
Change-Id: I4c6bbbd2165c9079b8557ea7d1f9861ff56a0964
|
|
FileTest#test_createNewFile to match the behavior change on kernel version 5.7+" into pie-cts-dev am: 9dea0d0749 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1644263
Change-Id: I9a558e294602bf4d2a835ff517973ef729a68bbb
|
|
behavior change on kernel version 5.7+" into pie-cts-dev
|
|
behavior change on kernel version 5.7+
Cherry-picking this to pie-cts-dev to fix an Android P CtsLibcore
failure when using the 5.10 kernel.
Original change description:
Relax the test expection on new File("/..").createNewFile().
File.createNewFile() with other illegal paths, e.g. "", "/a/../../", still throws
IOException on kernel 5.4 and 5.10.
Bug: 176057454
Bug: 179621021
Test: atest CtsLibcoreTestCases:org.apache.harmony.tests.java.io.FileTest on kernel 5.10
Test: atest CtsLibcoreTestCases:org.apache.harmony.tests.java.io.FileTest on kernel 5.4
Change-Id: I91455d09853c1e2e9b7dcd9c0c7ecfc9e537160e
(cherry picked from commit f2d9613d33d8f8f12df573b405814b0f7184bfba)
|
|
rvc-qpr3-release
Change-Id: Ica63afd029d6cbd433d510911c0ef33b76495219
|
|
rvc-qpr3-release
Change-Id: I803b6ecde1e98faaf810f1318ee43936dc6e6e77
|
|
default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours am: aabe25da47 -s ours am: e6554d1859 -s ours am: 2ee26d8d6c am: 70cd8e994a -s ours am: 7a9f1b4898
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ib83ae5622c83f3b597745c59097775d373fe7248
|
|
change in default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours" into pie-cts-dev am: f79b99d030 -s ours am: 012ae97680 -s ours am: 9cc0d83440 am: bf413adf11 -s ours am: 9074a894d0
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I4ba9f282dfd1428a6e59dde02c5e48eb2f7139a5
|
|
default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours am: aabe25da47 -s ours am: e6554d1859 -s ours am: 2ee26d8d6c am: 70cd8e994a -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I9c315effcb607a53b2365b72bcee4ea928d56eec
|
|
change in default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours" into pie-cts-dev am: f79b99d030 -s ours am: 012ae97680 -s ours am: 9cc0d83440 am: bf413adf11 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I97072042bd2f6581c79c9a64b0865e81ff5ead01
|
|
default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours am: aabe25da47 -s ours am: e6554d1859 -s ours am: 2ee26d8d6c
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I9acff53c4627583fbbf46436156151389a3bffa8
|
|
change in default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours" into pie-cts-dev am: f79b99d030 -s ours am: 012ae97680 -s ours am: 9cc0d83440
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I06fc3a956860a8160dded74009906964009d9dfd
|
|
default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours am: aabe25da47 -s ours am: e6554d1859 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I10007ed30ab38d1207cdc405394c192580951d77
|
|
change in default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours" into pie-cts-dev am: f79b99d030 -s ours am: 012ae97680 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I039b060ea930a12a347b67d90e28d16d9ac29b65
|
|
default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours am: aabe25da47 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iec4041e47a8bc65c59f557d0247ff14c01e7cb2b
|
|
change in default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours" into pie-cts-dev am: f79b99d030 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Id28cb4e0b2ac31f08bd272956f7c7e054692571a
|
|
default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I5494c278f36e25251376c8b65240eecfcdee580f
|
|
change in default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours" into pie-cts-dev
|
|
default HostnameVerifier." into oreo-mr1-cts-dev am: e79d676601 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1547918
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Id3b8f035dad841b78745f8161051d56b06afeb5e
|
|
HostnameVerifier." into oreo-mr1-cts-dev
|
|
Oreo MR1 will no longer support hostnames in the CN field of
X.509 certificates after the next security bulletin, so this
CL cherry-picks the relevant test changes from Pie.
Original change description:
The default HostnameVerifier now ignores any CommonName
in the certificate provided by the server, even when no
subjectAltName is present.
As well as the cherrypick for the CommonName behaviour change,
this also contains changes to match http://ag/13135278 which
rejects non-ASCII names.
Bug: 70278814
Bug: 171980069
Test: CtsLibcoreTestCases
Change-Id: Ib6fa0c40d8903352e88d8812bf0c09ec1d8ef6be
(cherry picked from commit 70bd0982aa6ed2603615df8a963f285b91872c87)
|
|
into oreo-mr1-cts-dev am: 3b1e6518bd -s ours am: 7a70d9038a -s ours am: 81a49709c7 -s ours am: 99e01aa50f am: 86cbf4462c -s ours am: 14eafb1bc1
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I36032e020f5fc971120cd0a6ddce65833abf1c20
|
|
test." into oreo-mr1-cts-dev am: 3b1e6518bd -s ours" into pie-cts-dev am: 8194bd87b5 -s ours am: 89072307a5 -s ours am: 7f6b6787fb am: 69beac6e54 -s ours am: ad43c1ebbd
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iaad6b7aac6845d567969a293d17694d99e7bd419
|
|
into pie-cts-dev am: 5ab4eef630 -s ours am: 165323835a -s ours am: 6ffa7bcd62 am: dfac99f6eb -s ours am: c5074f3fc6
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545728
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I35d44898a5b6bb6dbf6589ad058d22cf33592023
|
|
into oreo-mr1-cts-dev am: 3b1e6518bd -s ours am: 7a70d9038a -s ours am: 81a49709c7 -s ours am: 99e01aa50f am: 86cbf4462c -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I77a8c27188ef99d835b08e6efa43d136ace79a76
|
|
test." into oreo-mr1-cts-dev am: 3b1e6518bd -s ours" into pie-cts-dev am: 8194bd87b5 -s ours am: 89072307a5 -s ours am: 7f6b6787fb am: 69beac6e54 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic16db5e6bb1e21efe468f72fc98048c813dec835
|
|
into pie-cts-dev am: 5ab4eef630 -s ours am: 165323835a -s ours am: 6ffa7bcd62 am: dfac99f6eb -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545728
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I84ee4f69fd1260a632af371ef63066672059481e
|
|
into oreo-mr1-cts-dev am: 3b1e6518bd -s ours am: 7a70d9038a -s ours am: 81a49709c7 -s ours am: 99e01aa50f
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I1f427c428a7c31f95ae51c942567018d8e9d41a4
|
|
test." into oreo-mr1-cts-dev am: 3b1e6518bd -s ours" into pie-cts-dev am: 8194bd87b5 -s ours am: 89072307a5 -s ours am: 7f6b6787fb
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I6f00978eacda97356a4c2ccd9647d7d756e37db1
|
|
into pie-cts-dev am: 5ab4eef630 -s ours am: 165323835a -s ours am: 6ffa7bcd62
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545728
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Id39ccba785b2d00efaa1e5041ebf7a1bf8a18059
|
|
into oreo-mr1-cts-dev am: 3b1e6518bd -s ours am: 7a70d9038a -s ours am: 81a49709c7 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I9b07dd4079011ea7dcd30de2e33ad5824e412414
|
|
test." into oreo-mr1-cts-dev am: 3b1e6518bd -s ours" into pie-cts-dev am: 8194bd87b5 -s ours am: 89072307a5 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ia4e3288852008996bedfdf1b90a82c250f4a5f3b
|
|
into pie-cts-dev am: 5ab4eef630 -s ours am: 165323835a -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545728
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Id01033f19678251590437d78155763dd79541405
|
|
into oreo-mr1-cts-dev am: 3b1e6518bd -s ours am: 7a70d9038a -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I140ba20d7f7939a42583c2f3a1d2a9fad986e58c
|
|
test." into oreo-mr1-cts-dev am: 3b1e6518bd -s ours" into pie-cts-dev am: 8194bd87b5 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I6d75e31a4f1681d2ce0dbb885091cb1e6d7a4dcb
|
|
test." into oreo-mr1-cts-dev am: 3b1e6518bd -s ours" into pie-cts-dev
|
|
into oreo-mr1-cts-dev am: 3b1e6518bd -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ia0a00a962766923279b1c6f655088f2cedca262b
|
|
into pie-cts-dev am: 5ab4eef630 -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545728
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iff42c154f59d790936254036ded7df2f0b475b26
|
|
into oreo-mr1-cts-dev am: 3b1e6518bd -s ours
am skip reason: subject contains skip directive
Original change: https://android-review.googlesource.com/c/platform/libcore/+/1545729
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I1f52241e03a9d798b1d6007eb44caf93d95980c8
|
|
|
|
|