--- pmsdk/profiler/profile.doc 2018/08/09 12:28:12 1.1 +++ pmsdk/profiler/profile.doc 2018/08/09 12:28:15 1.1.1.2 @@ -3,14 +3,14 @@ OS/2 Profiler ------------------------------------------------------------ - The OS/2 Profiler will allow you to determine where your programs +The OS/2 Profiler allows you to determine where your programs are spending their time. It will tell you the percentage of execution time spent in your program at a function level when used with a .MAP file. It will also show what percentage of execution time is being used by the system. IMPORTANT NOTE: The profiling programming interfaces and tools are -provided here in the Microsoft OS/2 Software Development Kit as an +provided here in the Microsoft OS/2 1.1 Software Development Kit as an aid to developers. These features will NOT be present in the end-user version of the product. If you insert the profiling calls into your code during development you must remove them in your @@ -19,8 +19,16 @@ retail end user system. In addition we w these calls over time and future versions may not be compatible with those in the current kit. These calls are not part of the standard MS OS/2 Application Programming Interface. -In this release, kernel support profiling. So, you don't need a special -kernel to run your profilling program. + +The profiling tools requires a special kernel called OS2KRNLP (we have also +included a version of this kernel for PS/2s: OS2KRNLP.PS2). To use +these tools remove the HIDDEN and READ ONLY permission from the retail kernel +(using the Toolkit tool Chmode like this: chmode -hr OS2KRNL), and then +copy the retail kernel to OS2KRNLR. Next, copy the appropriate profiling +kernel (OS2KRNLP or OS2KRNLP.PS2) to OS2KRNL and reboot. The special kernel +is a super set of the retail kernel so it can be used in the same way as the +retail kernel. + Profile Library Calls: ====================== @@ -34,7 +42,7 @@ ProfInit( type, modulelist); ProfInit() initializes internal data space. - ProfInit clears the data areas after it has allocated them. In +ProfInit clears the data areas after it has allocated them. In addition to the profiling coutner segments, the profiler allocates a 64K block for internal use. @@ -91,17 +99,18 @@ To use the profiler follow these steps: USER PROFILING -------------- -2> a. Get testprof.c, testprof.def, testprof.lfr, profile.h and profile.lib - from the profiler\example, include, lib directories to use as an example. - b. Insert calls to the profiling functions in your application. - Use testprof.c as a model. +2> a. Get testprof.c, testprof.def, testprof.lrf, profile.h and profile.lib + from the profiler\example, include, lib directories to use as an + example. + b. Insert calls to the profiling functions in your application, + using testprof.c as a model. c. Build your executable. d. Run your executable. - + e. use PINFO to display profiling results SYSTEM PROFILING ---------------- -2> a. Make a batch file with the following lines: +3> a. Make a batch file with the following lines: pset init pset on (your commands here...) @@ -110,7 +119,7 @@ To use the profiler follow these steps: pset free b. Run the batch file. -3> a. use PINFO.EXE on your dump file. +4> Using PINFO.EXE with dump files (Your results may be different than this example.)