This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
AJP/DiSLProject2022/src-profiler/ex6/Instrumentation.java

15 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());
}
}