AJP/DiSLProject2022/src-profiler/ex6/Instrumentation.java

16 lines
459 B
Java

package ex6;
import ch.usi.dag.disl.annotation.Before;
import ch.usi.dag.disl.marker.BasicBlockMarker;
import ch.usi.dag.disl.staticcontext.MethodStaticContext;
public class Instrumentation {
@Before(marker = BasicBlockMarker.class,
scope = "ex6.MainThread.*",
guard = IsFirstInLoopGuard.class)
static void handleLoopInstruction(final MethodStaticContext msc) {
Profiler.countLoop(msc.thisMethodFullName());
}
}