Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for actor-language features to Dynamic Metrics tool #348

Merged
merged 30 commits into from Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
474e509
Tag LogPrim with OpArithmetic
smarr Apr 11, 2020
75a3df3
Added a double specialization to AbsPrim and move it
smarr Apr 11, 2020
784dc6f
Turn source section location into path:line:column:length format
smarr Apr 11, 2020
560371d
Implement some missing bits around actor-related types
smarr Apr 11, 2020
ba97a85
Added test for actor DyM support and add Savina benchmarks for testing
smarr Apr 11, 2020
4122590
Remove duplicated code and unused maps
smarr Apr 12, 2020
f21d959
Avoid initializing TraceActorCreationNode if tracing is not enabled
smarr Apr 12, 2020
dbe67be
Added DyM support for actor creation
smarr Apr 12, 2020
6ac75d7
Make UnarySystemOperation a ComplexPrimitiveOperation
smarr Apr 12, 2020
be18e47
Added basic message send instrumentation
smarr Apr 13, 2020
fd2a1f7
Make resolve an operation that is tracked
smarr Apr 13, 2020
2bb1471
Added general actor statistics
smarr Apr 13, 2020
731ec5b
Added EagerResolvePromiseNode to expose lexical location of Resolver>…
smarr Apr 13, 2020
607098a
Replace use of instrumentation for call nodes with counting call node…
smarr Apr 15, 2020
8d5ea40
Fix mixin identifier string, avoiding unnecessary #
smarr Apr 15, 2020
7516867
Remove old DyM code as part of Replace use of instrumentation for cal…
smarr Apr 15, 2020
9ba1970
Make sure ReceivedRootNodes are instrumented
smarr Apr 15, 2020
eea3b54
Mark eventual send callsites as such
smarr Apr 15, 2020
e610d18
Use fully qualified identifier for defined methods
smarr Apr 15, 2020
5b09424
Added support for OnError, WhenResolvedOnError for metric writing
smarr Apr 15, 2020
1b46a54
Remove findbugsNature from Eclipse project
smarr Apr 15, 2020
f9a0b87
Suppress warnings in KomposTraceParser
smarr Apr 15, 2020
77fdf25
Make sure implicit promise resolution is instrumented
smarr Apr 15, 2020
a370052
Count all null resolutions, i.e., when promises are not actually reso…
smarr Apr 15, 2020
313a5d6
Add missing promiseError operation and distinguish implicit/explicit
smarr Apr 15, 2020
fc16761
Generic and foreign dispatch are not yet implemented
smarr Apr 15, 2020
352e0e6
Update Kompos dependencies, make them strict, and fix issue with boot…
smarr Apr 15, 2020
dd07d87
Object safepoint operations need to be in finally blocks consistently
smarr Apr 15, 2020
fec3aec
Since we now have an eager primitive replacement on the AST, we need …
smarr Apr 15, 2020
ae21fce
Avoid reinitialization by publishing node only after full initialization
smarr Apr 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .project
Expand Up @@ -29,7 +29,6 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
<filteredResources>
<filter>
Expand Down
3 changes: 2 additions & 1 deletion src/som/compiler/MixinDefinition.java
Expand Up @@ -874,7 +874,8 @@ public SSymbol getIdentifier() {
if (identifier == null) {
CompilerDirectives.transferToInterpreterAndInvalidate();
if (outer != null) {
identifier = Symbols.symbolFor(outer.getIdentifier() + "." + this.name.getString());
identifier =
Symbols.symbolFor(outer.getIdentifier().getString() + "." + this.name.getString());
} else if (this.isModule && this.sourceSection != null) {
Path absolute = Paths.get(this.sourceSection.getSource().getURI());
Path relative =
Expand Down
79 changes: 79 additions & 0 deletions src/som/instrumentation/CountingDirectCallNode.java
@@ -0,0 +1,79 @@
package som.instrumentation;

import java.util.concurrent.atomic.AtomicInteger;

import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.nodes.DirectCallNode;

import som.interpreter.Invokable;


public final class CountingDirectCallNode extends DirectCallNode {

@Child private DirectCallNode callNode;

private final AtomicInteger counter;

public CountingDirectCallNode(final DirectCallNode callNode) {
super(null);
this.callNode = callNode;
this.counter = new AtomicInteger();
}

@Override
public Object call(final Object... arguments) {
counter.incrementAndGet();
return callNode.call(arguments);
}

public int getCount() {
return counter.get();
}

public Invokable getInvokable() {
return (Invokable) callNode.getCurrentRootNode();
}

@Override
public boolean isInlinable() {
throw new UnsupportedOperationException(
"Only to be used in Dynamic Metric Tool, where Truffle is not expected to inline");
// return callNode.isInlinable();
}

@Override
public boolean isInliningForced() {
throw new UnsupportedOperationException(
"Only to be used in Dynamic Metric Tool, where Truffle is not expected to inline");
// return callNode.isInliningForced();
}

@Override
public void forceInlining() {
throw new UnsupportedOperationException(
"Only to be used in Dynamic Metric Tool, where Truffle is not expected to inline");
// callNode.forceInlining();
}

@Override
public boolean isCallTargetCloningAllowed() {
throw new UnsupportedOperationException(
"Only to be used in Dynamic Metric Tool, where Truffle is not expected to inline");
// return callNode.isCallTargetCloningAllowed();
}

@Override
public boolean cloneCallTarget() {
throw new UnsupportedOperationException(
"Only to be used in Dynamic Metric Tool, where Truffle is not expected to inline");
// return callNode.cloneCallTarget();
}

@Override
public CallTarget getClonedCallTarget() {
throw new UnsupportedOperationException(
"Only to be used in Dynamic Metric Tool, where Truffle is not expected to inline");
// return callNode.getClonedCallTarget();
}

}
76 changes: 0 additions & 76 deletions src/som/instrumentation/InstrumentableBlockApplyNodeWrapper.java

This file was deleted.

128 changes: 0 additions & 128 deletions src/som/instrumentation/InstrumentableDirectCallNode.java

This file was deleted.

74 changes: 0 additions & 74 deletions src/som/instrumentation/InstrumentableDirectCallNodeWrapper.java

This file was deleted.

5 changes: 4 additions & 1 deletion src/som/interpreter/SomLanguage.java
Expand Up @@ -63,6 +63,7 @@
import tools.dym.Tags.ClassRead;
import tools.dym.Tags.ComplexPrimitiveOperation;
import tools.dym.Tags.ControlFlowCondition;
import tools.dym.Tags.CreateActor;
import tools.dym.Tags.FieldRead;
import tools.dym.Tags.FieldWrite;
import tools.dym.Tags.LocalArgRead;
Expand Down Expand Up @@ -109,7 +110,9 @@
ExpressionBreakpoint.class, CreatePromisePair.class, WhenResolved.class,
WhenResolvedOnError.class, OnError.class, ActivityCreation.class,
ActivityJoin.class, Atomic.class, AcquireLock.class, ReleaseLock.class,
AnyNode.class
AnyNode.class,

CreateActor.class
})
public final class SomLanguage extends TruffleLanguage<VM> {

Expand Down