Search in sources :

Example 1 with ClassFileTransformerLoader

use of com.navercorp.pinpoint.profiler.plugin.ClassFileTransformerLoader in project pinpoint by naver.

the class MockPluginSetup method setupPlugin.

@Override
public SetupResult setupPlugin(ProfilerPlugin plugin, ClassInjector classInjector) {
    final DefaultProfilerPluginSetupContext pluginSetupContext = new DefaultProfilerPluginSetupContext(profilerConfig);
    final GuardProfilerPluginContext guardPluginSetupContext = new GuardProfilerPluginContext(pluginSetupContext);
    ClassFileTransformerLoader classFileTransformerLoader = new ClassFileTransformerLoader(profilerConfig, dynamicTransformTrigger);
    InstrumentContext instrumentContext = new PluginInstrumentContext(profilerConfig, instrumentEngine, dynamicTransformTrigger, classInjector, classFileTransformerLoader);
    try {
        preparePlugin(plugin, instrumentContext);
        plugin.setup(guardPluginSetupContext);
    } finally {
        guardPluginSetupContext.close();
    }
    SetupResult setup = new SetupResult(pluginSetupContext, classFileTransformerLoader);
    return setup;
}
Also used : SetupResult(com.navercorp.pinpoint.profiler.plugin.SetupResult) PluginInstrumentContext(com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext) InstrumentContext(com.navercorp.pinpoint.bootstrap.instrument.InstrumentContext) PluginInstrumentContext(com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext) DefaultProfilerPluginSetupContext(com.navercorp.pinpoint.profiler.plugin.DefaultProfilerPluginSetupContext) GuardProfilerPluginContext(com.navercorp.pinpoint.profiler.plugin.GuardProfilerPluginContext) ClassFileTransformerLoader(com.navercorp.pinpoint.profiler.plugin.ClassFileTransformerLoader)

Example 2 with ClassFileTransformerLoader

use of com.navercorp.pinpoint.profiler.plugin.ClassFileTransformerLoader in project pinpoint by naver.

the class DebugTransformerRegistry method newDebugTransformer.

private DebugTransformer newDebugTransformer(ProfilerConfig profilerConfig, InstrumentEngine instrumentEngine, DynamicTransformTrigger dynamicTransformTrigger) {
    ClassInjector classInjector = newClassInjector(profilerConfig);
    ClassFileTransformerLoader transformerRegistry = new ClassFileTransformerLoader(profilerConfig, dynamicTransformTrigger);
    InstrumentContext debugContext = new PluginInstrumentContext(profilerConfig, instrumentEngine, dynamicTransformTrigger, classInjector, transformerRegistry);
    return new DebugTransformer(instrumentEngine, debugContext);
}
Also used : PluginInstrumentContext(com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext) InstrumentContext(com.navercorp.pinpoint.bootstrap.instrument.InstrumentContext) PluginInstrumentContext(com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext) ClassFileTransformerLoader(com.navercorp.pinpoint.profiler.plugin.ClassFileTransformerLoader) LegacyProfilerPluginClassInjector(com.navercorp.pinpoint.profiler.instrument.classloading.LegacyProfilerPluginClassInjector) ClassInjector(com.navercorp.pinpoint.profiler.instrument.classloading.ClassInjector) DebugTransformerClassInjector(com.navercorp.pinpoint.profiler.instrument.classloading.DebugTransformerClassInjector)

Aggregations

InstrumentContext (com.navercorp.pinpoint.bootstrap.instrument.InstrumentContext)2 ClassFileTransformerLoader (com.navercorp.pinpoint.profiler.plugin.ClassFileTransformerLoader)2 PluginInstrumentContext (com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext)2 ClassInjector (com.navercorp.pinpoint.profiler.instrument.classloading.ClassInjector)1 DebugTransformerClassInjector (com.navercorp.pinpoint.profiler.instrument.classloading.DebugTransformerClassInjector)1 LegacyProfilerPluginClassInjector (com.navercorp.pinpoint.profiler.instrument.classloading.LegacyProfilerPluginClassInjector)1 DefaultProfilerPluginSetupContext (com.navercorp.pinpoint.profiler.plugin.DefaultProfilerPluginSetupContext)1 GuardProfilerPluginContext (com.navercorp.pinpoint.profiler.plugin.GuardProfilerPluginContext)1 SetupResult (com.navercorp.pinpoint.profiler.plugin.SetupResult)1