diff --git a/bosk-core/src/main/java/works/bosk/bytecode/ClassBuilder.java b/bosk-core/src/main/java/works/bosk/bytecode/ClassBuilder.java index 98ca5069..42235e99 100644 --- a/bosk-core/src/main/java/works/bosk/bytecode/ClassBuilder.java +++ b/bosk-core/src/main/java/works/bosk/bytecode/ClassBuilder.java @@ -28,6 +28,7 @@ import works.bosk.exceptions.NotYetImplementedException; import works.bosk.util.ReflectionHelpers; +import static java.lang.System.identityHashCode; import static java.lang.reflect.Modifier.isStatic; import static java.util.Collections.synchronizedMap; import static java.util.Objects.requireNonNull; @@ -203,7 +204,7 @@ public void invokeDynamic(String name, CallSite callSite) { String fullName = "CallSite_" + CALL_SITE_COUNT.incrementAndGet() + "_" + name; CALL_SITES_BY_NAME.put(fullName, callSite); - LOGGER.debug("Added call site ({})", name); + LOGGER.debug("Added call site \"{}\" {}", fullName, identityHashCode(callSite)); methodVisitor().visitInvokeDynamicInsn( fullName, @@ -418,8 +419,9 @@ public Class loadThemBytes(String dottyName, byte[] b) { // happens-before edge between when the call site is added and when we remove it. public static CallSite retrieveCallSite(MethodHandles.Lookup __, String name, MethodType ___) { - LOGGER.debug("retrieveCallSite({})", name); - return requireNonNull(CALL_SITES_BY_NAME.remove(name)); + CallSite callSite = CALL_SITES_BY_NAME.remove(name); + LOGGER.debug("Retrieved call site \"{}\" {}", name, identityHashCode(callSite)); + return requireNonNull(callSite); } private static final Method RETRIEVE_CALL_SITE_METHOD; diff --git a/lib-testing/src/main/resources/logback.xml b/lib-testing/src/main/resources/logback.xml index e82ce02b..df9456ed 100644 --- a/lib-testing/src/main/resources/logback.xml +++ b/lib-testing/src/main/resources/logback.xml @@ -12,6 +12,7 @@ +