comparison truffle/com.oracle.truffle.tools/src/com/oracle/truffle/tools/CoverageTracker.java @ 22230:3f2052afcb6d

Truffle/Instrumentation: rename the methods in the Instrument listener classes to use the "on" convention, e.g. onEnter(), add Javadoc
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Sun, 20 Sep 2015 16:48:50 -0700
parents a0fa69e3e60e
children 59e022cee529
comparison
equal deleted inserted replaced
22229:a4ac9f2ff2bf 22230:3f2052afcb6d
61 * <p> 61 * <p>
62 * <b>Execution Counts</b> 62 * <b>Execution Counts</b>
63 * <p> 63 * <p>
64 * <ul> 64 * <ul>
65 * <li>"Execution call" on a node is is defined as invocation of a node method that is instrumented 65 * <li>"Execution call" on a node is is defined as invocation of a node method that is instrumented
66 * to produce the event {@link SimpleInstrumentListener#enter(Probe)};</li> 66 * to produce the event {@link SimpleInstrumentListener#onEnter(Probe)};</li>
67 * <li>Execution calls are tabulated only at <em>instrumented</em> nodes, i.e. those for which 67 * <li>Execution calls are tabulated only at <em>instrumented</em> nodes, i.e. those for which
68 * {@link Instrumenter#isInstrumentable(Node)}{@code == true};</li> 68 * {@link Instrumenter#isInstrumentable(Node)}{@code == true};</li>
69 * <li>Execution calls are tabulated only at nodes present in the AST when originally created; 69 * <li>Execution calls are tabulated only at nodes present in the AST when originally created;
70 * dynamically added nodes will not be instrumented.</li> 70 * dynamically added nodes will not be instrumented.</li>
71 * </ul> 71 * </ul>
254 CoverageRecord(SourceSection srcSection) { 254 CoverageRecord(SourceSection srcSection) {
255 this.srcSection = srcSection; 255 this.srcSection = srcSection;
256 } 256 }
257 257
258 @Override 258 @Override
259 public void enter(Probe probe) { 259 public void onEnter(Probe probe) {
260 if (isEnabled()) { 260 if (isEnabled()) {
261 count++; 261 count++;
262 } 262 }
263 } 263 }
264 264