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