fix ex5
This commit is contained in:
parent
5773ffe1b6
commit
783b90bdd2
2 changed files with 8 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Reference in a new issue