Class Profiler

  • All Implemented Interfaces:
    VMMonitor

    public class Profiler
    extends java.lang.Object
    implements VMMonitor
    Profiler for EMFTVM.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Profiler.ProfilingData
      Profiling data for a single operation (CodeBlock or Method).
    • Constructor Summary

      Constructors 
      Constructor Description
      Profiler()  
    • Constructor Detail

      • Profiler

        public Profiler()
    • Method Detail

      • isTerminated

        public boolean isTerminated()
        Returns true when the running EMFTVM instance should be terminated.
        Specified by:
        isTerminated in interface VMMonitor
        Returns:
        true when the running EMFTVM instance should be terminated
      • enter

        public void enter​(StackFrame frame)
        Enters the stack frame.
        Specified by:
        enter in interface VMMonitor
        Parameters:
        frame - the frame to enter in
      • leave

        public void leave​(StackFrame frame)
        Leaves the stack frame.
        Specified by:
        leave in interface VMMonitor
        Parameters:
        frame - the frame to leave
      • step

        public void step​(StackFrame frame)
        Steps into the stack frame.
        Specified by:
        step in interface VMMonitor
        Parameters:
        frame - the frame to step
      • terminated

        public void terminated()
        Invoked when execution is terminated.
        Specified by:
        terminated in interface VMMonitor
      • error

        public void error​(StackFrame frame,
                          java.lang.String msg,
                          java.lang.Exception e)
        Throws an error.
        Specified by:
        error in interface VMMonitor
        Parameters:
        frame - the current frame
        msg - the error message
        e - the exception
      • getResults

        public java.util.List<Profiler.ProfilingData> getResults()
        Returns the profiling results.
        Returns:
        the results
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object