java - btrace visualvm interfaces require ASM 5 -
when run simple java8 program
package test; public class traceint { public static void main(string args[]) throws interruptedexception{ traceint ti = new traceint(); while(true){ integer.valueof((int)system.currenttimemillis()); ti.sleep(1000); //system.getproperty("user.dir"); } } public void sleep(int millis){ try { thread.sleep(millis); } catch (interruptedexception e) { // todo auto-generated catch block e.printstacktrace(); } } }
and run btrace script against it
@onmethod( clazz = "/.*/", method = "/java.lang.*/", location = @location(value = kind.entry, = where.before) ) public static void onentry(object obj) { println(strings.strcat("on entry: ", identitystr(obj))); }
i error in program
java.lang.illegalargumentexception: invokespecial/static on interfaces require asm 5 @ com.sun.btrace.org.objectweb.asm.methodvisitor.visitmethodinsn(unknown source) @ com.sun.btrace.util.templates.templateexpandervisitor.visitmethodinsn(templateexpandervisitor.java:85) @ com.sun.btrace.org.objectweb.asm.methodvisitor.visitmethodinsn(unknown source) @ com.sun.btrace.org.objectweb.asm.classreader.a(unknown source) @ com.sun.btrace.org.objectweb.asm.classreader.b(unknown source) @ com.sun.btrace.org.objectweb.asm.classreader.accept(unknown source) @ com.sun.btrace.org.objectweb.asm.classreader.accept(unknown source) @ com.sun.btrace.runtime.instrumentutils.accept(instrumentutils.java:66) @ com.sun.btrace.runtime.instrumentutils.accept(instrumentutils.java:62) @ com.sun.btrace.agent.client.instrument(client.java:392) @ com.sun.btrace.agent.client.dotransform(client.java:213) @ com.sun.btrace.agent.client.transform(client.java:165) @ sun.instrument.transformermanager.transform(transformermanager.java:188) @ sun.instrument.instrumentationimpl.transform(instrumentationimpl.java:428) @ sun.instrument.instrumentationimpl.retransformclasses0(native method) @ sun.instrument.instrumentationimpl.retransformclasses(instrumentationimpl.java:144) @ com.sun.btrace.agent.main$4.run(main.java:464) @ java.util.concurrent.executors$runnableadapter.call(executors.java:511) @ java.util.concurrent.futuretask.run(futuretask.java:266) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) @ java.lang.thread.run(thread.java:745)
any appreciated
after while realised using old version of btrace against java8. moved latest version fine.
Comments
Post a Comment