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/ex9/Instrumentation.java

17 lines
539 B
Java
Raw Normal View History

2023-01-02 09:46:59 +00:00
package ex9;
2023-01-07 16:48:53 +00:00
import ch.usi.dag.disl.annotation.Before;
import ch.usi.dag.disl.marker.BodyMarker;
import ch.usi.dag.disl.staticcontext.InvocationStaticContext;
import ch.usi.dag.disl.staticcontext.MethodStaticContext;
2023-01-02 09:46:59 +00:00
public class Instrumentation {
2023-01-07 16:48:53 +00:00
@Before(marker = BodyMarker.class,
2023-01-09 17:25:05 +00:00
guard = IsNotConstructorOrStaticInitializerGuard.class,
scope = "ex9.MainThread.*")
static void logCall(final MethodStaticContext isc) {
Profiler.logCall(Thread.currentThread(), isc.thisMethodFullName());
2023-01-07 16:48:53 +00:00
}
2023-01-02 09:46:59 +00:00
}