summaryrefslogtreecommitdiff
path: root/test/GetMethodSignature/GetMethodSignature.java
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2017-09-21 16:21:43 +0100
committer Vladimir Marko <vmarko@google.com> 2017-09-21 18:41:25 +0100
commitb8a55f8a62b1309efe52ec0290dfdcf60f34a550 (patch)
tree1f2a62ba7c4d4e95577414721cc274d0ee82fe7d /test/GetMethodSignature/GetMethodSignature.java
parent30744106517d64fb218ec5a96edbec797ad5a091 (diff)
ART: Faster PrettyMethod().
Rewrite DexFile::PrettyMethod() to avoid copying strings. This improves the performance, especially when requesting the signature. Avoid code duplication in ArtMethod::PrettyMethod() and delegate to DexFile::PrettyMethod(). 10 million invocations of ArtMethod/DexFile::PrettyMethod() for "void Main.main(java.lang.String[] args)" with (+) or without (-) signature, time in ms: host/32-bit host/64-bit angler/32-bit angler/64-bit AM+: 10407-> 5020 6374-> 3302 32413->13140 17558->10003 DF+: 7280-> 4259 3881-> 2828 19287-> 9331 10343-> 7375 AM-: 2682-> 1599 2025-> 1186 7206-> 4271 7447-> 4166 DF-: 861-> 871 653-> 640 1574-> 1430 1828-> 1712 Test: m test-art-host-gtest Test: testrunner.py --host Change-Id: Ifb79abe1a7f4fc6adc10a34f5d49dc6681d06699
Diffstat (limited to 'test/GetMethodSignature/GetMethodSignature.java')
-rw-r--r--test/GetMethodSignature/GetMethodSignature.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/GetMethodSignature/GetMethodSignature.java b/test/GetMethodSignature/GetMethodSignature.java
index c2ba948d60..d2f96bbb96 100644
--- a/test/GetMethodSignature/GetMethodSignature.java
+++ b/test/GetMethodSignature/GetMethodSignature.java
@@ -17,4 +17,13 @@
class GetMethodSignature {
Float m1(int a, double b, long c, Object d) { return null; }
GetMethodSignature m2(boolean x, short y, char z) { return null; }
+ void m3() { }
+ void m4(int i) { }
+ void m5(int i, int j) { }
+ void m6(int i, int j, int[][] array1) { }
+ void m7(int i, int j, int[][] array1, Object o) { }
+ void m8(int i, int j, int[][] array1, Object o, Object[][] array2) { }
+ int m9() { return 0; }
+ int[][] mA() { return null; }
+ Object[][] mB() { return null; }
}