Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
705ec3e
Adopt new interface for before/after root node
smarr Mar 30, 2018
9ec93f8
Added support for Truffle’s ExpressionTag
smarr Mar 30, 2018
03c0bb8
Use Truffle’s Tag root class for tags
smarr Mar 30, 2018
7c21cda
Adopt InstrumentableNode/GenerateWrapper and hasTag
smarr Apr 1, 2018
fe45e25
Updated to Truffle 1.0.0-rc5, incl. mx, and BD
smarr Apr 1, 2018
870a56d
Remove insertInstrumentationWrapper
smarr Apr 1, 2018
bdae946
Improve Primitive.toString(.) and add others for debugging.
smarr Apr 1, 2018
40488d1
Adopt Instrumenter.attachExecutionEventFactory(.)
smarr Apr 1, 2018
9dc0b00
Update interop basics and turn SAbstractObject into TruffleObject
smarr Apr 5, 2018
8c53be1
Imports ActorExecutionTrace.java
smarr Aug 6, 2018
786de33
Generalize PrimitiveArgument to ArgumentExpr
smarr Aug 11, 2018
b2d81a8
Get the language object more consistently via helper
smarr Aug 11, 2018
470eb8d
Handle null values in argument arrays for profiled operations
smarr Aug 11, 2018
55e5e4a
Remove unnecessary cast in ArrayAllocationProfilingNode
smarr Aug 11, 2018
27d068e
Make sure DummyParent has language when needed
smarr Aug 11, 2018
671f4cc
Updated expected dym results
smarr Aug 11, 2018
20b931e
Update superinstructions, all ? gone, not sure why
smarr Aug 11, 2018
d229f03
Need to configure debugger with our tags
smarr Aug 16, 2018
6febdd5
ResolvePromiseNode has a HaltPrim, needs to be wrapped
smarr Aug 16, 2018
be079c2
Comment out @SuppressWarnings("deprecation") because of javac bug
smarr Aug 16, 2018
8a589d8
Replaced removed Profiler with CPUSampler
smarr Aug 27, 2018
c87fef5
Adopt new Source builder
smarr Aug 27, 2018
6f0f572
Adopt find() methods on instruments
smarr Aug 27, 2018
d338791
Restructure VM startup to account for Truffle changes
smarr Aug 27, 2018
987ff77
Remove TruffleSomTCK, because TruffleTCK is gone
smarr Aug 28, 2018
8c41970
[WIP] Add support for Polyglot TCK
smarr Aug 28, 2018
4e549d0
Use Env instead of engine where possible
smarr Aug 30, 2018
360636a
Update CoverallsTruffle for latest Truffle
smarr Aug 30, 2018
58581c3
Remember how we did debugging of javac
smarr Aug 30, 2018
f65d3be
[WIP] Don’t have any histogram or anything for the truffle profiler yet
smarr Aug 30, 2018
9e03de9
Update CI settings
smarr Aug 31, 2018
9a2e126
Update codespeed.conf for ReBench 1.0
smarr Aug 31, 2018
ac43f58
For debugging: Mark unused field in Parser
smarr Sep 1, 2018
fca8fe1
Deprecations: Change slot.getKind to access via descriptor
smarr Sep 1, 2018
758a38a
Removed unused som.actorTracingCfg handling
smarr Sep 1, 2018
b1e6781
Ignore deprecations of GraphPrintVisitor for now
smarr Sep 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adopt InstrumentableNode/GenerateWrapper and hasTag
- all InstrumentableNodes need execute method with virtual frame for correct wrapping
- need no-arg standard constructor
- replace VM.insertInstrumentationWrapper(.) with notifyInserted(.)
- adopt IsValue primitive
- use hasTag method from InstrumentableNode
- eliminate all isTaggedWith, this is not compatible with the other changes, need to use hasTag exclusively
- fix node initialization and set missing source sections

Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Sep 1, 2018
commit 7c21cda8d69ac479dfa0d838061a049fb02311ce
4 changes: 2 additions & 2 deletions src/som/VM.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.oracle.truffle.api.debug.Debugger;
import com.oracle.truffle.api.instrumentation.InstrumentableFactory.WrapperNode;
import com.oracle.truffle.api.instrumentation.InstrumentationHandler;
import com.oracle.truffle.api.instrumentation.Tag;
import com.oracle.truffle.api.nodes.GraphPrintVisitor;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.source.Source;
Expand Down Expand Up @@ -49,7 +50,6 @@
import tools.concurrency.KomposTrace;
import tools.concurrency.TracingActors;
import tools.concurrency.TracingBackend;
import tools.debugger.Tags;
import tools.debugger.WebDebugger;
import tools.debugger.session.Breakpoints;
import tools.dym.DynamicMetrics;
Expand Down Expand Up @@ -226,7 +226,7 @@ public boolean isPoolIdle() {
&& forkJoinPool.isQuiescent() && threadPool.isQuiescent();
}

