Class MethodProfilingInformation


  • public final class MethodProfilingInformation
    extends IdentifiableProfilingInformation
    Holds profiling information about a method or other code-unit during run-time.
    • Field Detail

      • name

        public final java.lang.String name
        The method/code unit name.
      • exceptions

        public int exceptions
        Number of exceptions of this method.
      • callees

        public final java.util.Map<java.lang.Integer,​CalleeProfilingInformation> callees
        Callees from this method.
        Methods that are profiled during a call of this method are collected here.
        Remind that only profiled methods are collected. Relation is not transitive.
    • Constructor Detail

      • MethodProfilingInformation

        public MethodProfilingInformation​(ClassProfilingInformation clazz,
                                          java.lang.String name)
        C'tor to create a new Method-Information instance.
        Parameters:
        clazz - The class information the method belongs to.
        name - The name of the method.
    • Method Detail

      • getCalleeInformation

        public CalleeProfilingInformation getCalleeInformation​(MethodProfilingInformation mi)
        Get the callee instance for the given method.
        If not callee instance exists a new one is created and added.
        Parameters:
        mi - The method for which the callee-information should be returned.
        Returns:
        The callee information, never null.
      • startCall

        public boolean startCall()
        Starts a call of this method.
        The method is pushed on the thread-stack.
        Returns:
        true if call was not recursive.
      • endCall

        public void endCall​(MeasurementValue usedValue,
                            boolean notRecursive)
        Ends a call of this method.
        The method is popped from thread stack and the used time is added the method- and callee-information.
        Parameters:
        usedValue - The used measurement value.
        notRecursive - True if this call was not recursive.