summaryrefslogtreecommitdiff
path: root/test/StringLiterals/StringLiterals.java
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2018-10-18 14:18:59 -0700
committer Mathieu Chartier <mathieuc@google.com> 2018-10-19 19:59:32 +0000
commit22752770e5e7dd9fb30bb35373b61e76b40ae5c3 (patch)
tree225ace62d4fba030cf2b5f5e0bbaf02e14e1c886 /test/StringLiterals/StringLiterals.java
parenteca553e1a8a47a23de621d3c998c2f6d5561d033 (diff)
Resolve const-string of clinit
Resolve the const strings of the clinit for classes that are loaded in the profile. For Maps, the number of strings is ~4400. This would take ~100k RAM if each string is around 20 characters. Note that these strings are mostly already loaded during startup, so there might not be a net RAM usage increase. Test: test-art-host Bug: 117621117 Change-Id: I632a91633c1b3757523ef6e655f192305554499b
Diffstat (limited to 'test/StringLiterals/StringLiterals.java')
-rw-r--r--test/StringLiterals/StringLiterals.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/StringLiterals/StringLiterals.java b/test/StringLiterals/StringLiterals.java
index 8dee666fd7..9ab37ca3de 100644
--- a/test/StringLiterals/StringLiterals.java
+++ b/test/StringLiterals/StringLiterals.java
@@ -15,6 +15,18 @@
*/
class StringLiterals {
+ static class StartupClass {
+ static {
+ System.out.println("Startup init");
+ }
+ }
+
+ static class OtherClass {
+ static {
+ System.out.println("Other class init");
+ }
+ }
+
void startUpMethod() {
String resource = "abcd.apk";
System.out.println("Starting up");