use of com.sun.btrace.runtime.BTraceProbe in project btrace by btraceio.
the class ProbeLoadingBenchmark method testBTraceProbeNew.
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testBTraceProbeNew(Blackhole bh) throws Exception {
BTraceProbe bp = bpf.createProbe(classStream);
if (bp == null) {
throw new NullPointerException();
}
bh.consume(bp);
}
use of com.sun.btrace.runtime.BTraceProbe in project btrace by btraceio.
the class ProbeDump method main.
public static void main(String[] args) throws Exception {
String path = args[0];
BTraceProbeFactory bpf = new BTraceProbeFactory(SharedSettings.GLOBAL);
BTraceProbe bp = bpf.createProbe(new FileInputStream(path));
FileSystem fs = FileSystems.getDefault();
Path p = fs.getPath(args[1]);
Files.write(p.resolve(bp.getClassName().replace(".", "_") + "_full.class"), bp.getFullBytecode());
Files.write(p.resolve(bp.getClassName().replace(".", "_") + "_dh.class"), bp.getDataHolderBytecode());
}
Aggregations