1f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project// Copyright 2007 The Android Open Source Project
2f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
3f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
4f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectInitial:
5f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projecttest001: 2039901us  (4079ns per call)
6f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projecttest049: 3346619us  (6693ns per call)
7f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projecttest099: 4687402us  (9374ns per call)
8f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst001: 1327216us  (2654ns per use)
9f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst049: 1326995us  (2653ns per use)
10f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst099: 1327735us  (2655ns per use)
11f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
12f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectAfter refactoring cache code: 2871ns per use
13f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectAfter re-refactoring cache code: 2797ns per use
14f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
15f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectAfter de-inlining invoke-interface:
16f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projecttest001: 2164873us  (4329ns per call)
17f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projecttest049: 3303884us  (6607ns per call)
18f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projecttest099: 4656718us  (9313ns per call)
19f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst001: 1401731us  (2803ns per use)
20f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst049: 1401120us  (2802ns per use)
21f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst099: 1401298us  (2802ns per use)
22f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
23f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectAfter adding caching for invoke-interface:
24f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestIface001: 1909330us  (3818ns per call)
25f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestIface049: 1905204us  (3810ns per call)
26f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestIface099: 1899012us  (3798ns per call)
27f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestVirt001: 1825001us  (3650ns per call)
28f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestVirt049: 1826161us  (3652ns per call)
29f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestVirt099: 1823915us  (3647ns per call)
30f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst001: 1393963us  (2787ns per use)
31f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst049: 1393163us  (2786ns per use)
32f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst099: 1390496us  (2780ns per use)
33f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
34f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectAfter repeating each operation 16 times inside the inner loop:
35f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestIface001: 1429472us  (2726ns per call)      * 2382ns
36f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestIface049: 1427847us  (2723ns per call)      * 2396ns
37f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestIface099: 1423707us  (2715ns per call)      * 2387ns
38f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestVirt001: 1277790us  (2437ns per call)       * 2118ns
39f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestVirt049: 1280276us  (2441ns per call)       * 2119ns
40f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestVirt099: 1272640us  (2427ns per call)       * 2118ns
41f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst001: 844694us  (1611ns per use)         * 1396ns
42f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst049: 845619us  (1612ns per use)         * 1395ns
43f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjecttestInst099: 845526us  (1612ns per use)         * 1394ns
44f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project('*' is with dx optimizations enabled)
45f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project*/
46f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
47f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/**
48f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Semi-generated class with many interfaces.
49f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
50f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projectpublic class ManyInterfaces
51f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    implements
52f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface000,
53f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface001,
54f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface002,
55f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface003,
56f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface004,
57f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface005,
58f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface006,
59f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface007,
60f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface008,
61f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface009,
62f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface010,
63f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface011,
64f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface012,
65f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface013,
66f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface014,
67f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface015,
68f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface016,
69f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface017,
70f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface018,
71f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface019,
72f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface020,
73f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface021,
74f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface022,
75f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface023,
76f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface024,
77f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface025,
78f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface026,
79f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface027,
80f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface028,
81f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface029,
82f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface030,
83f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface031,
84f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface032,
85f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface033,
86f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface034,
87f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface035,
88f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface036,
89f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface037,
90f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface038,
91f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface039,
92f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface040,
93f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface041,
94f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface042,
95f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface043,
96f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface044,
97f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface045,
98f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface046,
99f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface047,
100f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface048,
101f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface049,
102f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface050,
103f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface051,
104f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface052,
105f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface053,
106f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface054,
107f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface055,
108f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface056,
109f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface057,
110f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface058,
111f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface059,
112f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface060,
113f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface061,
114f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface062,
115f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface063,
116f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface064,
117f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface065,
118f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface066,
119f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface067,
120f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface068,
121f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface069,
122f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface070,
123f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface071,
124f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface072,
125f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface073,
126f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface074,
127f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface075,
128f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface076,
129f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface077,
130f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface078,
131f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface079,
132f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface080,
133f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface081,
134f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface082,
135f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface083,
136f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface084,
137f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface085,
138f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface086,
139f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface087,
140f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface088,
141f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface089,
142f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface090,
143f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface091,
144f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface092,
145f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface093,
146f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface094,
147f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface095,
148f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface096,
149f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface097,
150f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface098,
151f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface099
152f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project{
153f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    /** whether to report timing information */
154f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    private static boolean timing = false;
155f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
156f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    /**
157f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     * Report on a section.
158f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     */
159f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    private static void report(String label, long start, long end, int iter,
160f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            int rept) {
161f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        if (timing) {
162f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            System.out.println(label + ": " + (end - start) / 1000 + "us"
163f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project                    + "  (" + (end - start) / (iter*rept) + "ns per call)");
164f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        } else {
165f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            System.out.println(label + ": done");
166f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
167f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
168f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
169f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    /**
170f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     * Run tests.
171f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     *
172f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     * @param timing whether to print out timing info
173f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     */
174f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public static void run(boolean timing) {
175f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        ManyInterfaces.timing = timing;
176f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        ManyInterfaces obj = new ManyInterfaces();
177f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface001 one;
178f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface049 forty;
179f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        Interface099 ninety;
180f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        long start, end;
181f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        int iter = 32768;
182f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        int rept = 16;
183f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        int i;
184f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
185f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        /*
186f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project         * Clear the heap.  The various classes involved should already
187f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project         * be loaded and ready as a result of instantiating ManyInterfaces.
188f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project         */
189f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        System.gc();
190f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
191f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        start = System.nanoTime();
192f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        testIface001(obj, iter);
193f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        end = System.nanoTime();
194f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        report("testIface001", start, end, iter, rept);
195f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
196f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        start = System.nanoTime();
197f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        testIface049(obj, iter);
198f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        end = System.nanoTime();
199f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        report("testIface049", start, end, iter, rept);
200f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
201f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        start = System.nanoTime();
202f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        testIface099(obj, iter);
203f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        end = System.nanoTime();
204f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        report("testIface099", start, end, iter, rept);
205f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
206f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        start = System.nanoTime();
207f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        testVirt001(obj, iter);
208f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        end = System.nanoTime();
209f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        report("testVirt001", start, end, iter, rept);
210f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
211f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        start = System.nanoTime();
212f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        testVirt049(obj, iter);
213f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        end = System.nanoTime();
214f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        report("testVirt049", start, end, iter, rept);
215f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
216f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        start = System.nanoTime();
217f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        testVirt099(obj, iter);
218f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        end = System.nanoTime();
219f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        report("testVirt099", start, end, iter, rept);
220f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
221f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        start = System.nanoTime();
222f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        testInstance001(obj, iter);
223f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        end = System.nanoTime();
224f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        report("testInst001", start, end, iter, rept);
225f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
226f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        start = System.nanoTime();
227f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        testInstance049(obj, iter);
228f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        end = System.nanoTime();
229f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        report("testInst049", start, end, iter, rept);
230f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
231f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        start = System.nanoTime();
232f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        testInstance099(obj, iter);
233f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        end = System.nanoTime();
234f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        report("testInst099", start, end, iter, rept);
235f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
236f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
237f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func001() { return 1; }
238f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func003() { return 3; }
239f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func005() { return 5; }
240f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func007() { return 7; }
241f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func009() { return 9; }
242f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func011() { return 11; }
243f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func013() { return 13; }
244f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func015() { return 15; }
245f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func017() { return 17; }
246f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func019() { return 19; }
247f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func021() { return 21; }
248f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func023() { return 23; }
249f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func025() { return 25; }
250f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func027() { return 27; }
251f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func029() { return 29; }
252f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func031() { return 31; }
253f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func033() { return 33; }
254f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func035() { return 35; }
255f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func037() { return 37; }
256f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func039() { return 39; }
257f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func041() { return 41; }
258f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func043() { return 43; }
259f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func045() { return 45; }
260f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func047() { return 47; }
261f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func049() { return 49; }
262f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func051() { return 51; }
263f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func053() { return 53; }
264f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func055() { return 55; }
265f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func057() { return 57; }
266f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func059() { return 59; }
267f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func061() { return 61; }
268f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func063() { return 63; }
269f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func065() { return 65; }
270f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func067() { return 67; }
271f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func069() { return 69; }
272f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func071() { return 71; }
273f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func073() { return 73; }
274f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func075() { return 75; }
275f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func077() { return 77; }
276f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func079() { return 79; }
277f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func081() { return 81; }
278f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func083() { return 83; }
279f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func085() { return 85; }
280f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func087() { return 87; }
281f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func089() { return 89; }
282f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func091() { return 91; }
283f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func093() { return 93; }
284f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func095() { return 95; }
285f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func097() { return 97; }
286f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    public int func099() { return 99; }
287f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
288f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    static void testIface001(Interface001 iface, int count) {
289f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        while (count-- != 0) {
290f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func001(); iface.func001(); iface.func001(); iface.func001();
291f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func001(); iface.func001(); iface.func001(); iface.func001();
292f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func001(); iface.func001(); iface.func001(); iface.func001();
293f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func001(); iface.func001(); iface.func001(); iface.func001();
294f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
295f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
296f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
297f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    static void testIface049(Interface049 iface, int count) {
298f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        while (count-- != 0) {
299f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func049(); iface.func049(); iface.func049(); iface.func049();
300f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func049(); iface.func049(); iface.func049(); iface.func049();
301f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func049(); iface.func049(); iface.func049(); iface.func049();
302f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func049(); iface.func049(); iface.func049(); iface.func049();
303f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
304f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
305f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
306f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    static void testIface099(Interface099 iface, int count) {
307f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        while (count-- != 0) {
308f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func099(); iface.func099(); iface.func099(); iface.func099();
309f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func099(); iface.func099(); iface.func099(); iface.func099();
310f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func099(); iface.func099(); iface.func099(); iface.func099();
311f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            iface.func099(); iface.func099(); iface.func099(); iface.func099();
312f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
313f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
314f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
315f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    static void testVirt001(ManyInterfaces obj, int count) {
316f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        while (count-- != 0) {
317f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func001(); obj.func001(); obj.func001(); obj.func001();
318f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func001(); obj.func001(); obj.func001(); obj.func001();
319f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func001(); obj.func001(); obj.func001(); obj.func001();
320f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func001(); obj.func001(); obj.func001(); obj.func001();
321f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
322f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
323f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
324f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    static void testVirt049(ManyInterfaces obj, int count) {
325f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        while (count-- != 0) {
326f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func049(); obj.func049(); obj.func049(); obj.func049();
327f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func049(); obj.func049(); obj.func049(); obj.func049();
328f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func049(); obj.func049(); obj.func049(); obj.func049();
329f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func049(); obj.func049(); obj.func049(); obj.func049();
330f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
331f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
332f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
333f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    static void testVirt099(ManyInterfaces obj, int count) {
334f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        while (count-- != 0) {
335f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func099(); obj.func099(); obj.func099(); obj.func099();
336f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func099(); obj.func099(); obj.func099(); obj.func099();
337f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func099(); obj.func099(); obj.func099(); obj.func099();
338f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            obj.func099(); obj.func099(); obj.func099(); obj.func099();
339f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
340f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
341f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
342f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    static void testInstance001(Object obj, int count) {
343f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        if (!(obj instanceof Interface001))
344f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            System.err.println("BAD");
345f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        while (count-- != 0) {
346f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            boolean is;
347f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
348f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
349f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
350f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
351f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
352f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
353f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
354f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
355f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
356f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
357f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
358f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
359f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
360f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
361f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
362f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface001;
363f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
364f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
365f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
366f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    static void testInstance049(Object obj, int count) {
367f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        if (!(obj instanceof Interface049))
368f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            System.err.println("BAD");
369f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        while (count-- != 0) {
370f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            boolean is;
371f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
372f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
373f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
374f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
375f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
376f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
377f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
378f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
379f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
380f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
381f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
382f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
383f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
384f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
385f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
386f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface049;
387f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
388f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
389f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
390f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    static void testInstance099(Object obj, int count) {
391f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        if (!(obj instanceof Interface099))
392f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            System.err.println("BAD");
393f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        while (count-- != 0) {
394f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            boolean is;
395f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
396f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
397f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
398f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
399f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
400f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
401f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
402f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
403f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
404f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
405f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
406f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
407f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
408f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
409f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
410f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project            is = obj instanceof Interface099;
411f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project        }
412f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    }
413f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project}
414f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
415