You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,when I use btrace in debug mode,I met some errors
client:
DEBUG: accepting classpath /home/admin/xsea/lib/loadcontroller-model-1.1-SNAPSHOT.jar
DEBUG: assuming default port 2020
DEBUG: compiling ThreadStart.java
DEBUG: compiled ThreadStart.java
DEBUG: attaching to 19660
DEBUG: checking port availability: 2020
DEBUG: attached to 19660
DEBUG: loading /home/admin/btrace/build/btrace-agent.jar
DEBUG: agent args: port=2020,statsd=,debug=true,bootClassPath=/home/admin/xsea/lib/loadcontroller-model-1.1-SNAPSHOT.jar,systemClassPath=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/../lib/tools.jar,probeDescPath=.
DEBUG: loaded /home/admin/btrace/build/btrace-agent.jar
DEBUG: registering shutdown hook
DEBUG: registering signal handler for SIGINT
DEBUG: submitting the BTrace program
DEBUG: opening socket to 2020
DEBUG: setting up client settings
DEBUG: sending instrument command: []
DEBUG: entering into command loop
DEBUG: received com.sun.btrace.comm.RenameCommand@43bd930a
DEBUG: received com.sun.btrace.comm.OkayCommand@33723e30
Server:
btrace DEBUG: got instrument command
btrace DEBUG: loading BTrace class
btrace DEBUG: verifying BTrace class ...
btrace DEBUG: BTrace class com.sun.btrace.samples.ThreadStart$1 verified
btrace DEBUG: preprocessing BTrace class com.sun.btrace.samples.ThreadStart$1 ...
btrace DEBUG: ... preprocessed
btrace DEBUG: Template: com.perfma.loadcontroller.core.service.impl.MachineServiceImpl -> com.perfma.loadcontroller.core.service.impl.MachineServiceImpl
btrace DEBUG: Template: heartbeat -> heartbeat
btrace DEBUG: loaded 'com.sun.btrace.samples.ThreadStart$1' successfully
btrace DEBUG: class renamed to com.sun.btrace.samples.ThreadStart$1
btrace DEBUG: client com.sun.btrace.samples.ThreadStart$1: got com.sun.btrace.comm.RenameCommand@1e0972f7
btrace DEBUG: creating BTraceRuntime instance for com.sun.btrace.samples.ThreadStart$1
btrace DEBUG: created BTraceRuntime instance for com.sun.btrace.samples.ThreadStart$1
btrace DEBUG: sending Okay command
btrace DEBUG: client com.sun.btrace.samples.ThreadStart$1: got com.sun.btrace.comm.OkayCommand@33ad250
btrace DEBUG: about to defineClass com/sun/btrace/samples/ThreadStart$1
btrace DEBUG: defineClass succeeded for com.sun.btrace.samples.ThreadStart$1
btrace DEBUG: starting client command handler thread
btrace DEBUG: new Client created com.sun.btrace.agent.RemoteClient@6a10c030
btrace DEBUG: retransforming loaded classes
btrace DEBUG: filtering loaded classes
btrace DEBUG: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.sun.btrace.agent.Main.startServer(Main.java:673)
at com.sun.btrace.agent.Main.access$000(Main.java:63)
at com.sun.btrace.agent.Main$2.run(Main.java:128)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException
at com.sun.btrace.org.objectweb.asm.ClassReader.<init>(Unknown Source)
at com.sun.btrace.org.objectweb.asm.ClassReader.<init>(Unknown Source)
at com.sun.btrace.org.objectweb.asm.ClassReader.<init>(Unknown Source)
at com.sun.btrace.runtime.BTraceClassReader.<init>(BTraceClassReader.java:102)
at com.sun.btrace.runtime.ClassInfo.loadExternalClass(ClassInfo.java:265)
at com.sun.btrace.runtime.ClassInfo.<init>(ClassInfo.java:215)
at com.sun.btrace.runtime.ClassCache.get(ClassCache.java:70)
at com.sun.btrace.runtime.ClassCache.get(ClassCache.java:62)
at com.sun.btrace.runtime.ClassCache.get(ClassCache.java:51)
at com.sun.btrace.agent.Client.retransformLoaded(Client.java:461)
at com.sun.btrace.agent.Main$3.run(Main.java:692)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
btrace DEBUG: waiting for clients
Here is my script
package com.sun.btrace.samples;
import com.sun.btrace.BTraceUtils;
import com.sun.btrace.annotations.*;
import static com.sun.btrace.BTraceUtils.*;
import com.perfma.loadcontroller.model.Machine;
/*
* This BTrace script inserts a probe into
* method entry of java.lang.Thread.start() method.
* At each Thread.start(), it raises a DTrace probe
* in addition to printing the name of the thread.
* A D-script like jthread.d may be used to get the
* associated DTrace probe events.
*/
@BTrace public class ThreadStart {
@OnMethod(
clazz="com.perfma.loadcontroller.core.service.impl.MachineServiceImpl",
method="heartbeat",
location = @Location(Kind.ENTRY)
)
public static void onnewThread(@Self Object t,Machine m) {
BTraceUtils.jstack();
// D.probe("jthreadstart", Threads.name(t));
//println("starting " + Threads.name(t));
}
}
Hi,when I use btrace in debug mode,I met some errors
client:
Server:
Here is my script
And my cmd:
where is the problem?
The text was updated successfully, but these errors were encountered: