From c4b055db07d605270e0dc0c68ea5ac99b5f0a6ab Mon Sep 17 00:00:00 2001 From: Haiyang Sun Date: Tue, 7 Aug 2018 20:01:12 +0200 Subject: [PATCH] updated graal.js version --- mx.nodeprof/suite.py | 2 +- .../ch/usi/inf/nodeprof/analysis/NodeProfAnalysis.java | 9 ++++++--- .../usi/inf/nodeprof/utils/RawEventsTracingSupport.java | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mx.nodeprof/suite.py b/mx.nodeprof/suite.py index bad84982..33dfcace 100644 --- a/mx.nodeprof/suite.py +++ b/mx.nodeprof/suite.py @@ -6,7 +6,7 @@ "suites" : [ { "name" : "graal-nodejs", - "version" : "02d960f14128ac92ab543b90e6ca6b5f8cb3c839", + "version" : "694ba2d202e27a2333964b96edb838e2f7b5c3eb", "subdir" : True, "urls" : [ {"url" : "https://github.com/graalvm/graaljs.git", "kind" : "git"}, diff --git a/src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/analysis/NodeProfAnalysis.java b/src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/analysis/NodeProfAnalysis.java index d3243cb7..d800126c 100644 --- a/src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/analysis/NodeProfAnalysis.java +++ b/src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/analysis/NodeProfAnalysis.java @@ -33,6 +33,8 @@ import ch.usi.inf.nodeprof.utils.GlobalConfiguration; import ch.usi.inf.nodeprof.utils.Logger; import com.oracle.truffle.api.source.Source; +import com.oracle.truffle.js.nodes.instrumentation.JSTags; +import com.oracle.truffle.js.nodes.instrumentation.JSTags.InputNodeTag; public abstract class NodeProfAnalysis { private final Env env; @@ -227,7 +229,7 @@ private void analysisReady(AnalysisFilterBase sourceFilter, HashMap 1) { Logger.error("a node has more than 1 profiling tags!!"); String tags = ""; @@ -372,7 +375,7 @@ public void onAllCallback(ExecutionEventNodeFactory factory, SourcePredicate sourcePredicate) { getInstrumenter().attachExecutionEventFactory( SourceSectionFilter.newBuilder().tagIs(ProfiledTagEnum.getTags()).sourceIs(sourcePredicate).build(), - SourceSectionFilter.newBuilder().tagIs(StandardTags.ExpressionTag.class, StandardTags.StatementTag.class).build(), + SourceSectionFilter.newBuilder().tagIs(StandardTags.ExpressionTag.class, JSTags.InputNodeTag.class).build(), factory); } } diff --git a/src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/utils/RawEventsTracingSupport.java b/src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/utils/RawEventsTracingSupport.java index b4b8497b..74c8eb4f 100644 --- a/src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/utils/RawEventsTracingSupport.java +++ b/src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/utils/RawEventsTracingSupport.java @@ -33,6 +33,7 @@ import com.oracle.truffle.api.interop.UnsupportedMessageException; import com.oracle.truffle.api.object.DynamicObject; import com.oracle.truffle.js.nodes.JavaScriptNode; +import com.oracle.truffle.js.nodes.instrumentation.JSTags; import com.oracle.truffle.js.nodes.instrumentation.JSTags.BinaryExpressionTag; import com.oracle.truffle.js.nodes.instrumentation.JSTags.BuiltinRootTag; import com.oracle.truffle.js.nodes.instrumentation.JSTags.ControlFlowBlockTag; @@ -84,7 +85,7 @@ public static void enable(Instrumenter instrumenter) { SourceSectionFilter sourceSectionFilter = SourceSectionFilter.newBuilder().tagIs(ALL).build(); SourceSectionFilter inputGeneratingObjects = SourceSectionFilter.newBuilder().tagIs( StandardTags.ExpressionTag.class, - StandardTags.StatementTag.class).build(); + JSTags.InputNodeTag.class).build(); instrumenter.attachExecutionEventFactory(sourceSectionFilter, inputGeneratingObjects, getFactory()); Logger.info("Low-level event tracing enabled [SVM: " + JSTruffleOptions.SubstrateVM + "]"); enabled = true;