comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java @ 18130:b4e38f4ca414

Truffle: rename @SlowPath to @TruffleBoundary.
author Christian Humer <christian.humer@gmail.com>
date Tue, 21 Oct 2014 00:22:51 +0200
parents 8c34e2cc4add
children 85cec9cab17b
comparison
equal deleted inserted replaced
18129:b3adab5f01a2 18130:b4e38f4ca414
23 * questions. 23 * questions.
24 */ 24 */
25 package com.oracle.truffle.api.instrument; 25 package com.oracle.truffle.api.instrument;
26 26
27 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; 27 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
28 import com.oracle.truffle.api.CompilerDirectives.SlowPath; 28 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
29 import com.oracle.truffle.api.frame.*; 29 import com.oracle.truffle.api.frame.*;
30 import com.oracle.truffle.api.instrument.impl.*; 30 import com.oracle.truffle.api.instrument.impl.*;
31 import com.oracle.truffle.api.nodes.*; 31 import com.oracle.truffle.api.nodes.*;
32 32
33 /** 33 /**
47 * call {@linkplain InstrumentationNode#notifyProbeChanged(Instrument)} whenever it is modified.</li> 47 * call {@linkplain InstrumentationNode#notifyProbeChanged(Instrument)} whenever it is modified.</li>
48 * <li>Never store a {@link Frame} value in a field.</li> 48 * <li>Never store a {@link Frame} value in a field.</li>
49 * <li>Minimize computation in standard execution paths.</li> 49 * <li>Minimize computation in standard execution paths.</li>
50 * <li>If runtime calls must be made back to a tool, construct the instrument with a callback stored 50 * <li>If runtime calls must be made back to a tool, construct the instrument with a callback stored
51 * in a {@code final} field.</li> 51 * in a {@code final} field.</li>
52 * <li>Tool methods called by the instrument should be annotated as {@link SlowPath} to prevent them 52 * <li>Tool methods called by the instrument should be annotated as {@link TruffleBoundary} to prevent them
53 * from being inlined into fast execution paths.</li> 53 * from being inlined into fast execution paths.</li>
54 * <li>If computation in the execution path is needed, and if performance is important, then the 54 * <li>If computation in the execution path is needed, and if performance is important, then the
55 * computation is best expressed as a guest language AST and evaluated using standard Truffle 55 * computation is best expressed as a guest language AST and evaluated using standard Truffle
56 * mechanisms so that standard Truffle optimizations can be applied.</li> 56 * mechanisms so that standard Truffle optimizations can be applied.</li>
57 * </ol> 57 * </ol>