use of com.navercorp.pinpoint.profiler.instrument.GuardInstrumentor in project pinpoint by naver.
the class MatchableClassFileTransformerDelegate method transform.
@Override
public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException {
Objects.requireNonNull(className, "className");
final InstrumentContext instrumentContext = this.instrumentContext;
final GuardInstrumentor guard = new GuardInstrumentor(this.profilerConfig, instrumentContext);
try {
// WARN external plugin api
final TransformCallback transformCallback = transformCallbackProvider.getTransformCallback(instrumentContext, loader);
return transformCallback.doInTransform(guard, loader, className, classBeingRedefined, protectionDomain, classfileBuffer);
} catch (InstrumentException e) {
throw new PinpointException(e);
} finally {
guard.close();
}
}
use of com.navercorp.pinpoint.profiler.instrument.GuardInstrumentor in project pinpoint by naver.
the class ClassFileTransformerDelegate method transform.
@Override
public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException {
Objects.requireNonNull(className, "className");
final InstrumentContext instrumentContext = this.instrumentContext;
final GuardInstrumentor guard = new GuardInstrumentor(this.profilerConfig, instrumentContext);
try {
// WARN external plugin api
final TransformCallback transformCallback = this.transformCallbackProvider.getTransformCallback(instrumentContext, loader);
return transformCallback.doInTransform(guard, loader, className, classBeingRedefined, protectionDomain, classfileBuffer);
} catch (InstrumentException e) {
throw new PinpointException(e);
} finally {
guard.close();
}
}
Aggregations