Class Instrument

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static Type CD_Object_array
      "java.lang.Object[]".
      static SimpleLog debug_ppt_omit
      A log for debug information about ppt-omit and ppt-select.
      protected static SimpleLog debug_transform
      A log for debug information about which classes and/or methods are transformed and why.
      InstructionFactory instFactory
      InstructionFactory for a class.
      • Fields inherited from class StackMapUtils

        debugInstrument, firstLocalIndex, initialLocalsCount, initialTypeList, liveRangeEnd, liveRangeOperandSize, liveRangeStart, liveRangeType, needStackMap, numberActiveLocals, pool, runningOffset, smta, stackMapTable, stackTypes
    • Constructor Summary

      Constructors 
      Constructor Description
      Instrument()
      Create an instrumenter.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dump_code_attributes​(MethodGen mgen)
      Logs a method's attributes.
      static boolean shouldIgnore​(@BinaryName String className, @Identifier String methodName, String pptName)
      Returns true if the given ppt should be ignored.
      byte @Nullable [] transform​(@Nullable ClassLoader loader, @InternalForm String className, @Nullable Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)
      Given a class, return a transformed version of the class that contains instrumentation code.
      • Methods inherited from class InstructionListUtils

        append_inst, build_il, calculateLiveLocalTypes, calculateLiveStackTypes, delete_instructions, insertAtMethodStart, insertBeforeHandle, replaceInstructions
      • Methods inherited from class StackMapUtils

        addNewParameter, addString, adjust_code_for_locals_change, bcelCalcStackTypes, buildUninitializedNewMap, create_local_from_live_range, create_method_scope_local, createNewStackMapAttribute, findStackMapEqual, findStackMapIndexAfter, findStackMapIndexBefore, fixLocalVariableTable, gen_locals, gen_locals_from_byte_codes, gen_locals_from_byte_codes, generate_Type_from_StackMapType, generateStackMapTypeFromType, get_attribute_name, get_local_variable_type_table_attribute, getSize, getStackMapTable_attribute, is_local_variable_type_table, isStackMapTable, modifyStackMapsForSwitches, printStackMapTable, remove_local_variable_type_table, set_method_stackTypes, setCurrentStackMapTable, typeToClassGetName, update_full_frameStackMap_entries, updateStackMapOffset, updateUninitializedNewOffsets
    • Field Detail

      • debug_transform

        protected static final SimpleLog debug_transform
        A log for debug information about which classes and/or methods are transformed and why.
      • debug_ppt_omit

        public static final SimpleLog debug_ppt_omit
        A log for debug information about ppt-omit and ppt-select.
      • instFactory

        public InstructionFactory instFactory
        InstructionFactory for a class.
      • CD_Object_array

        protected static Type CD_Object_array
        "java.lang.Object[]".
    • Constructor Detail

      • Instrument

        public Instrument()
        Create an instrumenter. Setup debug directories, if needed.
    • Method Detail

      • shouldIgnore

        public static boolean shouldIgnore​(@BinaryName String className,
                                           @Identifier String methodName,
                                           String pptName)
        Returns true if the given ppt should be ignored. Uses the patterns in Runtime.ppt_omit_pattern and Runtime.ppt_select_pattern. This method is called by both Chicory and DynComp.
        Parameters:
        className - class name to be checked
        methodName - method name to be checked
        pptName - ppt name to be checked
        Returns:
        true if the item should be filtered out
      • dump_code_attributes

        public void dump_code_attributes​(MethodGen mgen)
        Logs a method's attributes.
        Parameters:
        mgen - describes the given method