annotate truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/profiles/IdentityValueProfileTest.java @ 22501:a63bda98cfdb

Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
author Christian Humer <christian.humer@oracle.com>
date Wed, 16 Dec 2015 16:38:13 +0100
parents truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/utilities/IdentityValueProfileTest.java@b39b603e2a1e
children 4ba1aa33fda4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
1 /*
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
4 *
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
8 *
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
13 * accompanied this code).
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
14 *
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
18 *
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
21 * questions.
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
22 */
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
23 package com.oracle.truffle.api.profiles;
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
24
22157
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22064
diff changeset
25 import static org.hamcrest.CoreMatchers.is;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22064
diff changeset
26 import static org.junit.Assert.assertEquals;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22064
diff changeset
27 import static org.junit.Assert.assertThat;
22425
b39b603e2a1e Organize imports after rename.
Christian Humer <christian.humer@oracle.com>
parents: 22424
diff changeset
28
22157
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22064
diff changeset
29 import org.junit.Before;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22064
diff changeset
30 import org.junit.Test;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22064
diff changeset
31 import org.junit.experimental.theories.DataPoint;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22064
diff changeset
32 import org.junit.experimental.theories.Theories;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22064
diff changeset
33 import org.junit.experimental.theories.Theory;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22064
diff changeset
34 import org.junit.runner.RunWith;
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
35
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
36 @RunWith(Theories.class)
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
37 public class IdentityValueProfileTest {
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
38
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
39 @DataPoint public static final String O1 = new String();
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
40 @DataPoint public static final String O2 = O1;
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
41 @DataPoint public static final Object O3 = new Object();
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
42 @DataPoint public static final Integer O4 = new Integer(1);
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
43 @DataPoint public static final Integer O5 = null;
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
44
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
45 private ValueProfile.Identity profile;
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
46
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
47 @Before
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
48 public void create() {
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
49 profile = (ValueProfile.Identity) ValueProfile.Identity.create();
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
50 }
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
51
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
52 @Test
22064
02015aac6be9 Removing IdentityValueProfile and ExactClassValueProfile classes from the API
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
53 public void testInitial() throws Exception {
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
54 assertThat(profile.isGeneric(), is(false));
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
55 assertThat(profile.isUninitialized(), is(true));
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
56 profile.toString(); // test that it is not crashing
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
57 }
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
58
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
59 @Theory
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
60 public void testDisabled(Object value) {
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
61 ValueProfile.Disabled p = (ValueProfile.Disabled) ValueProfile.Disabled.INSTANCE;
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
62 assertThat(p.profile(value), is(value));
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
63 p.toString(); // test that it is not crashing
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
64 }
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
65
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
66 @Theory
22064
02015aac6be9 Removing IdentityValueProfile and ExactClassValueProfile classes from the API
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
67 public void testProfileOne(Object value) throws Exception {
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
68 Object result = profile.profile(value);
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
69
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
70 assertThat(result, is(value));
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
71 assertEquals(profile.getCachedValue(), value);
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
72 assertThat(profile.isUninitialized(), is(false));
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
73 profile.toString(); // test that it is not crashing
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
74 }
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
75
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
76 @Theory
22064
02015aac6be9 Removing IdentityValueProfile and ExactClassValueProfile classes from the API
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
77 public void testProfileTwo(Object value0, Object value1) throws Exception {
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
78 Object result0 = profile.profile(value0);
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
79 Object result1 = profile.profile(value1);
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
80
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
81 assertThat(result0, is(value0));
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
82 assertThat(result1, is(value1));
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
83
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
84 if (value0 == value1) {
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
85 assertThat(profile.getCachedValue(), is(value0));
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
86 assertThat(profile.isGeneric(), is(false));
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
87 } else {
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
88 assertThat(profile.isGeneric(), is(true));
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
89 }
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
90 assertThat(profile.isUninitialized(), is(false));
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
91 profile.toString(); // test that it is not crashing
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
92 }
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
93
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
94 @Theory
22064
02015aac6be9 Removing IdentityValueProfile and ExactClassValueProfile classes from the API
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
95 public void testProfileThree(Object value0, Object value1, Object value2) throws Exception {
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
96 Object result0 = profile.profile(value0);
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
97 Object result1 = profile.profile(value1);
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
98 Object result2 = profile.profile(value2);
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
99
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
100 assertThat(result0, is(value0));
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
101 assertThat(result1, is(value1));
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
102 assertThat(result2, is(value2));
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
103
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
104 if (value0 == value1 && value1 == value2) {
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
105 assertThat(profile.getCachedValue(), is(value0));
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
106 assertThat(profile.isGeneric(), is(false));
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
107 } else {
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
108 assertThat(profile.isGeneric(), is(true));
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
109 }
22501
a63bda98cfdb Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
Christian Humer <christian.humer@oracle.com>
parents: 22425
diff changeset
110 assertThat(profile.isUninitialized(), is(false));
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
111 profile.toString(); // test that it is not crashing
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
112 }
22064
02015aac6be9 Removing IdentityValueProfile and ExactClassValueProfile classes from the API
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
113
17039
1e542561783e Truffle: new value profiles prototype.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
114 }