Class TracepointInstrumentationService
- java.lang.Object
-
- com.intergral.deep.agent.tracepoint.inst.TracepointInstrumentationService
-
- All Implemented Interfaces:
ClassFileTransformer
public class TracepointInstrumentationService extends Object implements ClassFileTransformer
This service deals with detecting which classes need to be transformed and uses the visitor to instrument the classes as needed.
-
-
Field Summary
Fields Modifier and Type Field Description static longCOMPUTE_ON_CLASS_VERSION
-
Constructor Summary
Constructors Constructor Description TracepointInstrumentationService(Instrumentation inst, Settings settings)Create a new service.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected URLgetLocation(ProtectionDomain protectionDomain)static TracepointInstrumentationServiceinit(Instrumentation inst, Settings settings)Initialise the tracepoint service with the deep services.voidprocessBreakpoints(Collection<TracePointConfig> breakpointResponse)Process the new config from the services and determine which classes need to be transformed, and trigger transformation.protected CFClassScannerreTransFormCfClasses(Map<String,TracePointConfig> newCFMState, Map<String,TracePointConfig> previousCFMState)Calculate the classes to scan for CFM.byte[]transform(ClassLoader loader, String classNameP, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.instrument.ClassFileTransformer
transform
-
-
-
-
Constructor Detail
-
TracepointInstrumentationService
public TracepointInstrumentationService(Instrumentation inst, Settings settings)
Create a new service.- Parameters:
inst- the instrumentation servicesettings- the deep settings
-
-
Method Detail
-
init
public static TracepointInstrumentationService init(Instrumentation inst, Settings settings)
Initialise the tracepoint service with the deep services.- Parameters:
inst- the instrumentation to usesettings- the settings for deep- Returns:
- the configured service
-
processBreakpoints
public void processBreakpoints(Collection<TracePointConfig> breakpointResponse)
Process the new config from the services and determine which classes need to be transformed, and trigger transformation.- Parameters:
breakpointResponse- the new list of tracepoints that have been received from the server.
-
reTransFormCfClasses
protected CFClassScanner reTransFormCfClasses(Map<String,TracePointConfig> newCFMState, Map<String,TracePointConfig> previousCFMState)
Calculate the classes to scan for CFM.- Parameters:
newCFMState- the new CFM statepreviousCFMState- the previous CFM state- Returns:
- the CFM class scanner
-
getLocation
protected URL getLocation(ProtectionDomain protectionDomain)
-
transform
public byte[] transform(ClassLoader loader, String classNameP, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)
- Specified by:
transformin interfaceClassFileTransformer
-
-