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

16 lines
459 B
Java
Raw Normal View History

2023-01-02 09:46:59 +00:00
package ex6;
2023-01-09 07:01:15 +00:00
import ch.usi.dag.disl.annotation.Before;
import ch.usi.dag.disl.marker.BasicBlockMarker;
2023-01-09 07:01:15 +00:00
import ch.usi.dag.disl.staticcontext.MethodStaticContext;
2023-01-02 09:46:59 +00:00
public class Instrumentation {
2023-01-09 07:01:15 +00:00
@Before(marker = BasicBlockMarker.class,
scope = "ex6.MainThread.*",
guard = IsFirstInLoopGuard.class)
static void handleLoopInstruction(final MethodStaticContext msc) {
Profiler.countLoop(msc.thisMethodFullName());
2023-01-09 07:01:15 +00:00
}
2023-01-02 09:46:59 +00:00
}