home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 6.ddi / DOC.ZIP / HELPME!.PRF < prev    next >
Encoding:
Text File  |  1992-06-10  |  10.2 KB  |  198 lines

  1. /*************************************************************************/
  2.                       TURBO PROFILER TIPS AND HINTS
  3.  
  4.   This file contains a list of the most commonly asked questions about 
  5.   Turbo Profiler. In addition, there is a section on mouse usage at the 
  6.   end of the file.
  7.  
  8. 1. Answers to common questions
  9. ==============================
  10.  
  11.   1. How can a "}" line in the program possibly use 90% of the total time
  12.      spent in the program?
  13.   
  14.      Turbo Profiler area markers only mark the beginning of an area when you
  15.      are profiling in active analysis mode. All time spent in the program
  16.      after hitting one area marker is charged to that marker until the
  17.      program hits a different area marker. Thus, if you're profiling one
  18.      routine in your program with an area set on each line in the routine,
  19.      you should see normal results for all lines except the last one. The
  20.      last line (usually a "}" in C++ or "end" in Pascal) will show all the
  21.      time spent between calls to the routine.
  22.     
  23.      Several methods can be used to obtain normal-looking results. You can
  24.      use the Filter/Current local command in the Execution Profile window to
  25.      remove that line from the statistics after each run. Or you can set
  26.      that area to Disable statistics collection, using the Operation command
  27.      in the Module or Areas windows. (Set the first area in the routine to
  28.      Enable statistics collection or you will only get results from the first
  29.      call to the routine.) Or you can switch to passive analysis mode, which
  30.      uses the area markers in a completely different way.
  31.     
  32.   2. What's the difference between Active, Passive, and Coverage analysis?
  33.     
  34.      Think of it this way: while profiling, your program is like a rabbit
  35.      running through a maze. The maze is set up with buttons (area markers)
  36.      on the floor. In active analysis mode, each button the rabbit hits
  37.      tells Turbo Profiler the part of the maze the rabbit is going into. In
  38.      passive analysis mode, each button marks the boundary between two areas,
  39.      and when a flash of light goes off, Turbo Profiler records which two
  40.      buttons the rabbit is between. Coverage analysis mode is like having
  41.      flags in the maze, but only at the entrance to new paths. As the rabbit
  42.      goes down a new path, it knocks down the flag for that path. Then, at
  43.      the end of the run, you can inspect which flags are left standing in the
  44.      maze.
  45.   
  46.   3. How does Turbo Profiler handle screen output for graphics- and 
  47.      text-based programs?
  48.   
  49.      There are a number of strategies that can be used to control how and
  50.      when the screen gets refreshed. If you are profiling a program that
  51.      uses a graphics display mode or are using a Borland pop-up utility
  52.      (such as SideKick or SideKick Plus) while profiling, you should review
  53.      the following tips.
  54.      
  55.      The default screen-updating mode is "Swap"; this means that Turbo
  56.      Profiler uses a single display adapter and display page, and swaps the
  57.      contents of the User and Turbo Profiler screens in software. This is
  58.      the slowest method of display swapping, but it is the most protective
  59.      and least disruptive.
  60.      
  61.      Pop-up utilities may not appear on the screen if your screen updating
  62.      is set to Flip, even though they are active and processing your
  63.      keystrokes. You must select "Swap" mode for display updating in order
  64.      for these programs to work properly. Use Turbo Profiler's -ds
  65.      command-line option to do this, or use the TFINST utility to
  66.      permanently set this mode. Swap mode makes screen updating slower, but
  67.      it makes sure that Turbo Profiler's screen does not interfere with
  68.      either your program's or any other program's display.
  69.     
  70.      You may also need to use "Swap" when you use the DOS Shell command or
  71.      run an editor from within Turbo Profiler. Most programs expect to run 
  72.      on video page 0, and don't check to see what the current video page is.
  73.      Turbo Profiler's DOS Shell and any editors that Turbo Profiler runs 
  74.      in "Flip" mode don't run from video page 0, and the programs might 
  75.      appear to hang, even though you'll be able to type in keystrokes normally.
  76.      If this happens, use the -ds command-line option when you run Turbo 
  77.      Profiler, or reinstall Turbo Profiler to use "Swap" instead of "Flip."
  78.     
  79.      If you're profiling a graphics mode application, you must specify the
  80.      -ds command-line option ("Swap" contents). You might also want to use
  81.      Turbo Profiler's -vg command-line option (Graphics Save), which causes
  82.      additional memory to be set aside for saving the entire graphics image
  83.      your program produces. If you don't use this option, a "red cloud" 
  84.      might appear on your program's screen. You can also set the -ds and -vg 
  85.      options permanently with the TFINST program. The Graphics Save option
  86.      takes an additional 8K of memory and slows screen-swapping.
  87.     
  88.      If you're running a graphics program that changes the EGA palette,
  89.      make sure you use the -vp command-line option to save the palette.
  90.   
  91.   4. Can Turbo Profiler execute other programs while you're still profiling?
  92.      
  93.      When you're using Turbo Profiler, the DOS Shell and Edit commands in the 
  94.      Module and File windows can swap the program you're profiling to disk 
  95.      to make room for running DOS or your editor. The default amount of memory 
  96.      to swap is 128K. You can use TFINST to set a different amount if that's 
  97.      not enough memory to run your editor or other programs. Setting the swap 
  98.      size to 0K tells Turbo Profiler to swap the entire user program to disk 
  99.      before running the DOS command processor.
  100.  
  101.      Only your program gets swapped to disk; Turbo Profiler remains in
  102.      memory.
  103.  
  104.   5. Why can't I press Ctrl-Break to get out of a program running on a
  105.      remote machine?
  106.  
  107.      The program running on the remote machine has taken control of
  108.      Interrupt 1B (Ctrl-Break). TFREMOTE does not take back control of
  109.      Interrupt 1B until you stop execution of the running program on the
  110.      profiler side by completing the program or pressing Ctrl-F2 (Program
  111.      Reset).
  112.     
  113.   6. What is the most likely reason for Turbo Profiler to hang when
  114.      starting up on a PC-compatible computer?
  115.      
  116.      If your computer is a Tandy 1000, IBM PC Convertible, or NEC
  117.      MultiSpeed, or if Turbo Profiler hangs when loading onto your system, 
  118.      run TFINST and change an item in the Options\Miscellaneous menu so that
  119.      NMI Intercept is not set. Some computers use the NMI (Non-Maskable
  120.      Interrupt) in ways that conflict with Turbo Profiler, so you must disable
  121.      Turbo Profiler's use of this interrupt in order to run the program.
  122.      
  123.      Also, if you're using a machine based on the Intel 80386 processor (or
  124.      higher) and you have the SuperKey utility loaded, be careful not to 
  125.      press a key when TF386 is loading, since SuperKey might capture the 
  126.      keystroke and cause unexpected results.
  127.   
  128.   
  129. 2. Mouse support
  130. ================
  131.   Turbo Profiler provides mouse support that allows you to manipulate 
  132.   elements of the user interface. Most Turbo Profiler mouse operations are 
  133.   similar to Windows mouse operations. In the material that follows, we 
  134.   discuss some driver issues, some uses of the mouse under Turbo 
  135.   Profiler that are different from standard Windows mouse usage, and
  136.   some problems you might encounter with using a mouse with TPROFW.
  137.  
  138.  
  139. Mouse drivers
  140. -------------
  141.   If you have a mouse driver installed by default, Turbo Profiler
  142.   and installation utilities will try to use your mouse. If you don't
  143.   want to use your mouse during a debugging session, you can use the
  144.   command-line switch '-p-' to turn the mouse off. You can also set
  145.   this option in TFINST.
  146.  
  147.   Your mouse driver is the application that you install to make your
  148.   mouse active inside Turbo Profiler and other programs. Most mouse
  149.   drivers will work with Turbo Profiler but may have to be updated
  150.   to a newer version if you are having problems using an older
  151.   version.
  152.  
  153.   If you have problems with the mouse once you have loaded Turbo 
  154.   Profiler or TFINST, you might try using the Display Swap option 
  155.   that can be specified either in TFINST or on the command-line with 
  156.   the -ds switch. Consult your mouse manual to ensure proper use of the
  157.   mouse and its driver. Early versions of mouse drivers don't
  158.   support screen display modes larger than 80 columns by 24 lines.
  159.   As a result, your mouse driver might not work correctly when you
  160.   use Turbo Profiler's EGA 80x43, VGA 80x50, or EGA/VGA graphics modes.
  161.  
  162.  
  163. Using the mouse
  164. ---------------
  165.   Most mice provide two or three buttons that allow for various
  166.   functions inside an application. With Turbo Profiler you can, among 
  167.   other things, use the left mouse button to select options, move items 
  168.   around on the screen, and set breakpoints. 
  169.  
  170.   Double-clicking the mouse on an item in a list chooses the item. 
  171.   For instance, in the File|Open dialog box clicking the mouse once 
  172.   just highlights a file. Double-clicking loads the file.
  173.  
  174.   The right mouse button has some of the same functionality as the 
  175.   left mouse button, but you can also open local menus within Turbo
  176.   Profiler windows by using this button. 
  177.  
  178.   You can also choose the commands shown at the bottom of the screen, 
  179.   like F1-Help, by using the mouse.
  180.  
  181.  
  182. Mouse problems when profiling Windows programs
  183. ----------------------------------------------
  184.   When the mouse driver is disabled for Windows, it will be disabled
  185.   for TPROFW as well.  Starting TRPOFW with the mouse support option
  186.   (-p) has no effect unless you enable the Windows mouse driver.
  187.   
  188.   If you have a mouse driver installed by default, TPROFW and the
  189.   installation utilities will try to use your mouse. If you 
  190.   don't want to use your mouse during a debugging session, you 
  191.   can use the command-line switch '-p-' to turn the mouse off. 
  192.  
  193.   When you're debugging a Windows application that uses the mouse,
  194.   and you reset the application and then run the program, it won't
  195.   accept mouse clicks until you make a keyboard entry.
  196.  
  197. /********************** END OF FILE ******************************/
  198.