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;
|
2023-01-11 11:02:10 +00:00
|
|
|
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
|
|
|
|
2023-01-11 11:02:10 +00:00
|
|
|
@Before(marker = BasicBlockMarker.class,
|
|
|
|
scope = "ex6.MainThread.*",
|
|
|
|
guard = IsFirstInLoopGuard.class)
|
2023-02-01 15:38:20 +00:00
|
|
|
static void handleLoopInstruction(final MethodStaticContext msc) {
|
2023-01-11 11:02:10 +00:00
|
|
|
Profiler.countLoop(msc.thisMethodFullName());
|
2023-01-09 07:01:15 +00:00
|
|
|
}
|
2023-01-02 09:46:59 +00:00
|
|
|
}
|