Closed magicwerk closed 1 year ago
Hi @magicwerk Can you try the fix from #634 if it resolves your issue? Thanks!
There seems to be something wrong with the build - btrace-client.jar comes out empty.
There was simply a "&&" missing at the end of one line, I think the exclude below should be correct:
exclude {
it.path.startsWith('org/jctools/maps/') &&
!it.path.startsWith("org/jctools/maps/NonBlockingIdentityHashMap") &&
!it.path.startsWith("org/jctools/maps/NonBlockingHashMap")
}
Good catch! Thanks! It is fixed now.
When running an application with BTrace, the following error occurs:
java.lang.NoClassDefFoundError: org/openjdk/btrace/libs/org/jctools/maps/NonBlockingIdentityHashMap at org.openjdk.btrace.instr.ClassCache.(ClassCache.java:80)
at org.openjdk.btrace.instr.ClassCache$Singleton.(ClassCache.java:158)
at org.openjdk.btrace.instr.ClassCache.getInstance(ClassCache.java:90)
at org.openjdk.btrace.instr.InstrumentUtils.collectHierarchyClosure(InstrumentUtils.java:78)
at org.openjdk.btrace.instr.InstrumentUtils.collectHierarchyClosure(InstrumentUtils.java:60)
at org.openjdk.btrace.instr.BTraceClassWriter.getCommonSuperClass(BTraceClassWriter.java:111)
at org.openjdk.btrace.libs.org.objectweb.asm.SymbolTable.addMergedType(SymbolTable.java:1202)
at org.openjdk.btrace.libs.org.objectweb.asm.Frame.merge(Frame.java:1299)
at org.openjdk.btrace.libs.org.objectweb.asm.Frame.merge(Frame.java:1197)
at org.openjdk.btrace.libs.org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1611)
at org.openjdk.btrace.libs.org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1547)
at org.openjdk.btrace.libs.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:767)
at org.openjdk.btrace.libs.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:647)
at org.openjdk.btrace.libs.org.objectweb.asm.tree.ClassNode.accept(ClassNode.java:468)
at org.openjdk.btrace.instr.BTraceProbeNode.getBytecode(BTraceProbeNode.java:252)
at org.openjdk.btrace.instr.BTraceProbeNode.getFullBytecode(BTraceProbeNode.java:210)
at org.openjdk.btrace.instr.BTraceProbePersisted.(BTraceProbePersisted.java:83)
at org.openjdk.btrace.instr.BTraceProbePersisted.from(BTraceProbePersisted.java:90)
at org.openjdk.btrace.instr.InstrPackGenerator.generateProbePack(InstrPackGenerator.java:19)
at org.openjdk.btrace.compiler.CompilerHelper.compile(CompilerHelper.java:122)
at org.openjdk.btrace.compiler.Compiler.compile(Compiler.java:244)
at org.openjdk.btrace.compiler.Compiler.compile(Compiler.java:234)
at org.openjdk.btrace.compiler.Compiler.main(Compiler.java:172)
Caused by: java.lang.ClassNotFoundException: org.openjdk.btrace.libs.org.jctools.maps.NonBlockingIdentityHashMap
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 23 more
Reason seems to be that ClassCache does the following imports