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();
|
Profiler.addSafeAllocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO why is it always 0
|
|
||||||
@Before(marker = BodyMarker.class, scope = "jdk.internal.misc.Unsafe.allocateInstance")
|
@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();
|
Profiler.addUnsafeAllocation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue