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(); 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();
} }
} }