This commit is contained in:
Claudio Maggioni 2023-01-09 18:04:35 +01:00
parent 5773ffe1b6
commit 783b90bdd2
2 changed files with 8 additions and 3 deletions

View file

@ -13,9 +13,14 @@ public class Instrumentation {
Profiler.addSafeAllocation();
}
// TODO why is it always 0
@Before(marker = BodyMarker.class, scope = "jdk.internal.misc.Unsafe.allocateInstance")
static void handleUnsafeAllocation() {
static void handleUnsafeAllocations() {
Profiler.addUnsafeAllocation();
}
@Before(marker = BodyMarker.class, scope = "sun.misc.Unsafe.allocateInstance")
static void handleUnsafeAllocationsPraiseTheSun() {
Profiler.addUnsafeAllocation();
}
}

View file

@ -4,7 +4,7 @@ import ch.usi.dag.disl.staticcontext.AbstractStaticContext;
import org.objectweb.asm.tree.AbstractInsnNode;
public class InvocationContext extends AbstractStaticContext {
public int getInvocationOp(){
public int getInvocationOp() {
final AbstractInsnNode ins = staticContextData.getRegionStart();
return ins.getOpcode();
}