Skip to content

Commit

Permalink
updated graal.js version
Browse files Browse the repository at this point in the history
  • Loading branch information
Haiyang-Sun committed Aug 7, 2018
1 parent f70072a commit c4b055d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mx.nodeprof/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"suites" : [
{
"name" : "graal-nodejs",
"version" : "02d960f14128ac92ab543b90e6ca6b5f8cb3c839",
"version" : "694ba2d202e27a2333964b96edb838e2f7b5c3eb",
"subdir" : True,
"urls" : [
{"url" : "https://github.com/graalvm/graaljs.git", "kind" : "git"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -227,7 +229,7 @@ private void analysisReady(AnalysisFilterBase sourceFilter, HashMap<ProfiledTagE
}
}

SourceSectionFilter inputFilter = SourceSectionFilter.newBuilder().tagIs(StandardTags.ExpressionTag.class, StandardTags.StatementTag.class).build();
SourceSectionFilter inputFilter = SourceSectionFilter.newBuilder().tagIs(StandardTags.ExpressionTag.class, InputNodeTag.class).build();

// A built-in node has also the root tag, so we need a separate factory
if (handlerMapping.containsKey(ProfiledTagEnum.BUILTIN)) {
Expand Down Expand Up @@ -269,7 +271,8 @@ public ExecutionEventNode create(EventContext context) {
count += 1;
}
}
// a node should never have two tags the same time(except for the built-in)
// a node should never have two tags the same time(except
// for the built-in)
if (count > 1) {
Logger.error("a node has more than 1 profiling tags!!");
String tags = "";
Expand Down Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c4b055d

Please sign in to comment.