Class InstrumentationTransform


  • public class InstrumentationTransform
    extends Object
    Transform that applies instrumentation hooks to IR methods.
    • Constructor Detail

      • InstrumentationTransform

        public InstrumentationTransform​(List<Hook> hooks,
                                        InstrumentationConfig config)
        Creates a transform that applies the given hooks under the given configuration.
        Parameters:
        hooks - the hooks to apply
        config - the instrumentation configuration
    • Method Detail

      • getLastInstrumentationCount

        public int getLastInstrumentationCount()
        Returns:
        the last instrumentation count
      • instrumentMethod

        public int instrumentMethod​(IRMethod irMethod,
                                    MethodEntry sourceMethod,
                                    ClassFile classFile)
        Instruments a single method.
        Parameters:
        irMethod - the IR method to instrument
        sourceMethod - the source method entry
        classFile - the class file
        Returns:
        number of instrumentation points applied