Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.tools/src/com/oracle/truffle/tools/NodeExecCounter.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 |
---|---|
64 * </p> | 64 * </p> |
65 * <b>Execution Counts</b> | 65 * <b>Execution Counts</b> |
66 * <p> | 66 * <p> |
67 * <ul> | 67 * <ul> |
68 * <li>"Execution call" on a node is is defined as invocation of a node method that is instrumented | 68 * <li>"Execution call" on a node is is defined as invocation of a node method that is instrumented |
69 * to produce the event {@link StandardInstrumentListener#enter(Probe, Node, VirtualFrame)};</li> | 69 * to produce the event {@link StandardInstrumentListener#onEnter(Probe, Node, VirtualFrame)};</li> |
70 * <li>Execution calls are tabulated only at <em>instrumented</em> nodes, i.e. those for which | 70 * <li>Execution calls are tabulated only at <em>instrumented</em> nodes, i.e. those for which |
71 * {@linkplain Instrumenter#isInstrumentable(Node) isInstrumentable() == true};</li> | 71 * {@linkplain Instrumenter#isInstrumentable(Node) isInstrumentable() == true};</li> |
72 * <li>Execution calls are tabulated only at nodes present in the AST when originally created; | 72 * <li>Execution calls are tabulated only at nodes present in the AST when originally created; |
73 * dynamically added nodes will not be instrumented.</li> | 73 * dynamically added nodes will not be instrumented.</li> |
74 * </ul> | 74 * </ul> |
112 * Listener for events at instrumented nodes. Counts are maintained in a shared table, so the | 112 * Listener for events at instrumented nodes. Counts are maintained in a shared table, so the |
113 * listener is stateless and can be shared by every {@link Instrument}. | 113 * listener is stateless and can be shared by every {@link Instrument}. |
114 */ | 114 */ |
115 private final StandardInstrumentListener instrumentListener = new DefaultStandardInstrumentListener() { | 115 private final StandardInstrumentListener instrumentListener = new DefaultStandardInstrumentListener() { |
116 @Override | 116 @Override |
117 public void enter(Probe probe, Node node, VirtualFrame vFrame) { | 117 public void onEnter(Probe probe, Node node, VirtualFrame vFrame) { |
118 if (isEnabled()) { | 118 if (isEnabled()) { |
119 final Class<?> nodeClass = node.getClass(); | 119 final Class<?> nodeClass = node.getClass(); |
120 /* | 120 /* |
121 * Everything up to here is inlined by Truffle compilation. Delegate the next part | 121 * Everything up to here is inlined by Truffle compilation. Delegate the next part |
122 * to a method behind an inlining boundary. | 122 * to a method behind an inlining boundary. |