| Age | Commit message (Collapse) | Author |
|
Different native methods can share the same JNI stub as long as they
have the same flag and shorty. Boot images loaded by zygote contain lots
of JNI stubs that already compiled, so we can reuse them for native
methods loaded later. For those methods having a matching JNI stub, we
no longer need the GenericJNI and following JIT/AOT, which will bring an
increase in program speed.
Since there are many optimizations in JniCompile, we can also optimize
the "shorty equals" criteria for some archs to let more methods find
their matching stubs.
Test performance improvement: run a simple addOne(Object, int) native
method for multiple times at startup (microsecond, lower is better):
Number of runs before after
5000 398.70 124.94
10000 792.21 234.23
50000 3919.20 1065.30
Test feature coverage: start and run the app for 30 seconds (top 10 apps
in Chinese market, the closer to 100% the better):
(count of native methods that reuse boot JNI stub / total count of app
native methods = percentage)
app1: 1055/1206 = 87.48%
app2: 765/884 = 86.54%
app3: 1267/1414 = 89.60%
app4: 1577/1759 = 89.65%
app5: 1698/1860 = 91.29%
app6: 2528/2787 = 90.71%
app7: 1058/1218 = 86.86%
app8: 952/1092 = 87.18%
app9: 1343/1483 = 90.56%
app10: 2990/3492 = 85.62%
This relands commit c8b6e26aa56bb6761bb781d1095b36f84c4c65d4.
Reason for reland:
- Fix the stack unwind issue of Thumb2.
- We never use AOT code in debuggable. So restrict this optimization
only to non-debuggable.
- The original CL has conflict with aosp/2988923. That other CL is
relanded so we can reland after resolving the conflict.
Test: m test-art-host-gtest
Test: run-gtest.sh
Test: testrunner.py --host --all-debuggable
Test: testrunner.py --target --all-debuggable
Bug: 288983053
Change-Id: If7ba92d8a5f4bb9903b407d4f625e085de80cad7
|
|
This reverts commit c8b6e26aa56bb6761bb781d1095b36f84c4c65d4.
Bug: 288983053
Reason for revert: Failure on luci bots.
Change-Id: Ieae0f47f2114efbfcb0bc4d8ffb0868001c22653
|
|
Different native methods can share the same JNI stub as long as they
have the same flag and shorty. Boot images loaded by zygote contain lots
of JNI stubs that already compiled, so we can reuse them for native
methods loaded later. For those methods having a matching JNI stub, we
no longer need the GenericJNI and following JIT/AOT, which will bring an
increase in program speed.
Since there are many optimizations in JniCompile, we also optimize the
"shorty equals" criteria for some archs to let more methods find their
matching stubs.
Test performance improvement: run a simple addOne(Object, int) native
method for multiple times at startup (microsecond, lower is better):
Number of runs before after
5000 398.70 124.94
10000 792.21 234.23
50000 3919.20 1065.30
Test feature coverage: start and run the app for 30 seconds (top 10 apps
in Chinese market, higher percentage is better):
(count of native methods that reuse boot JNI stub / total count of app
native methods = percentage)
app1: 1055/1206 = 87.48%
app2: 765/884 = 86.54%
app3: 1267/1414 = 89.60%
app4: 1577/1759 = 89.65%
app5: 1698/1860 = 91.29%
app6: 2528/2787 = 90.71%
app7: 1058/1218 = 86.86%
app8: 952/1092 = 87.18%
app9: 1343/1483 = 90.56%
app10: 2990/3492 = 85.62%
Test: m test-art-host-gtest
Test: testrunner.py --host
Test: run-gtest.sh
Test: testrunner.py --target
Bug: 288983053
Change-Id: I72f27bcfcd4d4a360bd5d9478b8f7687f087e431
|
|
And add a regression test. This was broken by
https://android-review.googlesource.com/1898923
but it was not caught by any direct tests.
Test: Additional test in JniCompilerTest.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 172332525
Bug: 208831945
Change-Id: I41d4999bbf43f8e58c88b87da47be6f7409d9ce1
|
|
Bug: 175016705
Test: 004-JniTest
Change-Id: I10a1d6d29ebab105a2dd55ed796742c13c221ae2
Merged-In: I10a1d6d29ebab105a2dd55ed796742c13c221ae2
(cherry picked from commit 80f8973cb13feff2336345719066e0a65eb48ca7)
|
|
With the exception of dwarf support in libelffile.
Test: aosp_taimen-userdebug boots.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 147346243
Change-Id: Ib25acbc98aa7f63ce49a7ed2f81a4a64d48eac39
|
|
Test: Add and enable tests in 178-app-image-native-method
Test: Add and enable tests in jni_compiler_test
Test: Manually step through the new stub in GDB and check
that backtrace works at various points.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Bug: 112189621
Change-Id: If094e5062acbb99eefa88f2afb4815f93730cb82
|
|
Fixed MIPS64 stackArgsSignExtendedTest that did not work properly
when code was built with clang. The the test is now written in an
asm stub and should be completely compiler indepedent.
Test: mma test-art-target-gtest-jni_compiler_test
Change-Id: Idefef3a8414dd8b88a28d2d8862a724bc72402a7
|
|
Change-Id: I963059ac3a72dd8e6a867596c356d7062deb6da7
|
|
Adds a faster path for java methods annotated with
dalvik.annotation.optimization.FastNative .
Intended to replace usage of fast JNI (registering with "!(FOO)BAR" descriptors).
Performance Microbenchmark Results (Angler):
* Regular JNI cost in nanoseconds: 115
* Fast JNI cost in nanoseconds: 60
* @FastNative cost in nanoseconds: 36
Summary: Up to 67% faster (vs fast jni) JNI transition cost
Change-Id: Ic23823ae0f232270c068ec999fd89aa993894b0e
|
|
Move Class to Class<?>, Constructor to Constructor<?>, and in
general clean up reflection.
Test: m test-art-host-run-test
Change-Id: I3a4223ee8d14d032015edf34bf27135757f7138c
|
|
MIPS n64 ABI differs from arm64. Arguments smaller than the 8B stack
slot need to be sign-extended.
Use combination (lw,sd), instead of (lw,sw) for 4B values.
Change fixes software keyboard crash on mips64.
Change-Id: I7574d37f6039e9e8c9e0047254be71d28d4c829a
|
|
The value may not contain a valid jobject, so ignore and use null
directly.
Refactor a bit to have one common function for both synchronized
and non-synchronized case.
Add a test to the JNI compiler tests.
Bug: 18135031
Change-Id: If2f004a112f36f4ff68172a946dec67ce561ae4d
|
|
Also fix the run script of 116-nodex2oat to use the non-prebuild
script for target.
Bug: 17000769
Change-Id: I439fcd710fb8bb408f3288ff8fb34fef23890adb
|
|
The quick-trampoline treats caller's frame in a different way
then it was formed by quck-invoke stub for hard float ABI targets
such as x86_64 and aarch64. The patch workarounds the issue of
wrongly-read stack arguments due to no contract between quick-invoke
stub and quick-trampoline/shadow-frame-builder regarding the reg-
spill area.
Change-Id: I302f212b4ea5e38632527a5ace03f136b21ef806
Signed-off-by: Vladimir Kostyukov <vladimir.kostyukov@intel.com>
|
|
Code did not properly call JNIMethodEnd, such that locks etc
where not correctly handled.
Add a test case to jni_compiler_test.
Change-Id: If2d5c628517d65a56dd6bb5c4cabdff77c7664a1
|
|
Add checks for alignment, floats, and maximum number of parameters
Fixed x86_64 ABI wrong interpretation (floats not widened in registers)
Change-Id: I6c09af4914b7675ac0275ce21003e317ca44a403
|
|
Change-Id: Ia247de328d234c4a57ddd93f394cad2c63e48153
|
|
low registers.
Change-Id: I3639f7a7a9564630ae01651119fcad237a5e675d
|
|
Also clean up the CheckJNI testing a bit. I still need to do some work so that
JniAbort catches more of the detail, but this is a step forward.
Change-Id: Ibf5e32867d56123cff902ebf602406b731f567d2
|
|
Fixes bug found in Google Earth.
Change-Id: I54beb05a67e77a004052b567c11837cc6f2c18fe
|
|
Additional unit test to avoid regressions like Change I707f8e64.
Change-Id: Ic343bf5273ca06b646f0235c88d6edbe3d20d448
|
|
Change-Id: I5b7bc76a370238d810d78522bd5531600746700f
|
|
This change modifies the exception throwing JNI unit test to be
realistic and implements the missing exception throwing pieces on X86.
It also corrects some issues on ARM including methods with arguments
LJII (such as compareAndSwapInt).
Change-Id: I375f6efe2edeebb8007d7aa12c10b49742a8f119
|
|
On ARM and x86. Added a unit test.
Change-Id: I6b1ee09ad18295108f406ce21d73555796ecbba6
|
|
For both x86 and arm we were under computing the outgoing argument size.
For ARM the managed double/long passing had been assumed to be following AAPCS,
however, currently we split long/doubles across R1_R2 and R3 and the stack.
Add support for this in the managed register and jni compiler code.
Add test and various other clean ups to jni compiler code.
Change-Id: I4129076d052a8bce42304f5331b71aa3ac50210f
|
|
Change-Id: Id0a6b6043b9604aa3bb077af0ed858be9bfa5407
|
|
Also add new unit test.
Change-Id: I226501dbfec6e207318d8063b5daf53b7b606ee4
|
|
Change-Id: Ie539275592fbb7b648f9ce5e4a619aecc576768c
|
|
Should be "mov R2, R3; mov R1, R2" instead.
Change-Id: Ie5264c3fe38486781e09f54e1e6d1fdcf7a2d4e5
|
|
I think this is as complete as possible right now. The remaining
two #if 0 sections require:
1. a way to get the Method* of the current native method.
2. a way to get the Class* of the type of a given Field*.
Change-Id: I331586022095fb36ccc10c9ac1890a59a9224d01
|
|
Change-Id: Iab19397c7a72fb9a3ca63bfd0bc4eaf1a98138ba
|