public void reportSyntaxElement(final Class<? extends Tags> type,
public void reportSyntaxElement(final Class<? extends Tag> type,
final SourceSection source) {
if (webDebugger != null) {
webDebugger.reportSyntaxElement(type, source);
Expand Down
106 changes: 0 additions & 106 deletions src/som/instrumentation/DirectCallNodeWrapper.java

This file was deleted.

87 changes: 0 additions & 87 deletions src/som/instrumentation/DispatchNodeWrapper.java

This file was deleted.

76 changes: 76 additions & 0 deletions src/som/instrumentation/InstrumentableBlockApplyNodeWrapper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
package som.instrumentation;

import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode;
import com.oracle.truffle.api.instrumentation.ProbeNode;
import com.oracle.truffle.api.nodes.NodeCost;

import som.instrumentation.InstrumentableDirectCallNode.InstrumentableBlockApplyNode;


public class InstrumentableBlockApplyNodeWrapper extends InstrumentableBlockApplyNode
implements WrapperNode {
@Child private InstrumentableDirectCallNode delegateNode;
@Child private ProbeNode probeNode;

InstrumentableBlockApplyNodeWrapper(final InstrumentableDirectCallNode delegateNode,
final ProbeNode probeNode) {
this.delegateNode = delegateNode;
this.probeNode = probeNode;
}

@Override
public InstrumentableDirectCallNode getDelegateNode() {
return delegateNode;
}

@Override
public ProbeNode getProbeNode() {
return probeNode;
}

@Override
public NodeCost getCost() {
return NodeCost.NONE;
}

@Override
public Object call(final Object[] arguments) {
return delegateNode.call(arguments);
}

@Override
public CallTarget getCallTarget() {
return delegateNode.getCallTarget();
}

@Override
public boolean isInlinable() {
return delegateNode.isInlinable();
}

@Override
public boolean isInliningForced() {
return delegateNode.isInliningForced();
}

@Override
public void forceInlining() {
delegateNode.forceInlining();
}

@Override
public boolean isCallTargetCloningAllowed() {
return delegateNode.isCallTargetCloningAllowed();
}

@Override
public boolean cloneCallTarget() {
return delegateNode.cloneCallTarget();
}

@Override
public CallTarget getClonedCallTarget() {
return delegateNode.getClonedCallTarget();
}
}
54 changes: 40 additions & 14 deletions src/som/instrumentation/InstrumentableDirectCallNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,55 @@

import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.instrumentation.Instrumentable;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.instrumentation.InstrumentableNode;
import com.oracle.truffle.api.instrumentation.ProbeNode;
import com.oracle.truffle.api.instrumentation.Tag;
import com.oracle.truffle.api.nodes.DirectCallNode;
import com.oracle.truffle.api.source.SourceSection;

import tools.dym.Tags.CachedClosureInvoke;
import tools.dym.Tags.CachedVirtualInvoke;


@Instrumentable(factory = DirectCallNodeWrapper.class)
public class InstrumentableDirectCallNode extends DirectCallNode {
public class InstrumentableDirectCallNode extends DirectCallNode
implements InstrumentableNode {

@Child protected DirectCallNode callNode;
@Child private DirectCallNode callNode;
@CompilationFinal private SourceSection sourceSection;

public InstrumentableDirectCallNode(final DirectCallNode callNode,
final SourceSection source) {
super(null);
assert (callNode != null && (getClass() == InstrumentableDirectCallNode.class
|| getClass() == InstrumentableBlockApplyNode.class))
|| (callNode == null) : "callNode needs to be set";
this.callNode = callNode;
this.sourceSection = source;
}

protected InstrumentableDirectCallNode(final InstrumentableDirectCallNode wrapped) {
/** For wrapper. */
protected InstrumentableDirectCallNode() {
super(null);
}

public Object executeDummy(final VirtualFrame frame) {
return null;
}

@Override
protected boolean isTaggedWith(final Class<?> tag) {
if (tag == CachedVirtualInvoke.class) {
return true;
} else {
return super.isTaggedWith(tag);
}
public boolean isInstrumentable() {
return true;
}

@Override
public boolean hasTag(final Class<? extends Tag> tag) {
return tag == CachedVirtualInvoke.class;
}

@Override
public WrapperNode createWrapper(final ProbeNode probe) {
return new InstrumentableDirectCallNodeWrapper(this, probe);
}

@Override
Expand Down Expand Up @@ -81,21 +98,30 @@ public CallTarget getClonedCallTarget() {
return callNode.getClonedCallTarget();
}

@Instrumentable(factory = DirectCallNodeWrapper.class)
public static class InstrumentableBlockApplyNode extends InstrumentableDirectCallNode {
public InstrumentableBlockApplyNode(final DirectCallNode callNode,
final SourceSection source) {
super(callNode, source);
}

/** For wrappers. */
protected InstrumentableBlockApplyNode() {
this(null, null);
}

@Override
public WrapperNode createWrapper(final ProbeNode probe) {
return new InstrumentableBlockApplyNodeWrapper(this, probe);
}

@Override
protected boolean isTaggedWith(final Class<?> tag) {
public boolean hasTag(final Class<? extends Tag> tag) {
if (tag == CachedClosureInvoke.class) {
return true;
} else if (tag == CachedVirtualInvoke.class) {
return false; // don't want that type of instrumentation here
} else {
return super.isTaggedWith(tag);
return super.hasTag(tag);
}
}
}
Expand Down
Loading