Previous Next        Current Page: NeXtMidas Training / NetBeans - Part 3 (Profiler) / Profiler Setup / Step 8
back
Start Here   
Background   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
   + About Profilers   
   - Profiler Setup   
      - Calibration   
      - Step 1   
      - Step 2   
      - Step 3   
      - Step 4   
      - Step 5   
      - Step 6   
      - Step 7   
      - Step 8   
      - Step 9   
      - Step 10   
   + Performance Analysis   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • 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

back