Mercurial > hg > truffle
diff truffle/com.oracle.truffle.tools/src/com/oracle/truffle/tools/NodeExecCounter.java @ 22225:a0fa69e3e60e
Truffle/Instrumentation: remove static Instrument factory methods, now supported by Instrumenter
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Sat, 19 Sep 2015 16:29:32 -0700 |
parents | 20380d1d41f2 |
children | 3f2052afcb6d |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.tools/src/com/oracle/truffle/tools/NodeExecCounter.java Sat Sep 19 13:56:42 2015 -0700 +++ b/truffle/com.oracle.truffle.tools/src/com/oracle/truffle/tools/NodeExecCounter.java Sat Sep 19 16:29:32 2015 -0700 @@ -120,7 +120,7 @@ /* * Everything up to here is inlined by Truffle compilation. Delegate the next part * to a method behind an inlining boundary. - * + * * Note that it is not permitted to pass a {@link VirtualFrame} across an inlining * boundary; they are truly virtual in inlined code. */ @@ -301,9 +301,10 @@ if (instrumenter.isInstrumentable(node)) { try { - final Instrument instrument = Instrument.create(instrumentListener, "NodeExecCounter"); + + final Probe probe = instrumenter.probe(node); + final Instrument instrument = instrumenter.attach(probe, instrumentListener, "NodeExecCounter"); instruments.add(instrument); - instrumenter.probe(node).attach(instrument); } catch (ProbeException ex) { failures.add(ex.getFailure()); } @@ -324,9 +325,8 @@ @Override public void probeTaggedAs(Probe probe, SyntaxTag tag, Object tagValue) { if (countingTag == tag) { - final Instrument instrument = Instrument.create(instrumentListener, NodeExecCounter.class.getSimpleName()); + final Instrument instrument = getInstrumenter().attach(probe, instrumentListener, NodeExecCounter.class.getSimpleName()); instruments.add(instrument); - probe.attach(instrument); } } }