summaryrefslogtreecommitdiff
path: root/test/ImageLayoutA/ImageLayoutA.java
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2016-09-20 15:33:31 -0700
committer Mathieu Chartier <mathieuc@google.com> 2016-09-23 09:38:57 -0700
commit4e9c4e746617bad6a012d799d2f5cf9e01d24ea2 (patch)
treeab589711e2517481e6b7c9eeb7e93a0d9ccb4426 /test/ImageLayoutA/ImageLayoutA.java
parent41be588f4f2a84c9c0bb1bcf49da018100bc7bf0 (diff)
Smarter image layout
Put strings in the dex file that resolves them. Depth first traversal with overrides for class and dex cache. The work list keeps track of what oat_index with each pushed item. This means the static fields of a class will usually be in the same image. Added layout test to image_test to make sure things are somewhat reasonably attributed. Bug: 28640955 Test: test-art-host Change-Id: I67a536c33aeed603b252d8e0f75622c9efbf2559
Diffstat (limited to 'test/ImageLayoutA/ImageLayoutA.java')
-rw-r--r--test/ImageLayoutA/ImageLayoutA.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ImageLayoutA/ImageLayoutA.java b/test/ImageLayoutA/ImageLayoutA.java
new file mode 100644
index 0000000000..0784ec267f
--- /dev/null
+++ b/test/ImageLayoutA/ImageLayoutA.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.util.HashMap;
+
+class MyClass {
+ static int i = 123;
+}