• Profiler Setup:
    • Now go back to the shell console you will use to run NeXtMidas (this is the same one you pasted the -agentpath: line into.
    • Start NeXtMidas using nmprofile in place of nm
      • The only difference between nmprofile and nm is that nmprofile tells the Java VM used by NeXtMidas to connect to the NetBeans profiler.
    • Once you run nmprofile the Java VM will connect to the NetBeans profiler allowing NetBeans to instrument the classes. This process will take up to thirty seconds.
      $  nmprofile
      Starting NeXtMidas with profiler flags:
          -agentpath:/opt/netbeans/netbeans-6.1/profiler3/lib/deployed/jdk16/linux/lib
          profilerinterface.so=/opt/netbeans/netbeans-6.1/profiler3/lib,5140
       
      Profiler Agent: Initializing...
      Profiler Agent: Options: >/opt/netbeans/netbeans-6.1/profiler3/lib,5140<
      Profiler Agent: Initialized succesfully
      Profiler Agent: Waiting for connection on port 5140 (Protocol version: 8)
      Profiler Agent: Established local connection with the tool
      Profiler Agent: Redefining 100 classes at idx 0, out of total 552
      Profiler Agent: Redefining 100 classes at idx 100, out of total 552
      Profiler Agent: Redefining 100 classes at idx 200, out of total 552
      Profiler Agent: Redefining 100 classes at idx 300, out of total 552
      Profiler Agent: Redefining 100 classes at idx 400, out of total 552
      Profiler Agent: Redefining 52 classes at idx 500, out of total 552
      nM>
                    
    • When you get to the NM> prompt run the command you want to test. To make it easier to identify the command it is best to run it in the background.
      nM> demo/bg