-
Notifications
You must be signed in to change notification settings - Fork 963
Closed
Description
Btrace cannot print info msg on console when using btrace pid scripts.java.
but when using btrace -v pid scripts.java, the msg can be printed along with debug info.
the trace scripts:
import org.openjdk.btrace.core.annotations.BTrace;
import org.openjdk.btrace.core.annotations.Injected;
import org.openjdk.btrace.core.annotations.OnMethod;
import org.openjdk.btrace.core.annotations.ProbeClassName;
import org.openjdk.btrace.core.annotations.ProbeMethodName;
import org.openjdk.btrace.core.annotations.Self;
import org.openjdk.btrace.core.annotations.ServiceType;
import org.openjdk.btrace.services.impl.Printer;
import static org.openjdk.btrace.core.BTraceUtils.*;
@BTrace
public class AllMethods {
@Injected(ServiceType.RUNTIME)
private static Printer printer;
@OnMethod(
clazz="/voldemort\\.server\\..*/",
method="/.*/"//"${m}"
)
public static void m(@Self Object o, @ProbeClassName String probeClass, @ProbeMethodName String probeMethod) {
printer.print("q");
printer.print("entered " + probeClass);
printer.println("." + probeMethod+" TIME:"+ Time.millis());
}
}