═══ Alias Record ═══ There is an alias record for each memory object which has more than one Arena Record referring to it. The handle of the alias record is a hal. ═══ Arena ═══ An arena maps a linear address space by way of a doubly linked circular chain of arena records. Each arena starts with a sentinel record. There are three separate arenas associated with each process: With SMP and the e-Business server for both UNI and SMP a 32-bit application can now address and allocate memory above the 512MB linear address space ( shared arena ). private Maps the linear address space unique to that process. This memory holds EXE files and memory objects allocated using the DosAllocMem function. high private Maps the linear address space above the 512MB line unique to that process. Allocation units are 4K pages. Allocation starts at the 512MB linear address mark incrementing toward the system arena. shared Maps the linear address space shared by all the processes. This memory holds DLL files and memory objects allocated using the DosAllocSharedMem function. high shared Maps the linear address space above the 512MB line shared by all the processes. Allocation units are 4k pages. Allocation starts at the system arena lowest linear address and is allocted towards the high private arena. system Maps the linear address space which belongs to the OS/2 system. ═══ Arena Record ═══ There is an arena record for each memory object that has linear address space allocated to it. The handle of the arena record is a har. The arena records are arranged in arenas. ═══ Claimable Page ═══ A claimable page is one that is not marked present in a particular Page Table Entry, however, the page is present. On the first reference to the page, the page will simply be marked "present". ═══ Clean Page ═══ A clean page is one that has not been written to in RAM since being loaded from disk. ═══ Committed Memory ═══ Committed memory is memory that has been both allocated and committed. Committed memory has an entry in the Virtual Page Table and can be "backed" by:  A page of real RAM  A page of DASD in the SWAPPER.DAT file  A page of a program file  Nothing. ═══ Context ═══ Many memory objects are associated with a particular OS/2 process. The context of a memory object refers to the process with which it is associated. ═══ Context Record ═══ There is a context record for each process that can access a particular memory object in the shared arena. The handle of the context record is a hco. ═══ Description in English ═══ Memory objects are "described" in several of the THESEUS displays as follows: Description Meaning module_name #nnnn The memory object is part of a module. The module is named and the nnnn is the object/segment number within the module. The object/segment type (code or data) is shown. If the object/segment is data, it is indicated whether it is shared or private. (If the object/segment table is swapped out, then the object/segment number is FFFF.) module_name allocated it The memory object was allocated by the named module using one of the Dos... functions. string (owner) The memory object is part of the Operating System. The kernel "subsystem" is named in string. This was decoded using the "owner" field of the Object Record. string (hmte [system owner]) The memory object is part of the Operating System. The kernel "subsystem" is named in string. This was decoded using the "hmte" field of the Object Record. ═══ Dirty Page ═══ A dirty page is one that has been written to in RAM, but not yet written to the SWAPPER.DAT file. ═══ DTE ═══ A DTE, or Descriptor Table Entry, is an entry in a Descriptor Table (GDT, LDT, or IDT). It includes the linear address and size of a segment. ═══ Exit List ═══ The list of routines that are to be executed when a process ends. ═══ File Handle ═══ The handle of a file. There are process handles which are unique for a process and system handles which are common across the entire system. ═══ Flat Address ═══ A flat address is a virtual offset. Because the selector registers (loaded by the operating system) have a base address of 00000000, flat is equivalent to linear. ═══ Fonts ═══ Fonts control the shapes and sizes of the characters being displayed. Only monospace fonts (all characters the same width) can be used by THESEUS. Only display fonts can be selected in THESEUS. Printer fonts cannot be changed by THESEUS. ═══ Free Page ═══ A free page is a page of RAM not currently in use. However, it may be allocated by the Page Manager and associated with a memory object. ═══ GDT ═══ The Global Descriptor Table contains the descriptor table entries for selectors that can be accessed by any process. ═══ Handle ═══ Within the OS/2 system, a handle is used to refer from one control block to another, without using the actual address. A handle is normally a 16-bit word. ═══ hal ═══ The handle of an alias record is a hal. ═══ har ═══ The handle of an arena record is a har. ═══ hco ═══ The handle of a context record is a hco. ═══ hmte ═══ The handle of an MTE is a hmte. ═══ hob ═══ The handle of an object record is a hob. ═══ Hyperblock Links ═══ Hyperblock* links allow you to navigate from one control block to another by using the mouse to select the address of the block to be viewed. A hyperblock link is denoted by its different color. The color of the links can be changed with the 'Link' color option of the Misc menu in the Process Hierarchy window. ═══ Idle Page ═══ An idle pages is a page that has not been recently used. The Page Ager program runs when the number of free pages becomes small. Idle pages are placed on the idle list before being removed from the system. ═══ IDT ═══ The Interrupt Descriptor Table contains the descriptor table entries for selectors used to execute the proper interrupt routine. ═══ LDT ═══ The Local Descriptor Table contains the descriptor table entries for selectors that can be accessed by a single process. There is one for each process. ═══ Linear Address ═══ A linear address is the intermediate result when the CPU is resolving memory addresses. They are represented by THESEUS as llllllll (in hexadecimal notation). ═══ Locked Page ═══ A locked page is a page of RAM that has been locked with the DevHlp_Lock... function. It may be locked either long term or short term. ═══ Memory Leak ═══ When a program allocates memory and then does not free it, that program is said to be "leaking memory." ═══ Memory Object ═══ A memory object is the logical allocation unit of memory. Applications allocate memory objects using the DosAllocMem or DosAllocSharedMem functions. ═══ MTE ═══ An MTE, or Module Table Entry, is an in-memory description of an executable module. The handle of an MTE is an hmte. ═══ n-way ═══ This term is used to indicate the number of processers in an SMP configuration. For example 1-way would be one active processor in an SMP configuration or if there where three it would be 3-way. ═══ Object Record ═══ There is an object record for each memory object in the system. Most objects are real objects and associated with arena records, containing a linear address. However, some objects are pseudo-objects, and the linear address is in the object record. The handle of an object record is a hob. ═══ Owner ═══ All allocated memory has an owner. For system memory, that owner is a hexadecimal value, starting with hex FF. Each sub-system in the kernel has one or more unique values for keeping track of allocated memory. For private memory, the owner is the hob of a PTDA or MTE. For shared memory, the owner may be either a system owner value, the hob of a PTDA, or the hob of an MTE. The owner value is in the object record. ═══ Page Directory ═══ The Page Directory is the first-level address translation table used by the hardware to map a linear address to a physical address. The entries in the Page Directory point to Page Tables. ═══ Page Frame Table ═══ The Page Frame Table has an entry for each page in the physical address space. This space includes all the real RAM in the machine, the I/O RAM space, and the ROM space. This table keeps track of the contents of each physical page. ═══ Page Table ═══ The Page Table is the second-level address translation table used by the hardware to map a linear address to a physical address. The entries in the Page Directory point to Page Tables, which in turn point to pages of physical RAM. ═══ PDE ═══ A PDE, or Page Directory Entry, contains the physical address of a particular Page Table. ═══ Physical Address ═══ A physical address is the final result when the CPU is resolving memory addresses. They are used to address the memory chips. They are represented by THESEUS as pppppppp (in hexadecimal notation). ═══ Physical Memory ═══ The physical memory in the machine is referenced by a physical address. (As opposed to virtual memory.) ═══ PID ═══ The process ID is a 16-bit number that uniquely identifies an OS/2 process. ═══ Popup Menu ═══ A popup menu is activated by a single-click of mouse button 2 or by pressing the Shift-F10 key sequence. A popup menu appears next to the item selected. ═══ Present Pages ═══ Present pages are those pages currently in RAM. ═══ Process ═══ In the OS/2 system, processes are the owners of resources. One or more cooperating processes make up each application. Each process takes its name from EXE file it is associated with. Each process is uniquely identified within the OS/2 system by its PID. (In other systems, processes are called "tasks.") ═══ Process Page Directory ═══ Each process is associated with a Process Page Directory. This directory contains the PDEs for the first 512MB of linear address space. The Process Page Directory is copied into the first 128 entries of the System Page Directory when the process is dispatched. ═══ Pseudo-Objects ═══ Pseudo-objects are areas of memory allocated from kernel heap space. Because they have hobs, they can be accessed the same way as normal memory objects. MTEs and PTDAs are pseudo-objects. ═══ PTDA ═══ The PTDA, or Per Task Data Area, describes the resources owned by a process. ═══ PTE ═══ The PTE, or Page Table Entry, contains the physical address of a page. ═══ RAM ═══ RAM, or Random Access Memory, is the modifiable memory in the computer used by programs. See Physical Memory. ═══ Resident Pages ═══ Resident pages are pages of RAM that cannot be swapped. They must remain in RAM at all times until freed. ═══ ROM ═══ ROM, or Read Only Memory, is the unchangeable memory in the computer used by permanent programs. See Physical Memory. ═══ SFT ═══ The System File Table entry contains information about each unique instance of an open file. ═══ SMP ═══ Symetrical MultiProcessors. ═══ Swappable Pages ═══ Swappable pages are pages of RAM that can be swapped. They may be in RAM or on disk. ═══ Swapped Pages ═══ Swapped pages are those pages currently in the SWAPPER.DAT file. ═══ SWAPPER.DAT ═══ The SWAPPER.DAT file is the disk file where pages are kept after being swapped out. ═══ System Page Directory ═══ The System Page Directory is the page directory which is pointed to by the processors' Control Register 3. ═══ TCB ═══ The TCB, or Thread Control Block, contains information unique to a thread. ═══ Thread ═══ A thread is the dispatchable entity within the OS/2 system. A thread is identified within a process by its TID. It is uniquely identified within the OS/2 system by a thread number. ═══ Thread Number ═══ A thread number is the system wide unique identifier for a thread. A thread number is used within the OS/2 dispatcher, for example. Do not confuse the thread number with thread ID. ═══ TIB ═══ The TIB, or Thread Information Block, contains information about the currently running thread and is accessible by the application program. ═══ TID ═══ The TID, or Thread ID, is a 16-bit number that uniquely identifies a thread within a process. ═══ TSD ═══ The TSD, or Thread Swappable Data, is the portion of a thread control block that is swappable. ═══ TSS ═══ The TSS, or Task State Segment, is a 386 control block used by the processor to control its multi-tasking functions. ═══ UVirt Page ═══ A UVirt page is a page that has been defined by a device driver or the kernel by using one of their special functions. The device driver function is DevHlp_PhysToUVirt. The "physical address" in the Page Table Entry may not point to a real page of RAM. It may point to an I/O adapter card or some other "pseudo-memory." ═══ Virtual Address ═══ Virtual addresses have both selectors and offsets. They are represented by THESEUS as ssss:oooo or ssss:oooooooo (selector:offset) (all in hexadecimal notation). ═══ Virtual Memory ═══ Virtual memory is memory as seen by the program. It is referenced by a virtual address or a flat address. (As opposed to physical memory.) ═══ Virtual Page Table ═══ The Virtual Page Table keeps track of committed memory. This table contains an entry for each page of committed memory. ═══ Working Set ═══ The working set is the set of memory (pages) referenced in the last n time intervals. The working set includes both resident and locked pages and swappable pages. ═══ 1. Notices ═══ References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM product, program, or service is not intended to state or imply that only IBM's product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any of IBM's intellectual property rights or other legally protectible rights may be used instead of the IBM product, program, or service. Evaluation and verification of operation in conjunction with other products, programs, or services, except those expressly designated by IBM, are the user's responsibility. IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any rights to these patents. You can inquire, in writing, to the IBM Director of Commercial Relations, IBM Corporation, Purchase, NY 10577 - USA, or to the IBM Director of Commercial Relations, IBM World Trade Asia Corporation, IBM Kamiya-cho Building, 4-3-9 Toranomon, Minato-ku, Tokyo, Japan. The following terms, denoted by an asterisk (*) in this reference, are trademarks of the IBM Corporation in the United States and/or other countries: IBM THESEUSn Operating System/2 Hyperblock OS/2 SystemView Presentation Manager CSet/2 WARP The following terms, denoted by a double asterisk (**) in this reference, are trademarks of other companies as follows: Microsoft Microsoft Corporation The following paragraph does not apply to the United Kingdom or any country where such provisions are inconsistent with local law. INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS INFORMATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions; therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the information. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this information at any time. It is possible that this information may contain reference to, or information about, IBM products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that IBM intends to announce such IBM products, programming, or services in your country. Requests for copies of this information and for technical information about IBM products should be made to your IBM Authorized Dealer or your IBM Marketing Representative. (C) Copyright International Business Machines Corporation 1992, 1999. All rights reserved. Note to U.S. Government Users: Documentation and programs related to restricted rights. Use, duplication, or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. ═══ 2. Introduction ═══ THESEUS4* is a memory analysis program for the OS/2 WARP* 3.x, 4.x, and e-Business server systems to: 1. Determine the amount of memory consumed by each active process. a) Memory leak detection. b) Working set analysis. c) Memory utilization. 2. Look at application memory (in hexadecimal notation) a) In hexadecimal byte notation. b) In hexadecimal word notation (2 bytes). c) In hexadecimal double word notation ( 4 bytes ). d) In unassembled notation. 3. Look at selected OS/2 system control blocks (formatted) 4. Look at selected machine registers and control blocks (formatted) THESEUS4 uses two classes of windows: Process Hierarchy Shows the hierarchy of processes as they currently exist in memory. There is only 1 window of this class. Detail Shows information about specific areas in either the OS/2 system or application memory. There can be up to 16 windows of this class. Other topics include: Demonstration demonstrating some of THESEUS4's functions How to use THESEUS4 understanding how to use THESEUS4 Memory Explanations understanding how memory is managed in OS/2 3.x, 4.x, and e-Business server. Glossary meanings of terms. ═══ 3. Who Was Theseus? ═══ Theseus (pronounced Thee'-see-us) was one of the Attic heroes of Greek mythology. According to legend, he was one of the young Greeks chosen to be sacrificed to the Minotaur, the mythical half man/half bull confined in the Labyrinth. Instead, Theseus killed the Minotaur. One of the local girls, Ariadne, gave him a thread, which he used to mark his trail into and out of the Labyrinth. He then married Ariadne and they sailed off into the sunset. The analogy of the labyrinth is appropriate, because assigning memory to a user in the OS/2 environment is quite complex, much like the Labyrinth of old. However, this program knows its way through the labyrinth and can assist you in determining the amount of memory used by your programs. ═══ 4. A Short Demonstration ═══ THESEUS4 is a PM windowed application with hyperblock linking between the OS/2 control blocks. To try it out: 1. Bring up THESEUS4. 2. Select the Registers pull-down. 3. Select Control Registers. 4. Double-click mouse button 1 while pointing at the GDT base value (which is in green). 5. What you are seeing is the formatted GDT. 6. Close that window. 7. Double-click mouse button 2 while pointing at the GDT base value (which is in green). 8. What you are seeing is a "description" of the GDT memory object. 9. Press the F1 key to obtain a help panel that explains what you are looking at. ═══ 5. Glossary ═══ Word Definition Alias Record There is an alias record for each memory object which has more than one Arena Record referring to it. The handle of the alias record is a hal. Arena An arena maps a linear address space by way of a doubly linked circular chain of arena records. Each arena starts with a sentinel record. There are three separate arenas associated with each process: With SMP and the e-Business server for both UNI and SMP a 32-bit application can now address and allocate memory above the 512MB linear address space ( shared arena ). private Maps the linear address space unique to that process. This memory holds EXE files and memory objects allocated using the DosAllocMem function. high private Maps the linear address space above the 512MB line unique to that process. Allocation units are 4K pages. Allocation starts at the 512MB linear address mark incrementing toward the system arena. shared Maps the linear address space shared by all the processes. This memory holds DLL files and memory objects allocated using the DosAllocSharedMem function. high shared Maps the linear address space above the 512MB line shared by all the processes. Allocation units are 4k pages. Allocation starts at the system arena lowest linear address and is allocted towards the high private arena. system Maps the linear address space which belongs to the OS/2 system. Arena Record There is an arena record for each memory object that has linear address space allocated to it. The handle of the arena record is a har. The arena records are arranged in arenas. Claimable Page A claimable page is one that is not marked present in a particular Page Table Entry, however, the page is present. On the first reference to the page, the page will simply be marked "present". Clean Page A clean page is one that has not been written to in RAM since being loaded from disk. Committed Memory Committed memory is memory that has been both allocated and committed. Committed memory has an entry in the Virtual Page Table and can be "backed" by:  A page of real RAM  A page of DASD in the SWAPPER.DAT file  A page of a program file  Nothing. Context Many memory objects are associated with a particular OS/2 process. The context of a memory object refers to the process with which it is associated. Context Record There is a context record for each process that can access a particular memory object in the shared arena. The handle of the context record is a hco. Description in English Memory objects are "described" in several of the THESEUS displays as follows: Description Meaning module_name #nnnn The memory object is part of a module. The module is named and the nnnn is the object/segment number within the module. The object/segment type (code or data) is shown. If the object/segment is data, it is indicated whether it is shared or private. (If the object/segment table is swapped out, then the object/segment number is FFFF.) module_name allocated it The memory object was allocated by the named module using one of the Dos... functions. string (owner) The memory object is part of the Operating System. The kernel "subsystem" is named in string. This was decoded using the "owner" field of the Object Record. string (hmte [system owner]) The memory object is part of the Operating System. The kernel "subsystem" is named in string. This was decoded using the "hmte" field of the Object Record. Dirty Page A dirty page is one that has been written to in RAM, but not yet written to the SWAPPER.DAT file. DTE A DTE, or Descriptor Table Entry, is an entry in a Descriptor Table (GDT, LDT, or IDT). It includes the linear address and size of a segment. Exit List The list of routines that are to be executed when a process ends. File Handle The handle of a file. There are process handles which are unique for a process and system handles which are common across the entire system. Flat Address A flat address is a virtual offset. Because the selector registers (loaded by the operating system) have a base address of 00000000, flat is equivalent to linear. Fonts Fonts control the shapes and sizes of the characters being displayed. Only monospace fonts (all characters the same width) can be used by THESEUS. Only display fonts can be selected in THESEUS. Printer fonts cannot be changed by THESEUS. Free Page A free page is a page of RAM not currently in use. However, it may be allocated by the Page Manager and associated with a memory object. GDT The Global Descriptor Table contains the descriptor table entries for selectors that can be accessed by any process. Handle Within the OS/2 system, a handle is used to refer from one control block to another, without using the actual address. A handle is normally a 16-bit word. hal The handle of an alias record is a hal. har The handle of an arena record is a har. hco The handle of a context record is a hco. hmte The handle of an MTE is a hmte. hob The handle of an object record is a hob. Hyperblock Links Hyperblock* links allow you to navigate from one control block to another by using the mouse to select the address of the block to be viewed. A hyperblock link is denoted by its different color. The color of the links can be changed with the 'Link' color option of the Misc menu in the Process Hierarchy window. Idle Page An idle pages is a page that has not been recently used. The Page Ager program runs when the number of free pages becomes small. Idle pages are placed on the idle list before being removed from the system. IDT The Interrupt Descriptor Table contains the descriptor table entries for selectors used to execute the proper interrupt routine. LDT The Local Descriptor Table contains the descriptor table entries for selectors that can be accessed by a single process. There is one for each process. Linear Address A linear address is the intermediate result when the CPU is resolving memory addresses. They are represented by THESEUS as llllllll (in hexadecimal notation). Link see Hyperblock Link. Locked Page A locked page is a page of RAM that has been locked with the DevHlp_Lock... function. It may be locked either long term or short term. Memory Leak When a program allocates memory and then does not free it, that program is said to be "leaking memory." Memory Object A memory object is the logical allocation unit of memory. Applications allocate memory objects using the DosAllocMem or DosAllocSharedMem functions. MTE An MTE, or Module Table Entry, is an in-memory description of an executable module. The handle of an MTE is an hmte. n-way This term is used to indicate the number of processers in an SMP configuration. For example 1-way would be one active processor in an SMP configuration or if there where three it would be 3-way. Object Record There is an object record for each memory object in the system. Most objects are real objects and associated with arena records, containing a linear address. However, some objects are pseudo-objects, and the linear address is in the object record. The handle of an object record is a hob. Owner All allocated memory has an owner. For system memory, that owner is a hexadecimal value, starting with hex FF. Each sub-system in the kernel has one or more unique values for keeping track of allocated memory. For private memory, the owner is the hob of a PTDA or MTE. For shared memory, the owner may be either a system owner value, the hob of a PTDA, or the hob of an MTE. The owner value is in the object record. Page Directory The Page Directory is the first-level address translation table used by the hardware to map a linear address to a physical address. The entries in the Page Directory point to Page Tables. Page Frame Table The Page Frame Table has an entry for each page in the physical address space. This space includes all the real RAM in the machine, the I/O RAM space, and the ROM space. This table keeps track of the contents of each physical page. Page Table The Page Table is the second-level address translation table used by the hardware to map a linear address to a physical address. The entries in the Page Directory point to Page Tables, which in turn point to pages of physical RAM. PDE A PDE, or Page Directory Entry, contains the physical address of a particular Page Table. Physical Address A physical address is the final result when the CPU is resolving memory addresses. They are used to address the memory chips. They are represented by THESEUS as pppppppp (in hexadecimal notation). Physical Memory The physical memory in the machine is referenced by a physical address. (As opposed to virtual memory.) PID The process ID is a 16-bit number that uniquely identifies an OS/2 process. Popup Menu A popup menu is activated by a single-click of mouse button 2 or by pressing the Shift-F10 key sequence. A popup menu appears next to the item selected. Present Pages Present pages are those pages currently in RAM. Process In the OS/2 system, processes are the owners of resources. One or more cooperating processes make up each application. Each process takes its name from EXE file it is associated with. Each process is uniquely identified within the OS/2 system by its PID. (In other systems, processes are called "tasks.") Process Page Directory Each process is associated with a Process Page Directory. This directory contains the PDEs for the first 512MB of linear address space. The Process Page Directory is copied into the first 128 entries of the System Page Directory when the process is dispatched. Pseudo-Object Pseudo-objects are areas of memory allocated from kernel heap space. Because they have hobs, they can be accessed the same way as normal memory objects. MTEs and PTDAs are pseudo-objects. PTDA The PTDA, or Per Task Data Area, describes the resources owned by a process. PTE The PTE, or Page Table Entry, contains the physical address of a page. RAM RAM, or Random Access Memory, is the modifiable memory in the computer used by programs. See Physical Memory. Resident Pages Resident pages are pages of RAM that cannot be swapped. They must remain in RAM at all times until freed. ROM ROM, or Read Only Memory, is the unchangeable memory in the computer used by permanent programs. See Physical Memory. SFT The System File Table entry contains information about each unique instance of an open file. SMP Symetrical MultiProcessors. Swappable Pages Swappable pages are pages of RAM that can be swapped. They may be in RAM or on disk. Swapped Pages Swapped pages are those pages currently in the SWAPPER.DAT file. SWAPPER.DAT The SWAPPER.DAT file is the disk file where pages are kept after being swapped out. System Page Directory The System Page Directory is the page directory which is pointed to by the processors' Control Register 3. TCB The TCB, or Thread Control Block, contains information unique to a thread. Thread A thread is the dispatchable entity within the OS/2 system. A thread is identified within a process by its TID. It is uniquely identified within the OS/2 system by a thread number. Thread Number A thread number is the system wide unique identifier for a thread. A thread number is used within the OS/2 dispatcher, for example. Do not confuse the thread number with thread ID. TIB The TIB, or Thread Information Block, contains information about the currently running thread and is accessible by the application program. TID The TID, or Thread ID, is a 16-bit number that uniquely identifies a thread within a process. TSD The TSD, or Thread Swappable Data, is the portion of a thread control block that is swappable. TSS The TSS, or Task State Segment, is a 386 control block used by the processor to control its multi-tasking functions. UVirt Page A UVirt page is a page that has been defined by a device driver or the kernel by using one of their special functions. The device driver function is DevHlp_PhysToUVirt. The "physical address" in the Page Table Entry may not point to a real page of RAM. It may point to an I/O adapter card or some other "pseudo-memory." Virtual Address Virtual addresses have both selectors and offsets. They are represented by THESEUS as ssss:oooo or ssss:oooooooo (selector:offset) (all in hexadecimal notation). Virtual Memory Virtual memory is memory as seen by the program. It is referenced by a virtual address or a flat address. (As opposed to physical memory.) Virtual Page Table The Virtual Page Table keeps track of committed memory. This table contains an entry for each page of committed memory. Working Set The working set is the set of memory (pages) referenced in the last n time intervals. The working set includes both resident and locked pages and swappable pages. ═══ 6. How to use THESEUS4 ═══ The following aspects of using THESEUS4 are explored:  Hyperblock Links  Mouse Usage  Memory Analysis Using THESEUS4  How to Do Things with THESEUS4 ═══ 6.1. Hyperblock (tm) links ═══ Hyperblock* links allow you to navigate from one control block to another by using the mouse to select the address of the block to be viewed. A hyperblock link is denoted by its different color. The color of the links can be changed with the 'Link' color option of the Misc menu in the Process Hierarchy window. ═══ 6.2. Mouse usage and item selection ═══ The usage of the Mouse is dependent on the context, as follows: ┌──────────────┬──────────────┬────────────────────┬──────────────┐ │Item\Context │Main Window │Detail Window │Detail Window │ │ │ │(normal usage) │(selecting an │ │ │ │ │area) │ ├──────────────┼──────────────┼────────────────────┼──────────────┤ │Pointer │Points to the │Points to the │Marks off │ │ │desired │desired hyperblock │opposite │ │ │process. │link. │corners of the│ │ │ │ │area to be │ │ │ │ │selected. │ ├──────────────┼──────────────┼────────────────────┼──────────────┤ │Button 1 │Selects the │Selects the │Starts/stops │ │(single-click)│process that │hyperblock link that│selecting the │ │ │the pointer is│the pointer is over.│area. │ │ │over. │ │ │ ├──────────────┼──────────────┼────────────────────┼──────────────┤ │Button 1 │Displays │Displays the linked │ │ │(double-click)│general │memory object that │ │ │ │information │the pointer is over.│ │ │ │about the │ │ │ │ │process that │ │ │ │ │the pointer is│ │ │ │ │over. │ │ │ ├──────────────┼──────────────┼────────────────────┼──────────────┤ │Button 2 │ │Displays a popup │ │ │(single-click)│ │menu customized for │ │ │ │ │the hyperblock link │ │ │ │ │which is selected. │ │ │ │ │If there is not a │ │ │ │ │hyperblock link │ │ │ │ │selected, then │ │ │ │ │displays a general │ │ │ │ │popup menu. │ │ ├──────────────┼──────────────┼────────────────────┼──────────────┤ │Button 2 │ │Describes the linked│ │ │(double-click)│ │memory object that │ │ │ │ │the pointer is over.│ │ └──────────────┴──────────────┴────────────────────┴──────────────┘ There is a pause between releasing mouse button 2 and the display of the popup menu. As a result, the program can distinguish between a single-click and a double-click. The time used is the system-maintained time for double-clicks (SV_DBLCLKTIME). ═══ 6.3. Memory Analysis Using THESEUS4 ═══ We have found it necessary to look at memory usage in several different ways. Sometimes we need to see how much memory has been allocated, sometimes we need to see how much has been committed, sometimes we need to see how much is in use. The various memory analysis functions of THESEUS4 were created to satisfy these needs. Analysis of memory usage can be done by THESEUS4 as follows:  Memory Usage for the Entire System  Kernel Memory Usage  Memory Usage by a Single Process  Working Set of the Entire System  Working Set of a Single Process ═══ 6.3.1. Memory Usage for the Entire System ═══ The amount of memory (RAM) consumed by each process is determined and then a summary of consumption by all processes is displayed by the RAM Usage by Process function. Memory is considered consumed if it is allocated and marked present in the Page Table Entry. This is done for the entire system and the display includes data for all processes. This gives an overall indication of memory consumption. However, since this does not consider which pages are being used, only present, the actual amount of memory needed by each process may be less than the amount shown. ═══ 6.3.2. Kernel Memory Usage ═══ The amount of memory consumed by the operating system is determined by system owner code by the Kernel Memory Usage function. The information is displayed sorted by system owner code. This is useful to determine how much memory is consumed by:  Device driver allocated (owner = FF6B - allocated via devhlp AllocPhys), which includes any "RAM disk" allocated  Kernel code (owner = FFAA - os2krnl load image)  Any object allocated by the kernel, device drivers and IFSs. ═══ 6.3.3. Memory Usage by a Single Process ═══ Details about the memory usage by the selected process is displayed by the Memory Utilization function. This data is computed as if there were no other processes in the system. When multiple copies of a particular program are running, each of them would show the EXE file as being consumed by that process. This is done for only the selected process. Some detail for the process is shown. This is useful for determining if a process is leaking memory. See Is a Process Leaking Memory? (method 1) for a description of how to do this. ═══ 6.3.4. Working Set of the Entire System ═══ The working set memory utilization of the entire system can be determined by the Working Set for the Entire System function. This is most useful if the working set of all the programs you normally run can be held in RAM at the same time. To see how to use this function, please see:  Working Set of the Entire System?  Working Set When it does not all fit? ═══ 6.3.5. Working Set of a Single Process ═══ The working set memory utilization of a single process can be determined by the Working Set for a Single Process function. This is useful if you are only interested in a single process or if all of your the programs you normally run do not fit in RAM. To see how to use this function, please see:  Working Set of a Single Process?  Working Set When it does not all fit? ═══ 6.4. How to Do Things with THESEUS4 ═══ It is possible to do a number of different program analysis functions in addition to the memory analysis functions. Some of them are:  What is at an Address?  Valid Contexts for a Shared Linear Address?  Where is Code Loaded?  Is a Process Leaking Memory? (programatic method) This also includes the functions for determining why the SWAPPER.DAT file is continuing to increase in size.  Is a Process Leaking Memory? (old method 1)  Is a Process Leaking Memory? (old method 2)  Working Set of the Entire System?  Working Set of a Multi-Process Application?  Working Set of a Single Process?  Working Set When it does not all fit? ═══ 6.4.1. What is at an Address? ═══ To determine what memory object is at a specific address: 1. Select the process in whose context the address lies. 2. Select the General Process Information option of the Process pull-down. 3. Select the Show Description option of the Functions pull-down. 4. Enter the desired address type and value. 5. The object description is shown. ═══ 6.4.2. Valid Contexts for a Shared Linear Address? ═══ To determine what processes have access to a shared linear address: 1. Select the 'sysinit' process. 2. Select the Shared Object Summary option of the Process pull-down. 3. Select the Show Description option. 4. Enter the desired address type and value. 5. The object description is shown, including all the processes' Page Table Entries for the object. The Context Records also show which processes have access and the type of access allowed. ═══ 6.4.3. Where is Code Loaded? ═══ To determine where code objects are loaded (so you can program a tool like the "Intel In-Circuit Analyzer" (ICE): 1. Select the process in whose context the program is running. 2. Select the Modules option of the System pull-down. 3. Find the module you are interested in. (You can use the Find dialog to have THESEUS4 find the module for you.) 4. Double-click the left mouse button while pointing at the MTE @ (first column) value. This will display the formatted MTE. 5. Move to the Object/Segment Table, at the bottom of the display. 6. Double-click the right mouse button while pointing at the address of the particular object/segment you want to map. The Page Table Entries map the virtual/logical address of the module into the physical addresses needed. ═══ 6.4.4. Is a Process Leaking Memory? (programatic method) ═══ To determine which process is leaking memory, use the Memory Leak Detection option on the System pull-down. To determine which memory object is leaking memory for a specific process, use the Memory Leak Detection option on the Process pull-down. To determine which pages in a memory object are being leaked, use the Memory Object Leak Detection option of the Functions pull-down in a detail window, after selecting the linear address of the memory object. There is a 'white paper' on CompuServe which discusses how to find memory leaks using both THESEUS4 and CSet/2's "debug malloc" support. I highly recommend that you get this to understand the mechanics of doing leak detection and correction. After logging onto CompuServe, go os2df2 lib 9 file name is "memlks.exe" It is a "self-extracting" zip file. ═══ 6.4.5. Is a Process Leaking Memory? (old method 1) ═══ To determine if a process is leaking memory: 1. Select the process you wish to examine. 2. Perform the function that you wish to examine. (This will cause all the related pages of program and data to be loaded.) 3. Select the Memory Utilization option of the Process pull-down. Do not close this window. 4. Perform the function that you wish to examine. 5. Select the Memory Utilization option of the Process pull-down, again. 6. Compare the results in the two Memory Utilization displays. Look at the Total Shared originated and the Total Private lines, as these are the ones that will change if leaking is taking place. (If you forget which display is which, the time and date of display generation are displayed on the last line of the display.) ═══ 6.4.6. Is a Process Leaking Memory? (old method 2) ═══ To determine if a process is leaking memory, when the SWAPPER.DAT file is growing: 1. Select the Swapper display. 2. Look at the entries at the bottom of the display. If a process is leaking memory, it will usually have a lot of pages in the SWAPPER.DAT file which are the same type of memory object as the one which is being leaked. ═══ 6.4.7. Working Set of the Entire System? ═══ To determine the working set of the entire system: 1. Select the Working Set option of the System pull-down. 2. Select the Working Set Parameters option of the Functions pull-down. 3. Make any changes that you want to the default data collection parameters. 4. Select the Working Set Start option of the Functions pull-down. 5. Perform the functions (in your application) that you want measured. 6. Return to THESEUS4's working set window and select the Working Set Stop option of the Functions pull-down. 7. A summary of the working set for the entire system is displayed. 8. Detail working set information may be obtained by:  Selecting the Show Detail by Page option of the Functions pull-down  Selecting the Show Detail by Object option of the Functions pull-down If you want to know the working sets of individual processes, see the section Working Set of a Single Process. ═══ 6.4.8. Working Set of a Multi-Process Application? ═══ A method we use in Austin in the performance analysis departments to determine the working set of our complex, multi-process applications is to plot the results of the System Working Set output and look at the changes as we perform various functions. 1. Input the following one of the two commands to get the data collection started: workset2 system 5 12 /plot > filename ( for system working set ) -or- workset2 processName 5 12 /plot > filename ( for a process ) If you want to collect the data at another interval or number of intervals in the working set, change the 5 and 12 to whatever you want. NOTE: It is not recommended to change these, we found that these work best. 2. Run your application, noting the times that you do specific events in your scenario. 3. When you have completed the scenario, input the following: ctl-c to stop the output of data. 4. The output file is formatted for easy importing into most plotting spread-sheets. There are four columns of data: a) Time of day in hours, minutes, and seconds, without any delimiters. For instance, current time is 10:26:10 AM and that would be presented as 102610. b) The now column in megabytes. c) The working set column in megabytes. d) The free column in megabytes. We generally edit the time column and put in information which is better for the horizontal plotting axis, for instance, we would put in the names of the specific events in the scenario. 5. We then "import" this data into a plotting spread-sheet and plot the now and working set columns. We get something similar to the following: 6. The difference between the RAM at B and the RAM at A is the size of the application "steady-state" working set. 7. If there are changes at point C and point D, then these functions have additional memory requirements. 8. The spikes at the specific functions shows the "transient" memory required to perform these functions. 9. The highest of the working set spikes shows how much RAM is needed to be able to run the application without thrashing RAM. 10. After the "stop" function is done, the working set should return to the value at point A. When this kind of test is run, the machine it is run on must have more memory than the working set requires, such that the working set is no larger than 85% of RAM. Otherwise, the system "page ager" and THESEUS4 conflict and the resulting data is unreliable. The customer machine must have more RAM than the highest of the "steady-state" points. If it doesn't, then steady-state paging will occur and our experience is that the user will not be satisfied with performance. Also, if the machine has less than any one spike, then paging will occur during the processing of that function and performance will degrade. ═══ 6.4.9. Working Set of a Single Process? ═══ To determine the working set of memory for a particular process: 1. Select the process you wish to measure. 2. Select the Working Set option of the Process pull-down. 3. Select the Working Set Parameters option of the Functions pull-down. 4. Make any changes that you want to the default data collection parameters. 5. Select the Working Set Start option of the Functions pull-down. 6. Perform the functions (in your application) that you want measured. 7. Return to THESEUS4's working set window and select the Working Set Stop option of the Functions pull-down. 8. A summary of the working set for the specified process is displayed. 9. Detail working set information may be obtained by:  Selecting the Show Detail by Page option of the Functions pull-down  Selecting the Show Detail by Object option of the Functions pull-down If you want to know the working set of the entire system, see the section Working Set of the Entire System. ═══ 6.4.10. Working Set When it does not all fit? ═══ To determine the working set of memory of a group of processes that do not all fit into RAM at the same time: 1. Start your system without any of your applications. 2. Do Working Set of the Entire System to determine the working set of the base system with your configuration. 3. Do Working Set of a Single Process for each of your applications, one at a time. 4. Do the following calculation: Recommended amount of memory from step 2 + Recommended amount of memory from each case of step 3 - 188K (THESEUS4's working set while taking the measurement) = Total working set for your case. ═══ 7. Memory Explanations ═══ The following aspects of memory under the OS/2 system are explored:  Memory Addressing in the OS/2 System  Memory States  Memory Management Control Blocks  Cost of Memory Objects ═══ 7.1. Memory Addressing in the OS/2 System ═══ The OS/2 system uses four types of addresses: Virtual Virtual addresses have both selectors and offsets. They are represented by THESEUS as ssss:oooo or ssss:oooooooo (selector:offset) (all in hexadecimal notation). These are sometimes referred to as "16:16" addresses. This is the address type that "16-bit / segmented" programs use. The system uses the Global and Local Descriptor Tables to convert a virtual address to a linear address. Flat A flat address is a virtual offset. Because the selector registers (loaded by the operating system) have a base address of 00000000, flat is equivalent to linear. These are sometimes referred to as "0:32" addresses. This is the address type that "32-bit / flat" programs use. Linear A linear address is the intermediate result when the CPU is resolving memory addresses. They are represented by THESEUS as llllllll (in hexadecimal notation). Physical A physical address is the final result when the CPU is resolving memory addresses. They are used to address the memory chips. They are represented by THESEUS as pppppppp (in hexadecimal notation). See the Thunking Addresses section for conversion of "16:16" and "0:32" addresses. Because linear and physical addresses are both presented by THESEUS4 as eight hexadecimal digits, the particular type must be deduced from context. However, if THESEUS4 presents the address as a hyperblock link, it will do the proper processing if the link is used. Refer to the Intel 80386 Programmer's Reference Manual, Chapter 5 for more information about how the processor handles addressing. ═══ 7.1.1. Thunking Addresses ═══ The process of converting virtual addresses from one form to another is referred to as thunking. Addresses can be converted from the "0:32" flat address form to the "16:16" virtual address form by: selector = ((flat >> 16) << 3) | 7; offset = flat & 0x0000FFFF; Addresses can be converted from the "16:16" virtual address form to the "0:32" flat address form by: flat = ((selector >> 3) << 16) | offset; Where: Symbol Meaning >> n Right shift n bits, filling on the left with zeros. << n Left shift n bits, filling on the right with zeros. | Bitwise or. & Bitwise and. ═══ 7.1.2. Translation Lookaside Buffer ═══ The 80386 and i486 processors use a Translation Lookaside Buffer (TLB) to improve the instruction execution rate when doing paging. The TLB is a four-way set-associative memory which maps linear addresses to physical addresses. Each time a linear address without a TLB entry is translated, the appropriate TLB entry is loaded and this "...will add 13, 21 or 28 clocks to the instruction depending on whether the Accessed and/or Dirty bit in neither, one or both of the page entries needs to be set in memory" (Intel i486 Microprocessor Programmer's Reference Manual, 1990, page E-2). The bottom three bits of the linear address page number (bits 12-14 of the linear address) are used to select the set of four data entries. Because most memory objects start on 64K boundaries, these bits are zeros and the same set of data entries is used for all address translation. TLB "thrashing" can occur if the first page of more than four memory objects are being referenced by the program. This causes the program execution time to substantially increase. Because the programmer has little control over where the variables used in high-level languages are stored, this problem is likely to occur. ═══ page entries ═══ Page Directory or Page Table ═══ 7.2. Memory States ═══ Memory in OS/2* has several states. The states are explored:  Physical Memory States  Physical Memory State Change Table  Virtual Memory States  Virtual Memory State Change Table  Memory State Venn Diagram ═══ 7.2.1. Physical Memory States ═══ Physical memory pages have three states: State Explanation Free A page that is not in use. A free page can be attached to a virtual page. Attached A page that is in use. The physical page is attached to a virtual page, and one or more Page Table Entries point directly to it. Idle A page that has not been used recently. The Page Table Entry is not connected directly to the physical page. Instead, the Page Table Entry is connected to the physical page by way of the Virtual Page Table. Attached pages have three substates: State Explanation Swappable The page is swappable or discardable. Locked The memory has been locked by a Device Driver. The lock may be either long-term or short-term. Resident The page must remain in RAM at all times and cannot be swapped or discarded. Idle pages have two substates: State Explanation Dirty The page contents have been modified and must be written to the swap file before attaching the page to another virtual page. Clean The page contents have not been modified. The page can, therefore, be given to another virtual page without the Page Manager writing the contents to disk. (Attached pages have the substates of Dirty and Clean, also. However, the Dirty/Clean substate is interesting only if the page is in the Idle state.) Physical Memory State Change Table ═══ 7.2.2. Physical Memory State Change Table ═══ Following are the primary physical page state transitions: ┌──────────┬─────────┬────────────────────────────────────────────┐ │From State│To State │Reason │ ├──────────┼─────────┼────────────────────────────────────────────┤ │Free │Attached │A virtual page is referenced that has no │ │ │ │physical page attached to it. The page is │ │ │ │zeroed before being given to the │ │ │ │application. │ ├──────────┼─────────┼────────────────────────────────────────────┤ │Attached │Free │The application performs a DosFreeMem │ │ │ │function on the memory object. │ ├──────────┼─────────┼────────────────────────────────────────────┤ │Attached │Idle │The page ager "idles" the page if it has not│ │ │ │been accessed recently. │ ├──────────┼─────────┼────────────────────────────────────────────┤ │Idle │Attached │Either: 1. the application references the │ │ │ │page, or 2. another application needs a │ │ │ │page, so this one is paged out and then │ │ │ │attached. The page is zeroed before being │ │ │ │given to the application. │ ├──────────┼─────────┼────────────────────────────────────────────┤ │Idle │Free │The application performs a DosFreeMem │ │ │ │function on the memory object. │ └──────────┴─────────┴────────────────────────────────────────────┘ Following are the substate transitions: ┌──────────┬─────────┬────────────────────────────────────────────┐ │From State│To State │Reason │ ├──────────┼─────────┼────────────────────────────────────────────┤ │Swappable │Locked │A device driver performs a DevHlp_Lock │ │ │ │function on the page. │ ├──────────┼─────────┼────────────────────────────────────────────┤ │Locked │Swappable│A device driver performs a DevHlp_Unlock │ │ │ │function on the page. │ ├──────────┼─────────┼────────────────────────────────────────────┤ │Resident │ │Substate changes not allowed for resident │ │ │ │pages. │ ├──────────┼─────────┼────────────────────────────────────────────┤ ├──────────┼─────────┼────────────────────────────────────────────┤ │Clean │Dirty │The page is modified by a program. │ ├──────────┼─────────┼────────────────────────────────────────────┤ │Dirty │Clean │The page is written to disk by the Memory │ │ │ │Manager. │ └──────────┴─────────┴────────────────────────────────────────────┘ ═══ 7.2.3. Virtual Memory States ═══ Virtual memory pages have three states: State Explanation Free The virtual memory is not allocated to the application. Decommitted Linear address space is allocated, but it is not valid for the program to reference the page. Committed Linear address space is allocated, and it is valid for the program to reference the page. Committed pages have six substates: State Explanation Guard Guard pages are used to manage stacks, linearly expanding objects or sparse objects. When referenced, a 'guard page entered' condition is raised. AOD (Allocate On Demand) The page has not been referenced and does not have a page of physical memory attached. This is the normal state of a page after being committed and before being referenced. When referenced, a physical page is zeroed and attached to the virtual page. TBL (To Be Loaded) The page has not been referenced and does not have a page of physical memory attached. This page was created by the loader. When referenced, the page is retrieved from the appropriate disk file. Present A physical page is attached to the virtual page, and the appropriate Page Table Entry points directly to it. This is the state of a page that is in active use. Idle A page which has not been used recently. The Page Table Entry is not connected directly to the physical page. Instead, the Page Table Entry is connected to the physical page by way of the Virtual Page Table. When referenced, the page is returned to the present state. Swapped The contents of the page have been swapped to disk. When referenced, the page is loaded from disk and returned to the present state. Present pages have the same substates as attached physical memory. See the Physical Memory States section for an explanation. Virtual Memory State Change Table ═══ 7.2.4. Virtual Memory State Change Table ═══ Following are the primary virtual page state transitions: ┌───────────┬───────────┬─────────────────────────────────────────┐ │From State │To State │Reason │ ├───────────┼───────────┼─────────────────────────────────────────┤ │Free │Decommitted│DosAllocMem or DosAllocSharedMem w/o │ │ │ │PAG_COMMIT │ ├───────────┼───────────┼─────────────────────────────────────────┤ │Free │Committed │DosAllocMem or DosAllocSharedMem w/ │ │ │ │PAG_COMMIT │ ├───────────┼───────────┼─────────────────────────────────────────┤ │Decommitted│Free │DosFreeMem │ ├───────────┼───────────┼─────────────────────────────────────────┤ │Decommitted│Committed │DosSetMem w/ PAG_GUARD or PAG_COMMIT │ ├───────────┼───────────┼─────────────────────────────────────────┤ │Committed │Free │DosFreeMem or the program terminates │ ├───────────┼───────────┼─────────────────────────────────────────┤ │Committed │Decommitted│DosSetMem w/ PAG_DECOMMIT. If a page is │ │ │ │attached, it is freed. │ └───────────┴───────────┴─────────────────────────────────────────┘ Following are the substate transitions within the committed state: ┌──────────┬────────┬─────────────────────────────────────────────┐ │From State│To State│Reason │ ├──────────┼────────┼─────────────────────────────────────────────┤ │Guard │AOD │DosSetMem w/ PAG_COMMIT │ ├──────────┼────────┼─────────────────────────────────────────────┤ │AOD │Guard │DosSetMem w/ PAG_GUARD │ ├──────────┼────────┼─────────────────────────────────────────────┤ │AOD │Present │The page is referenced. │ ├──────────┼────────┼─────────────────────────────────────────────┤ │TBL │Present │The page is referenced. │ ├──────────┼────────┼─────────────────────────────────────────────┤ │Present │TBL │The page is discarded by the Swapper. │ ├──────────┼────────┼─────────────────────────────────────────────┤ │Present │Idle │The Page Ager "idles" the page if it has not │ │ │ │been accessed recently. │ ├──────────┼────────┼─────────────────────────────────────────────┤ │Idle │Present │The page is referenced. │ ├──────────┼────────┼─────────────────────────────────────────────┤ │Idle │Swapped │The Swapper writes the page contents to disk │ │ │ │because it needs the physical page. │ ├──────────┼────────┼─────────────────────────────────────────────┤ │Swapped │Present │The page is referenced. │ └──────────┴────────┴─────────────────────────────────────────────┘ ═══ 7.2.5. Memory State Venn Diagram ═══ The Venn diagram for the states of physical and virtual memory is: ═══ 7.3. Memory Management Control Blocks ═══ The memory management control blocks are presented in three methods:  The Different Views of Memory  Table of Memory Management Control Blocks  Pictures of Memory Control Blocks ═══ 7.3.1. The Different Views of Memory ═══ The Memory Manager uses several control blocks to keep track of all the different views of memory. The views are: View Control Blocks Virtual The GDT and LDT are used to convert virtual addresses to linear addresses. Linear The arena is used to manage the linear address space. Physical The Page Directory and Page Tables are used to convert linear addresses to physical addresses. Modules The MTE is used to manage modules. For an explanation of the relationship of the linear and physical views, see Linear/Physical Relationship. For a tabular summary, see Table of Memory Management Control Blocks. ═══ 7.3.1.1. Virtual View Control Blocks ═══ The GDT and LDT are used to convert virtual addresses to linear addresses. GDT (Global Descriptor Table) The GDT has selectors which are valid in any process context. These include selectors for device drivers, system tables, kernel code, and the flat selectors that are loaded by the system for 32-bit flat programs. LDT (Local Descriptor Table) Each process has an LDT, which is used only for 16-bit segmented applications. ═══ 7.3.1.2. Linear View Control Blocks ═══ The arena is used to manage the linear address space. arena The arena keeps track of what linear addresses are being used. The arena contains arena records, alias records, object records, and context records. See sections starting with Arenas with Arena Records for a pictorial representation of their relationships of these control blocks. See section Arena Relationships for a pictorial representation of the relationships between the various types of arenas. arena header There is an arena header for each arena. They are doubly linked. The Arena Header picture shows this graphically. private arena The PTDA contains the arena header for the private arena for that process. The arena header has a pointer to the sentinel arena record for the private arena for that Process. The private arena is usable only in the context of that process. The Arena Header picture shows this graphically. shared arena The shared arena tracks all of the shared memory objects in the system. The shared arena is context-sensitive, because the backing memory (pages of real RAM) may be process-unique. (This is the case for the instance data in a DLL file.) The context records keep track of which processes can access each memory object. system arena The system arena maps the linear address space which belongs to the OS/2 system. The system memory objects are not addressable by application programs. VPT (Virtual Page Table) The Virtual Page Table has an entry for each committed page. Each entry also includes the hob of the memory object that is attached to the page. ═══ 7.3.1.3. Physical View Control Blocks ═══ The Page Directory and Page Tables are used to convert linear addresses to physical addresses. PD (Page Directory) The Page Directory is the first-level address translation table used by the hardware to map a linear address to a physical address. The entries in the Page Directory point to Page Tables. PT (Page Table) The Page Table is the second-level address translation table used by the hardware to map a linear address to a physical address. The entries in the Page Directory point to Page Tables, which in turn point to pages of physical RAM. PPD (Process Page Directory) Each PTDA contains a pointer to a Process Page Directory which points to Page Tables that track the physical pages that may be referenced by that Process. The PPD maps the area for both the private and shared arenas. PFT (Page Frame Table) The Page Frame Table keeps track of physical memory. There is an entry for each addressable page of RAM in the machine. Each in-use entry in this table has a pointer to an entry in the Virtual Page Table, which effectively links physical and linear memory. PRT (Page Range Table) The Page Range Table tells which pages are addressable. For systems up to and including 2.11, the Process Page Directory (PPD) mapped the entire private and shared arenas. However, starting with OS/2 Warp, the PPD maps the private arena and the "read/write data" portion of the shared arena. The "code" and "read-only data" portion of the shared arena is mapped from the System Page Directory. As a result, the Process Working Set and Leak Detection computations can no longer determine which process is accessing a particular page of DLL code. ═══ 7.3.1.4. Module View Control Blocks ═══ The MTE is used to manage modules. MTE (Module Table Entry) Each module that is loaded has an MTE that is used to manage the memory objects that make up the module. The MTEs are linked together. The PTDA points to the MTE for the EXE file for that process. The MTE is split into resident and swappable portions. There are several substates in each category, including the object/segment table that has the actual object/segment information for the module. ═══ 7.3.1.5. Linear/Physical Relationship ═══ The picture Arena Relationships shows pictorially how the arenas are arranged in the linear address space. For OS/2 Warp 3.x and 4.x versions The Process Page Directory maps the linear space represented by the private arena and the first portion of the shared arena, which includes only the read/write data memory objects. This is the first 320M of the linear address space. For e-Business version Addressing of linear address space above 512M was added. The code and read-only data memory objects in the shared arena are mapped by the System Page Directory. This is the next 192M of the linear address space. The System Page Directory maps all the system arena. This is the top 2.5G of linear address space. The linear address space between 512M (0.5G) and 1.5G is not mapped by any arena. This is not true for SMP and e-Busines SMP and UNI kernels. The area between the 512M and up to 3.0G can be allocated and address for 32-bit applications. This area is split into an area called the high private starting at 512M and high shared starting at 3.0G. The 3.0G can be adjusted to the 512M line using VIRTUALADDRESSLIMIT= in CONFIG.SYS. The reason for lowering high address space is to increase the number of processes. The System Page Directory doesn't have page tables for that region of space. ═══ 7.3.2. Table of Memory Management Control Blocks ═══ A summary of how the various Memory Management Control Blocks refer to each other: ┌────────────────────┬────────────────────┬────────────────────┐ │Control Block ----->│Pointer Type ------>│Control Block │ ├────────────────────┼────────────────────┼────────────────────┤ │alias record │har │arena record │ ├────────────────────┼────────────────────┼────────────────────┤ │arena record │har │next arena record in│ │ │ │the arena │ ├────────────────────┼────────────────────┼────────────────────┤ │arena record │hal │alias record │ ├────────────────────┼────────────────────┼────────────────────┤ │arena record │hob │object record │ ├────────────────────┼────────────────────┼────────────────────┤ │arena record │hco │context record │ ├────────────────────┼────────────────────┼────────────────────┤ │object record │har │arena record │ ├────────────────────┼────────────────────┼────────────────────┤ │object record │hob │owner │ ├────────────────────┼────────────────────┼────────────────────┤ │object record │hob │the EXE or DLL file │ │ │ │which allocated the │ │ │ │memory │ ├────────────────────┼────────────────────┼────────────────────┤ │context record │hob │PTDA with access to │ │ │ │the shared object │ ├────────────────────┼────────────────────┼────────────────────┤ │context record │hco │next context record │ │ │ │in the access chain │ ├────────────────────┼────────────────────┼────────────────────┤ │arena header │linear address │arena sentinel │ ├────────────────────┼────────────────────┼────────────────────┤ │PTDA │linear address and │LDT │ │ │hob │ │ ├────────────────────┼────────────────────┼────────────────────┤ │PTDA │linear address │Process Page │ │ │ │Directory │ ├────────────────────┼────────────────────┼────────────────────┤ │PTDA │hob │MTE of the EXE file │ ├────────────────────┼────────────────────┼────────────────────┤ │MTE │linear address │next MTE in the list│ │ │ │of MTEs │ ├────────────────────┼────────────────────┼────────────────────┤ │Page Directory │physical address │Page Table │ ├────────────────────┼────────────────────┼────────────────────┤ │Page Table Entry │Implied by the │Page Frame Entry │ │ │physical address │ │ ├────────────────────┼────────────────────┼────────────────────┤ │Page Frame Entry │Linear address │Virtual Page Entry │ ├────────────────────┼────────────────────┼────────────────────┤ │Virtual Page Entry │hob │Object Record │ ├────────────────────┼────────────────────┼────────────────────┤ │Virtual Page Entry │frameid │Physical page │ └────────────────────┴────────────────────┴────────────────────┘ This is all the information that is gathered together by:  Description of Linear Object,  Description of Segment, and  Description of Physical Object. ═══ 7.3.3. Pictures of Memory Control Blocks ═══ The memory manager control block pictures are:  Arena Header picture  Arena Relationships  Arenas with Arena Records  Arenas with Object Records  Arenas with Context Records ═══ 7.3.3.1. Arena Header picture ═══ Most arena headers are within PTDAs and all are linked together: Next picture: Arena Relationships. ═══ 7.3.3.2. Arena Relationships ═══ The arenas are related by linear address: Adjacent pictures: Arenas with Arena Records, Arena Headers. ═══ 7.3.3.3. Arenas with Arena Records ═══ The arenas are made up of doubly linked arena records: Adjacent pictures: Arenas with Object Records, Arena Relationships. ═══ 7.3.3.4. Arenas with Object Records ═══ All the arena records, except the sentinel, have object records: Adjacent pictures: Arenas with Context Records, Arenas with Arena Records. ═══ 7.3.3.5. Arenas with Context Records ═══ The arena records in the shared arena have context records: Previous picture: Arenas with Object Records. ═══ 7.4. Cost of Memory Objects ═══ The cost of a memory object can be summarized as follows: Item Cost in bytes (decimal) DTE 8 PTE 4 * total number of pages Arena Record 22 Object Record 16 Context Record 5 * number of Processes that have access to the object Page Frame Record 12 * number of pages in RAM Virtual Page Record 12 * number of committed pages If the object is loaded from a 32-bit EXE/DLL file, then add: Item Cost in bytes (decimal) MTE object entry 24 If the object is loaded from a 16-bit EXE/DLL file, then add: Item Cost in bytes (decimal) MTE segment entry 16 Remember that this is a per-object/segment cost. Each object/segment loaded from the module must be included. ═══ 8. Changes ═══ Changes that have been made to THESEUS4 3.001: 1. 231954 - fix for fix pack 12 kernel changes. Changes that have been made to THESEUS4 3.002: 1. 238201 - fix for Warp 4 fp13 and e-business fp1. 2. 238203 - convert old debug to new trace output. 3. 238246 - new rexx api for linear usage by process. A new command file getlinmp.cmd is used to display the linear usage by process. 4. 238433 - Apar PJ27114 TRAP-e fixed. 5. 238698 - Warp 4 debug kernel page frame function loops. ═══ 9. Process Hierarchy Window ═══ The Process Hierarchy window shows the parent/child relationships of processes as they currently exist in memory. After a process has been selected, you may then move on to a Detail window. Options available on the Process Hierarchy window are: System Lists the displays applicable to the system as a whole. Process Lists the displays applicable to the selected process. Registers Lists the displays applicable to the processor. Misc Lists the miscellaneous functions. Window Lists the existing THESEUS Detail windows. Help Lists the help functions. The window automatically updates at 10 second interval. This can be changed with the Options dialog of the Contents Update sub-menu of the Misc pull-down. ═══ 9.1. Selecting a Process ═══ You may select a process in either of two ways:  Place the mouse pointer over a process name, then press mouse button 1.  Use the arrow keys: Left Moves to the parent of the current process. Right Moves to the oldest child of the current process. Up Moves to the next younger sibling of the current process. Down Moves to the next older sibling of the current process. If no process is selected, pressing any arrow key makes "sysinit" the selected process. ═══ 9.2. Keys ═══ The key usage in the Process Hierarchy window is: Left Moves to the parent of the current process. Right Moves to the oldest child of the current process. Up Moves to the next younger sibling of the current process. Down Moves to the next older sibling of the current process. Alt+Left Scrolls the window information left. Alt+Right Scrolls the window information right. Alt+Up Scrolls the window information up. Alt+Down Scrolls the window information down. Page Up Scrolls the window information up 1/2 the screen height. Page Down Scrolls the window information down 1/2 the screen height. Print Screen Prints the contents of the window. F1 Requests contextual help. F3 Exits THESEUS. Enter Displays General Process Information for the selected process. (This is the same as double-clicking mouse button 1.) ═══ 9.3. System ═══ The System pull-down contains displays applicable to the system as a whole. A process does not have to be selected in order to select one of these displays. Functions available are: Working Set Displays the working set of memory for the entire system. Memory Leak Detection Displays the number of pages of memory that each process is accumulating. Nonswappable Memory Analysis Displays information about the contents of nonswappable memory. Linear Usage by Process Displays a map of the linear address usage for all processes. This includes the private and shared arenas. Page Contents Displays the contents of each page of physical memory. RAM Usage by Process First determines and then displays the amount of RAM consumed my each process. Free, Idle and Locked Memory Generates the summary information about free, idle and locked pages. Swapper Displays information about the contents of the SWAPPER.DAT file. General System A set of displays containing general system information. Kernel Information A set of displays containing kernel information. ═══ 9.3.1. Working Set ═══ Select one: Selecting Example Output Contents of Display Algorithm Illustration Related Topics ═══ Selecting the Working Set Display ═══ When you select the Working Set option of the System pull-down on the Process Hierarchy window, the memory working set of the entire System is computed and displayed. There are optional values that can be shown in realtime. ═══ Example of the Working Set Display ═══ Working Set for the entire System: Use the 'Functions' pull-down or the 'Popup Menu' to start and stop the data collection. Collection started: interval = 5, Working Set is 3 intervals. current time --------- Total ---------- ------ ------ ---- Process ----- hh:mm:ss.tt now ws accessed Free Idle contributed total 10:49:02.84 4.789M 4.789M 4.789M 3.191M 0.008M 7 7 10:49:07.84 4.664M 4.828M 4.828M 3.191M 0.008M 7 7 10:49:12.84 4.664M 4.828M 4.828M 3.191M 0.008M 7 7 10:49:17.84 4.664M 4.664M 4.828M 3.191M 0.008M 7 7 10:49:22.84 4.664M 4.664M 4.828M 3.191M 0.008M 7 7 10:49:27.84 4.664M 4.664M 4.828M 3.191M 0.008M 7 7 10:49:32.84 4.734M 4.734M 4.898M 3.191M 0.008M 7 7 10:49:37.87 5.172M 5.184M 5.199M 3.180M 0.008M 7 7 8 samples collected. Total Absolute minimum amount of memory: 5.172M Recommended amount of memory: 5.184M Total amount of accessed memory: 5.199M ═══ Contents of the Working Set Display ═══ The following values are computed and optionally presented in realtime: Column Meaning current time The time of the sample, presented in hours:minutes:seconds.hundredths. now The amount of memory referenced in the current interval. ws The working set, which is the amount of memory referenced in the past n intervals. accessed The total amount of memory accessed since the start of the collection run. Free The amount of free memory. Idle The amount of idle memory. Process contributed The number of processes that had memory accessed during the interval. This value indicates the number of processes which are both running and touching non-system memory. Process total The total number of processes found during the interval. This number changes as processes are created or destroyed. When the Stop option is selected: ii samples collected. The number of samples collected is reported (in decimal notation). Absolute minimum amount of memory The maximum value from the now column. This is the amount of memory absolutely required to run the application without "thrashing" memory. Recommended amount of memory The maximum value from the ws column. This is the recommended amount of memory for the application to run with minimum impact on paging. Total amount of accessed memory The maximum value from the accessed column. This is the amount of memory required to run the application with no paging activity. Note: If either Absolute minimum amount of memory or Recommended amount of memory are more than 80% of physical RAM, then the results are probably not valid. You should run your tests on a machine which has too much RAM, in order to get meaningful results. ═══ Related Topics ═══  Memory addressing  Memory Management Control Blocks  Memory Analysis Techniques  Detail of Working Set (by Page)  Detail of Working Set (by Object)  Summary by Process ═══ System Working Set Algorithm ═══ To compute the working set for the entire OS/2 system, you need to know:  Which pages have been referenced  When the pages were touched. The algorithm is: 1. The accessed flags are cleared from the Page Tables of all processes running in the system. 2. A timer is started, and on each timer tick: a) The pages which have been accessed are noted. b) The accessed flags are cleared. c) The number of pages which have been accessed anytime within the specified number of intervals is counted. d) Summary information for the interval is generated. e) The interval information is displayed, if requested. 3. When the Stop option is selected: a) Summary numbers for the entire run are generated. They are: Absolute minimum amount of memory The maximum of all the now entries. Recommended amount of memory The maximum of all the ws entries. Total amount of accessed memory The maximum of all the accessed entries. b) The results are displayed. ═══ Working Set Illustration ═══ To illustrate how the working set algorithm works, the follow table will be used: ┌──────┬───────────┬──────┬──────┬──────┬──────┬──────┬────────┐ │tick │which pages│page 1│page 2│page 3│now │ws │accessed│ │ │accessed │ │ │ │ │ │ │ ├──────┼───────────┼──────┼──────┼──────┼──────┼──────┼────────┤ │ 0 │ │ 255 │ 255 │ 255 │ │ │ │ ├──────┼───────────┼──────┼──────┼──────┼──────┼──────┼────────┤ │ 1 │ 1 │ 1 │ 255 │ 255 │ 1 │ 1 │ 1 │ ├──────┼───────────┼──────┼──────┼──────┼──────┼──────┼────────┤ │ 2 │ 2 │ 1 │ 1 │ 255 │ 1 │ 2 │ 2 │ ├──────┼───────────┼──────┼──────┼──────┼──────┼──────┼────────┤ │ 3 │ 1 3 │ 2 │ 1 │ 1 │ 2 │ 3 │ 3 │ ├──────┼───────────┼──────┼──────┼──────┼──────┼──────┼────────┤ │ 4 │ 1 │ 3 │ 1 │ 1 │ 1 │ 3 │ 3 │ ├──────┼───────────┼──────┼──────┼──────┼──────┼──────┼────────┤ │ 5 │ 1 │ 4 │ 1 │ 1 │ 1 │ 2 │ 3 │ ├──────┼───────────┼──────┼──────┼──────┼──────┼──────┼────────┤ │ 6 │ 1 │ 5 │ 1 │ 1 │ 1 │ 1 │ 3 │ └──────┴───────────┴──────┴──────┴──────┴──────┴──────┴────────┘ The number of intervals in the working set is 3 for this illustration. The meanings of the columns are: Column Meaning tick The interval number. pages accessed Indicates which page numbers were accessed during this interval. page n The number of intervals since the page was accessed. (255 indicates the page has never been accessed. The value is not allowed to be incremented above 254, so that value simply means that the page was accessed "a long time ago.") This corresponds to the time column in the detail displays. now The number of pages accessed in this interval. This corresponds to the now column in the displays. ws The number of pages considered to be in the working set. This corresponds to the ws column in the displays. accessed The number of pages which have been accessed since the run began. This corresponds to the accessed column in the displays. Explanation at each tick: 0 At initialization all pages are marked as "never been accessed." 1 Page 1 was accessed. Since it was the only page accessed in the last interval, the now column has 1. Page 1 has been accessed within the last 3 intervals, so the ws column has 1. 2 Page 2 was accessed. Since it was the only page accessed in the last interval, the now column has 1. Pages 1 and 2 have been accessed within the last 3 intervals, so the ws column has 2. 3 Pages 1 and 3 were accessed. They were the only pages accessed in the last interval, so the now column has 2. Pages 1, 2 and 3 have been accessed within the last 3 intervals, so the ws column has 3. 4 Page 1 was accessed. Since it was the only page accessed in the last interval, the now column has 1. Pages 1, 2 and 3 have been accessed within the last 3 intervals, so the ws column has 3. 5 Page 1 was accessed. Since it was the only page accessed in the last interval, the now column has 1. Pages 1 and 3 have been accessed within the last 3 intervals, so the ws column has 2. (Page 2 was accessed 4 intervals ago.) 6 Page 1 was accessed. Since it was the only page accessed in the last interval, the now column has 1. Page 1 has been accessed within the last 3 intervals, so the ws column has 1. (Page 2 was accessed 5 intervals ago and page 3 was accessed 4 intervals ago.) ═══ 9.3.2. Memory Leak Detection ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Memory Leak Detection Display ═══ When you select the Memory Leak Detection option of the System pull-down on the Process Hierarchy window, information about memory accumulation for each process in the system is computed and shown. This can be done either on a periodic basis or under user control. See Related Topics for the references for specifying control. ═══ Example of the Memory Leak Detection Display ═══ Memory leak detection: < End of THESEUSn (v 3.00.000) output @ 13:21:01 on 8/5/1993 > Use the 'Function' pull-down to start and stop the data collection. Leak data captured. Periodic update started with interval of 10 seconds. Previous sample will be used as the base. < End of THESEUSn (v 3.00.000) output @ 13:21:10 on 8/5/1993 > ----------Private----------- -----------Shared----------- Allocated Committed Actual Allocated Committed Actual PID Name +16 +17 +17 +64 0000 System +16 +1 +1 +0 +0 0004 PMSHL32 +160 +56 +39 +1540 +774 0061 +CMD < End of THESEUSn (v 3.00.000) output @ 13:21:21 on 8/5/1993 > ----------Private----------- -----------Shared----------- Allocated Committed Actual Allocated Committed Actual PID Name -16 -17 -17 -64 0000 System -16 -1 -1 +0 +0 0004 PMSHL32 -160 -56 -39 -1540 -774 0061 -CMD < End of THESEUSn (v 3.00.000) output @ 13:21:31 on 8/5/1993 > Periodic updated stopped. < End of THESEUSn (v 3.00.000) output @ 13:21:32 on 8/5/1993 > ═══ Contents of the Memory Leak Detection Display ═══ One line is displayed for each process whose allocated, committed, or actual (present + swapped) memory values have changed: Column Meaning Private Allocated The change in the number of pages of allocated (virtual) memory in the private arena. Private Committed The change in the number of pages of committed memory in the private arena. Private Actual The change in the number of pages of actual memory in the private arena. Shared Allocated The change in the number of pages of allocated (virtual) memory in the shared arena. Shared Committed The change in the number of pages of committed memory in the shared arena. Shared Actual The change in the number of pages of actual memory in the shared arena. PID The PID of the process for this line. Name The name of the process on this line. If the process is new (not present in the base data), then a prefix '+' is shown. If the process has terminated, then a prefix '-' is shown. ═══ Related Topics ═══  Memory addressing  Memory states  Leak detection control  Manual data capture  Manual data compare ═══ 9.3.3. Nonswappable Memory Analysis ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Nonswappable Memory Analysis display ═══ When you select the Nonswappable Memory Analysis option of the System pull-down on the Process Hierarchy window, information about nonswappable memory is displayed. ═══ Example of the Nonswappable Memory Analysis display ═══ This is from a freshly booted ThinkPad 720C with 16M RAM and 160M hardfile, running OS/2 Warp, using the "Easy Installation" option. Nonswappable Memory analysis: Apps & DLLs = 00009000 -> 36K -> 0.035M Process overhead = 00048000 -> 288K -> 0.281M DD allocated = 0000D000 -> 52K -> 0.051M DOS = 00008000 -> 32K -> 0.031M VDisk = 00000000 -> 0K -> 0.000M File system = 001D9000 -> 1892K -> 1.848M Kernel code = 00063000 -> 396K -> 0.387M Kernel data = 0004D000 -> 308K -> 0.301M Kernel heap = 00072000 -> 456K -> 0.445M Total = 00361000 -> 3460K -> 3.379M ═══ Contents of the Nonswappable Memory Analysis Display ═══ The information presented on the Nonswappable Memory Analysis display is as follows: Apps & DLLS Memory which is in the private and shared arenas. Process overhead Memory which is in the system arena and is used by the system to manage processes. DD allocated Memory allocated by device drivers, or on their behalf. DOS Memory allocated for the Virtual DOS Machine support. VDisk Memory allocated for a VirtualDisk. File system Memory allocated by the File System, including FAT chache. Kernel code Kernel code. Kernel data Kernel data and whatever doesn't fit in the other categories. Kernel heap The resident and locked portions of the kernel heap, including HPFS cache. xxxxxxxx Amount of memory in hexadecimal bytes in this category. iiiK Amount of memory in Kilobytes in this category. iiiM Amount of memory in Megabytes in this category. ═══ Related Topics ═══  Memory addressing ═══ 9.3.4. Linear Usage by Process ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Linear Usage by Process Display ═══ When you select the Linear Usage by Process option of the System pull-down on the Process Hierarchy window, information about usage of linear address space of all processes is shown. For the private arena, each block of memory (64K) is shown on a separate line, with the processes being shown as columns. Whether a block is allocated or free in each process is shown. For the shared arena, each memory object is shown on a separate line, with the processes being shown as columns. The highest access ability of each process is indicated. ═══ Example of the Linear Usage by Process Display ═══ Linear memory map: Process Names sLLLLECSEPHSSSEPMWWPMKSLNLSCSRSASACACVT yOAASPNPPMAPPTPMUKKMALPSBPPMPEPCPSMCMDH sGNNDWTMWSRMMOWSGSSDHOMCQDMSMMMSMPKSDME iDMDARRNMHDSNPPHLTTAJN nASLEOLBULENELSLRAALODIISLOALACAS0MEEEE iEGLMU tME address usage... 00000000 ....................................0. 00010000 00000000000000000000000000000000..0000 00020000 11111101111011111110101110101111..1100 00030000 2222220222202222.220202220202222002200 00040000 33333303333033332331303330303333113310 00050000 44444414444144443441404440414344224451 00060000 55555525555255554551505550525455335591 00070000 66666636666366665662606660636565446632 00080000 x77777477774777767737077707476755x7773 00090000 x8xx85x8885888878848088808587856 8814 000A0000 x 96 9996999989959099909698957 99.5 000B0000 07 0xx7000.9x060000000709058 00.6 000C0000 18 1 811100 171011101810159 1x77 000D0000 29 2 9221x. 2820.2202921250 2 18 ··· 01440000 6 01450000 . 01460000 . 01470000 7 01480000 x 01490000 There is 43.500M between the private and shared arenas. Shared arena starts at 04000000, which is 64.000M. Free memory from 04000000 for 225.750M, which is equivalent to 3612 64K spaces. 121C0000 ..............o....................... 0 PMWIN allocated it 121D0000 ......w.ww.wwwoww.wwwwwwwwwwwww.w.ww.w 20 PMGRE allocated it object is 128K 121F0000 ......w.ww.wwwoww.wwwwwwwwwwwww.w.ww.w 1 PMGRE allocated it 12200000 ......w.ww.wwwoww.wwwwwwwwwwwww.w.ww.w 2 PMGRE allocated it 12210000 ......w.ww.wwwoww.wwwwwwwwwwwww.w.ww.w 8 PMGRE allocated it 12220000 ..............o....................... 0 PMWIN allocated it 12230000 ........w.....o....................... 1 IBM42XX #0008 (shared data) 12240000 ........e.....o....................... 2 IBM42XX #0005 (shared code) 12250000 ........e.....o....................... 5 IBM42XX #0003 (shared code) 12260000 ........e.....o....................... 9 IBM42XX #0002 (shared code) ··· 1AE50000 ........o..eeeeee.eeeeeeeeeeeee.e.ee.e 0 IBMXGA32 #0003 (shared code) object is 256K 1AE90000 ........o..eeeeee.eeeeeeeeeeeee.e.ee.e IBMXGA32 #0004 (shared code) 1AEA0000 ........o..wwwwww.wwwwwwwwwwwww.w.ww.w 0 IBMXGA32 #0005 (shared data) Free memory from 1AEB0000 for 17.188M, which is equivalent to 275 64K spaces. 1BFE0000 rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.r infoseg (local or global) (owner) 1BFF0000 rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.r infoseg (local or global) (owner) Total number of committed pagees = 00048 Total free space in the shared arena = 39.500M. ═══ Contents of the Linear Usage by Process Display ═══ The process names are shown at the tops of their respective columns, with the names being printed vertically. The processes will be listed in the same order that they are in the Process List option of the General System option of the System pull-down. Each of the entries is Hyperblock linked. When you select a particular entry, the process context and linear address are both set so that the normal "display" and "describe" functions work properly. For the private arena:  One line is displayed for each 64K block of address space. Each memory object starts on a 64K boundary and is a multiple of 64K bytes long. (This is part of the definition of the "16-bit compatibility region" that all the application processes run in.)  Each process is shown as a separate column.  Each memory object is represented by a number. The numbers start at 0 for each process. Each time a new memory object is encountered, the number is incremented. So, if you see a vertical string of several 0's, that indicates that the memory object is more than 64K bytes long. For instance, if there are 3 0's in a row, then it is between 132K and 192K bytes long. Note: If there are memory objects less than 64K in size, they will consume numbers, but not necessarily be displayed. The VDM process has some that are like this. Since the purpose in this display is to look at overall usage of linear addresss space, this is not considered to be a problem.  Free space in the address space is represented with a dot (.).  An x is put at the end of the private arena for each process. The x is on the line following the last allocated block.  The free space between the end of the largest private arena and the shared arena sentinel is reported. For the shared arena:  One line is displayed for each memory object. If the memory object is greater than 64K bytes, then another line is used to report the size of the memory object in Kilobytes or Megabytes, whichever is appropriate.  Each process is shown as a separate column.  Each memory object is represented by a letter, indicating what accessability the process has to the memory object, with the following priority applied to the various valid attributes: Character Meaning i The object is "instance" data for the process. o This process is the "originator" of the memory object. w The process can write to the memory object. e The process can execute the code in the memory object. r The process can read the contents of the memory object. s The process has shared access, which was not one of the above. (I do not believe it is possible to get this attribute, but it is here as a "default" value, just in case.) . The process does not have access to the memory object. This is used so that it is easier to scan across the display and keep the eye on a particular line.  The column following the memory object is the decimal count of committed pages for the object.  The next column is the name of the shared module associated with the object and an explaination of what the object is for.  Free space in the address space is reported as the amount in Kilobytes. If the amount is greater than 64K, the number of 64K memory objects which would fit in the free space is reported.  The total committed pages for the shared arena is reported at the end.  The total free space in the shared arena is reported at the end. For purposes of this calculation, the shared arena is considered to start at the first memory object, not at the address in the sentinel. The address in the sentinel is a "high water mark" of the private arenas, with a minimum of 64M. ═══ Related Topics ═══  Memory addressing  Memory states ═══ 9.3.5. Page Contents ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Page Contents display ═══ When you select the Page Contents option of the System pull-down on the Process Hierarchy window, information about the contents and state of each page of physical memory is shown. ═══ Example of the Page Contents Display ═══ relative physical vp hob page owner state description 00000000 FF3FE000 FF77 0000 generic init-time only 00001000 FF3FE050 0007 0000 FF6D R DosHelp segment (owner) ··· 0000E000 FF41980A 070A 000B FFF7 D PMGRE allocated it ··· 00130000 FF3FE492 0015 000B FFAA L os2krnl load image (owner) ··· 002FF000 free 00300000 FF411A92 0859 0005 0A7F I TCP32DLL #0001 (shared code) ··· 017FF000 FF407B8C 001D 000A FFB3 R VP array (owner) 69 pages ( 276K or 0.270M) are marked I (Idle). 176 pages ( 704K or 0.688M) are marked L (Locked). 1727 pages ( 6908K or 6.746M) are marked R (Resident). 1228 pages ( 4912K or 4.797M) are marked D (Dirty). There are 6045 pages (24180K or 23.613M) reported. ═══ Contents of the Page Contents Display ═══ One line is displayed for each entry in the Page Frame Table: Column Meaning physical The physical address for the page on this line. vp The linear address of the Virtual Page Table entry for this page. hob The hob of the object record associated with this memory object. relative page Which page within the memory object. owner This is either the special system owner code or the hob of the memory object that created this memory object. state The state of the page: I The page is idle. L The page is locked. R The page is resident. D The page is dirty. description A description in English of the object that the page is a part of. ═══ Related Topics ═══  Memory addressing ═══ 9.3.6. RAM Usage by Process ═══ Select one: Selecting Example Output Contents of Display Algorithm Related Topics ═══ Selecting the RAM Usage by Process Display ═══ When you select the RAM Usage by Process option of the System pull-down on the Process Hierarchy window, information about RAM utilization for the entire system is computed and displayed. All pages of RAM are assigned to a process, after which summaries are provided. CAUTION: This is a 'snap-shot' of RAM at the time of display generation. It does not represent the amount of RAM required by the various processes, including the 'system'. Use Working Set to compute the RAM required by processes and the system. The display generation takes about 7 seconds on an 8MB 20Mhz P70. ═══ Example of the RAM Usage by Process Display ═══ RAM Usage by Process: --------- private -------- ------ owned shared ------ bytes Kbytes Mbytes bytes Kbytes Mbytes who 00409000 4132 4.035 0026A000 2472 2.414 system 00000000 0 0.000 sysinit 00031000 196 0.191 000D5000 852 0.832 PMSHL32 00009000 36 0.035 00005000 20 0.020 HARDERR 000BE000 760 0.742 00047000 284 0.277 PMSHL32 00018000 96 0.094 0000A000 40 0.039 PULSE 00061000 388 0.379 VDM 00025000 148 0.145 00008000 32 0.031 CMD 0004B000 300 0.293 00008000 32 0.031 THESEUSn -------- ------ ------ -------- ------ ------ 001E1000 1924 1.879 0013B000 1260 1.230 total RAM in use 00611000 6212 6.066 free RAM -------- ------ ------ 00FA0000 16000 15.625 total of all RAM pages found ═══ Contents of the RAM Usage by Process Display ═══ CAUTION: This is a 'snap-shot' of RAM at the time of display generation. It does not represent the amount of RAM required by the various processes, including the 'system'. Use Working Set to compute the RAM required by processes and the system. The information presented on the RAM Usage by Process display is as follows, with one line displayed for each process: Column Meaning private Memory from the private arena of this process. If multiple processes have the same page in their private arenas, the process with the lowest PID value is charged with the memory. owned shared Memory from the shared arena that is owned by this process. bytes The amount of memory in bytes. Kbytes The amount of memory in kilobytes. Mbytes The amount of memory in megabytes. who Name of the process whose data appears on the line. ═══ Related Topics ═══  Memory addressing  Memory Management Control Blocks  Memory Analysis Using THESEUSn ═══ RAM Usage by Process Algorithm ═══ 1. An array having an entry for each page in the machine is allocated, and backing RAM is forced for it. This array is called PF-parallel. This array keeps track of the state of each page and which process is charged with the page. 2. Memory for a private copy of the Page Frame Table is allocated, and the Page Frame Table is copied into it. This table is called private-PF. 3. The free pages (as indicated in private-PF) are marked in PF-parallel and counted. 4. The idle pages (as indicated in private-PF) are marked in PF-parallel and counted. 5. For each process: a) For each arena record in its private arena: 1. Execute the MarkPresentPages routine (below). 6. For each arena record in the shared arena: a) If there is an hco in the arena record: 1. Determine the process indicated as the originator by looking at the context records. 2. Execute the MarkPresentPages routine for the originator process. b) If there is no hco in the arena record: 1. For each process: a) Execute the MarkPresentPages routine for the non-shared DLL object. 7. For each arena record in the system arena: a) Execute the MarkPresentPages routine. 8. For each entry in PF-parallel that has not been assigned or that is marked idle: a) Get the hob from private-PF. b) The object record and the linear address (from the arena record) can be used to determine which process should be charged with the page. The method used is similar to what occurred in preceding steps for normal objects. 9. For each entry in PF-parallel: a) Add a page to the proper counter being charged. This will either be the free counter or a process counter. 10. Display the counters, showing both private and shared memory. The MarkPresentPages routine is passed a range of pages and a thing to assign them to. The algorithm is: 1. For each page in the object which is present and not UVirt: a) If the page has not been assigned to something and this is a shared page, then assign it to this thing. b) If the page is a shared page and is already assigned to something and the linear addresses do not match, there is a conflict. c) If the page is not a shared page and is already assigned to something or the linear addresses do not match, there is a conflict. d) If system pages are being assigned and if the owner code indicates INFOSEGOWNER, then assign the page to the system. e) If system pages are being assigned and if the owner code indicates VDMALIASOWNER or VDHOWNER, do not assign the page. It will be assigned to the VDM that really owns it when the VDM is processed. f) If a conflict was detected, print out both the old and new information about the page. g) If there was no conflict, modify PF-parallel to indicate what the page was assigned to and the type of memory (shared, private, or system). ═══ 9.3.7. Free, Idle, and Locked Memory ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Free, Idle, and Locked Memory display ═══ When you select the Free, Idle, and Locked Memory option of the System pull-down on the Process Hierarchy window, information about free, idle, and locked memory is displayed. If the list of pages making up a category is desired, double-click mouse button 1 with the pointer over the page count. (This procedure is similar to "display a control block" processing.) ═══ Example of the Free, Idle, and Locked Memory Display ═══ Free, Idle, and Locked Memory: Free RAM = 000BD000 bytes ( 756K) ( 0.738M). Idle RAM = 00076000 bytes ( 472K) ( 0.461M). (Dirty idle RAM = 00068000 bytes ( 416K) ( 0.406M)). Long Term Locked RAM = 0001C000 bytes ( 112K) ( 0.109M). Short Term Locked RAM = 00000000 bytes ( 0K) ( 0.000M). Short & Long Locked RAM = 00000000 bytes ( 0K) ( 0.000M). ═══ Contents of the Free, Idle, and Locked Memory Display ═══ The information presented on the Free, Idle, and Locked Memory display is as follows: Free RAM = xxxxxxxx Amount of free memory. Idle RAM = xxxxxxxx Amount of idle memory. Dirty idle RAM Amount of idle memory which is marked dirty. Long Term Locked RAM = xxxxxxxx Amount of Long Term Locked memory. Short Term Locked RAM = xxxxxxxx Amount of Short Term Locked memory. Short & Long Locked RAM = xxxxxxxx Amount of memory that is both Long Term and Short Term Locked. This memory is not included in the Short and Long values on the previous lines. (There are three separate counts of locked memory.) ═══ Related Topics ═══  Memory addressing  Physical addresses ═══ 9.3.8. Swapper ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Swapper Display ═══ When you select the Swapper option of the System pull-down on the Process Hierarchy window, information about the contents of the SWAPPER.DAT file will be displayed. ═══ Example of the Swapper Display ═══ Analysis of the SWAPPER.DAT file: There are 1152 disk frames in SWAPPER.DAT (each is 4K bytes). There are 715 frames used. (2860K => 2.793M) There are 437 frames free. (1748K => 1.707M) There are 1152 frames total. (4608K => 4.500M) ═══ Contents of the Swapper Display ═══ The information presented on the Swapper display is as follows: There are iiii disk frames in SWAPPER.DAT (each is 4K bytes). The number of 4KB disk frames currently allocated for the SWAPPER.DAT file. There are iiii frames used. The number of 4KB disk frames that are currently being used. The amount is also given in kilobytes and megabytes of space. There are iiii frames free. The number of 4KB disk frames that are currently free. The amount is also given in kilobytes and megabytes of space. There are iiii frames total. The total number of 4KB disk frames that were found. (The sum of the previous two lines.) The amount is also given in kilobytes and megabytes of space. There are iiii frames compressed. Starting with Warp 3, pages which have only a few bits in them are compressed and placed in a "compressed pages" area in the Kernel Resident Heap, instead of being written to the SWAPPER.DAT file. The number of these pages is shown here. They will not be reported in the SWAPPER.DAT contents (by page) display. ═══ Related Topics ═══  Memory addressing  SWAPPER.DAT contents (by page) ═══ 9.3.9. General System ═══ The General System option contains: General System Information Displays selected general system information. Device Drivers Displays information about all Device Drivers currently loaded. GDT Displays the Global Descriptor Table. Modules Displays information about all modules currently loaded. System Anchor Segment Displays the System Anchor Segment. Global Info Seg Displays the Global Information Segment. Open Files Displays information about the files that are open. Process List Displays a list of all processes that are running. ═══ 9.3.9.1. General System Information ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the General System Information Display ═══ When you select the General System Information option of the General System option of the System pull-down on the Process Hierarchy window, information that THESEUS discovers during its initialization is displayed. The values returned by DosQuerySysInfo are displayed, also. ═══ Example of the General System Information Display ═══ General System Information: OS/2 version = 2.45, revision = 0. Os2krnl build level = 14.040 SYSLEVEL.OS2 information OS/2 Component ID = 5639A6150 CSD GA level = XR04500 CSD Previous level = XR0E001 SYSLEVEL.FPK information OS/2 Component ID = 566933010 CSD Current level = XR0E001 CSD Previous level = XR0E001 Theseusn Version = n.000.00 Machine information: Model = 252 (0xFC), Submodel = 1 (0x01), Revision = 0 (0x00), ABIOS = 0 (0x00). BIOS date = 02/04/98. RAM available to OS/2 = 027A0000 bytes (39.625M). It appears that all of it is being used as 'paging space' by OS/2. (This is the 'proper' usage of the memory.) Following are the values from DosQuerySysInfo: 1. QSV_MAX_PATH_LENGTH = 260. 2. QSV_MAX_TEXT_SESSIONS = 16. 3. QSV_MAX_PM_SESSIONS = 16. 4. QSV_MAX_VDM_SESSIONS = 513. 5. QSV_BOOT_DRIVE = 3. 6. QSV_DYN_PRI_VARIATION = 1. 7. QSV_MAX_WAIT = 2. 8. QSV_MIN_SLICE = 32. 9. QSV_MAX_SLICE = 320. 10. QSV_PAGE_SIZE = 4096. 11. QSV_VERSION_MAJOR = 20. 12. QSV_VERSION_MINOR = 45. 13. QSV_VERSION_REVISION = 0. 14. QSV_MS_COUNT = 108986695 (30:16:26). 15. QSV_TIME_LOW = 960906256. 16. QSV_TIME_HIGH = 0. 17. QSV_TOTPHYSMEM = 41549824 (40576K -> 39.625M). 18. QSV_TOTRESMEM = 11776000 (11500K -> 11.230M). 19. QSV_TOTAVAILMEM = 122761216 (119884K -> 117.074M). 20. QSV_MAXPRMEM = 308936704 (301696K -> 294.625M). 21. QSV_MAXSHMEM = 271777792 (265408K -> 259.188M). 22. QSV_TIMER_INTERVAL = 310. 23. QSV_MAX_COMP_LENGTH = 255. 24. QSV_FOREGROUND_FS_SESSION = 20. 25. QSV_FOREGROUND_PROCESS = 80. 26. QSV_NUMPROCESSORS = 1. 27. QSV_MAXHPRMEM = 469762048 (458752K -> 448.000M). 28. QSV_MAXHSHMEM = 469762048 (458752K -> 448.000M). 29. QSV_MAXPROCESSES = 513. 30. QSV_VIRTUALADDRESSLIMIT = 40000000 System Anchor Segment (SAS) selector = 0070. Size of PTDA = 0760 bytes. Size of TCB = 02F4 bytes. Size of Alias record = 0008 bytes. Size of Arena record = 0016 bytes. Size of Object record = 0010 bytes. Size of Context record = 0005 bytes. Size of Page Frame record = 000C bytes. Size of Virtual Page record = 000A bytes. Size of SFT entry = 00A2 bytes. har of System Arena Sentinel = 0004. har of Shared Arena Sentinel = 0006. har above 512m Shr Arena Sen = 0005. har of Page Frame table = 0020. har of Virtual Page table = 0023. System Page Directory @ FF383000. System Page Tables start @ FA000000. DLL code Page Tables start @ FF17B000. Start address shared global @ 1E000000. Alias Record Table @ FD938020. < End of THESEUSn (v n.000.00) output @ 14:24:16 on 6/13/2000 > ═══ Contents of the General System Information display ═══ The following information appears on the General System Information display: The first group of values is "discovered" by THESEUS during its initialization: OS/2 version = i.i, revision = i. The major and minor version numbers, followed by the revision. This looks like... Based on several parameters, THESEUS determines which level of OS/2 you are running. SYSLEVEL.OS2 informaiton Shows the component ID, CSD ga level and CSD previous level. SYSLEVEL.FPK information If it exists then ith shows the component ID, CSD current level and CSD previous level. Theseus Version: Theseus version = i.iiii.ii. Machine information:. Indentifies the PC model and BIOS level as best as possible. BIOS date = mm/dd/yy. The date from the ROM BIOS chip at physical memory location 0xFFFF5. RAM available to OS/2 = hhhhhhhh bytes (dd.dddM). The amount of RAM available to the OS/2 system. This may be less than the total RAM in your system by 128KB (.125MB), because, on some systems, 128KB is used to copy the BIOS from ROM into RAM. This is because ROM is too slow to keep the processor running at full speed. Note: This is presented as a cross-check. If the amount is different than what you expect, then OS/2 may not be using memory on a memory board installed in your machine. It appears... This message indicates whether or not OS/2 is using the area above the 16M line in physical RAM as "Fast Swap" space or as "normal paging" space. The second group is retrieved from DosQuerySysInfo. The following QSV_ descriptions come from the on-line documentation of the DosQuerySysInfo system call. QSV_MAX_PATH_LENGTH Maximum length, in bytes, of a path name. QSV_MAX_TEXT_SESSIONS Maximum number of text sessions. QSV_MAX_PM_SESSIONS Maximum number of PM sessions. QSV_MAX_VDM_SESSIONS Maximum number of DOS sessions. QSV_BOOT_DRIVE Drive from which the system was started (1 means drive A, 2 means drive B, and so on). QSV_DYN_PRI_VARIATION Dynamic priority variation flag (0 means absolute priority, 1 means dynamic priority). QSV_MAX_WAIT Maximum wait in seconds. QSV_MIN_SLICE Minimum time slice in milliseconds. QSV_MAX_SLICE Maximum time slice in milliseconds. QSV_PAGE_SIZE Memory page size in bytes. This value is 4096 for the 80386 processor. QSV_VERSION_MAJOR Major version number. QSV_VERSION_MINOR Minor version number. QSV_VERSION_REVISION Revision letter. QSV_MS_COUNT Value of a 32-bit, free-running millisecond counter. This value is zero when the system is started. This value does not reflect the "suspended" time for Thinkpads; it is only that time that the processor is running. It is also formatted as hours, minutes, and seconds. QSV_TIME_LOW Low-order 32 bits of the time in seconds since January 1, 1970 at 0:00:00. QSV_TIME_HIGH High-order 32 bits of the time in seconds since January 1, 1970 at 0:00:00. QSV_TOTPHYSMEM Total amount of physical memory in the system. QSV_TOTRESMEM Total amount of resident memory in the system. QSV_TOTAVAILMEM Maximum amount of memory that can be allocated by all processes in the system. This number is advisory and is not guaranteed, since system conditions change constantly. QSV_MAXPRMEM Maximum amount of memory that this process can allocate in its private arena. This number is advisory and is not guaranteed, since system conditions change constantly. QSV_MAXSHMEM Maximum amount of memory that this process can allocate in the shared arena. This number is advisory and is not guaranteed, since system conditions change constantly. QSV_TIMER_INTERVAL Timer interval in tenths of a millisecond. QSV_MAX_COMP_LENGTH Maximum length, in bytes, of one component in a path name. QSV_FGND_SG_ID Foreground Screen Group ID. QSV_FGND_PID Foreground Process ID. QSV_NUMBERPROCESSORS This value is zero for OS/2 system that do not support SMP. Otherwise it is the number of processors. QSV_MAXHPRMEM For WARP SMP systems that have high memory support, it is the maximum amount of memory that this process can allocate in its high private arena. This number is advisory and is not guaranteed, since system conditions change constantly. QSV_MAXHSHMEM For WARP SMP systems that have high memory support, it is the maximum amount of memory that this process can allocate in the high shared arena. This number is advisory and is not guaranteed, since system conditions change constantly. QSV_MAXPROCESSES For WARP SMP systems that have high memory support. Indicates the maximum number of processes that can be started. QSV_VITUALADDRESSLIMIT For WARP SMP systems that have high memory support, it is the upper address that can addressed by the process. This value is in hexadecimal. The last group of values is also "discovered" by THESEUS during its initialization: System Anchor Segment (SAS) selector = ssss. The selector that points to the System Anchor Segment is located from the GDT. Size of PTDA = hhhh bytes. The PTDA is different sizes on different systems. Size of TCB = hhhh bytes. The TCB is different sizes on different systems. Size of Arena record = hhhh bytes. The size of the Arena record, as mapped by a .H file. Size of Object record = hhhh bytes. The size of the Object record, as mapped by a .H file. Size of Context record = hhhh bytes. The size of the Context record, as mapped by a .H file. Size of Page Frame record = hhhh bytes. The size of the Page Frame record, as mapped by a .H file. Size of Virtual Page record = hhhh bytes. The size of the Virtual Page record, as mapped by a .H file. Size of SFT entry = hhhh bytes. The SFT entry is different sizes on different systems. har of System Arena Sentinel = hhhh. The System Arena's Sentinel is not pointed to by anything and must be discovered. har of Shared Arena Sentinel = hhhh. The Shared Arena's Sentinel is pointed to from the process's sentinel. har of Page Frame table = hhhh. The Page Frame table's har is discovered, based on its address. har of Virtual Page table = hhhh. The Virtual Page Table's har is discovered, based on its owner value. System Page Directory @ hhhhhhhh. The linear address of the System Page Directory. System Page Tables start @ hhhhhhhh. The linear address of were the system page tables start. DLL code Page Tables start @ hhhhhhhh. The linear address of were the DLL code page tables start. Start address shared global @ hhhhhhhh. The linear address of were the shared global area start. Alias Record Table @ hhhhhhhh. The linear address of were the Alias Record table start. ═══ Related Topics ═══  Memory addressing  Handles ═══ 9.3.9.2. Device Drivers ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Device Drivers display ═══ When you select the Device Drivers option of the General System option of the System pull-down on the Process Hierarchy window, information about all Device Drivers currently loaded is displayed. Device Drivers defined in the CONFIG.SYS file, but which did not load are not shown. ═══ Example of the Device Drivers Display ═══ Device Drivers: Header addr Limit Strategy Limit Name/Units Attr ... 0070:08EC 06A4C 0F00:06A0 09A0F NUL 8084 CHR NUL LVL=OS/2 0400:0908 06A4C 0F00:06A8 09A0F CON 8083 CHR SCR KBD LVL=OS/2 0778:0000 00040 0798:0000 0022A THESEU2$ 8080 CHR LVL=OS/2 0550:0000 01CD7 0558:0E00 02603 5 2080 IBM LVL=OS/2 04D0:0000 0010A 04D8:0002 00790 CLOCK$ 8188 CHR CLK LVL=3 ?? ═══ Contents of the Device Drivers Display ═══ One line is displayed for each Device Driver: Column Meaning Header addr The virtual address (selector:offset) of the header for the Device Driver. Limit Limit value for the header segment. (This value is 1 less than the size of the segment.) Strategy The virtual address (selector:offset) of the Strategy Routine of the Device Driver. Limit Limit value for the Strategy Routine segment. (This value is 1 less than the size of the segment.) Name/Units For character devices, the name of the device. For block devices, the number of units supported by the device. Attr The device attributes in hexadecimal notation. ... The device attributes decoded and presented in English: CHR Bit 15 - The device is a "character" device. Otherwise, it is a "block" device. IDC Bit 14 - The device supports "Inter-device Driver Communication". If this option is set, the IDC Entry Point must be valid. IBM Bit 13 - The device is non-IBM block format. SHR Bit 12 - The device supports "shared device access checking." OPN Bit 11 - The device supports removable media (block devices) or device open/close (character devices). LVL Bits 9-7 - Function level of support. PC/DOS 000 - PC/DOS device driver. (This should never be seen in OS/2 2.0.) OS/2 001 - OS/2 device driver, that does not support DosDevIOCTL2 packets. IOCTL2 010 - OS/2 device driver, that supports DosDevIOCTL2 and SHUTDOWN request packets. BitStrip 011 - OS/2 device driver, with a Capabilities Bit Strip in the header. ?? Level was not one of the above. The level value is printed. CLK Bit 3 - The device is the CLOCK device. NUL Bit 2 - The device is the NULL device. SCR Bit 1 - The device is the SCREEN (STDOUT). KBD Bit 0 - The device is the KEYBOARD (STDIN). ═══ Related Topics ═══  Memory addressing  Virtual addresses ═══ 9.3.9.3. GDT ═══ Select one: Selecting Example Output Contents of Display Descriptor Table Entry Description Related Topics ═══ Selecting the GDT Display ═══ When you select the GDT option of the General System option of the System pull-down on the Process Hierarchy window, the contents of the GDT is displayed. The display generation takes about 3 seconds on an 8MB 20Mhz P70. ═══ Example of the GDT Display ═══ Global Descriptor Table: GDT(0010) BTSS32 Base=FFE42DC8 Limit=00067 DPL=0 P=1 G=0 GDT(0018) Data Base=FFE42966 Limit=003FF DPL=0 ED=0 W=1 A=1 P=1 G=0 B=0 Alias GDT(0020) Data Base=FFEDA000 Limit=003FF DPL=0 ED=0 W=1 A=1 P=1 G=0 B=0 Alias GDT(0028) LDT Base=7C6D5000 Limit=0FFFF DPL=0 P=1 ··· GDT(0038) Data Base=7CAD5DAC Limit=000F3 DPL=3 ED=0 W=1 A=0 P=1 G=0 B=0 ··· GDT(0058) Code Base=00000000 Limit=1BFFF DPL=2 CF=1 R=1 A=1 P=1 G=1 D=1 Alias ··· GDT(05B8) CallG Selector=DFEE Offset=0292 DPL=3 WordCount=03 P=1 ··· GDT(07A8) CallG32 Selector=07C0 Offset=01A0 DPL=3 WordCount=00 P=1 ··· ═══ Contents of the GDT Display ═══ One line is displayed for each valid entry in the GDT. Please see the Descriptor Table Entry for the format of an entry. ═══ Related Topics ═══  Memory addressing  Virtual addresses ═══ 9.3.9.4. Modules ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Modules Display ═══ When you select the Modules option of the General System option of the System pull-down on the Process Hierarchy window, information about all modules currently loaded is displayed. ═══ Example of the Modules Display ═══ Modules currently loaded: MTE @ hob Name type Full Path FEB63770 0252 THESEUS LX D:\THESEUSn\THESEUSn.EXE FEB43AC0 026E VIEWDOC LX C:\OS2\VIEWDOC.EXE FEB3BB34 0220 CMD LX C:\OS2\CMD.EXE FEB60584 01F8 PMEXEC LX C:\OS2\PMEXEC.EXE FEB5ABB0 014B HARDERR NE C:\OS2\SYSTEM\HARDERR.EXE ··· ═══ Contents of the Modules Display ═══ One line is displayed for each module currently loaded: Column Meaning MTE @ Linear address of the Module Table Entry (MTE) of the module. hob The hob of the MTE. Name The name of the module. type Specifies the type of module: NE The module was generated by the linker on the OS/2 1.x system. The module is all 16-bit. LX The module was generated by the linker on the OS/2 system. The module may be any combination of 16 & 32-bit. Full Path The fully qualified path name of the file. ═══ Related Topics ═══  Memory addressing  Handles ═══ 9.3.9.5. System Anchor Segment ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the System Anchor Segment Display ═══ When you select the System Anchor Segment option of the General System option of the System pull-down on the Process Hierarchy window, the contents of the System Anchor Segment are displayed. Many of the tables and control block chains used by the OS/2 system have their anchors in the System Anchor Segment. ═══ Example of the System Anchor Segment Display ═══ System Anchor Segment (SAS), selector = 0070 tables_area @ 0016 GDT = 0008 (selector) - ERROR LDT = 0000 (selector) - ERROR IDT = 0018 (selector) GDT pool = 0100 (starting selector) flat_sel = 0158 (selector) (this is for the Kernel Data) config_area @ 001E Config table @ 09D6 (offset into SAS) (?) dd_area @ 0020 bimodal chain @ 094F (offset into SAS) real chain @ 0000 (offset into SAS) Drive Parameter Block = 04E8 (selector) (?) ABIOS Common Data Area = 0430 (selector) (?) ABIOS Common Data Area = 6A00 (segment) (?) FSC Common Data Area = 00C8 (selector) (?) vm_area @ 002C arena records @ FEF29020 (flat) object records @ FF08A020 (flat) context records @ FFEC8020 (flat) kernel MTE records @ FFF2F46C (flat) linked MTE list @ FFF2E9A8 (flat) page frame table @ FFE20000 (flat) page range table @ FFE1F000 (flat) swap frame table @ 7C7C3144 (flat), length = 512 idle head @ FFE2078C (flat) (within 'page frame table') free head @ FFE20780 (flat) (within 'page frame table') heap array @ 00000000 (flat) (?) task_area @ 0058 PTDA = 0030 (selector) Process tree @ FFE518DC (flat) Thread array @ FFE318B9 (flat) (array of TCB linears) Current Thread @ FFE2B802 -> 002E Thread Count @ FFE2B806 -> 0031 ras_area @ 006A System Trace Data area = 0000 (selector) (?) System Trace Data area = 0000 (segment) (?) Trace enable table @ 07CC (offset into SAS) (?) file_area @ 0070 Master File Table = FEB30FC0 (flat) (?) System File Table = 00C0 (selector) Volume Parameter Block = 03E8 (selector) (?) Current Directory Structure = 0608 (selector) Buffer Segment = 00A8 (selector) (?) info_area @ 007C Global Info Segment = 0428 (selector) Local Info Segment = 03B8 (selector) 3xBox Info Segment = FFFFFFFF (?) Codepage Data Info Block = 061B (selector) ═══ Contents of the System Anchor Segment Display ═══ There are some fields within the System Anchor Segment (SAS) which I have been unable to verify. They are all marked with a (?) on the display and are also explicitly indicated in the descriptions below. The fields of the System Anchor Segment are displayed as follows: System Anchor Segment (SAS), selector = ssss The GDT selector that points to the SAS. tables_area @ oooo The offset within the SAS that contain selectors to certain system tables. GDT = ssss (selector) - ERROR The selector of the Global Descriptor Table (GDT). The value displayed is incorrect. LDT = ssss (selector) - ERROR The selector of the Local Descriptor Table (LDT). The value displayed is incorrect. IDT = ssss (selector) The selector of the Interrupt Descriptor Table (IDT). GDT pool = ssss (starting selector) Starting selector of a pool of GDT selectors used by the OS/2 kernel. flat_sel = ssss (selector) (this is for the Kernel Data) Selector used by the kernel as the flat addressing selector for its data. config_area @ oooo The offset within the SAS that contains the configuration pointers. Config table @ oooo (offset into SAS) (?) The Configuration table itself is at this offset within the SAS. (This is unverified.) dd_area @ oooo The offset within the SAS that contains the information about Device Drivers. bimodal chain @ oooo (offset into SAS) The offset within the SAS that contains the start of the chain of "bimodal" device drivers. (This is the device header for the NUL device.) real chain @ oooo (offset into SAS) The offset within the SAS that contains the start of the chain of "real mode" device drivers. (This appears to be a hold over from 1.x.) Drive Parameter Block = ssss (selector) (?) The segment with the Driver Parameter Block information. (This is unverified.) ABIOS Common Data Area = ssss (selector) (?) The segment with the ABIOS Common Data Area. This selector is valid for Protect mode. (This is unverified.) ABIOS Common Data Area = ssss (segment) (?) The segment with the ABIOS Common Data Area. This segment is valid for Real mode. (This is unverified.) FSC Common Data Area = ssss (selector) (?) The segment with the File System Control (FSC) Common Data Area. (This is unverified.) vm_area @ oooo The offset within the SAS that contains the information about Memory Management. arena records @ llllllll (flat) The linear address of the Arena Table. object records @ llllllll (flat) The linear address of the Object Table. context records @ llllllll (flat) The linear address of the Context Table. kernel MTE records @ llllllll (flat) The linear address of the last MTE which is a DLL. This points to DOSCALLS.DLL. linked MTE list @ llllllll (flat) The linear address of the linear address of the first MTE which is a DLL. page frame table @ llllllll (flat) The linear address of the Page Frame Table. page range table @ llllllll (flat) The linear address of the Page Range Table. swap frame table @ llllllll (flat), length = iii The linear address of the table of bits that indicate the free/allocated state of the SWAPPER.DAT page frames. The length is given as the number of bits in the table. idle head @ llllllll (flat) (within 'page frame table') The head of the "idle chain" of pages. This head is within the Page Frame Table and points to an entry that has no physical memory associated with it. free head @ llllllll (flat) (within 'page frame table') The head of the "free chain" of pages. This head is within the Page Frame Table and points to an entry that has no physical memory associated with it. heap array @ llllllll (flat) (?) This value is always zero. task_area @ oooo The offset within the SAS that contains the information about processes and threads. PTDA = ssss (selector) The selector points to the active process's PTDA. This segment is "sparse" and contains the PTDA, TCB and TSD. Process tree @ llllllll (flat) The linear address of the top process (sysinit) in the process tree. Thread array @ llllllll (flat) (array of TCB linears) The linear address of the Thread Table. There is one entry for each thread defined in the system. The index into this table is the thread number. Current Thread @ llllllll -> hhhh The linear address of the word containing the current thread number. This is followed by the actual value. This will always be a thread in THESEUS. Thread Count @ llllllll -> hhhh The linear address of the word containing the actual number of threads in the system. This is not the maximum number of threads. ras_area @ oooo The offset within the SAS that contains the information about trace. System Trace Data area = ssss (selector) The selector of the System Trace buffer. (This is unverified.) System Trace Data area = ssss (segment) (?) The selector of the System Trace buffer. (This is unverified.) Trace enable table @ oooo (offset into SAS) (?) ??? (This is unverified.) file_area @ oooo The offset within the SAS that contains the information about File System. Master File Table = llllllll (flat) (?) Linear address of the Master File Table. (This is unverified.) System File Table = ssss (selector) This is the selector of the segment containing the System File Table selectors Volume Parameter Block = ssss (selector) (?) ??? (This is unverified.) Current Directory Structure = ssss (selector) This is the selector of the segment containing the current directory. Buffer Segment = ssss (selector) (?) info_area @ oooo The offset within the SAS that contains the information about Info Segments. Global Info Segment = ssss (selector) The selector of the Global Information Segment. This selector is for "ring 0" and is not usable by an application program. Local Info Segment = ssss (selector) The selector of the Local Information Segment. This selector is for "ring 0" and is not usable by an application program. 3xBox Info Segment = hhhhhhhh (?) ??? (This is unverified.) Codepage Data Info Block = ssss (selector) This selector points to the code page table currently loaded. ═══ Related Topics ═══  Memory addressing  Virtual addresses  Linear addresses ═══ 9.3.9.6. Global Info Seg ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Global Info Seg Display ═══ When you select the Global Info Seg option of the General System option of the System pull-down on the Process Hierarchy window, the contents of the Global Information Segment is displayed. ═══ Example of the Global Info Seg Display ═══ Global Info Seg: Time since 1/1/1970 = 289D662A (hex secs) Time since ipl = 0151A406 (hex msecs) Current time = 14:52:26.53 Time zone = undefined Timer interval = 31.0 (msec) Date = 8/5/1991 Day of week = 1 (Monday) OS/2 version = 20.0, revision = ' ' Current screen group = 1 Maximum number of screen groups = 16 HugeShift = 3 ProtectOnly = 0 (No) Current PID = 0005 Dynamic Scheduling = 1 (Dynamic) MaxWait = 3 (sec) Min time slice = 32, Max time slice = 32 (msec) Boot drive = 3 (C:) Trace control flags: 0-15: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16-31: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Max VIO windowable sessions = 16 Max PM windowable sessions = 16 Error logging status = 0 MMPH selector = 0000, linear = 00000000 ═══ Contents of the Global Info Seg Display ═══ The following information is taken from the Control Program Programming Reference, version 1.2. The information presented on the Global Info Seg display is as follows: Time since 1/1/1970 = hhhhhhhh (hex secs) Time in seconds since January 1, 1970. Time since ipl = hhhhhhhh (hex msecs) Time in milliseconds. Current time = hh:mm:ss.hh Current time as hours:minutes:seconds.hundredths. Time zone = undefined Minutes from UTC; if the value is hex FFFF, the time zone is undefined. Timer interval = dd.d (msec) Timer interval in milliseconds. Date = m/d/yyyy Date as month/day/year. Day of week = i (aaaaaa) Day of the week. The number is given, followed by the day in ASCII. OS/2 version = vv.v, revision = 'c' OS/2 version, given as major version then minor version. The revision is a letter. Current screen group = d Current foreground full-screen session. Maximum number of screen groups = dd Maximum number of full-screen sessions, in decimal notation. HugeShift = d Shift count for huge segments. ProtectOnly = d (aa) Protect-mode-only indicator. The number is given, followed by yes or no. This is controlled by the PROTECTONLY command in the CONFIG.SYS file. Current PID = hhhh Process ID of the current foreground process. Dynamic Scheduling = d (aaaaaaa) Dynamic variation flag. The number is given, followed by Absolute or Dynamic. This is controlled by the PRIORITY command in the CONFIG.SYS file. MaxWait = d (sec) Maximum wait in seconds. This is controlled by the MAXWAIT command in the CONFIG.SYS file. Min time slice = dd, Max time slice = dd (msec) Minimum and maximum time-slice values. These are controlled by the TIMESLICE command in the CONFIG.SYS file. Boot drive = d (c:) Drive from which the system was booted. The number is given, followed by the drive letter and a colon. Trace control flags: The flags used to control what trace events are being generated. Max VIO windowable sessions = dd Maximum number of VIO windowable sessions. Max PM windowable sessions = dd Maximum number of Presentation Manager sessions. Error logging status = d Error-logging status value. MMPH selector = ssss, linear = llllllll The selector and linear address to be used when doing MMPH hooks. MMPH is the OS/2 name given to the same type hooks designated as MMIO in the OS/2 1.x system. ═══ Related Topics ═══  Memory addressing  Virtual addresses  Linear addresses ═══ 9.3.9.7. Open Files ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Open Files Display ═══ When you select the Open Files option of the General System option of the System pull-down on the Process Hierarchy window, information about all files that are open is displayed. ═══ Example of the Open Files Display ═══ Open Files: System File Table - (table of selectors) selector = 00C0 System File Table - Selector = 03F8 Ref System Address Count Handle PID --Chain-- --MFT--- name 03F8:0008 1 0000 0002 FEB563C8 D:\EA DATA. SF 03F8:0087 1 0001 System FEB5632C C:\OS2\DLL\PMSHAPIM.DLL 03F8:0106 1 0002 System FEB562E4 C:\OS2\DLL\PMSDMRI.DLL ··· 03F8:31A4 1 0064 System FEB619A4 C:\THESEUSn\THESEUSn.EXE There were 99 open files found. ═══ Contents of the Open Files Display ═══ The information presented on the Open Files display is as follows: System File Table - (table of selectors) selector = ssss This is the selector of the table of selectors which make up the System File Table (SFT). System File Table - Selector = ssss This is the selector of the segment of the SFT which follows. One line is displayed for each file that is open: Column Meaning Address Virtual address of the SFT entry for this file. Ref Count Number of processes that reference this file. System Handle The system wide handle for this file. PID Process ID of the process that opened this file This has 'System' if it was opened by the system instead of a process. Chain The virtual address of an SFT which is opened for the same file. MFT The linear address of the Master File Table (MFT) entry for this file. name The name of the file. This is followed by a line which gives the total number of SFT entries which are used. ═══ Related Topics ═══  Memory addressing  Virtual addresses  System File Table entries ═══ 9.3.9.8. Process List ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Process List Display ═══ When you select the Process List option of the General System option of the System pull-down on the Process Hierarchy window, information about all processes currently running is displayed. Also shown are the total number of threads in the system and the PID of the current selected process. ═══ Example of the Process List Display ═══ PTDA PTDA # of Parent PID hob Linear Threads PID Name 0001 006E FFE537DC 5 0000 sysinit 0002 0090 7D3D5020 20 0001 PMSHL32 0003 018C 7D3D5844 3 0002 HARDERR 0005 0245 7D3D688C 11 0002 PMSHL32 0006 02CA 7D3D6068 3 0002 PULSE 0007 02F7 7D3D70B0 1 0002 VDM 0008 030D 7D3D78D4 1 0002 CMD 011C 033D 7D3DA188 1 0002 THESEUSn 45 threads were found. Current PID qualifier = 0000. ═══ Contents of the Process List Display ═══ One line is displayed for each process: Column Meaning PID Process ID of the process. PTDA hob Hob of the PTDA. PTDA Linear The linear address of the PTDA. # of Threads The number of threads in the process. Parent PID PID of the parent process. Name Name of the process. ═══ Related Topics ═══  Memory addressing ═══ 9.3.10. Kernel Information ═══ The Kernel Information option contains: Kernel Memory Usage First determines and then displays the amount of memory consumed by the Operating System. System Object Summary Displays the System Object Summary. System Arena Table Displays the System Arena Table. System Page Table Displays the System Page Table. Page Frame Table Displays the Page Frame Table. ═══ 9.3.10.1. Kernel Memory Usage ═══ Select one: Selecting Example Output Contents of Display Algorithm Related Topics ═══ Selecting the Kernel Memory Usage Display ═══ When you select the Kernel Memory Usage option of the Kernel Information option of the System pull-down on the Process Hierarchy window, information about kernel memory usage is computed and displayed. The memory is accumulated by system owner code, sorted by system owner code. The display generation takes about 2 seconds on an 8MB 20Mhz P70. ═══ Example of the Kernel Memory Usage Display ═══ Memory Usage for System Memory (memory in the 'System' Arena): allocated committed present resident owner 00010000 00002000 00002000 00002000 FF31 (Named pipe NP segment) 00010000 00001000 00001000 00001000 FF33 (DD strat2 request packets) 00001000 00001000 00001000 00001000 FF37 (ROM data) 00010000 00001000 00001000 00001000 FF40 (DD strat1 request packets) 00020000 00020000 00020000 00020000 FF41 (Allocated via DevHlp AllocPhys) 00400000 00002000 00002000 00002000 FF43 (Resident R/W 1Meg mem heap owner) 00100000 00002000 00002000 00002000 FF44 (Resident R/W 1Meg mem heap owner) 00010000 00001000 00001000 00001000 FF47 (record lock record owner) -------- -------- -------- -------- 00561000 0002A000 0002A000 0002A000 Subtotal for 'Miscellaneous' group 1 ··· allocated committed present resident Totals -------- -------- -------- -------- 8383E000 005B1000 00533000 003BE000 Total (in bytes) 2154744 5828 5324 3832 Total (in Kbytes) 2104.242 5.691 5.199 3.742 Total (in Mbytes) ═══ Contents of the Kernel Memory Usage Display ═══ One line is displayed for each system owner with allocated memory: Column Meaning allocated The total amount of linear address space allocated. committed The amount of committed memory for this owner. present The actual amount of RAM which is present for the owner. This is real RAM. resident The amount of resident memory for this owner. owner The system owner, presented as a hexadecimal value followed by a short ASCII name. ═══ Related Topics ═══  Memory addressing  Memory Management Control Blocks  Detail for System Owner ═══ Kernel Memory Usage Algorithm ═══ 1. For each arena record in the system arena: a) Determine the amount of linear space allocated by looking at the page count in the arena record. b) Check the Page Directory and Page Tables to determine how many pages within the linear address range represented by this entry are committed and how many are present. 2. Display the results, sorted by system owner value. ═══ 9.3.10.2. Object Summary ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Object Summary Display ═══ The Object Summary display can be selected in several ways:  When you select the System Object Summary option of the Kernel Information option of the System pull-down on the Process Hierarchy window, a summary of all the memory objects defined in the system arena is displayed.  When you select the Private Object Summary option of the Process pull-down on the Process Hierarchy window, a summary of all the memory objects defined in the private arena for the selected process is displayed.  When you select the Shared Object Summary option of the Process pull-down on the Process Hierarchy window, a summary of all the memory objects defined in the shared arena for the selected process is displayed.  When you select the hyperblock link from the bytes allocated column of the Process Memory Utilization display, a summary of all the memory objects defining that memory type is displayed. ═══ Example of an Object Summary Display ═══ Object Allocated Committed Present Swapped address memory memory memory memory Description 7BC00000 00400000 00112000 00004000 00000000 'VDM Alias' (decoded owner from object record) 7C2D5000 00010000 00003000 00003000 00000000 'SEL LDT' (decoded owner from object record) ··· FFF4C000 0000F000 0000F000 0000F000 00000000 'os2krnl load image' (decoded owner from object record) FFF5B000 00065000 0005D000 00053000 00000000 'os2krnl load image' (decoded owner from object record) -------- -------- -------- -------- Totals: 83AC5000 007D8000 005DF000 00000000 (in bytes) 2157332 8032 6012 0 (in Kbytes) 2106.770 7.844 5.872 0.000 (in Mbytes) Number of objects = 207. ═══ Contents of an Object Summary Display ═══ One line is displayed for each memory object in the selected arena or area: Column Meaning Object address Linear address of the memory object. Allocated memory Amount of allocated memory (in bytes). Committed memory Amount of committed memory (in bytes). Present memory Amount of RAM in use (in bytes). Swapped memory Amount of memory (in bytes) that has been written to the swap file. Description A description in English of the object. Totals of all the "amount" columns are given in hexadecimal bytes, decimal kilobytes, and decimal megabytes. The number of objects found is also indicated. The number of free areas in the linear address space is shown, along with the total amount of memory in hexadecimal bytes, decimal kilobytes, and decimal megabytes. The largest 10 areas are shown, sorted by size. Note: It is possible for a page to be both present and swapped. The following is one way this can occur: 1. A read/write page is written into (becomes "dirty"). 2. The page is not used for a long time and is swapped out to disk. 3. When the page is referenced, it is brought back into RAM. Until the RAM page is written into, both pages are valid. If the RAM page gets aged, it will not need to be written to disk, because the copy there is still valid. Once the RAM page is written into, the swapped page is discarded. ═══ Related Topics ═══  Memory addressing  Linear addresses  Memory Management Control Blocks ═══ 9.3.10.3. System Arena Table ═══ Select one: Selecting Example Output Contents of Display Arena Record Description Related Topics ═══ Selecting the System Arena Table display ═══ When you select the System Arena Table option of the Kernel Information option of the System pull-down on the Process Hierarchy window, the contents of the System Arena is displayed. The display generation takes about 2 seconds on an 8MB 20Mhz P70. ═══ Example of the System Arena Table Display ═══ System Arena Table: har pages linear flg next prev link hash hob hal sel / Decoded flags 0004 00000000 60000000 003 01E1 0010 0000 0000 Sentinel, max pages=000FFFC0 01E1 00000400 7C000000 001 020E 0004 0000 007A 022D 0000 0000 / 020E 00000010 7C705000 121 01D5 01E1 0000 0000 0238 0000 0000 / Write Read ··· 0006 00000003 FFF36000 009 000F 000E 0000 0000 0007 0000 0100 / Mapped 000F 00000009 FFF39000 001 0010 0006 0000 0000 0010 0000 0000 / 0010 0000007E FFF42000 001 0004 000F 0000 0000 0011 0000 0000 / ═══ Contents of the System Arena Table Display ═══ One line is displayed for each entry in the system arena. Please see the arena record for the format of an entry. ═══ Related Topics ═══  Handles ═══ 9.3.10.4. System Page Table ═══ Select one: Selecting Example Output Contents of Display Page Table Entry Description Related Topics ═══ Selecting the System Page Table Display ═══ When you select the System Page Table option of the Kernel Information option of the System pull-down on the Process Hierarchy window, the contents of the System Page Table is displayed. The display generation takes about 8 seconds on an 8MB 20Mhz P70. ═══ Example of the System Page Table Display ═══ System Page Table: *Linear=7C000000 Physical=0065D000 D=1 A=1 User R/W P=1 Resident Linear=7C000000 Physical=0002F000 D=1 A=1 User R/W P=1 Linear=7C001000 Physical=00183000 D=1 A=1 User R/W P=1 ··· Linear=7C0F4000 FrameId=000F4 D=0 A=0 User R/W P=0 UVirt Linear=7C0F5000 Physical=000F5000 D=0 A=1 User R/W P=1 UVirt Linear=7C0F6000 FrameId=000F6 D=0 A=0 User R/W P=0 UVirt ··· Linear=7C852000 Physical=00668000 D=0 A=1 Super R/O P=1 Resident Linear=7C875000 Physical=005D3000 D=1 A=1 User R/W P=1 Linear=7C876000 FrameId=00001 D=0 A=0 User R/W P=0 ··· ═══ Contents of the System Page Table Display ═══ One line is displayed for each valid entry in the System Page Table. Please see the Page Table Entry for the format of an entry. ═══ Related Topics ═══  Memory addressing  Linear addresses  Physical addresses ═══ 9.3.10.5. Page Frame Table ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Page Frame Table Display ═══ When you select the Page Frame Table option of the Kernel Information option of the System pull-down on the Process Hierarchy window, the contents of the Page Frame Table is displayed. A map of physical memory is also shown. The display generation takes about 6 seconds on an 8MB 20Mhz P70. ═══ Example of the Page Frame Table Display ═══ Physical memory map: From To Size 00000000 00033000 0.203M 00037000 0009F000 0.410M 00100000 017FF000 23.000M Page Frame table: Free head = 000A0000, flink = 005BC, blink = 00409 Idle head = 000A1000, flink = 0065F, blink = 0065F ---lock--- physical vp pteCnt long short flink blink block flags 00000000 FF421000 0001 0000 0000 00000 0000 00001000 FF42105A 0001 0000 0000 00000 0000 00002000 FF421064 0001 0000 0000 00000 0000 ··· 0009F000 FF40B2BC 0002 0000 0000 00000 0000 The Page Range Table indicates a break in the physical memory. 00100000 FF40B2C6 0001 0000 0000 00000 0000 ··· ═══ Contents of the Page Frame Table Display ═══ A map of physical memory is shown. One line is displayed for each range of pages: Column Meaning From The starting physical address of this range. To The ending physical address of this range. Size The size in megabytes of this range. The heads of the free and idle lists are shown. They consist of only a flink and blink fields. Breaks in the contiguous range of pages are noted with the sentence, "The Page Range Table indicates a break in the physical memory." One line is displayed for each entry in the Page Frame Table: Column Meaning physical The physical address for the page on this line. vp The linear address of the Virtual Page Table entry for this page. pteCnt The number of PTEs that refer to this page as being present. lock long The number of long term locks outstanding for this page. lock short The number of short term locks outstanding for this page. flink Forward link. Used when a page is on the free or idle list. blink Backward link. Used when a page is on the free or idle list. block Pager disk frame or Loader Block number flags Flags indicating the status of the page. They are shown as hex and then decoded into ASCII: fast Page is in fast memory. busy Page is busy. free Page is on the free chain. reserved? Reserved bit. ═══ Related Topics ═══  Memory addressing ═══ 9.4. Process ═══ The Process pull-down contains displays which are applicable to the selected process. For information on selecting a process, see Selecting a Process. Functions available are: Working Set Displays the working set of memory for the process. Memory Utilization Displays details of memory usage for the process. Memory Leak Detection Displays the number of pages of memory that each object is accumulating. General Process Information Displays general information about the process. Per Task Data Area (PTDA) Displays the PTDA. LDT Displays the LDT. Page Table Displays the process unique Page Table. Private Object Summary Displays a summary of the private arena memory objects. Shared Object Summary Displays a summary of the shared arena memory objects. Private Arena Table Displays the process unique arena table. Shared Arena Table Displays the shared arena, in the process' context. ═══ 9.4.1. Working Set ═══ Select one: Selecting Example Output Contents of Display Algorithm Illustration Related Topics ═══ Selecting the Working Set Display ═══ When you select the Working Set option of the Process pull-down on the Process Hierarchy window, memory working set of the selected process is computed and displayed. There are optional values which can be shown in realtime. ═══ Example of the Working Set Display ═══ Working Set for the Process with PID = 0100, name = 'THESEUSn': Use the 'Functions' pull-down to start and stop the data collection. Collection started: interval = 5, Working Set is 3 intervals. current time ------ Process ------- ------ System DLL ----- hh:mm:ss.tt now ws acc'd now ws acc'd 16:54:53.16 0.180M 0.180M 0.180M 0.406M 0.406M 0.406M 16:54:58.00 0.184M 0.195M 0.195M 0.379M 0.438M 0.438M 16:55:03.03 0.184M 0.195M 0.195M 0.379M 0.438M 0.438M 16:55:08.00 0.180M 0.188M 0.195M 0.414M 0.414M 0.438M 16:55:13.00 0.188M 0.195M 0.199M 0.449M 0.449M 0.473M 16:55:18.03 0.184M 0.195M 0.199M 0.379M 0.449M 0.473M 16:55:23.00 0.176M 0.195M 0.199M 0.379M 0.449M 0.473M 16:55:28.00 0.176M 0.184M 0.199M 0.379M 0.379M 0.473M 16:55:33.03 0.176M 0.176M 0.199M 0.379M 0.379M 0.473M 16:55:38.00 0.176M 0.176M 0.199M 0.375M 0.379M 0.473M 10 samples collected. Process DLL Total Absolute minimum amount of memory: 0.188M 0.449M 0.637M Recommended amount of memory: 0.195M 0.449M 0.645M Total amount of accessed memory: 0.199M 0.473M 0.672M ═══ Contents of the Working Set Display ═══ Three values are computed for each of two areas during each data collection cycle. The data can be presented in real-time. The values are: Column Meaning current time The time of the sample, presented in hours:minutes:seconds.hundredths. now The amount of memory referenced in the current interval. ws The working set. This is the amount of memory referenced in the past n intervals. acc'd The total amount of memory accessed since the start of the collection run. The areas are: Process The memory that is: in the private arena, DLL instance data memory, non-system DLLs, and system memory used by this process. System DLL The memory that is in system DLLs. The totals are computed on each data collection cycle, but not displayed due to lack of space in the window. When the Stop option is selected, the following is presented: ii samples collected. The number of samples collected is reported (in decimal). The following are reported for Private, System DLL, and Total: Absolute minimum amount of memory The maximum value from the now column. This is the amount of memory absolutely required to run the application without "thrashing" memory. Recommended amount of memory The maximum value from the ws column. This is the recommended amount of memory for the application to run with minimum impact on paging. Total amount of accessed memory The maximum value from the accessed column. This is the amount of memroy required to run the application with no paging activity. ═══ Related Topics ═══  Memory addressing  Memory Management Control Blocks  Memory Analysis Techniques  Detail of Working Set (by Page)  Detail of Working Set (by Object)  Usage Type Display  Last Referenced Graphic ═══ Memory Working Set Algorithm ═══ To compute the working set for a particular OS/2 process, you need to know:  Which pages have been referenced  Whether or not a particular page "belongs" to the specified process  When the pages were touched. The algorithm is: 1. The accessed flags are cleared from the Page Tables of the selected process. 2. A timer is started, and on each timer tick: a) The pages which have been accessed are noted. b) The accessed flags are cleared. c) For each newly accessed page, determine its owning memory object. d) Classify the object (and, therefore, the page) by type:  Private  System DLL  System. Starting with OS/2 Warp, the way the Page Directory is managed has changed. (See Linear/Physical Relationship for the changes.) The above part of the algorithm had to be modified to first check to see if the DLL page was "accessible" from the specified process. If not, the page is marked Ignore in the "page usage table". e) The number of pages which have been accessed anytime within the specified number of intervals is counted. f) Generate summary information for this interval. g) Display the interval information, if requested. 3. When the Stop option is selected: a) A final data collection cycle is performed. b) Summary numbers for the entire run are generated. They are: Absolute minimum number of pages The maximum of all the now entries. Recommended number of pages The maximum of all the ws entries. Total number of accessed pages The maximum of all the accessed entries. c) The results are displayed. Note: Even though the "infosegs" are in the shared arena, they are counted as system pages. They are, in fact, shared pages. ═══ 9.4.2. Memory Utilization ═══ Select one: Selecting Example Output Contents of Display Algorithm Related Topics ═══ Selecting the Memory Utilization Display ═══ When you select the Memory Utilization option of the Process pull-down on the Process Hierarchy window, information about the memory used by the selected process is computed and displayed. The display generation takes about 3 seconds on an 8MB 20Mhz P70. ═══ Example of the Memory Utilization Display ═══ Memory Utilization for Process with PID = 004D, name = 'THESEUSn': bytes bytes number bytes bytes bytes allocated committed present each present swapped description 00000604 00000604 1 0604 00000604 00000000 PTDA 0000027C 0000027C 1 027C 0000027C 00000000 TCB 00001000 00001000 1 1000 00001000 00000000 TSD 00010000 00009000 9 1000 00009000 00000000 LDT 00000180 00000180 384 0180 00000180 00000000 Process Page Directory 00060000 00014000 20 1000 00014000 00000000 Page Tables 040F0000 010FE000 1939 1000 00793000 002AD000 Accessible Shared memory 00FE0000 0005E000 44 1000 0002C000 00000000 Originated Shared memory 00A30000 001AC000 140 1000 0008C000 00000000 Private memory 00071A00 0001EA00 0001EA00 00000000 Total System 00FE0000 0005E000 0002C000 00000000 Total Shared originated 00A30000 001AC000 0008C000 00000000 Total Private -------- -------- -------- -------- 01A81A00 00228A00 000D6A00 00000000 Total RAM/SWAPPER for this Process 27143 2211 859 0 (in Kbytes) 26.507 2.159 0.839 0.000 (in Mbytes) < End of THESEUSn (v n.000.00) output @ 15:20:34 on 9-13-1999 > ═══ Contents of the Memory Utilization Display ═══ One line is displayed for each type of memory associated with a process: Column Meaning bytes allocated The amount of linear address space allocated for the memory type on this line. bytes committed The amount of committed memory for the memory type on this line. number present The number of instances of the memory type on this line present in RAM for this process. (This column is in decimal notation; all others are hexadecimal.) bytes each The size of one of the memory types on this line. bytes present The actual amount of real RAM used by the memory type on this line. bytes swapped The actual number of bytes swapped out for this memory type on this line. description The name of the memory type reported on this line. The "Accessible Shared memory" is not added into the summaries. It is the total amount of shared memory which is accessible by the process. It includes: originated shared memory, DLLs used by the process, memory given to it by another process (using DosGiveSharedMem), and memory gotten by it (using DosGetSharedMem). Summaries are provided and shown as hex bytes: Total System The system RAM consists of the lines for PTDA, TCB, TSD, LDT, Process Page Directory, and Page Tables. The swapped number of bytes for this process contained in the previously stated control blocks that belongs to this process. Total Shared originated The shared memory that was not originated by this process is ignored. It also specifies the total bytes occupied in swapper.dat that were originated by this process. Total Private This entry includes the .EXE file and all privately allocated memory. This memory is computed as if there were no other processes in the system. So, if there are multiple copies of a particular program running, each of them would show the .EXE file as being consumed by that process. The swapper total is the number of bytes that occupy swapper.dat. Total RAM for the Process The total of the above three values, presented in bytes, kilobytes and megabytes. ═══ Related Topics ═══  Memory addressing  Memory Management Control Blocks  Memory Analysis Using THESEUSn  Object Summary ═══ Memory Utilization Algorithm ═══ 1. There is one PTDA for the process. Its size is determined during THESEUS initialization. 2. There is one TCB for each thread being used by the process. Its size is determined by a mapping structure. 3. There is one TSD for each thread being used by the process. Its allocated size is 4KB. The number of pages actually in use and swapped are counted. 4. There is one LDT for the process. Its allocated size is 64KB. The number of pages actually in use and swapped are counted. 5. There is one Process Page Directory for the process. Its size is 512 bytes. 6. There is a group of Page Tables for the process. The number of Page Tables in use is determined by looking at the Process Page Directory and then determining what pages are present. The number of pages tables that have been swapped out are also counted. 7. For each arena record in the private arena: a) Determine the number of allocated pages. b) Count the number of pages actually in use. c) Count the number of pages swapped. 8. For each arena record in the shared arena for which the process has access to the memory object (by looking at the context records): a) Determine the number of allocated pages. b) Count the number of pages actually in use. c) Count the number of pages swapped. 9. For each arena record in the shared arena for which the process was the originator, (by looking at the context records): a) Determine the number of allocated pages. b) Count the number of pages actually in use. c) Count the number of pages swapped. ═══ 9.4.3. Memory Leak Detection ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Memory Leak Detection Display ═══ When you select the Memory Leak Detection option of the Process pull-down on the Process Hierarchy window, information about memory accumulation for each object in the process is computed and shown. This can be done either on a periodic basis or under user control. See Related Topics for the references for specifying control. ═══ Example of the Memory Leak Detection Display ═══ Memory leak detection for Process with PID = 0039, name = THESEUSn: < End of THESEUSn (v 3.00.000) output @ 10:42:49 on 8/5/1993 > Use the 'Function' pull-down to start and stop the data collection. Leak data captured. Periodic update started with interval of 10 seconds. Previous sample will be used as the base. < End of THESEUSn (v 3.00.000) output @ 10:43:06 on 8/5/1993 > Allocated Committed Actual har Address P/S Description +0 +1 +1 0342 01100000 Pvt THESEUSn allocated it +0 +0 +1 0343 01130000 Pvt THESEUSn allocated it < End of THESEUSn (v 3.00.000) output @ 10:43:16 on 8/5/1993 > Allocated Committed Actual har Address P/S Description +0 +1 +1 0343 01130000 Pvt THESEUSn allocated it +96 +1 +1 034B +019B0000 Pvt THESEUSn allocated it +688 +1 +1 034C +01A10000 Pvt THESEUSn allocated it +16 +2 +2 034D +01CC0000 Pvt PMWIN allocated it +16 +1 +1 034E +01CD0000 Pvt PMGPI allocated it +16 +1 +0 034F +01CE0000 Pvt PMGPI allocated it +1024 +1 +1 0350 +01CF0000 Pvt PMGPI allocated it +1024 +1 +1 0351 +020F0000 Pvt PMGPI allocated it +0 +2 +2 0185 16070000 Shr PMGRE allocated it < End of THESEUSn (v 3.00.000) output @ 10:43:26 on 8/5/1993 > Allocated Committed Actual har Address P/S Description -96 -1 -1 034B -019B0000 Pvt -688 -1 -1 034C -01A10000 Pvt -16 -2 -2 034D -01CC0000 Pvt -16 -1 -1 034E -01CD0000 Pvt -16 -1 +0 034F -01CE0000 Pvt -1024 -1 -1 0350 -01CF0000 Pvt -1024 -1 -1 0351 -020F0000 Pvt < End of THESEUSn (v 3.00.000) output @ 10:43:36 on 8/5/1993 > Periodic updated stopped. < End of THESEUSn (v 3.00.000) output @ 10:43:38 on 8/5/1993 > ═══ Contents of the Memory Leak Detection Display ═══ One line is displayed for each memory object whose committed or actual (present + swapped) memory values have changed: Column Meaning Allocated The change in the number of pages of allocated (virtual) memory in this object. This will be non-zero only when the memory object is allocated or freed. Committed The change in the number of pages of committed memory in this object. Actual The change in the number of pages of actual memory in this object. har The har of this object. Address The linear address of this object. P/S An indicator as to the type of memory object: Pvt The memory object is in the private arena. Shr The memory object is in the shared arena. Description A description in English of the object. ═══ Related Topics ═══  Memory addressing  Memory states  Leak detection control  Manual data capture  Manual data compare ═══ 9.4.4. General Process Information ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the General Process Information Display ═══ When you select the General Process Information option of the Process pull-down on the Process Hierarchy window, general information about the process is shown: 1. Linear address of the PTDA. 2. Number of threads, if THESEUS found a number different from what the PTDA indicates. 3. General information about each thread, including: a) Thread number; b) Addresses of the TCB and TSD; c) Scheduling priority and state. 4. The Exit List. 5. The open files. 6. The environment strings. ═══ Example of the General Process Information Display ═══ General Information about the Process with PID = 010A, name = 'THESEUSn': PTDA address = 7D3E821C Threads for this Process: ---- priority ---- TID Th_# TCB TSD class level actual state 0001 002F 7D3CEB5C 7D2F8000 02 00 0500 0005 Running Exit List: Class RtnAddress Description 0010 BF6F:015E DISPLAY #0007 (shared) 0010 D44F:02C4 PMGRE #0006 (shared) 0010 D0FF:0A54 PMWIN #0005 (shared) 0010 D18F:A1E6 PMSHAPI #0001 (shared) 00C0 D067:27A8 OS2CHAR #0001 (shared) 0100 1A393454 HELPMGR #0001 (shared) 0100 0003A7DB THESEUSn #0001 (shared) 0100 1A4B6188 PMCTLS #0002 (shared) 0100 D2B7:9D1C PMSPL #0004 (shared) 01A5 D0FF:04A6 PMWIN #0005 (shared) 01AB D44F:02CE PMGRE #0006 (shared) 01C0 D067:27B5 OS2CHAR #0001 (shared) 01FF 1A4B61E4 PMCTLS #0002 (shared) 01FF D44F:0308 PMGRE #0006 (shared) Open Files (MaxFH=20): ---- handles --- Process System File name 0000 0027 \DEV\CON 0001 0027 \DEV\CON 0002 0027 \DEV\CON 0003 0080 \DEV\THESEU2$ 0004 002C \DEV\KBD$ 0005 0059 C:\THESEUSn\THESEUSn.HLP 0006 0081 C:\OS2\HELP\HMHELP.HLP 000C 0050 \DEV\KBD$ Environment: "WP_OBJHANDLE=113848" "USER_INI=C:\OS2\OS2.INI" "SYSTEM_INI=C:\OS2\OS2SYS.INI" "OS2_SHELL=C:\OS2\CMD.EXE" "AUTOSTART=PROGRAMS,TASKLIST,FOLDERS" "RUNWORKPLACE=C:\OS2\PMSHELL.EXE" "COMSPEC=C:\OS2\CMD.EXE" "PATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\MDOS\WINOS2;C:\OS2\INSTALL;C:\;C:\OS2\MDOS;C:\OS2\APPS;E:\TOOLKT20\OS2BIN" "DPATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\MDOS\WINOS2;C:\OS2\INSTALL;C:\;C:\OS2\BITMAP;C:\OS2\MDOS;C:\OS2\APPS" "PROMPT=$i[$p]" "HELP=C:\OS2\HELP;C:\OS2\HELP\TUTORIAL;E:\TOOLKT20\OS2HELP" "GLOSSARY=C:\OS2\HELP\GLOSS;" "KEYS=ON" "DELDIR=C:\DELETE,512;D:\DELETE,512;E:\DELETE,512;" "BOOKSHELF=C:\OS2\BOOK;E:\TOOLKT20\BOOK" "EPATH=C:\OS2\APPS" "VIDEO_DEVICES=VIO_VGA" "VIO_VGA=DEVICE(BVHVGA)" "TMP=E:\" "PROGREF20=GUIREF20.INF" "PMREF=PMFUN.INF+PMGPI.INF+PMMSG.INF+PMWIN.INF" "WORKPLACE__PROCESS=NO" Program (actual) = "E:\THESEUSn\THESEUSn.EXE" Program (specified) = "E:\THESEUSn\THESEUSn.EXE" Parameters = "" ═══ Contents of the General Process Information Display ═══ The information presented on the General Process Information display is as follows: General Information about the Process with PID = hhhh The PID of the specified process. name = 'aaaaaaaa' The name of the .EXE file that is the module for the process. PTDA address = llllllll The linear address of the PTDA being shown. Thread count (as discovered by THESEUS) = i, The number of threads that THESEUS found for this process when it scanned the thread table. This number is shown only if this and the following value are not the same. as claimed by PTDA = i. The number that is in the PTDA. One line is displayed for each thread: Column Meaning TID Thread ID of the thread. Th_# Thread number of the thread. TCB Linear address of the Thread Control Block of the thread. TSD Linear address of the Thread Swappable Data of the thread. Priority class Declared priority class of the thread. Priority level Declared priority level of the thread. Priority actual Actual priority being used by the scheduler, after all the dynamic calculations have been applied. state Dispatch state of the thread. The following decoded states are shown: Ready The thread is ready to run, but is not the highest priority that is ready. Blocked The thread is blocked, waiting on some event. Suspended The thread has been suspended by the system. Critical section The thread has done a DosEnterCritSec and not completed. Running The thread is running. Ready, but apply an IO boost The thread is ready to run, but needs to be "boosted" because it has just completed some I/O. Thread waiting for TSD The thread is waiting for a TSD to become available. Delayed TKWakeup (Almost Ready) The thread has been delayed by the system. Frozen Thread The thread has been "frozen" by the system, waiting on its parent. Incoming TSD ??? TSD failed to swap in A disk error occurred trying to swap the TSD in. One line is displayed for each entry in the Exit List: Column Meaning Class The class/priority of the Exit Routine. See the description of the DosExitList function for the meaning of this. RtnAddress The address of the Exit Routine. This is either a 16:16 virtual address or a 0:32 flat address. Description The name of the module and the segment/object number this routine is in. The Open Files are displayed. The maximum number of process file handles (MaxFH) is shown. Then, the open files are shown, with 1 line for each open file: Column Meaning Process handle The value of the process file handle. These are unique to the process. That is, process file handle 5 in the process with PID = 5 is not the same as process file handle 5 in the process with PID = 6. System handle The corresponding system file handle. These are common across the entire system. That is, system file handle 5 in the process with PID = 5 is the same as system file handle 5 in the process with PID = 6. Flags The file state flags. They are decoded into English at the end of the line. File name This can be:  Fully qualified file name.  "anonymous pipe" = an anonymous pipe is opened on this handle.  "named pipe" = a named pipe is opened on this handle. The process environment is displayed. Each string is displayed on a line, surrounded by quote marks. The fully qualified program file name is displayed, surrounded by quote marks. The program name as input is displayed, surrounded by quote marks. The parameters passed to the program are displayed, surrounded by quote marks. ═══ Related Topics ═══  Memory addressing  PTDA  Open Files ═══ 9.4.5. Per Task Data Area (PTDA) ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Per Task Data Area (PTDA) Display ═══ When you select the Per Task Data Area (PTDA) option of the Process pull-down on the Process Hierarchy window, the Per Task Data Area (PTDA) for the selected process is displayed. ═══ Example of the Per Task Data Area (PTDA) Display ═══ Per Task Data Area (PTDA) for Process with PID = 0088, name = 'THESEUSn': parent PTDA @ 7D31E020, this PTDA @ 7D320A80 first child @ 00000000, exec child @ 00000000 next sibling @ 7D31FC60, previous sibling @ 00000000 EXE pointer @ FE5A2934, name = D:\THESEUSn\THESEUSn.EXE last TCB @ FD422E10, first TCB @ FD422E10 # of threads = 0001, tib count = 0055 TIB 0 = 00050000, TIB 1 = FFFFFFFF TIB 2 = FFFFFFFF, TIB 3 = FFFFFFFF debug data @ 00000000, debug flag = 00000000 Virtual Memory Manager information: Next Arena @ 7D31FCA0, Previous Arena @ FFF408FC Arena sentinel @ FEF31ECA, Hint of first free @ FEF3244A bitmap dir (?) @ FEF2D650, hash table @ FEF2D8CC per-type info @ FFF3C23C, VM flags = 00000002 min address = 00010000, max address = 00810000 arena count = 00000000, need bitmap = 00000000 max bitmap = 00000003, max bitmap entry = 00000000 max hash index = 00000081, arena header hob = 0275 Physical Memory Manager information: page tables @ 7D680000 Process Page Directory (1st 512M) @ FF215A00 allocated page counts @ 7D320B28 present page counts @ 7D320C28 locked/resident page counts @ 7D320D28 base virtual page number = 00000000 base vdm alias region = 00000000 max potential pdes for this arena = 0080 count of low in-use pdes = 0003 count of high in-use pdes = 0015 page table context = 0006 per-process page manager flags = 0000 process was aged in this sweep. Environment hob = 0352 (linear = 00060000, selector = 0037) PerfView data @ 00000000 Exit List @ FE5B55C0 hob of PTDA = 026C, hob of MTE = 024C hob of LDT = 0278, LDT @ 7C705000 PID = 0088, parent PID = 0002 selector = 0E48, signature = TD ═══ Contents of the Per Task Data Area (PTDA) Display ═══ The information presented on the Per Task Data Area (PTDA) display is as follows: Per Task Data Area (PTDA) for Process with PID = hhhh The PID of the specified process. name = 'aaaaaaaa' The name of the .EXE file that is the module for the process. The following items concern the process lineage and its threads: parent PTDA @ llllllll The processes have a parent/child relationship. This entry is the linear address of the parent process' PTDA. this PTDA @ llllllll The linear address of this PTDA. first child @ llllllll The linear address of the PTDA of the youngest child of this process. exec child @ llllllll The linear address of the PTDA of the child process, while the child is being created. next sibling @ llllllll The linear address of the next oldest sibling in the structure. previous sibling @ llllllll The linear address of the next youngest sibling in the structure. EXE pointer @ llllllll The linear address of the fully qualified .EXE file name. name = aaaaaaaa The fully qualified file name of the .EXE file for this process. last TCB @ llllllll The linear address of the last TCB in the TCB chain for this process. first TCB @ llllllll The linear address of the first TCB in the TCB chain for this process. # of threads = hhhh The number of threads that the PTDA claims to own. tib count = hhhh The number of TIBs that have been allocated. TIB 0 = llllllll Linear address of the first group of TIBs. TIB 1 = llllllll Linear address of the second group of TIBs. TIB 2 = llllllll Linear address of the third group of TIBs. TIB 3 = llllllll Linear address of the fourth group of TIBs. debug data @ hhhhhhhh Unknown debug flag = hhhhhhhh Unknown The following items concern the Virtual Memory Manager: Next Arena @ llllllll The linear address of the next arena header. Previous Arena @ llllllll The linear address of the previous arena header. Arena sentinel @ llllllll The linear address of the sentinel arena record that starts the process' arena. Hint of first free @ llllllll The linear address of the arena record which may be followed by an area of linear space that is not allocated. bitmap dir (?) @ llllllll Unknown hash table @ llllllll Unknown per-type info @ llllllll Unknown VM flags = hhhhhhhh Unknown min address = hhhhhhhh The minimum linear address used by this process. max address = hhhhhhhh The maximum linear address used by this process. arena count = hhhhhhhh Unknown need bitmap = hhhhhhhh Unknown max bitmap = hhhhhhhh Unknown max bitmap entry = hhhhhhhh Unknown max hash index = hhhhhhhh Unknown arena header hob = oooo The hob of the pseudo-object for this arena header. The following items concern the Physical Memory Manager: page tables @ llllllll The linear address of the start of the Page Tables for this process. Process Page Directory (1st 512M) @ llllllll The linear address of the Process Page Directory for this process. allocated page counts @ llllllll The linear address of a table having one entry for each potential Page Table. Each entry states the number of pages that are allocated within that Page Table. present page counts @ llllllll The linear address of a table having one entry for each potential Page Table. Each entry states the number of pages that are present within that Page Table. locked/resident page counts @ llllllll The linear address of a table having one entry for each potential Page Table. Each entry states the number of pages that are locked/resident within that Page Table. base virtual page number = hhhhhhhh Unknown base vdm alias region = hhhhhhhh Unknown max potential pdes for this arena = hhhh The size of the process' Process Page Directory. count of low in-use pdes = hhhh Unknown count of high in-use pdes = hhhh Unknown page table context = hhhh Unknown per-process page manager flags = hhhh Unknown process was aged in this sweep. Environment hob = oooo (linear = llllllll, selector = ssss) The hob, linear address and selector of the environment object. PerfView data @ llllllll The linear address of the PerfView data for this process. Exit List @ llllllll The linear address of the Exit List for this process. hob of PTDA = oooo The hob of the PTDA pseudo-object. hob of MTE = oooo The hob of the MTE for the .EXE file for the process. hob of LDT = oooo The hob of the process' LDT. LDT @ llllllll The linear address of the process' LDT. MaxFileHandles = iii The maximum number of files that can be opened at one time by this process. Open File table @ ssss:oooo The virtual address of the Open File table. There is one entry for each process file handle. PID = hhhh The PID of this process. parent PID = hhhh The PID of the parent process. selector = ssss The GDT selector that points to this PTDA. signature = TD Several of the OS/2 kernel control blocks have signature characters at the beginning (the PTDA was inverted in OS/2 1.2). The signature of the PTDA is 'TD'. ═══ Related Topics ═══  Memory addressing  Linear addresses  Memory Management Control Blocks  General Process Information ═══ 9.4.6. LDT ═══ Select one: Selecting Example Output Contents of Display Descriptor Table Entry Description Related Topics ═══ Selecting the LDT Display ═══ When you select the LDT option of the Process pull-down on the Process Hierarchy window, the contents of the LDT for the selected process is displayed. ═══ Example of the LDT Display ═══ Local Descriptor Table for process 'THESEUSn', PID = 0033: LDT(0004) Data Base=7C705000 Limit=0FFFF DPL=3 ED=0 W=0 A=0 P=1 G=0 B=0 LDT(000C) Code Base=00010000 Limit=0FFFF DPL=3 CF=0 R=1 A=0 P=1 G=0 D=0 LDT(0014) Code Base=00020000 Limit=0E2B5 DPL=3 CF=0 R=1 A=0 P=1 G=0 D=0 LDT(001C) Data Base=00030000 Limit=0EADF DPL=3 ED=0 W=1 A=1 P=1 G=0 B=0 LDT(0024) Data Base=00040000 Limit=002A8 DPL=3 ED=0 W=1 A=1 P=1 G=0 B=0 ··· ═══ Contents of the LDT Display ═══ One line is displayed for each valid entry in the LDT. Please see the Descriptor Table Entry for the format of an entry. ═══ Related Topics ═══  Memory addressing  Virtual addresses  General Process Information  PTDA ═══ 9.4.7. Page Table ═══ Select one: Selecting Example Output Contents of Display Page Table Entry Description Related Topics ═══ Selecting the Process Page Table Display ═══ When you select the Page Table option of the Process pull-down on the Process Hierarchy window, the contents of the Process Page Table is displayed. The display generation takes about 3 seconds on an 8MB 20Mhz P70. ═══ Example of the Process Page Table Display ═══ Page Table for 'THESEUSn': *Linear=00000000 Physical=002D2000 D=1 A=1 User R/W P=1 Resident Linear=00010000 FrameId=0083D D=0 A=0 User R/O P=0 Linear=00011000 Physical=001AE000 D=0 A=1 User R/O P=1 Linear=00012000 Physical=002DA000 D=0 A=1 User R/O P=1 Linear=00013000 FrameId=00840 D=0 A=0 User R/O P=0 ··· ═══ Contents of the Process Page Table Display ═══ One line is displayed for each valid entry in the Process Page Table. Please see the Page Table Entry for the format of an entry. ═══ Related Topics ═══  Memory addressing  Linear addresses  Physical addresses ═══ 9.4.8. Private Object Summary ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Private Object Summary Display ═══ When you select the Private Object Summary option of the Process pull-down on the Process Hierarchy window, a summary of all the memory objects defined in the private arena for the selected process is displayed. ═══ 9.4.9. Shared Object Summary ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Shared Object Summary Display ═══ When you select the Shared Object Summary option of the Process pull-down on the Process Hierarchy window, a summary of all the memory objects defined in the shared arena for the selected process is displayed. ═══ 9.4.10. Private Arena Table ═══ Select one: Selecting Example Output Contents of Display Arena Record Description Related Topics ═══ Selecting the Private Arena Table Display ═══ When you select the Private Arena Table option of the Process pull-down on the Process Hierarchy window, the contents of the process' private arena is displayed. ═══ Example of the Private Arena Table Display ═══ Private Arena Table for 'THESEUS': har pages linear flg next prev link hash hob hal ptda / Decoded flags 020E 00000000 00010000 003 020A 0229 0005 0000 Sentinel, max pages=00004000 020A 00000020 00010000 1D9 020B 020E 0000 0000 0238 0000 0235 / Mapped Reload User Exec Read 020B 00000010 00030000 179 0211 020A 0000 0000 0263 0000 0235 / Mapped Reload Write User Read ··· 024A 00000010 006E0000 169 020D 0219 0000 0000 0243 0000 0235 / Mapped Write User Read 020D 00000010 006F0000 169 0229 024A 0000 0000 023A 0000 0235 / Mapped Write User Read 0229 000000D0 00700000 169 020E 020D 0000 0000 0278 0000 0235 / Mapped Write User Read ═══ Contents of the Private Arena Table Display ═══ One line is displayed for each entry in the private arena. Please see the arena record for the format of an entry. ═══ 9.4.11. Shared Arena Table ═══ Select one: Selecting Example Output Contents of Display Arena Record Description Related Topics ═══ Selecting the Shared Arena Table Display ═══ When you select the Shared Arena Table option of the Process pull-down on the Process Hierarchy window, the contents of the shared arena is displayed. ═══ Example of the Shared Arena Table Display ═══ Shared Arena Table for 'THESEUS': har pages linear flg next prev link hash hob hal hco / Decoded flags 0005 00016F10 04000000 007 023D 0021 0000 0000 Boundary Sentinel 023D 00000010 1AF10000 349 0247 0005 0000 0000 0248 0000 03AA / Mapped User Read Hco 0247 00000010 1AF20000 369 0236 023D 0000 0000 0251 0000 032C / Mapped Write User Read Hco ··· 006D 00000010 1BFE0000 349 006B 0095 0000 0000 006E 0000 030B / Mapped User Read Hco 006B 00000010 1BFF0000 349 0021 006D 0000 0000 006C 0000 02BB / Mapped User Read Hco 0021 00000010 1C000000 001 0005 006B 0000 0000 0000 0000 0000 / ═══ Contents of the Shared Arena Table Display ═══ One line is displayed for each entry in the shared arena. Please see the arena record for the format of an entry. ═══ 9.5. Registers ═══ The Registers pull-down contains displays of certain of the hardware related tables. Functions available are: Current IDT Displays the current Interrupt Descriptor Table. ═══ 9.5.1. IDT ═══ Select one: Selecting Example Output Contents of Display Descriptor Table Entry Description Related Topics ═══ Selecting the IDT Display ═══ When you select the IDT option of the Registers pull-down on the Process Hierarchy window, the contents of the IDT is displayed. ═══ Example of the IDT Display ═══ Interrupt Descriptor Table: Trap(00) TrapG32 Selector=0160 Offset=FFF6BF58 DPL=0 P=1 Trap(01) IntG32 Selector=0160 Offset=FFF6C004 DPL=3 P=1 Trap(02) TaskG Selector=1D18 DPL=0 P=1 Trap(03) IntG32 Selector=0160 Offset=FFF6C1A8 DPL=3 P=1 Trap(04) TrapG32 Selector=0160 Offset=FFF6C1F0 DPL=3 P=1 Trap(05) TrapG32 Selector=0160 Offset=FFF6C1FC DPL=0 P=1 Trap(06) TrapG32 Selector=0160 Offset=FFF6C208 DPL=0 P=1 Trap(07) TrapG32 Selector=005A Offset=1BF60AD0 DPL=0 P=1 Trap(08) TaskG Selector=0088 DPL=0 P=1 Trap(09) TrapG32 Selector=0160 Offset=FFF6C2E0 DPL=0 P=1 ··· Int (00) IntG32 Selector=0160 Offset=FFF37214 DPL=0 P=1 Int (01) IntG32 Selector=0160 Offset=FFF37228 DPL=0 P=1 ··· Int (0E) IntG32 Selector=0160 Offset=FFF37354 DPL=0 P=1 Int (0F) IntG32 Selector=0160 Offset=FFF37368 DPL=0 P=1 ··· ═══ Contents of the IDT Display ═══ One line is displayed for each valid entry in the IDT. Please see the Descriptor Table Entry for the format of an entry. ═══ Related Topics ═══  Memory addressing  Virtual addresses ═══ 9.6. Misc ═══ The Misc pull-down contains options applicable to the system as a whole. Functions available are: Refresh Diagram Refreshes the process hierarchy diagram. Unselect Process Unselects the currently selected process. 'Link' Color Changes the color of the hyperblock links. Font for this window... Specifies an alternate font for this window. Default font for Detail Windows... Specifies an alternate default font for the Detail windows. Contents Update Specifies control, start and stop of periodic updates. ═══ 9.6.1. Refresh Diagram ═══ When you select the Refresh Diagram option of the Misc pull-down on the Process Hierarchy window, the process hierarchy diagram on the Process Hierarchy window is redetermined and redisplayed. This also happens each time any part of the window is painted. ═══ 9.6.2. Unselect Process ═══ When you select the Unselect Process option of the Misc pull-down on the Process Hierarchy window, the currently selected process is unselected. No process will be selected. ═══ 9.6.3. 'Link' Color ═══ When you select the 'Link' Color option of the Misc pull-down on the Process Hierarchy window, you can change the color of the hyperblock links displayed on the Detail window. The Dark Blue and Dark Red offer the best contrast for both normal and reverse video information displayed on both a color and monochrome display. However, the color defaults to Dark Cyan so the hyperblock links will be the same color as the hypertext links in the help panels. The pop-out menu lists all available colors. Window Text is a color chosen by the system to be neutral on both color and monochrome displays. It is normally black. The current setting is checked in the list. ═══ 9.6.4. Font for this Window... ═══ When you select the Font for this Window... option of the Misc pull-down on the Process Hierarchy window, you can specify a different monospace font for the Process Hierarchy window. ═══ 9.6.5. Default font for Detail Windows... ═══ When you select the Default font for Detail Windows... option of the Misc pull-down on the Process Hierarchy window, you can specify a different default monospace font for Detail windows which are created. ═══ List of Selectable Fonts ═══ Select a font from this list. Only monospaced fonts are displayed. ═══ 9.7. Window ═══ The Window pull-down contains the list of existing THESEUS Detail windows. When you select one, it is brought to the foreground. If it has been minimized, it is also restored to the size and position it had before being minimized. The list is updated as Detail windows are created and destroyed. The order of the windows listed reflects the order of creation, with the newest being on the bottom of the list. The last window viewed is indicated by a check mark. ═══ 9.8. Help ═══ The Help pull-down contains the list of the help functions available for the Process Hierarchy window. ═══ 9.8.1. Help Index ═══ The Help Index option of the Help pull-down displays the index of the help document. ═══ 9.8.2. Keys help ═══ The Keys help option of the Help pull-down displays the key definitions for this window. ═══ 9.8.3. Mouse ═══ The Mouse option of the Help pull-down displays information about using the mouse. ═══ 9.8.4. General Help ═══ The General Help option of the Help pull-down displays information about the contents of this window. ═══ 9.8.5. Product Information ═══ The Product Information option of the Help pull-down displays a dialog box which tells the version of the program. ═══ 10. Detail Window ═══ The Detail window shows information about specific areas in either OS/2 system or application memory. There are a number of different window contents, all displayed in this same generic window class. The initial window size computed by the program is:  The width of the longest line (not to exceed the screen width)  The height of the data (not more than 3/4 of the screen height). THESEUS knows how to format many control blocks. These are pointed to by hyperblock links. The section Selecting a Hyperblock Link tells how to use the hyperblock links. The section Keys tells how to use the keyboard. Options available on the Detail window are: Functions Viewing memory in various hex formats or control working set computations. Secondary View the working set from different view points. Output Sending output to a file or printer. Mark/Find Doing the clipboard and general string finding functions. Misc Changing window processing controls and font specification. Help Lists the help functions. ═══ 10.1. Selecting a Hyperblock Link ═══ You may select a hyperblock link address in either of two ways:  Place the mouse pointer over a hyperblock link address and press button 1.  Use the arrow keys: Left Arrow Moves to the previous hyperblock link address. Right Arrow Moves to the next hyperblock link address. Up Arrow Moves to the hyperblock link address in the previous line. This attempts to stay in the same data column. If not possible, then the last hyperblock link address on the line is selected. Down Arrow Moves to the hyperblock link address in the next line. This attempts to stay in the same data column. If not possible, then the last hyperblock link address on the line is selected. If no hyperblock link address is selected, pressing any arrow key will select the first one. ═══ 10.2. Keys ═══ The key assignments in a Detail window are: Left Arrow Moves to the previous hyperblock link address. Right Arrow Moves to the next hyperblock link address. Up Arrow Moves to the hyperblock link address in the previous line. This attempts to stay in the same data column. If not possible, then the last hyperblock link address on the line is selected. Down Arrow Moves to the hyperblock link address in the next line. This attempts to stay in the same data column. If not possible, then the last hyperblock link address on the line is selected. Alt+Left Scrolls the window information left. Alt+Right Scrolls the window information right. Alt+Up Scrolls the window information up. Alt+Down Scrolls the window information down. Page Up Scrolls the window information up 1/2 the screen height. Page Down Scrolls the window information down 1/2 the screen height. Home Moves the window so that the top left corner is displayed. End Moves the window so that the bottom right corner is displayed. Print Screen Prints the contents of the window. Ctrl-A Performs the "Find again" function. Ctrl-F Displays the "Find..." dialog. Ctrl-S Displays the "Save As..." dialog. F1 Requests contextual help. F3 Closes the Detail window. Shift-F10 Displays a popup menu. Enter Formats the data at the selected address. (This is the same as double-clicking mouse button 1.) ═══ 10.3. Functions ═══ The Functions pull-down has options that allow displaying more information about items in the current display. Functions available are: Show memory at linear address... Presents a dialog to allow display of memory at a specified linear address. Show memory at virtual address... Presents a dialog to allow display of memory at a specified virtual address. Show memory at physical address... Presents a dialog to allow display of memory at a specified physical address. Show selected address formatted Shows the selected address as a formatted control block. Show description... Displays a "description" of the memory object. Show process contexts Displays context information for each process which access to the specified linear address. Memory Object Leak Detection Performs memory leak detection on a single memory object. Hot Spot Detection... Performs byte change detection on a page of memory. Working Set Parameters... Presents a dialog to specify data collection parameters. Working Set Start Starts collecting the working set information. Working Set Stop Stops collecting the working set information and provide a summary. Show detail by Page Shows which pages made up the summary data in the window. Show detail by Object Shows which objects made up the summary data in the window. Show summary by Process Show a summary of the working set information, summarized by process. Leak Detection Control... Presents a dialog to specify leak detection parameters. Start Periodic Leak Detection Starts performing leak detection on a periodic basis. Stop Periodic Leak Detection Stops the periodic leak detection. Capture Leak Reference Data Manually captures leak detection data. Compare Present Leak Data Compares current leak detection data with last captured data. ═══ 10.3.1. Show memory at linear address... ═══ The Show memory at linear address dialog of the Functions pull-down on the Detail window allows you to display memory at a specified linear address for a specified number of bytes. Various formatting options are available:  bytes  words  doublewords  disassembled instructions. ═══ Address (in hex) of the area to display. ═══ This option specifies the linear address (in hexadecimal) of the memory to be displayed. The default value is the selected hyperblock link, if one is selected. ═══ Number of bytes (in hex) to display. ═══ This option specifies the number of bytes (in hexadecimal) you wish displayed. ═══ Show the memory as "bytes". ═══ This option displays the memory as bytes. Each byte is formatted in hexadecimal. Additionally, the memory is formatted in ASCII. Unprintable characters are printed as a period (.). The width specification controls the number of bytes presented on each line. ═══ Show the memory as "words". ═══ This option displays the memory as words (2 bytes). Each word is "byte reversed" and then formatted in hexadecimal. Additionally, the memory is formatted in ASCII, without "byte reversal." Unprintable characters are printed as a period (.). ═══ Show the memory as "doublewords". ═══ This option displays the memory as doublewords (4 bytes). Each doubleword is "byte reversed" and then formatted in hexadecimal. Additionally, the memory is formatted in ASCII, without "byte reversal." Unprintable characters are printed as a period (.). ═══ Show the memory as disassembled instructions. ═══ This option displays the memory as disassembled instructions. The memory is presented: 1. in bytes 2. in ASCII 3. as disassembled instructions. The default instruction type may be specified with the Code is 32-bit option. ═══ Code is 32-bit. ═══ This option specifies that the instructions being disassembled are 32-bit instructions. If this option is not selected, the instructions are assumed to be 16-bit. ═══ Number of bytes (in hex) per line. ═══ If you choose to "format in bytes," you can additionally select the number of bytes to be displayed on each line. This makes it easier to look at arrays, since each entry can be placed on a separate line. The default is 10 (hexadecimal) bytes per line. ═══ 10.3.2. Show memory at virtual address... ═══ The Show memory at virtual address dialog of the Functions pull-down on the Detail window allows you to display memory at a specified selector:offset for a specified number of bytes. Various formatting options are available:  bytes  words  doublewords  disassembled instructions ═══ Selector (in hex) of Segment. ═══ This option specifies the selector portion (in hexadecimal) of the virtual address of the memory to be displayed. The default value is the selector portion of the selected hyperblock link, if one is selected. ═══ Offset (in hex) of Segment. ═══ This option specifies the offset portion (in hexadecimal) of the virtual address of the memory to be displayed. The default value is the offset portion of the selected hyperblock link, if one is selected. ═══ Number of bytes (in hex) to display. ═══ This option specifies the number of bytes (in hex) you wish displayed. If a hyperblock link has been selected and the selector is valid, the length will default to the length of the segment. If a hyperblock link has not been selected, the length will default to the "double-click length" for the window. ═══ Show the memory as "bytes". ═══ This option displays the memory as bytes. Each byte is formatted in hexadecimal. Additionally, the memory is formatted in ASCII. Unprintable characters are printed as a period (.). ═══ Show the memory as disassembled instructions. ═══ This option displays the memory as disassembled instructions. The memory is presented: 1. in bytes 2. in ASCII 3. as disassembled instructions. The default instruction type may be specified with the Code is 32-bit option. ═══ Code is 32-bit. ═══ Select this option if the instructions being disassembled are 32-bit instructions. If this option is not selected, the instructions are assumed to be 16-bit. If a hyperblock link has been selected and the selector is valid, the type will default to the type of the segment. ═══ 10.3.3. Show memory at physical address... ═══ The Show memory at physical address dialog of the Functions pull-down on the Detail window allows you to display memory at a specified physical address for a specified number of bytes. Various formatting options are available:  bytes  words  doublewords  disassembled instructions ═══ Address (in hex) of the area to display. ═══ This option specifies the physical address (in hexadecimal) of the memory to be displayed. The default value is the selected hyperblock link, if one is selected. ═══ 10.3.4. Show selected address formatted ═══ When a hyperblock link address is selected, the memory may be displayed either by double-clicking mouse button 1 or by selecting this option on the menu. The memory is displayed formatted by its control block type, if THESEUS knows the format. ═══ Show selected address in hex ═══ When a hyperblock link address is selected, this option displays the memory in hexadecimal. ═══ Describe the selected address ═══ When a hyperblock link address has been selected, this option displays the "description" of the memory represented by the address. ═══ 10.3.5. Show description... ═══ The Show description of an object option of the Functions pull-down on the Detail window allows you to display the "description" of a memory object. The object address can be specified as being referenced by:  linear address  virtual address  physical address  hob.  har  hal. ═══ Address of object to be described ═══ Specify the address of the object to be "described." It can be:  linear address  virtual address  physical address  hob.  har  hal ═══ Describe a linear object ═══ The address specified is a linear address. ═══ Describe a virtual object ═══ The address specified is a virtual address. Specify the selector of the segment. ═══ Describe a physical object ═══ The address specified is a physical address. ═══ Describe an object, given the HOB ═══ The address specified is a hob. ═══ Describe an object, given the HAR ═══ The address specified is a har. ═══ Describe an object, given the HAL ═══ The address specified is a hal. ═══ 10.3.6. Show Process Contexts ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Show Process Contexts Display ═══ When you select the Show Process Contexts option of the Functions pull-down on a Detail window, information about the state of the memory object in all the processes is shown. This option is available only if you have selected a Hyperblock link linear address. ═══ Example of the Show Process Contexts Display ═══ Process contexts for 0001FCC0: This address is in the 'Private Arena'. VP linear/ PID Process Physical State Description 0030 PMX2 00D59000 pur PMX2 #0001 (shared code) 0034 REMMAIN FF4114FC vur REMMAIN #0001 (shared code) 003A VDM 0148F000 puw aliased by process VDM 0179 THESEUSn 01668000 pur THESEUSn #0001 (shared code) ═══ Contents of the Show Process Contexts Display ═══ The information presented on the Show Process Contexts display is as follows: (For "System Arena" linear addresses, only the "system" process is shown.) Column Meaning PID The PID of the process for this line. Process The name of the process on this line. VP linear/Physical Either the Virtual Page Table Entry linear address or the physical address of the page. Which one is indicated by the content of the first of the State flags. State The state of the page within the context of this process: Column 1 shows the type of address shown in the previous data: p The page is present. The address shown in the physical page address. v The page is not present. The address shown in the Virtual Page Table entry address. ? The page is not present and the address is not of a Virtual Page Table entry. Column 2 shows the user/system state: u The page is a "user" page. s The page is a "system" page. Column 3 shows the read/write state: r The page is a "read-only" page. w The page is a "read/write" page. Column 4 shows the detail page state: uncommitted The page was uncommitted. special The page was a special system page. allocate on demand The page was an "allocate on demand" page. claimable The page was claimable. idle The page was idle. to be loaded The page was a "to be loaded" page. present The page was present. resident The page was resident. swapped The page was swapped. UVirt The page was a UVirt page. Description A description in English of the object that the page is a part of. ═══ Related Topics ═══  Memory addressing  Memory states ═══ 10.3.7. Memory Object Leak Detection ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Memory Object Leak Detection Display ═══ When you select the Memory Object Leak Detection option of the Functions pull-down on a Detail window, information about the changes of state of individual pages of the specified memory object are shown. This option is available only if you have selected a Hyperblock link linear address. ═══ Example of the Memory Object Leak Detection Display ═══ Leak detection for Process with PID = 067C, name = THESEUS3, memory object linear = 00010000, object has 48 pages: < End of THESEUSn (v 3.00.000) output @ 15:57:38 on 5-16-1993 > Use the 'Function' pull-down to start and stop the data collection. Leak data captured. Periodic update started with interval of 10 seconds. < End of THESEUSn (v 3.00.000) output @ 15:57:41 on 5-16-1993 > address old state new state 00026000 not-present present < End of THESEUSn (v 3.00.000) output @ 15:57:51 on 5-16-1993 > If the Show all page states option is chosen, then the following is produced: old pppppppppppppllllpplpppllllllplllplpplpppppppp new pppppppppppppllllpplpppppllllplllplpplpppppppp dif .......................AB..................... dif address old state new state A: 00027000 to be loaded present B: 00028000 to be loaded present < End of THESEUSn (v 3.00.000) output @ 15:58:01 on 5-16-1993 > ═══ Contents of the Memory Object Leak Detection Display ═══ The information presented on the Memory Object Leak Detection display is as follows: If the Show all page states option is chosen, then the following information is produced: old The states of each page in the memory object in the reference data: . The page was uncommitted. ? The page was a special system page. a The page was an "allocate on demand" page. c The page was claimable. i The page was idle. l The page was a "to be loaded" page. p The page was present. r The page was resident. s The page was swapped. u The page was a UVirt page. new The states of each page in the memory object in the current data. The state codes are the same as the old line. dif The pages which have different states are marked with a letter: . The page state did not change. A The page changed state. The letter shown is different for each page which changed state. The letter is repeated on the appropriate line of the summary information. Uncommitted pages at the end of the memory object are not shown, in order to reduce clutter on the screen. Summary information is always presented: Column Meaning address The linear address of the page which has changed state. old state The state the page had in the reference data. uncommitted The page was uncommitted. special The page was a special system page. allocate on demand The page was an "allocate on demand" page. claimable The page was claimable. idle The page was idle. to be loaded The page was a "to be loaded" page. present The page was present. resident The page was resident. swapped The page was swapped. UVirt The page was a UVirt page. new state The state the page has in the current data. The states are the same as the old state column. ═══ Related Topics ═══  Memory addressing  Memory states  Leak detection control  Manual data capture  Manual data compare ═══ 10.3.8. Hot Spot Detection... ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Cooling rate ═══ This option specifies the number of data collection intervals between color changes on the display. The default value 2. The maximum is 9. ═══ Selecting the Hot Spot Detection display ═══ When you select the Hot Spot Detection option of the Functions pull-down on a Detail window, information about which bytes of data within a page are changing is displayed. The parameters on the display are: Linear address Cooling rate The update rate can be changed by using the Options... dialog on the Contents Update sub-menu of the Misc pull-down. ═══ Example of the Hot Spot Detection display ═══ || ||| 000 FFF Hot Spot detection, linear = 7C7E5000, for process 'system': 7C7E5000 (000) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 *................* 7C7E5010 (010) 67 00 00 CC E2 8B 00 FF FF 03 40 71 E2 93 10 FF *g.........@q....* 7C7E5020 (020) FF 03 00 30 E7 93 10 FF FF FF 00 70 EA 82 00 77 *...0.......p...w* ··· 7C7E5FE0 (FE0) FF 0F 00 30 77 92 11 79 FF 0F 00 30 75 92 11 79 *...0w..y...0u..y* 7C7E5FF0 (FF0) FF 0F 00 30 73 92 11 79 FF 0F 00 30 71 92 11 79 *...0s..y...0q..y* ═══ Contents of the Hot Spot Detection Display ═══ The information presented on the Hot Spot Detection display is as follows: line 1 The first line contains a graphic representation of which lines of data are changing. Each 16 byte line of data is represented by a vertical bar which is two pixels wide. The color is determined by how long it has been since the value of the byte of data changed. The colors are (from "hotest" to "coolest") red, orange, yellow, green, and blue. line2 This line just gives an indication of where bytes 000 and FFF are on the graphic line. remainder The remainder of the display is just like the Show memory at a linear address... display. The bytes which have changed are colored in both the hex and character portions of the display. When you place the mouse pointer on a vertical bar on line 1 and press mouse button 1, the line of hex for that bar is scrolled to the top of the hex portion of the display. ═══ Related Topics ═══  Memory addressing ═══ 10.3.9. Working Set Parameters... ═══ The Working Set Parameters dialog of the Functions pull-down on the Working Set Detail window allows you to specify the data-collection parameters used during working set calculations. The parameters that can be specified are:  Data collection interval  Number of intervals in Working Set  Include 'System' pages  Show data at each interval  Save as defaults  Results presented in. ═══ Number of seconds per sample interval ═══ This option specifies the number of seconds for each working set data collection interval. The default is 5 seconds. The maximum value is 99 seconds. This value is specified in decimal. ═══ Specify the number of intervals for Working Set ═══ This option specifies the number of intervals (n) that constitute the working set. If a page has been accessed within the last n intervals, then it is considered to be within the working set. The default is 12 intervals (times the default interval of 5 seconds = 60 seconds). This value is specified in decimal. This value can be changed while the data collection is running. ═══ Include 'System' pages ═══ If this option is selected, the system arena is included in the calculations. CAUTION: This option is not recommended. Many system pages are referenced by THESEUS while it is doing the data collection and reduction, and it is impossible to differentiate between them and the ones referenced by the application of interest, so this tends to confuse the actual answers. ═══ Show data at each interval ═══ This option displays the results each interval. The changes in the working set during the running of a scenario are usually more interesting than the summary results. This option can be changed while the data collection is occurring. ═══ Save as defaults ═══ When this option is selected, the input values become the defaults for the working set parameters on subsequent creations of the working set window. ═══ Results presented in: ═══ The results can be presented in either:  Pages  Kilobytes  Megabytes ═══ Pages ═══ This option presents the results as the number of pages of memory used. ═══ Kilobytes ═══ This option presents the results as the number of kilobytes of memory used. ═══ Megabytes ═══ This option presents the results as the number of megabytes of memory used. ═══ 10.3.10. Working Set Start ═══ This option starts collecting the information required to determine memory working set. ═══ 10.3.11. Working Set Stop ═══ This option stops collecting the information required to determine memory working set. A final data-collection cycle occurs before the results are analyzed and displayed. ═══ Detail of Working Set (by Page) ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Detail of Working Set (by Page) display ═══ When you select the Show detail by Page option of the Functions pull-down on the Working Set Detail window, detail information about the working set is shown. Specifically, the pages referenced since the working set sampling began are shown. ═══ Example of the Detail of Working Set (by Page) Display ═══ Working Set detail for the Process with PID = 000E, name = 'THESEUSn': Physical hob Time State Type Description 00060000 0382 1 A DLL SYSMONO #0004 (shared) 00068000 0383 1 A Private THESEUSn allocated it 0006C000 0362 1 A Private THESEUSn #0001 (shared) ··· 00DCA000 00B3 1 A DLL DOSCALL1 #0005 (shared) 00DE4000 031E 1 A DLL PMGRE allocated it 142 pages were marked 'A' (Accessed). 17 pages were marked 'L' (Locked). 0 pages were marked 'R' (Resident). There were a total of 145 pages reported. ═══ Contents of the Detail of Working Set (by Page) display ═══ One line is displayed for each page in the working set: Column Meaning Physical The physical address of the page. hob The hob of the memory object that this page is a part of. Time Number of time intervals (in decimal) since the page was referenced. A value of 1 indicates that the page was touched in the last interval before data capturing was stopped. A value of 2 indicates that the page was touched in the next-to-last interval before data capturing was stopped. State The state of this page: A The page has been accessed during the run. L The page is locked. R The page is resident. F The page is now free. I The page is idle B The page has a "bad hob" The hob value is too large to be able to access the Object Record in the Object Table. Type (This is only on the display if it was generated from a Working Set for a Process display.) The type of object that this page is a part of. The values are: System The page is from the system arena. Private The page is from the private arena, is an instance object from a system DLL, or is an object from a DLL which is not a system DLL. DLL The page is from the shared arena and is for a system DLL. The system DLLs are those that are part of the system and are not considered to be part of the application. Ignore The page is not accessible from the specified process and is ignored. (This is a DLL page which is mapped from the system wide section of the Page Directory.) Error An error has occurred while processing the page. The hob may be out of range. The page was assigned to the system. Description A description in English of the object that the page is a part of. A summary of the number of pages in each page State is given. Then the total number of pages reported is given. (Since a page may be in multiple states, the total of the pages in each state is probably not the same as the total reported.) ═══ Related Topics ═══  Memory analysis  Memory addressing  System Working Set ═══ Detail of Working Set (by Object) ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Detail of Working Set (by Object) display ═══ When you select the Show detail by Object option of the Functions pull-down on the Working Set Detail window, detail information about the working set is shown. Specifically, all the memory objects from the private arena are shown, along with ones from the shared and system arenas that have had pages referenced since the run began. ═══ Example of the Detail of Working Set (by Object) Display ═══ Working Set detail for the Process with PID = 0060, name = 'THESEUSn': Objects from the 'private' arena: ---accessed--- pages in avg. linear hob no yes working set time Description 00010000 04CF 32 18 18 1.1 THESEUSn #0001 (shared code) 00050000 047C 21 8 8 1 THESEUSn #0002 (private) 00070000 0475 1 0 0 User Environment (hmte) ··· 01C80000 048F 1 0 0 THESEUSn allocated it 92 44 44 1.0 Total Objects from the 'shared' arena: ---accessed--- pages in avg. linear hob no yes working set time Description 16350000 04DF 0 1 1 1 THESEUSn allocated it 163E0000 04BB 1 1 1 1 SYSMONO #0004 (shared data) 16420000 04AE 0 1 1 1 PMGRE allocated it ··· 1BFF0000 0074 0 1 1 1 infoseg (local or global) (owner) 1052 254 254 1.0 Total Objects from the 'system' arena: ---accessed--- pages in avg. linear hob no yes working set time Description 7DC00000 002A 5 13 13 1 PG Compat. region page table (owner) 5 13 13 1.0 Total ═══ Contents of the Detail of Working Set (by Object) Display ═══ One line is displayed for each object: Column Meaning linear The linear address of the memory object. hob The hob of the memory object. accessed - no The number of pages that are committed in the object that were not accessed since the start of the run. accessed - yes The number of pages that are committed in the object that were accessed since the start of the run. pages in working set The number of pages that were in the working set. avg. time The average number of intervals since the pages were accessed. If all the pages were accessed at the same time, the time is output without a decimal point. Description A description in English of the object. The totals for each arena is shown at the end of the arena's output. ═══ Related Topics ═══  Memory analysis  Memory addressing  System Working Set  Summary by Process ═══ 10.3.12. Show detail by Page ═══ Which display is presented depends on the Detail window from which this option is selected: Working Set window Swapper window ═══ 10.3.13. Show detail by Object ═══ Which display is presented depends on the Detail window from which this option is selected: Working Set window ═══ 10.3.14. Summary by Process ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Summary by Process display ═══ When you select the Show summary by process option of the Functions pull-down on the System Working Set Detail window, summary information about the working set is shown. Specifically, the amount of memory, both private and shared, used by each process is shown, along with the amount used from the system and shared arenas. ═══ Example of the Summary by Process Display ═══ Working Set summary for the System (by Process): -------- Private --------- ---------- Shared --------- - Accessed - Working Avg. - Accessed - Working Avg. No Yes set time No Yes set time PID Process name 0 2 2 1.0 0 0 0 0002 LOGDAEM 21 8 8 1.3 0 4 4 1.5 0004 PMSHL32 4 2 2 2.0 0 0 0 0006 WHATEVER 41 37 37 1.5 0 0 0 0009 VDM 50 10 10 1.0 0 0 0 000A AAA 32 43 43 1.9 1 6 6 2.0 000C TESTING 103 19 19 1.6 0 0 0 000D TESTING 81 20 20 2.0 0 0 0 000E WHAT 9 23 23 1.2 0 3 3 2.0 001F IPFCPREP 57 41 41 1.3 0 3 3 1.0 0020 THESEUSn 268 1370 1370 1.0 1071 292 292 1.7 System ------ ------ ------ ------ ------ ------ 666 1575 1575 1072 308 308 Totals 2 2 Free RAM ------ ------ ------ 1738 1885 1885 Pvt + Shr + Free ═══ Contents of the Summary by Process Display ═══ One line is displayed for each process: Column Meaning Private Memory from the private arena. For the System line, this is memory from the system arena. Shared Instance data from the shared arena. For the System line, this is shared memory from the shared arena. Accessed - No The number of pages that are committed in the objects for this process that were not accessed since the start of the run. Accessed - Yes The number of pages that are committed in the objects for this process that were accessed since the start of the run. Working set The number of pages that were in the working set. Avg. time The average number of intervals since the pages were accessed. PID The PID of the process for this line. Process name The name of the process on this line. Totals for each column are generated and shown. The line labeled Free RAM is memory that has been accessed during the run, but is currently marked Free. The line labeled Pvt + Shr + Free is a total of all the data. ═══ Related Topics ═══  Memory analysis  Memory addressing  System Working Set  Detail by Object ═══ Detail of SWAPPER.DAT (by Page) ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Detail of SWAPPER.DAT (by Page) display ═══ When you select the Show detail by Page option of the Functions pull-down on the SWAPPER.DAT Analysis Detail window, detail information about the make up of the SWAPPER.DAT file will be shown. Specifically, the pages that have been paged out are shown. ═══ Example of the SWAPPER.DAT contents (by page) Display ═══ SWAPPER.DAT contents by page: frame vp hob linear Process Description 0000 FF4132EE 01C1 00030000 01BB HARDERR #0003 (private) 0001 FF417966 039F 000C1000 0379 PMD #000C (private) ··· 0020 FF41916C 03DE 00047000 03D4 THESEUSn #0002 (private) 0021 free 0022 FF419194 03DE 0004B000 03D4 THESEUSn #0002 (private) ··· 003B FF419720 0421 18523000 shared THESEUSR #0003 (shared) 003C to 003F (4 frames) are free 0040 FF40E7EE 0016 FFFB0000 system os2krnl load image (owner) ··· 0229 FF412146 017C 19F40000 inst0114 OS2CHAR #0000 (private) ═══ Contents of the SWAPPER.DAT contents (by page) display ═══ One line is displayed for each frame in the SWAPPER.DAT file: Column Meaning frame Disk frame number. Each frame is 4KB. vp The linear address of the Virtual Page Table entry for this page. hob The hob of the page. linear The linear address of the page. Process The content of this column is dependent on the type of page: hob This is a page from a private arena. The value is the hob of the PTDA of the process that owns the page. shared This is a shared page from the shared arena. insthob This is an instance data page from the shared arena. The hob is for the PTDA of the process. system This is a page from the system arena. Description A description in English of the object. Frames that are not in use have "free" after the frame number. If there are multiple free frames together, only one line is shown with the starting and ending frame numbers. The number of frames is also shown. ═══ Related Topics ═══  Memory analysis  Memory addressing ═══ 10.3.15. Leak Detection Control... ═══ The Leak Detection Control dialog of the Functions pull-down on the Memory Leak Detection Detail window allows you to control the characteristics of the leak detection that is taking place. The parameters that can be specified are:  Use previous sample as base.  Show data from next collection cycle.  Show all pages states. ═══ Use previous sample as base ═══ When this option is selected, each periodic update will use the data collected on the previous cycle as the base data against which the comparison is done. When this option is not selected, the reference data comes from:  The data collected when Start Periodic Leak Detection was selected.  The data collected when Capture Leak Reference Data was selected. ═══ Show data from next collection cycle ═══ When this option is selected, all the data collected is displayed, as well as any differences. When this option is not selected, only the differences are shown. ═══ Show all pages states ═══ When this option is selected, the state of every page in the object is shown. The previous state, the new state and differences are shown on three separate lines. There 128 page states shown on each group of three lines. When this option is not selected, only the page differences are shown. ═══ 10.3.16. Start Periodic Leak Detection ═══ This option starts a periodic update of the Memory Leak Detection window. The Options dialog of the Contents Update sub-menu of the Misc pull-down can be used to select the update interval and window update characteristics. ═══ 10.3.17. Stop Periodic Leak Detection ═══ This option stops the periodic update of the Memory Leak Detection window. ═══ 10.3.18. Capture Leak Reference Data ═══ This option causes memory leak detection data to be captured. It can be used for a later Compare Present Leak Data to generate memory leak detection data. This option can be used at any time, even when periodic updates are being done. This data then becomes the reference data for the next update cycle. ═══ 10.3.19. Compare Present Leak Data ═══ This option causes memory leak detection data to be generated. This option can be used at any time, even when periodic updates are being done. ═══ 10.4. Secondary ═══ The Secondary pull-down includes options that show the working set of the linear pages, as opposed to the physical pages. Functions available are: Usage Type Display Shows the working set of the linear pages, broken down by "usage type". Last Referenced Graphic Shows the working set of the linear pages as a "color strip" display, graphically showing the time since last refernce of a page. ═══ 10.4.1. Usage Type Display ═══ Select one: Selecting Example Output Contents of Display Related Topics ═══ Selecting the Usage Type Display ═══ When you select the Usage Type Display from the Secondary column of the Process Working Set display, information about the working set is shown, broken down by "usage type". The different "usage types" are: code, data, stack and allocated. The results are presented in the same units as the parent display. ═══ Example of the Usage Type Display ═══ Working Set by Usage Type for the Process with PID = 00AA, name = 'THESEUSn': time -- code -- -- data -- - stack -- allocated - total -- hh:mm:ss now ws now ws now ws now ws now ws 10:37:47 105 105 47 47 1 1 97 97 250 250 10:37:52 98 117 47 49 1 1 132 142 278 309 10:37:57 99 117 47 49 1 1 136 142 283 309 10:38:02 89 117 43 49 1 1 129 142 262 309 ═══ Contents of the Usage Type Display ═══ The information presented on the Usage Type display is as follows: One line is displayed for each time interval: Column Meaning time Time of the sample in hours:minutes:seconds. code Memory objects which are the executable portions of modules. data Memory objects which are the data portions of modules. stack Memory objects which are marked as "stack" in their memory control blocks. allocated Memory objects which are marked as "api allocated" in their memory control blocks. total Total for the previous columns now The amount of memory referenced in the previous time interval for the applicable memory type. ws The amount of memory in the working set for the applicable memory type. Note: The total from this display will be different that the total of the parent display because the Page Table pages are not included on this display and they are on the parent. ═══ Related Topics ═══  Memory addressing  Process Working Set  Last Referenced Graphic ═══ 10.4.2. Last Referenced Graphic ═══ Select one: Selecting Using the Display Example Output Contents of Display Related Topics ═══ Selecting the Last Referenced Graphic Display ═══ When you select the Last Referenced Graphic from the Secondary column of the Process Working Set display, information about the working set of the process is displayed in a graphic representation. The linear address space is shown as two strips of color bars. The time since last reference is shown as a color (or bar height on monochrome display). ═══ Using the Last Referenced Graphic Display ═══ The pointer assumes different shapes as it is moved through the different zones of the display:  When in one of the color strips, it will be an x, with the "hot spot" being at the center of the x. (The x has a vertical line through it which will "disappear" when you have aligned the "hot spot" exactly with a bar.)  When in the zoom control area, it will be a +. When you press mouse button 1, small arrows will be added to the + to indicate which end of which zoom control line is being moved. If you press mouse button 1 while the pointer is over one of the color strips, the address associated with that bar (horizontal position in the strip) will be show. If you are in the summary strip (line C in the example), the address will be shown above the strip (line B of the example). If you are in the zoomed strip (line E in the example), the address will be shown below the strip (line F of the example) and an English description of the memory object will be shown on line G. If you double click mouse button 1, a list of memory objects around the bar selected will be shown. If you double click mouse button 2, a description of the memory object will be shown. ═══ Example of the Last Referenced Graphic Display ═══ ═══ Contents of the Last Referenced Graphic Display ═══ The information presented on the Last Referenced Graphic display is as follows: Line Meaning A The high and low values of the linear address space available to user processes is shown. For color displays, a set of boxes showing the "color temeratures" is also shown. The "hottest" color (red) is on the left and the "coolest" color (blue) is on the right. If a bar from line C has been selected by mouse button one, its address will be shown in the center of this line. B A set of "tick marks" showing the 64M points of the address space. For OS/2 Warp and later, the part of the address space that has common page tables (the area between 320M and 512M) has a line through the ticks, to remind you that there is something different about it. (Remember that it cannot be determined which process referenced a page in this area.) C A summary of the working set across the entire 512M address space. Each bar represents the "average temperature" of the active pages within each 1M region. D The zoom control lines. You can control the zoomed area (line E) by grabbing an end of either of the zoom control lines and moving it to the desired place and then dropping it. E The zoomed area. This is a variable sized and positioned area which shows more detail about the portion of the address space which is selected. If a bar has been selected by mouse button 1, the extent of the memory object is shown by a gray rectangle. F The low and high address (in hexadecimal) of the portion of the address space shown on line E. If a bar from line E has been selected by mouse button one, its address will be shown in the center of this line. G A description in English of the object selected from line E. The "temperature" of a page is computed by how long it has been since the page was last referenced. The page is lowered by one temperature color for each two intervals since it was referenced. On systems with monochrome displays, the bars are different lengths instead of different colors. They will start off long and as the page "cools", they get shorter. ═══ Related Topics ═══  Memory addressing  Process Working Set  Usage Type Display ═══ 10.5. Output ═══ The Output pull-down includes options that allow saving or printing the current display. Functions available are: Save as... Allows saving the display to a file. Print all Allows printing the display. ═══ 10.5.1. Save as... ═══ The Save as dialog of the Output pull-down on the Detail window allows you to save the contents of the window to a file. To make your selections, either:  Use the mouse to point to the disk, directory, or file name  Use the tab key to move between the lists and the up/down arrow keys to move within the list. ═══ Filename: ═══ Use this option to specify a file name. If you do not specify a fully qualified file name, it is qualified with the "Current Directory" displayed above it. Note: The name is converted to upper case before using. ═══ Directories ═══ This field displays the list of disks and directories available for selection. Select one by either:  Double-clicking mouse button 1  Moving the cursor (using the up/down arrow keys) and then pressing the Enter key. The file or directory names are retrieved and displayed. ═══ Files ═══ This field displays the list of files in the selected directory. Select one by single-clicking mouse button 1. Double-clicking mouse button 1 is equivalent to selecting the file name and pressing the "Save" key. ═══ Save ═══ When you press the Save button, the window is saved to the specified file. ═══ 10.5.2. Print all ═══ The Print all option of the Output pull-down on the Detail window allows you to print the contents of the window. The output goes to the printer identified as PRN. If the longest line is more than 80 characters, then a "go to condensed mode" command (hex 15) is the first character output to the printer. Likewise, a "go to normal mode" command (hex 18) is the last character output to the printer. ═══ 10.6. Mark/Find ═══ The Mark/Find pull-down includes options that allow text scans of the display window and clipboard operations. Functions available are: Find... Allows finding a specified ASCII string on the display. Find again Repeats the previous find operation, starting with the current cursor location. Mark an area Marks an area for storing into the clipboard or printing. Copy selection to clipboard Copies the current marked area into the clipboard. Print selection Prints only the current marked area. ═══ 10.6.1. Find... ═══ The Find dialog of the Mark/Find pull-down on the Detail window allows you to find a specified ASCII text string in the information displayed in the window. There is one entry field on the dialog: Specify the text to be found: Specify the text you wish to search for. There are two options on the dialog: Case sensitive? Specify case sensitivity of the search. Move pointer onto found text? Specify if the pointer is to be moved. ═══ Specify the text to be found: ═══ Specify the text which you wish to search for. The text must all be on one line in the window. There are no "wild card" nor "don't care" characters. ═══ Case sensitive? ═══ If this check box is selected, the text is searched using the supplied case. If this check box is not selected, the text is searched without regard to the case in both the supplied text and the window text. ═══ Move pointer onto found text? ═══ If this check box is selected, the pointer is moved to the center of the text which is found. If this check box is not selected, the pointer is not moved. ═══ 10.6.2. Find again ═══ The Find again option of the Mark/Find pull-down on the Detail window allows you to continue the ASCII text scan previously started. The text scan continues from the current cursor location. ═══ 10.6.3. Mark an area ═══ The Mark an area option of the Mark/Find pull-down on the Detail window allows you to mark a rectangle, which can then be copied into the clipboard or printed. The current status of this mode is denoted by a check mark on the pull-down. Selecting this option reverses the setting. When you select this option, the operation of the buttons on the mouse change. Position the pointer to one of the corners of the area to be marked. When you press the button, it marks one corner of the rectangle. As you drag the pointer, the rectangle is marked out, using the current pointer position as the "opposite" corner. When you release the button, the rectangle is frozen and the operation of the buttons reverts back to the default mode. ═══ 10.6.4. Copy selection to clipboard ═══ The Copy selection to clipboard option of the Mark/Find pull-down on the Detail window allows you to copy the marked rectangle into the clipboard. The area can be either the one marked with the Mark an area option or a hyperblock link that has been selected. The "text" portion of the clipboard is the only one updated. ═══ 10.6.5. Print selection ═══ The Print selection option of the Mark/Find pull-down on the Detail window allows you to send the marked rectangle to the printer. The area can be either the one marked with the Mark an area option or a hyperblock link that has been selected. The output goes to the printer identified as PRN. If the rectangle is more than 80 characters wide, then a "go to condensed mode" command (hex 15) is the first character output to the printer. Likewise, a "go to normal mode" command (hex 18) is the last character output to the printer. ═══ 10.7. Misc ═══ The Misc pull-down includes options that allow control of double-click operations and font specification. Functions available are: Unselect 'link' Unselects the currently selected hyperblock link. Send output to the same window Controls where the output from the mouse button "double-click" is sent. Double-click options... Allows control of the action taken when mouse button 1 or 2 is double-clicked. Font for this window... Specifies an alternate font for this window. Contents Update Specifies control, start and stop of periodic updates. ═══ 10.7.1. Unselect 'link' ═══ The Unselect 'link' option of the Misc pull-down on the Detail window allows you to unselect the currently selected hyperblock link. This also causes the pop-up menu to revert back to the mode it had before the link was selected. ═══ 10.7.2. Send output to the same window ═══ The Send output to the same window option of the Misc pull-down on the Detail window allows you to control where the output from mouse button "double-click" will go. When this option is chosen, "double-click" output is added to the current window. A check mark on the pull-down indicates this mode is active. If this option is not chosen, then "double-click" output is sent to a new window. No check mark appears on the pull-down when this mode is active. Initially, the option is not set. ═══ 10.7.3. Double-click options... ═══ The Double-click options dialog of the Misc pull-down on the Detail window allows you to specify the action taken when you double-click mouse button 1 while the pointer is over the address of a control block that THESEUS cannot format. The display generated is referred to in the helps as a "General memory display." The default "description" action for mouse button 2 can also be selected. ═══ Show description ═══ When this option is selected, double clicking button 2 on the mouse will display a "description" of the memory object which has been selected. ═══ Show process contexts ═══ When this option is selected, double clicking button 2 on the mouse will display the process contexts of the memory object which has been selected. ═══ Save as defaults ═══ When this option is selected, the input values become the defaults for the mouse button double click parameters on subsequent creations of detail windows. If the dialog was selected from a detail window, its defaults are also changed. ═══ 10.7.4. Font for this Window... ═══ When you select the Font for this Window option of the Misc pull-down on the Detail window, you can specify a different monospace font for the Detail window being displayed. THESEUS will automatically resize the window if you have not manually changed the size. ═══ 10.7.5. Contents Update ═══ When you select the Contents Update option of the Misc pull-down on the Detail or Process Hierarchy window, you are presented with a sub-menu for specification of control, start and stop of periodic updates to this window. Note: Not all detail windows allow periodic update. Only those that do have this option enabled. Functions available are: Options... Presents a dialog to allow control of the update rate and window update characteristics. Start Starts the periodic update of the window contents. Stop Stops the periodic update of the window contents. Refresh now Causes an immediate update of the window contents. ═══ 10.7.5.1. Options... ═══ The Options dialog of the Periodic Update option of the Misc pull-down on the Detail window allows you to control the update rate and window update characteristics. The options are:  Time between updates.  Replace window contents each time.  Change cursor shape while updating.  Scroll the screen when it is updated.  End of Output control: - Never output it. - Output it if data was generated. - Always output it. ═══ 10.7.5.1.1. Time between updates ═══ This option specifies the number of minutes and seconds for the detail window update interval. The default is 30 seconds. The maximum value is 999 minutes. The seconds value cannot be typed, only the spin buttons work. The granularity of the seconds value is determined by the minutes value as follows: Minutes Seconds granularity 0 Any second, except 0. 1-4 5. 5-9 10. 10-999 Minutes only. ═══ 10.7.5.1.2. Replace window contents each time ═══ If this option is selected, the window contents are replace at each interval. If this option is not selected, the update information is added to the end of the existing window contents. ═══ 10.7.5.1.3. Change cursor shape while updating ═══ If this option is selected, the cursor is changed from the "pointer" to the "clock" whenever the window contents are being recomputed. ═══ 10.7.5.1.4. Scroll the screen when it is updated ═══ If this option is selected, the window is scrolled so that the last line of data generated is displayed. ═══ 10.7.5.1.5. Never output the End of Output ═══ If this option is selected, the End of Output message is never output at the end of the newly generated information in the window. ═══ 10.7.5.1.6. Output the End of Output if data was generated ═══ If this option is selected, the End of Output message is output if there were other information generated in the window. ═══ 10.7.5.1.7. Always output the End of Output ═══ If this option is selected, the End of Output message is always output, even if there were no other information generated in the window. ═══ 10.7.5.2. Start ═══ This option starts a periodic update of the contents of the window. The Options dialog of the Periodic Update sub-menu of the Misc pull-down can be used to select the update interval and window update characteristics. ═══ 10.7.5.3. Stop ═══ This option stops the periodic update of the contents of the window. ═══ 10.7.5.4. Refresh now ═══ This option causes the window contents to be updated now. The behavior is the same as if a periodic update had occurred. ═══ 10.8. Help ═══ The Help pull-down contains the list of the help functions available for the Detail window. ═══ 10.8.1. Explanation of the contents of this window ═══ The Explanation of the contents of this window option of the Help pull-down displays information about the contents of this window. ═══ 11. Detail Window Contents ═══ The following panels show the content of the various displays presented in the Detail window. The following displays are selectable from several sources: System Lists the displays available from the System pull-down. Process Lists the displays available from the Process pull-down. Registers Lists the displays available from the Registers pull-down. Functions Lists the displays available from the Functions pull-down. Secondary Lists the displays available from the Secondary pull-down. Links Lists the displays available only from hyperblock links. Common Elements Lists the displays which occur in a variety of places. ═══ 11.1. From the System Pull-Down ═══ The following panels show the content of the various displays selectable from the System pull-down on the Process Hierarchy window. These displays are: Working Set Displays the working set of memory for the entire system. Memory Leak Detection Displays the number of pages of memory that each process is accumulating. Nonswappable Memory Analysis Displays information about the contents of nonswappable memory. Linear Usage by Process Displays a map of the linear address usage for all processes. This includes the private and shared arenas. Page Contents Displays the contents of each page of physical memory. RAM Usage by Process Determines and displays the amount of RAM consumed my each process. Free, Idle, and Locked Memory Generates the summary information about free, idle and locked pages. Swapper Displays information about the contents of the SWAPPER.DAT file. General System A set of displays containing general system information. Kernel Information A set of displays containing kernel information. ═══ 11.1.1. Working Set ═══ Select one: Contents of Display Selecting Example Output Algorithm Illustration Related Topics ═══ 11.1.2. Memory Leak Detection ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.3. Nonswappable Memory Analysis ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.4. Linear Usage by Process ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.5. Page Contents ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.6. RAM Usage by Process ═══ Select one: Contents of Display Selecting Example Output Algorithm Related Topics ═══ 11.1.7. Free, Idle, and Locked Memory ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.8. Swapper ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.9. General System ═══ The General System option contains: General System Information Displays selected general system information. Device Drivers Contains information about all Device Drivers currently loaded. GDT Displays the Global Descriptor Table. Modules Contains information about all modules currently loaded. System Anchor Segment Displays the System Anchor Segment. Global Info Seg Displays the Global Information Segment. Open Files Displays information about the files that are open. Process List Displays a list of all processes that are running. ═══ 11.1.9.1. General System Information ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.9.2. Device Drivers ═══ Select one: Contents of Display Selecting Example output Related Topics ═══ 11.1.9.3. GDT ═══ Select one: Contents of Display Descriptor Table Entry Description Selecting Example Output Related Topics ═══ 11.1.9.4. Modules ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.9.5. System Anchor Segment ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.9.6. Global Info Seg ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.9.7. Open Files ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.9.8. Process List ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.10. Kernel Information ═══ The Kernel Information option contains: Kernel Memory Usage Determines and displays the amount of memory consumed by the Operating System. System Object Summary Displays the System Object Summary. System Arena Table Displays the System Arena Table. System Page Table Displays the System Page Table. Page Frame Table Displays the Page Frame Table. ═══ 11.1.10.1. Kernel Memory Usage ═══ Select one: Contents of Display Selecting Example Output Algorithm Related Topics ═══ 11.1.10.2. Object Summary ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.1.10.3. System Arena Table ═══ Select one: Contents of Display Arena Record Description Selecting Example Output Related Topics ═══ 11.1.10.4. System Page Table ═══ Select one: Contents of Display Page Table Entry Description Selecting Example Output Related Topics ═══ 11.1.10.5. Page Frame Table ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.2. From the Process Pull-Down ═══ The following panels show the content of the various displays selectable from the Process pull-down on the Process Hierarchy window. These displays are: Working Set Displays the working set of memory for the process. Memory Utilization Displays details of memory usage for the process. Memory Leak Detection Displays the number of pages of memory that each object is accumulating. General Process Information Displays general information about the process. Per Task Data Area (PTDA) Displays the PTDA. LDT Displays the LDT. Page Table Displays the process unique Page Table. Private Object Summary Displays a summary of the private arena memory objects. Shared Object Summary Displays a summary of the shared arena memory objects. Private Arena Table Displays the process unique arena table. Shared Arena Table Displays the shared arena, in the process' context. ═══ 11.2.1. Working Set ═══ Select one: Contents of Display Selecting Example Output Algorithm Illustration Related Topics ═══ 11.2.2. Memory Utilization ═══ Select one: Contents of Display Selecting Example Output Algorithm Related Topics ═══ 11.2.3. Memory Leak Detection ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.2.4. General Process Information ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.2.5. Per Task Data Area (PTDA) ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.2.6. LDT ═══ Select one: Contents of Display Descriptor Table Entry Description Selecting Example Output Related Topics ═══ 11.2.7. Page Table ═══ Select one: Contents of Display Page Table Entry Description Selecting Example Output Related Topics ═══ 11.2.8. Private Object Summary ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.2.9. Shared Object Summary ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.2.10. Private Arena Table ═══ Select one: Contents of Display Arena Record Description Selecting Example Output Related Topics ═══ 11.2.11. Shared Arena Table ═══ Select one: Contents of Display Arena Record Description Selecting Example Output Related Topics ═══ 11.3. From the Registers Pull-Down ═══ The following panel shows the content of the display selectable from the Registers pull-down on the Process Hierarchy window. The display is: Current IDT Displays the current Interrupt Descriptor Table. ═══ 11.3.1. IDT ═══ Select one: Contents of Display Descriptor Table Entry Description Selecting Example Output Related Topics ═══ 11.4. From Functions Pull-Down ═══ The following panels show the content of the various displays selectable from the Functions pull-down on the Detail window. Displays are: General Linear Memory Displays memory at a specified linear address. General Virtual Memory Displays memory at a specified virtual address. General Physical Memory Displays memory at a specified physical address. Show Working Set detail (by Page) Shows which pages made up the working set. Show Working Set detail (by Object) Shows which objects made up the working set. Show summary by Process Show a summary of the working set information, summarized by process. Show SWAPPER.DAT detail (by Page) Shows which pages make up the SWAPPER.DAT file. Show process contexts Displays context information for each process which access to the specified linear address. Memory Object Leak Detection Performs memory leak detection on a single memory object. Hot Spot Detection... Performs byte change detection on a page of memory. ═══ 11.4.1. General Linear Memory Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the General Linear Memory Display ═══ You may either select the Show memory at linear address option on the Functions pull-down on the Detail window to get a dialog so that you may enter a specific linear address or select a linear address hyperblock link from another window that THESEUS cannot explicitly format. ═══ Example of the General Linear memory display ═══ Memory from Linear address FEB5F498 for 40 bytes for process 'system': FEB5F498 (0000) 00 00 50 07 80 80 00 00 00 00 54 48 45 53 45 55 *..P.......THESEU* FEB5F4A8 (0010) 32 24 98 07 78 07 00 00 00 00 54 00 C8 0F 92 03 *2$..x.....T.....* FEB5F4B8 (0020) B8 04 82 00 EA 9D 1F 00 00 00 17 04 00 14 A0 07 *................* FEB5F4C8 (0030) A8 07 B0 07 B8 07 C0 07 40 00 FF 1F 00 60 EC FF *........@....`..* The above is the same memory as the Device Driver Header example. Memory from Linear address FE984D84 for E bytes for process 'system': FE984D84 (0000) 89 1E 1E 00 *....* mov [1E],bx FE984D88 (0004) 8C 06 20 00 *.. .* mov [20],es FE984D8C (0008) 26 8A 47 02 *&.G.* mov al,es:[bx+2] FE984D90 (000C) 3C 00 *<.* cmp al,0 ═══ Contents of the General Linear memory display ═══ For hex mode, the memory is presented as follows: address The linear address of the byte that begins the line. hex There are three formats for this data: byte Each byte is formatted individually. word Each word (2 bytes) is formatted individually. "Byte reversal" is done. doubleword Each doubleword (4 bytes) is formatted individually. "Byte reversal" is done. ASCII The character representation of the memory area. "Byte reversal" is not done. For disassemble mode, the memory is presented as follows: address The linear address of the byte that begins the line. hex Each byte is formatted individually. ASCII The character representation of the memory area. instruction The disassembled instruction, using MASM mnemonics. ═══ Related Topics ═══  Memory addressing  Linear addresses  Description of Linear Object ═══ 11.4.2. General Virtual Memory Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the General Virtual Memory Display ═══ You may either select the Show memory at virtual address option on the Functions pull-down on the Detail window to get a dialog so that you may enter a specific virtual address or select a virtual address hyperblock link from another window that THESEUS cannot explicitly format. ═══ Example of the General Virtual Memory Display ═══ Memory from Virtual address 0778:00000000 for 1A bytes for process 'system': 0778:0000 00 00 50 07 80 80 00 00 00 00 54 48 45 53 45 55 *..P.......THESEU* 0778:0010 32 24 98 07 78 07 00 00 00 00 *2$..x.....* The above is the same memory as the Device Driver Header example. Memory from Virtual address 0798:00000000 for 22B bytes for process 'system': 0798:0000 89 1E 1E 00 *....* mov [1E],bx 0798:0004 8C 06 20 00 *.. .* mov [20],es 0798:0008 26 8A 47 02 *&.G.* mov al,es:[bx+2] 0798:000C 3C 00 *<.* cmp al,0 ═══ Contents of the General Virtual Memory Display ═══ For hex mode, the memory is presented as follows: address The virtual address of the byte that begins the line. hex There are three formats for this data: byte Each byte is formatted individually. word Each word (2 bytes) is formatted individually. "Byte reversal" is done. doubleword Each doubleword (4 bytes) is formatted individually. "Byte reversal" is done. ASCII The character representation of the memory area. "Byte reversal" is not done. For disassemble mode, the memory is presented as follows: address The virtual address of the byte that begins the line. hex Each byte is formatted individually. ASCII The character representation of the memory area. instruction The disassembled instruction, using MASM mnemonics. ═══ Related Topics ═══  Memory addressing  Virtual addresses ═══ 11.4.3. General Physical Memory Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the General Physical Memory Display ═══ You may either select the Show memory at physical address option on the Functions pull-down on the Detail window to get a dialog so that you may enter a specific physical address or select a physical address hyperblock link from another window that THESEUS cannot explicitly format. ═══ Example of the General Physical Memory Display ═══ Memory from Physical address 006A7498 for 40 bytes for process 'system': 006A7498 (0000) 00 00 50 07 80 80 00 00 00 00 54 48 45 53 45 55 *..P.......THESEU* 006A74A8 (0010) 32 24 98 07 78 07 00 00 00 00 54 00 C8 0F 72 03 *2$..x.....T...r.* 006A74B8 (0020) B8 04 82 00 36 A1 1F 00 00 00 0F 04 00 14 A0 07 *....6...........* 006A74C8 (0030) A8 07 B0 07 B8 07 C0 07 40 00 FF 1F 00 60 EC FF *........@....`..* The above is the same memory as the Device Driver Header example. Memory from Physical address 0068FD84 for E bytes for process 'system': 0068FD84 (0000) 89 1E 1E 00 *....* mov [1E],bx 0068FD88 (0004) 8C 06 20 00 *.. .* mov [20],es 0068FD8C (0008) 26 8A 47 02 *&.G.* mov al,es:[bx+2] 0068FD90 (000C) 3C 00 *<.* cmp al,0 ═══ Contents of the General Physical Memory Display ═══ For hex mode, the memory is presented as follows: address The physical address of the byte that begins the line. hex There are three formats for this data: byte Each byte is formatted individually. word Each word (2 bytes) is formatted individually. "Byte reversal" is done. doubleword Each doubleword (4 bytes) is formatted individually. "Byte reversal" is done. ASCII The character representation of the memory area. "Byte reversal" is not done. For disassemble mode, the memory is presented as follows: address The physical address of the byte that begins the line. hex Each byte is formatted individually. ASCII The character representation of the memory area. instruction The disassembled instruction, using MASM mnemonics. ═══ Related Topics ═══  Memory addressing  Physical addresses ═══ 11.4.4. Detail of Working Set (by Page) Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.4.5. Detail of Working Set (by Object) Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.4.6. Detail of Summary by Process Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.4.7. SWAPPER.DAT Contents (by Page) Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.4.8. Show Process Contexts ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.4.9. Memory Object Leak Detection ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.4.10. Hot Spot Detection... ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.5. From Secondary Pull-Down ═══ The following panels show the content of the various displays selectable from the Secondary pull-down on the Detail window. Displays are: Usage Type Display Shows the working set of the linear pages, broken down by "usage type". Last Referenced Graphic Shows the working set of the linear pages as a "color strip" display, graphically showing the time since last refernce of a page. ═══ 11.5.1. Usage Type Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ 11.5.2. Last Referenced Graphic ═══ Select one: Contents of Display Using the Display Selecting Example Output Related Topics ═══ 11.6. From Links ═══ The following panels show the content of displays that are displayed only from hyperblock links: Device Driver Header Displays the contents of a single Device Driver's header. Virtual Address Memory Displays the contents of a segment in memory. Show description of an object Displays the "description" of a memory object. Show description of a segment Displays the "description" of a segment. Physical description Displays the "description" of a physical page of memory. Detail for System Owner Displays the list of memory objects that make up a particular system owner. Alias Record Displays a single Alias Record. Arena Record Displays a single Arena Record. Object Record Displays a single Object Record. Context Record Displays a single Context Record. Virtual Page Table entry Shows a single Virtual Page Table entry. MTE display Displays a single MTE. TCB display Displays a single TCB. Detail Working Set information for an Object Displays the pages that make up the object and their relation in the working set. SFT display Displays a single System File Table entry. Detailed Memory Assignment Information Displays detail of several memory analysis displays. Detail of Nonswappable Memory Displays detail of a selected nonswappable memory group. The following panels show the content of displays that are displayed only from the Last Referenced Graphic display: Strip List Displays the list of memory objects surrounding the requested color bar. ═══ 11.6.1. Device Driver Header Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Device Drivers Header Display ═══ This is selected by the hyperblock link of the Header addr field on the Device Drivers display. ═══ Example of the Device Driver Header Display ═══ Device Driver header located at 0778:0000: Next DD header @ 0750:0000 Device attribute = 8080 => CHR LVL=OS/2 Offset to Strategy Routine = 0000 Offset to IDC Routine = 0000 Device name = 'THESEU2$' Code Selector = 0798 Data Selector = 0778 Reserved_3 = 0000 Reserved_4 = 0000 ═══ Contents of the Device Driver Header Display ═══ The fields of the device driver header are displayed as follows: Device Driver header located at ssss:oooo: The address of this device driver header. Next DD header @ ssss:oooo The device drivers are linked together. This is the address of the next one. Device attribute = hhhh => decoded attributes The attributes are printed in hex and then presented in English as follows: CHR Bit 15 - The device is a character device. Otherwise, it is a block device. IDC Bit 14 - The device supports "Inter-device Driver Communication". If this is set, then the IDC Entry Point value must be valid. IBM Bit 13 - The device is non-IBM block format. SHR Bit 12 - The device supports "shared device access checking". OPN Bit 11 - The device supports removable media (block devices) or device open/close (character devices). LVL Bits 9-7 - Function level of support: PC/DOS 000 - PC/DOS device driver. (This should never be seen in OS/2 2.0.) OS/2 001 - OS/2 device driver, which does not support DosDevIOCTL2 packets. IOCTL2 010 - OS/2 device driver, which supports DosDevIOCTL2 and SHUTDOWN request packets. BitStrip 011 - OS/2 device driver, with a Capabilities Bit Strip in the header. ?? Level was not one of the above. The level value is printed. CLK Bit 3 - The device is the CLOCK device. NUL Bit 2 - The device is the NULL device. SCR Bit 1 - The device is the SCREEN (STDOUT). KBD Bit 0 - The device is the KEYBOARD (STDIN). Offset to Strategy Routine = hhhh The offset into the device driver's code segment where the Strategy Routine starts. Offset to IDC Routine = hhhh The offset into the device driver's code segment where the IDC Routine starts. Device name = 'name' The name of the (character) device. Number of units supported = i (integer) The number of units supported by the (block) device. Code Selector = ssss The selector of the code segment. Data Selector = ssss The selector of the data segment. Reserved_3 = hhhh The third "reserved word" in the device driver header. Reserved_4 = hhhh The fourth "reserved word" in the device driver header. Bit Strip = hhhhhhhh The hex value of the Bit Strip and then presented in English: parallel The physical device driver supports parallel ports. 32-bit For character device drivers, this bit is set to 1 if memory addressing above 16MB is supported; that is, support for full 32-bit memory addressability instead of 24-bit memory addressability. For block device drivers, this bit is reserved and must be set to 0. DosDevIOCtl2 The DosDevIOCtl2 and SHUTDOWN request packets are supported. ═══ Related Topics ═══  Memory addressing  Device Drivers ═══ 11.6.2. Description of Linear Object Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Description of Linear Object Display ═══ The Description of Linear Object display is selected by double-clicking mouse button 2, with the pointer over any linear address for which a hyperblock link is defined. If the linear address is not a system arena address, then a process context should be set (by selecting a particular process). If a context is not specified, or the context is sysinit, then the Page Tables for all processes are shown. ═══ Example of the Description of Linear Object Display ═══ Description of Linear Object 1B4A0000, process = 'THESEUSn': It is object # 0002 from module PMDRAG. Arena Record: har pages linear flg next prev link hash hob hal hco / Decoded flags 016F 00000010 1B4A0000 3D9 016E 0170 0000 0000 019D 0000 03D9 / Mapped Reload User Exec Read Hco Object Record: hob har next flgs ownr hmte sown,cnt lt ld st sd / owner / decoded_flags 019D 016F 0000 0838 019B 019B 0000 00 00 00 00 00 / m-PMDRAG / shared exec read user Context Record(s): hco next ptda flgs / process / decoded_flags 03D9 01FB 0290 1C / THESEUSn / read exec user 01FB 0113 01D4 1C / PMEXEC / read exec user 0113 0000 00EF 1D / PMSHELL / read exec user originator Page Table, from 1B4A0000 to 1B4AFFFF: *Linear=1B400000 Physical=0019C000 D=1 A=1 User R/W P=1 Resident pteCnt=0001 long_lock=0000 short_lock=0000 block=00000 flags=0001 fast hob=0067 refCount=0001 relPage=02ED block#=0019C flag=0010 / pf Linear=1B4A0000 FrameId=005CB D=0 A=0 User R/O P=0 hob=019D refCount=0003 relPage=0000 block#=00008 flag=0800 / discardable Linear=1B4A1000 FrameId=005CC D=0 A=0 User R/O P=0 hob=019D refCount=0003 relPage=0001 block#=00009 flag=0800 / discardable Linear=1B4A2000 Invalid page D=0 A=0 Super R/O P=0 Linear addresses 1B4A2000 to 1B4AF000 (14 pages) as last PTE above. ═══ Contents of the Description of Linear Object Display ═══ The information presented on the Description of Linear Object display follows: 1. The linear address and context (denoting a particular process) of the memory object. 2. A high-level statement describing the memory object: It is object # hhhh from module aaaaaaaa. The name of the module (either .EXE or .DLL) and the relative object number within the module. This object number will match the one produced and printed by the linker. It was allocated by aaaaaaaa. This memory was allocated by the indicated module. It is 'aaaaaaaa' (decoded hmte from object record). 'aaaaaaaa' is the name of a system resource, obtained by decoding the hmte. It is 'aaaaaaaa' (decoded owner from object record). 'aaaaaaaa' is the name of a system resource, obtained by decoding the owner. 3. The decoded arena record. 4. The decoded alias record. 5. The decoded object record. 6. The decoded context record(s) (if this is a shared arena address). 7. The decoded Page Table over the linear address range of the object. For each page in the object (PDEs are shown when displaying from a new Page Table), the following items are shown:  The PTE.  The Page Frame Table entry for the PTE (if the page is present).  The Virtual Page Table entry for the PTE. If a context has not been specified, or the context is sysinit, then the Page Tables for all processes are shown. ═══ Related Topics ═══  Memory addressing  Linear addresses  Handles  Memory Management Control Blocks ═══ Page Frame Table entry ═══ The fields of the Page Frame Table entry are decoded: Term Meaning pteCnt=hhhh The number of PTEs that refer to this page as being present. long_lock=hhhh The number of long-term locks outstanding for this page. short_lock=hhhh The number of short-term locks outstanding for this page. block=hhhhh Pager disk frame or loader block number flags=hhhh Flags indicating the status of the page. They are shown as hex and then decoded into ASCII: fast Page is in fast memory. busy Page is busy. free Page is on the free chain. reserved? Reserved bit. ═══ 11.6.3. Description of Segment Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Description of Segment Display ═══ The Description of Segment display is selected by double-clicking mouse button 2, with the pointer over any virtual address or selector for which a hyperblock link is defined. If the virtual address is not a system arena address, then a process context must be set (by selecting a particular process). ═══ Example of the Description of Segment Display ═══ Description of Segment w/ selector = 0010, process = 'system' Descriptor Table Entry: GDT(0010) BTSS32 Base=FFE42DC8 Limit=00067 DPL=0 P=1 G=0 Description of Linear Object FFE42DC8, process = 'system': It is object # 0001 from module DOSCALLS. Arena Record: har pages linear flg next prev link hash hob hal sel / Decoded flags 0007 0000000B FFE3D000 009 0008 0014 0000 0000 0008 0000 0400 / Mapped Object Record: hob har next flgs ownr hmte sown,cnt lt ld st sd / owner / decoded_flags 0008 0007 0000 0000 FFAA 0006 0000 00 00 00 00 00 / os2krnl load image / Page Table, from FFE42DC8 to FFE42E2F: *Linear=FFC00000 Physical=00190000 D=0 A=1 User R/W P=1 Resident pteCnt=0001 long_lock=0000 short_lock=0000 block=00000 flags=0000 hob=0019 refCount=0001 relPage=027F block#=00190 flag=0410 / pf resident Linear=FFE42000 Physical=00009000 D=1 A=1 User R/W P=1 Resident pteCnt=0001 long_lock=0000 short_lock=0000 block=00000 flags=0000 hob=0008 refCount=0001 relPage=0005 block#=00009 flag=0410 / pf resident ═══ Contents of the Description of Segment Display ═══ The information presented on the Description of Segment display follows: 1. The selector and context (denoting a particular process) of the segment. 2. The Descriptor Table Entry for the selector. 3. The linear address and context (denoting a particular process) of the memory object. 4. A high-level statement describing the memory object: It is object # hhhh from module aaaaaaaa. The name of the module (either .EXE or .DLL) and the relative object number within the module. This object number will match the one produced and printed by the linker. It was allocated by aaaaaaaa. This memory was allocated by the indicated module. It is 'aaaaaaaa' (decoded hmte from object record). 'aaaaaaaa' is the name of a system resource, obtained by decoding the hmte. It is 'aaaaaaaa' (decoded owner from object record). 'aaaaaaaa' is the name of a system resource, obtained by decoding the owner. 5. The decoded arena record. 6. The decoded alias record. 7. The decoded object record. 8. The decoded context record(s) (if this is a shared arena address). 9. The decoded Page Table over the linear address range of the object. For each page in the object (PDEs are shown when displaying from a new Page Table), the following items are shown:  The PTE.  The Page Frame Table entry for the PTE (if the page is present).  The Virtual Page Table entry for the PTE. If a context has not been specified, or the context is sysinit, then the Page Tables for all processes are shown. ═══ Related Topics ═══  Memory addressing  Virtual addresses  Linear addresses  Handles  Memory Management Control Blocks ═══ 11.6.4. Description of Physical Object Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Description of Physical Object Display ═══ The Description of Physical Object display is selected by double-clicking mouse button 2, with the pointer over any physical address for which a hyperblock link is defined. ═══ Example of the Description of Physical Object Display ═══ Description of Physical Object 0018F000: Start from the bottom (Page Frame Table) and go up: Page Frame Table entry: pteCnt=0001 long_lock=0000 short_lock=0000 block=00000 flags=0000 Virtual Page Table entry (FrameId=00A9): hob=0014 refCount=0001 relPage=0000 block#=0018F flag=0410 / pf resident Object Record: hob har next flgs ownr hmte sown,cnt lt ld st sd / owner / decoded_flags 0014 0013 0000 0000 FFB1 0000 0000 00 00 00 00 00 / PG Page directory / Arena Record: har pages linear flg next prev link hash hob hal sel / Decoded flags 0013 00000001 FF420000 001 0017 0018 0000 0000 0014 0000 0000 / ============================================================================= Now, go from the top (Arena's) down: See if it is a page in the 'system' arena. ----------------------------------------------------------------------------- Description of Linear Object FF420000, process = 'system': Arena Record: har pages linear flg next prev link hash hob hal sel / Decoded flags 0013 00000001 FF420000 001 0017 0018 0000 0000 0014 0000 0000 / Object Record: hob har next flgs ownr hmte sown,cnt lt ld st sd / owner / decoded_flags 0014 0013 0000 0000 FFB1 0000 0000 00 00 00 00 00 / PG Page directory / Page Table, from FF420000 to FF420FFF: *Linear=FF400000 Physical=00191000 D=0 A=1 User R/W P=1 Resident pteCnt=0001 long_lock=0000 short_lock=0000 block=00000 flags=0000 hob=0019 refCount=0001 relPage=027D block#=00191 flag=0410 / pf resident Linear=FF420000 Physical=0018F000 D=1 A=1 User R/W P=1 Resident pteCnt=0001 long_lock=0000 short_lock=0000 block=00000 flags=0000 hob=0014 refCount=0001 relPage=0000 block#=0018F flag=0410 / pf resident ============================================================================= The page in each Process context in which it exists. ═══ Contents of the Description of Physical Object Display ═══ The page address specified is described in three ways:  From the Page Frame Table, looking up through the Virtual Page Table to an object record to an arena record.  From the system arena, looking down through the arena record to the object record and Page Table.  From the shared and private arenas of each process, looking down through the arena record to the object record and Page Table. The information presented on the Description of Physical Object display follows: 1. The physical address of the page being "described." 2. The Page Frame Table entry for the page. 3. The Virtual Page Table entry for the page. 4. The decoded object record. 5. The decoded arena record. 6. The linear address and context (denoting a particular process) of the memory object. 7. A high-level statement describing the memory object: It is object # hhhh from module aaaaaaaa. The name of the module (either .EXE or .DLL) and the relative object number within the module. This object number will match the one produced and printed by the linker. It was allocated by aaaaaaaa. This memory was allocated by the indicated module. It is 'aaaaaaaa' (decoded hmte from object record). 'aaaaaaaa' is the name of a system resource, obtained by decoding the hmte. It is 'aaaaaaaa' (decoded owner from object record). 'aaaaaaaa' is the name of a system resource, obtained by decoding the owner. 8. The decoded arena record. 9. The decoded alias record. 10. The decoded object record. 11. The decoded context record(s) (if this is a shared arena address). 12. The decoded Page Table over the linear address range of the object. For each page in the object (PDEs are shown when displaying from a new Page Table), the following items are shown:  The PTE.  The Page Frame Table entry for the PTE (if the page is present).  The Virtual Page Table entry for the PTE. Items 6-11 are repeated for every process that has the specified page in its Page Tables. ═══ Related Topics ═══  Memory addressing  Linear addresses  Physical addresses  Handles  Memory Management Control Blocks ═══ 11.6.5. Detail for System Owner Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Detail for System Owner Display ═══ This is selected by a hyperblock link from the owner column of the Kernel Memory Usage display. ═══ Example of the Detail for System Owner Display ═══ Detail Kernel Memory assignment information, owner = FF6B: This owner is 'allocated via devhlp AllocPhys'. There are 2 objects which make up this System Owner. 1. Object at linear address 7C673000, pages present = 640. 2. Object at linear address 7D0BD000, pages present = 16. ═══ Contents of the Detail for System Owner Display ═══ One line is displayed for each memory object that makes up the specified system owner: i. Object at linear address llllllll, pages present = nnn. The base linear address of the memory object. The letter i indicates the line number in the list. The nnn is the number of pages that are present in RAM for this object. ═══ Related Topics ═══  Memory addressing  Linear addresses  Memory Management Control Blocks  System Memory Usage ═══ 11.6.6. Alias Record Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Alias Record Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Alias Record Display ═══ Alias records are displayed by selecting a hyperblock link from a hal field of some display. ═══ Example of the Alias Record Display ═══ A "CS_alias" alias record looks like: hal har CS flags count DS / Decoded flags 003E 0ACB 006E 13 001 D446 / CS_alias DS_is_valid A "MemMapAlias" alias record looks like: hal har ptda flags count DS / Decoded flags 003E 0ACB 006E 15 001 D446 / MemMapAlias DS_is_valid A "VM" alias record looks like: hal har ptda flags offset / Decoded flags 0006 0638 008D 021 0000 / DevHlp ═══ Contents of the Alias Record Display ═══ The alias record displayed contains the following entries: Column Meaning hal The hal of the displayed alias record. har The har of the arena record for the memory object that this alias is for. CS Code Selector ptda Context this alias is created from. flags Flags for the record. They are decoded at the end of the line. count Reference count DS Data Selector offset Page offset of the alias from the start of the object. Decoded flags The flags are decoded into readable form: CS_alias The alias is for a Code Selector (CS) alias. MemMapAlias The alias is for a PTDA alias. (Neither of the above two) The alias is a Virtual Memory (VM) alias. Debug The alias is for a debugger. DS_is_valid The data field is valid. DevHlp The alias is for a DevHlp allocated memory. Privatized ??? VDM The alias is for a Virtual Dos Machine (VDM). UVIRT_mapping_in_VDMs ??? ═══ Related Topics ═══  Memory Management Control Blocks  Handles ═══ 11.6.7. Arena Record Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Arena Record Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Arena Record Display ═══ Arena records are displayed by selecting a hyperblock link from a har field of some display. ═══ Example of the Arena Record Display ═══ A private arena record looks like: har pages linear flg next prev link hash hob hal ptda / Decoded flags 0252 00000020 00010000 1D9 0243 024D 0000 0000 025F 0000 0301 / Mapped Reload User Exec Read A shared arena record looks like: har pages linear flg next prev link hash hob hal hco / Decoded flags 02C5 00000010 1AB60000 369 02AE 0005 0000 0000 030F 0000 04E2 / Mapped Write User Read Hco A system arena record looks like: har pages linear flg next prev link hash hob hal sel / Decoded flags 0210 00000400 7C000000 001 0272 0004 0000 007A 0270 0000 0000 / ═══ Contents of the Arena Record Display ═══ The arena record displayed contains the following entries: Column Meaning har The har of the displayed arena record. pages The number of pages allocated in the memory object. The number of committed pages may be less than this. linear The linear address of the start of the memory object. flg Flags to indicate the status of the memory Object. They are decoded into English at the end of the line. next The next arena record in the doubly linked chain. The arena records are linked in ascending order of the linear address of the memory object. prev The previous arena record in the doubly linked chain. link The har of an arena record that is an alias for the memory object. hash Link to hash table. hob The hob of the object record associated with this memory object. hal Alias record handle. ptda (private arena) The hob of the PTDA of the process that owns the memory object. hco (shared arena) The first hco in a chain of context records for the memory object. sel (system arena) The GDT selector that points to the memory object. Decoded flags The flags are decoded into readable form: Mapped A selector maps this memory object. Reload Loader flag. Write The object is writable. User The object has user pages Exec The object has executable pages. Read The object has readable pages Hco For a shared arena record, this indicates that there is an entry in the hco field. Guard The object has guard pages. SGS The object is registered under Screen Group Switch control. ═══ Related Topics ═══  Memory Management Control Blocks  Handles ═══ 11.6.8. Object Record Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Object Record Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Object Record Display ═══ Object records are displayed by selecting a link from a hob field of some display. ═══ Example of the Object Record Display ═══ A real memory object looks like: hob har next flgs ownr hmte sown,cnt lt st / owner / decoded_flags 0252 0259 0000 0838 025F 025F 0000 00 00 00 / m-THESEUSn / shared exec read user A pseudo-object looks like: hob linear flgs ownr hmte sown,cnt lt st / owner / decoded_flags 0294 7D3211D0 8000 FFE1 025F 0000 00 00 00 / VM arena header / Pseudo-object ═══ Contents of the Object Record Display ═══ The object record displayed contains the following entries: Column Meaning hob The hob of the displayed object record. har The har of the arena record associated with this object record. next The next object record in the chain for this memory object. linear The linear address of the pseudo-object. flgs Flags to indicate the status of the memory object. They are decoded into English at the end of the line. ownr Objects have owners. This is the hob of the owner. hmte The hmte that allocated the memory object. sown ID of thread owning the semaphore. cnt Counter and waiting flag associated with sown. lt Number of long-term locks that are outstanding. st Number of short-term locks that are outstanding. owner The name of the owner in ASCII. decoded_flags The flags are decoded into readable form: Pseudo-object The object is a pseudo-object. The linear address of the object is contained in the object record. API_allocated_object Object was allocated by an application. lock Some thread to wake in VMUnlock. aliases The object has aliases. shared The object's contents are shared. UVirt UVirt object. zero-init Object is zero-initialized. resident The object is to remain resident. It is not allowed to be paged out. low memory The object's memory is to be allocated from low memory. guard The object has guard pages. exec The object has executable pages read The object has readable pages user The object has user pages. write The object has writable pages. ═══ Related Topics ═══  Memory Management Control Blocks  Handles ═══ 11.6.9. Context Record Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Context Record Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Context Record Display ═══ Context records are displayed by selecting a hyperblock link from an hco field of some display. ═══ Example of the Context Record Display ═══ hco next ptda flgs / process / decoded_flags 0472 02C6 0283 16 / THESEUSn / read user write ═══ Contents of the Context Record Display ═══ The context record displayed contains the following entries: Column Meaning hco The hco of the displayed context record. next The hco of the next context record in the chain. The last context record has a next field of 0000. ptda The hob of the PTDA which has access to the shared memory object. flgs The flag byte is presented in hex. It is decoded into English at the end of the line. process The name of the process referred to by the PTDA handle. decoded_flags The flags are decoded into readable form: privatized The context is privatized. guard The object has guard pages. read Object is readable from this process. exec Object is executable from this process. user The object has user pages. write Object is writable from this process. originator This process that originally allocated the object. ═══ Related Topics ═══  Memory Management Control Blocks  Handles ═══ 11.6.10. Virtual Page Table Entry Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Virtual Page Table Entry Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Virtual Page Table Entry Display ═══ Virtual Page Table entries are displayed by selecting a hyperblock link from a vp field of the Page Frame display. They also appear a number of other displays. ═══ Example of the Virtual Page Table Entry Display ═══ Virtual Page Table entry at FF40F064: hob=0007 refCount=0001 relPage=0001 block#=00002 flag=0410 / pf resident ═══ Contents of the Virtual Page Table entry display ═══ The fields of the Virtual Page Table entry are decoded: Term Meaning hob=oooo The hob of the memory object that this page is a part of. refCount=hhhh The number of objects that refer to this page. relPage=hhhh The relative page number within the object. block#=hhhhh Pager disk frame or loader block number for pages which are not in RAM. The physical page number of pages which are in RAM. flag=hhhh Flags indicating the status of the virtual page. They are shown as hex and then decoded into ASCII: busy Page semaphore is taken. wanted Page semaphore has been requested. cache Search page cache for the page. pfidle Cross linked to an idle page frame. pf Cross linked to a page frame. swapped Has a swap file disk frame. dirty Page contents have been written to. shdirty Shadow dirty bit (for VDMs). sow Change to swappable on write. resident Cannot be moved or paged. discardable Page is discardable. ═══ Related Topics ═══  Memory addressing  Handles ═══ 11.6.11. MTE Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the MTE Display ═══ This is selected by a hyperblock link from the MTE @ column of the Modules display. ═══ Example of the MTE Display ═══ Resident portion of MTE (@ FEB717E8): Use count = 1 Number of entries in Imp Mod Name Tbl = 5 Module name @ FEB71820 -> THESEUSn Module pointers table @ FEB71808 Handle of the mte = 0345 File system number for open file = 0077 Link to next mte = FEB71B18 Link to swappable mte = FE5BA250 Signature = LX Flags = 04903142 Class = Program File Media permits discarding Program module Swappable portion of MTE (@ FE5BA250): Module # pages = 0000003C Initial instruction pointer = 0001:00026634 Initial stack pointer = 0002:0001B100 Fixup section size = 00009440 Object table offset = FE5BA305 Number of objects in module = 00000002 Object page map offset = FE5BA335 Object iterated data map offset = 00000000 Offset of Resource Table = 00000000 Number of resource entries = 00000000 Offset of resident name table = FE5BA515 Offset of Entry Table = FE5BA521 Offset of Fixup Page Table = FE5BA522 Offset of Fixup Record Table = FE5BA616 Offset of Import Module Name Table = FE5C393D Offset of Imp Procedure Name Table = FE5C3962 Offset of Enumerated Data Pages = 00009800 Number of preload pages = 00000000 Offset of Non-resident Names Table = 00044400 Size of Non-resident Name Table = 00000042 Object # for automatic data object = 00000002 Offset of the debugging info = 00000000 The length of the debug info in bytes = 00000000 Number of instance pages in preload section = 00000000 Use for converted 16-bit modules = 00000000 (heapsize) Full pathname = FE5BA2EC -> E:\THESEUSn\THESEUSn.EXE Length of pathname = 0018 Used by dynamic trace = 0000 Count of threads waiting on MTE semaphore = 0 Slot number of the owner of the MTE semaphore = 0000 Pointer to preload pages = 00000000 Start of object with preload pages = FDD09000 Size of object with preload pages = 00000000 Pointer to file cache for Dos32CacheModule= 00000000 Use for converted 16-bit modules = 0000 (alignshift) Use for converted 16-bit modules = 0000 (stacksize) Original flags from NE header = 0000 expver from NE header = 0000 exetype from NE header = 0000 Original other flags from NE header = 0000 Number of preload pages used = 00 Object Table: Obj# address size hob sel page map map size flags / flags... 0001 00010000 0002A579 035D 000F 00000001 0000002B 80002025 / readable executable shared 32-bit 0002 00040000 0001B100 0000 0027 0000002C 00000011 80002003 / readable writeable 32-bit ═══ Contents of the MTE Display ═══ The MTE is in two sections: resident and swappable. They are displayed as follows: The resident portion of the MTE is as follows: Resident portion of MTE (@ llllllll): The linear address of the resident portion of the MTE. Use count = i Number of times a DosLoadModule function has been done for this module. Number of entries in Imp Mod Name Tbl = i Number of entries in Import Module Name Table. Module name @ llllllll -> 'name' The linear address of the module name, followed by the name in ASCII. (Only the linear address is in the MTE; THESEUS retrieves the contents of the ASCII string that is pointed to.) Module pointers table @ llllllll Pointer to the Module Pointers Table. Handle of the mte = oooo The hob of this MTE. File system number for open file = hhhh System file number for the open .EXE or .DLL program file. Link to next mte = llllllll Linear address of the next MTE in the chain. Link to swappable mte = llllllll Linear address of the swappable portion of this MTE. Signature = aa The signature indicates the type of the module. NE = 16-bit segmented module. (Built by the old linker.) LX = 16 or 32-bit module. (Build by the new linker.) Flags = hhhhhhhh Module flags. The relevant flags are decoded on the following lines. The swappable portion of the MTE is as follows: Swappable portion of MTE (@ llllllll): The linear address of the swappable portion of the MTE. Module # pages The number of pages in the module. Initial instruction pointer = ssss:oooooooo ssss is the module-relative segment/object number where the initial entry point is located. oooooooo is the offset within the segment/object of the entry point. (The module type determines whether the ssss is segment or object.) This address will match the address on the .MAP file produced by the linker. Initial stack pointer = ssss:oooooooo ssss is the module-relative segment/object number where the initial stack is located. oooooooo is the offset within the segment/object of the stack. (The module type determines whether the ssss is segment or object.) This address will match the address on the .MAP file produced by the linker. Fixup section size = hhhhhhhh Number of bytes in the "fixup" section of the module. Object table offset = llllllll Linear address of the Object Table. Number of objects in module = hhhhhhhh Number of segments/objects in the module. Object page map offset = llllllll Linear address of the Object Page Map. Object iterated data map offset = hhhhhhhh ??? Offset of Resource Table = llllllll Linear address of the modules Resource Table. Number of resource entries = hhhhhhhh Number of entries in the Resource Table. Offset of resident name table = llllllll Linear address of the Resident Name Table. Offset of Entry Table = llllllll Linear address of the Entry Table. Offset of Fixup Page Table = llllllll Linear address of the Fixup Page Table. Offset of Fixup Record Table = llllllll Linear address of the Fixup Record Table. Offset of Import Module Name Table = llllllll Linear address of the Import Module Name Table. Offset of Imp Procedure Name Table = llllllll Linear address of the Import Procedure Name Table. Offset of Enumerated Data Pages = hhhhhhhh ??? Number of preload pages = hhhhhhhh Number of pages which have been marked "preload" by the linker. Offset of Non-resident Names Table = hhhhhhh ??? Size of Non-resident Name Table = hhhhhhhh ??? Object # for automatic data object = ssssssss Segment/object number that contains the automatic data object. Offset of the debugging info = hhhhhhhh ??? The length of the debug info in bytes = hhhhhhhh The size of the debug information in bytes. Number of instance pages in preload section = hhhhhhhh Number of instance pages that are to be preloaded. Use for converted 16-bit modules = hhhhhhhh (heapsize) Size of the heap. Full pathname = llllllll -> 'file name' Linear address of the fully qualified file name, followed by the fully qualified file name. (Only the linear address is in the MTE; THESEUS retrieves the contents of the ASCIIZ string that is pointed to.) Length of pathname = hhhh Length (in bytes) of the path name. Used by dynamic trace = hhhh ??? Count of threads waiting on MTE semaphore = i ??? Slot number of the owner of the MTE semaphore = hhhh ??? Pointer to preload pages = hhhhhhhh ??? Start of object with preload pages = hhhhhhhh ??? Size of object with preload pages = hhhhhhhh ??? Pointer to file cache for Dos32CacheModule= hhhhhhhh ??? Use for converted 16-bit modules = hhhh (alignshift) ??? Use for converted 16-bit modules = hhhh (stacksize) ??? Original flags from NE header = hhhh ??? expver from NE header = hhhh ??? exetype from NE header = hhhh ??? Original other flags from NE header = hhhh ??? Number of preload pages used = hh ??? Following this is either a Segment Table or Object Table, depending on the module type. Each line of an Object Table contains the following: Obj# Module relative number of the object. This will match the linker's output. address Linear address of the object in memory. size Size of the object in bytes. hob The hob assigned to the object. sel Selector in the LDT assigned to this object. (This is only for 16-bit compatibility.) page map ??? map size ??? flags Flags for this object. They are decoded to the right. Each line of a Segment Table contains the following: Seg# Module relative number of the segment. This will match the linker's output. file offset Location of the segment in the file on disk. The interpretation of this depends on the "file granularity" specified to the linker. file size The size, in bytes, of the segment within the file. flag Flags for this segment. They are decoded to the right. ram size The size, in bytes, of the segment after being loaded into RAM. hob The hob assigned to the segment. sel Selector in the LDT assigned to this object. fixups ??? ═══ Related Topics ═══  Memory Management Control Blocks  Memory addressing ═══ 11.6.12. TCB Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the TCB Display ═══ This is selected by a hyperblock link from the TCB column of a display. ═══ Example of the TCB Display ═══ Thread Control Block at FD423E78: TCB Linkage Information: TID = 0001, Thread slot number = 0028 Forced action bit vector = 00000000 PTDA @ 7D3234E0 TSD @ 7D145000, TIB @ 00060030 Forward link to next (active) TCB = 00000000 Dos32CreateThread stack parameters: Virtual size of stack object = 00000000 Committed size of stack object = 00000000 Virtual base of stack object = FFFFFFFF Libi load data area link head @ 00000000 Libi load data area link current @ 00000000 Libi load data area link free @ 00000000 Stack frame type = FFF3CCCC Stack frame base pointer = 7D145F3C Local context hook head = FD423EB0, 00000000 Information needed for context switching: KStack page 0 of TCB = 0065D203 KStack page 1 of TCB = 0063C203 KStack TSD page = 005AA203 KStack page 0 of PTDA = 00000000 KStack page 1 of PTDA = 00000000 KStack page 2 of PTDA = 00623203 SS-relative offset of Current TCB = 00009288 SS-relative offset of Current TSD = 00004410 stack-to-flat TCB conversion value = FD41ABF0 stack-to-flat TSD conversion value = 7D140BF0 Variables used in the file system: User's I/O transfer address = 03F05E70 Position of first sector accessed within the file = 00000000 Pointer to SFT we're working with = 00000000 Number of valid (previously written) sectors = 0000005E Redirector TCB (Used by LANMAN) = 05C10000 Process ID for file sharing checks = 0000 User ID for file sharing checks = 0000 non-zero ==> no redirection = 00 see SetAttrib/file.asm = 00 JFN flag bits for current file handle = 1C Allowed I 24 answers (see allowed_) = 00 Fields to support opportunistic locks. These are set by the server. Server's per file cookie = 00120000 Whether server wants oplock, etc. = FFFFEF4F Variables used by the FAT file system. These are specific for the FAT file system and are not used for any IFS. Currently assigned buffer = FFFF0000 Handle of current VPB = 0005 TCBNextAdd = 001D Position of first byte within sector = 0000 TCBClusNum = 0000 TCBLastPos = 0101 Number of bytes in 1st sector = 0000 # of bytes in last sector = 003E Number of whole sectors = 0000 Position of first sector within cluster = FFFFFFF4 How to handle a HardError = 02 Action response from user on HardError = 01 NZ if TCBLockHndl is valid = 00 Lock Handle of user mem = D9 02 0C 06 D4 50 30 00 40 FF 00 00 Address of current CDS = 000051FA Address of current FSC = 000051F4 NZ if user did FAIL on I 24 = 0000 16bit addr of the ramsem blocked upon = 072306E0 Debugger display address fo ksems = FFFFFFFF Per-thread NPX Information: buffer @ 7CAD5EA0 TKWaitThread fields: Next waiting TCB = 00000000 Threads waiting for me to die = 00000000 Scheduler fields: Scheduler queue location (actual) = 05 Current scheduler state (desired) = 05 TKSleep/TKWakeup flags = 00 Window Boost count = 01 Priority Class (user) = 02 Priority Level (user) = 00 Priority Class modifier bits = 60 Misc. Scheduler flags = 00 Calculated Priority = 0500 Minimum Scheduling priority = 0000 Kernel Boost Lock nesting count = 00000000 Next priority queue in chain = FD423E78 Previous priority queue in chain = FD423E78 Higher priority thread = FD423E78 Lower priority thread = FD423E78 Next same-priority thread = FD423E78 Previous same-priority thread = FD423E78 TKQueryWakeup TCB list = 00000000 Sleep ID this TCB is sleeping on = FFFE0064 Timeout/Starvation Timeout element = ???? Used by the loader (TCBCheckedSig) = 01 Per-thread Swapper Information: Status of swapping = 00 Info about nesting level in FSH_DoVolIO: Nesting level of FSH_DoVolIO = 00 Device I/O fields: Flag to indicate if request pkt in use = 00 I/O request packet for thread = 01000000 ═══ Contents of the TCB Display ═══ No additional explanation is available. ═══ Related Topics ═══  Memory Management Control Blocks  Memory addressing ═══ 11.6.13. Detail Working Set Information for an Object Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Detail Working Set Information for an Object Display ═══ This is selected by a hyperblock link from the accessed - yes column of the Detail of Working Set (by Object) display. ═══ Example of the Detail Working Set Information for an Object Display ═══ Details of Working Set for Object with hob = 0429, Process = 'THESEUSn': It is (shared) object # 0001 of module THESEUSn. linear physical time status 00010000 00639000 1 in Working Set 00011000 00060000 not in Working Set 00012000 003BF000 1 in Working Set 00013000 0047E000 1 in Working Set 00014000 00058000 1 in Working Set 00015000 00895000 1 in Working Set 00016000 0070B000 3 in Working Set 00017000 001F6000 1 in Working Set 00018000 006B0000 not in Working Set 00019000 00096000 not in Working Set 0001A000 00072000 not in Working Set 0001B000 003BC000 not in Working Set 0001C000 0048A000 not in Working Set 0001D000 not in memory 0001E000 not in memory 0001F000 not in memory 00020000 not in memory 00021000 005C3000 1 in Working Set 00022000 not in memory 00023000 not in memory linear physical time status 00024000 not in memory 00025000 0043D000 not in Working Set 00026000 not in memory 00027000 not in memory 00028000 00488000 1 in Working Set 00029000 0024E000 1 in Working Set 0002A000 002E3000 1 in Working Set 0002B000 002D9000 not in Working Set 0002C000 005F0000 not in Working Set 0002D000 00186000 not in Working Set 0002E000 005CD000 1 in Working Set 0002F000 not in memory 00030000 00444000 not in Working Set 00031000 00363000 not in Working Set 00032000 0004B000 1 in Working Set 00033000 00487000 1 in Working Set 00034000 00474000 1 in Working Set 00035000 00340000 not in Working Set 00036000 00190000 1 in Working Set 00037000 0018E000 1 in Working Set linear physical time status 00038000 009E7000 1 in Working Set 00039000 0034D000 1 in Working Set 0003A000 004C3000 1 in Working Set 0003B000 00699000 not in Working Set 0003C000 009F2000 1 in Working Set ═══ Contents of the Detail Working Set Information for an Object Display ═══ One line is displayed for each committed page within the object: Column Meaning linear The linear address of the page. physical The physical address of the page. time The number of intervals since the page was last accessed. status The status of the page relative to the working set: in Working Set The page was in memory and was accessed sometime within the working set interval. not in Working Set The page was in memory but was last accessed outside the working set interval. not in memory This is a committed page that was not in RAM during the run. ═══ Related Topics ═══  Memory analysis  Memory addressing ═══ 11.6.14. SFT Entry Display ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the SFT Entry Display ═══ This is selected by a hyperblock link of the SFT address field on the Open Files display. ═══ Example of the SFT Entry Display ═══ System File Table Entry located at 03F8:30A6: Base portion of the SFT entry: Reference count = 1 User count = 0 Flag word 1 = 0040 / local file 40 Flag word 2 = 0000 / Device pointer = 00000012 File System Control (FSC) block @ 0000FF40 'cookie' = 00000000 Next in chain = 0000:0000 Master File Table (MFT) entry @ FEB62FA0 File system dependent portion of the SFT: File system independent portion of the SFT: Access mode = 00A0 Additional openmode bits for DosOpen2 = 0000 handle of volume = 0012 Creation time of file = 0000 Creation date of file = 0000 Time of last access of file 0000 Date of last access of file 0000 Time of last modification of file = 5C4A Date of last modification of file = 1913 Size associated with file = 0003910D Read/Write pointer or LRU count for FCBs = 000060A1 User ID = 0000 Process ID = 00FF Process Data Block = 0000 SFN of this sf_entry = 0062 update time stamp flags = 00 file/device/named-pipe/FCB = 0000 performance counter data block pointer = 00000000 DOS attributes of file(sys,hid,r/o,arch = 20 Used for spooling: 16 bit offset to first pending LOCK record = 0000 SFN of named pipe for spooled files = 0000 Current codepage (font) for data in file = 0 ═══ Contents of the SFT Entry Display ═══ No additional explanation is available. ═══ Related Topics ═══  Memory addressing ═══ 11.6.15. Detailed Memory Assignment Information ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Detailed Memory Assignment Information Display ═══ This is selected by a hyperblock link of the RAM amount field on the Free, Idle, and Locked Memory display or the RAM Usage by Process display. ═══ Example of the Detailed Memory Assignment Information Display ═══ There are two different formats of the information displayed, one for Locked memory and one for all the other types. The detail of locked memory is: Detail memory assignment information, PID = 0000, Process = system: giving detail about Long Term Locked memory: 0012F000 is Long Term Locked, count = 1. 004EB000 is Long Term Locked, count = 1. 00510000 is Long Term Locked, count = 5. 00670000 is Long Term Locked, count = 1. ··· The detail of other type memory is: Detail memory assignment information, PID = 0000, Process = system, giving detail about IDLE memory: 0009C000 is assigned as IDLE 001D1000 is assigned as IDLE 001E8000 is assigned as IDLE 001ED000 is assigned as IDLE, page is dirty ··· ═══ Contents of the Detailed Memory Assignment Information Display ═══ The free and idle detail lists are presented in the order they are linked into the chain. If an idle page is dirty, it is indicated as such. The locked detail lists are presented in physical page address order. The lock count from the Page Frame Table is given. This count specifies the number of times that Device Drivers have locked the particular page. ═══ Related Topics ═══  Memory addressing  Physical Memory States ═══ 11.6.16. Detail of Nonswappable Memory ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Detail of Nonswappable Memory Display ═══ When you select the link from the nonswappable memory bytes column of the Nonswappable Memory display, detail about the specified Nonswappable memory group will be displayed. ═══ Example of the Detail of Nonswappable Memory Display ═══ This is from a freshly booted ThinkPad 720C with 16M RAM and 160M hardfile, running OS/2 Warp, using the "Easy Installation" option. Detail of Nonswappable Memory 'Apps & DLLs': Following entries are from 'Private Arenas': Following entries are from the 'Shared Arena': Object Resident Locked Process address har memory memory PID name Description 13A90000 0236 00000000 00003000 0002 PMSHL32 IBMDEV32 #0001 (shared data) 13AA0000 0235 00000000 00001000 0002 PMSHL32 IBMDEV32 #0002 (shared data) 1B780000 0233 00000000 00001000 0002 PMSHL32 IBMDEV32 #0004 (shared code) 1BD00000 01C3 00000000 00002000 0002 PMSHL32 PMMERGE #0004 (shared code) 1BDF0000 01C2 00000000 00002000 0002 PMSHL32 PMMERGE #0005 (shared data) Detail of Nonswappable Memory 'Process overhead': Object Resident Locked Process address har memory memory PID name Description 1BFE0000 0073 00000000 00001000 0002 PMSHL32 infoseg (local or global) (owner) 1BFF0000 0071 00000000 00001000 0002 PMSHL32 infoseg (local or global) (owner) A9447000 035D 00004000 00000000 0006 THESEUSn SEL LDT (owner) A9627000 01AE 00000000 00001000 0002 PMSHL32 SEL LDT (owner) ABCD9000 008A 00004000 00000000 0000 system TK TSD (owner) ABDD8000 0089 00006000 00000000 0000 system TK TCB (owner) ABDF8000 0088 00002000 00000000 0000 system TK PTDA (owner) AC800000 0028 00030000 00000000 0000 system PG Compat. region page table (owner) FF150000 001E 00005000 00000000 0000 system PG Compat. region page table (owner) Now the overhead for each process: PTDA Process PTDA TCB LDT Page_Table linear name size size size size FFE4AA0C sysinit 000005F4 00000B18 00000000 00009000 ABDF8020 PMSHL32 000005F4 00002A28 00005000 0000A000 ABDF8614 HARDERR 000005F4 000006A8 00000000 00006000 ABDF8C08 PMSPOOL 000005F4 000008E0 00000000 00000000 ABDF91FC PMSHL32 000005F4 00001AA0 00000000 0000B000 ABDF97F0 THESEUSn 000005F4 00000238 00000000 0000D000 ======== ======== ======== ======== Totals 000023B8 000061A0 00005000 00031000 Detail of Nonswappable Memory 'File system': Object Resident Locked address har memory memory Description AB244000 00B1 00042000 00000000 file system buffer (owner) AB286000 0076 0018D000 00000000 file system buffer (owner) ABED7000 0077 00002000 00000000 Named pipe NP segment (owner) ABEE7000 0078 00001000 00000000 record lock record owner (owner) ABEF7000 007A 00003000 00000000 system file table (owner) ABF07000 0079 00001000 00000000 system file table (owner) ABF20000 0339 00003000 00000000 FindNotify global segment (owner) ═══ Contents of the Detail of Nonswappable Memory Display ═══ The information presented on the Detail of Nonswappable Memory display is as follows: 1. For the Apps & DLLs detail, the private arena memory object are presented, followed by the shared arena memory objects. 2. For the Process overhead detail, the memory objects are presented in linear address order and then each process is shown with its resident/locked memory usage. 3. For all the other details, the memory objects are presented in linear address order. One line is displayed for each memory object: Column Meaning Object address The linear address of the start of the memory object. har The har of the arena record associated with this object record. Resident memory The number of bytes in hexadecimal of memory marked resident for this memory object. Locked memory The number of bytes in hexadecimal of memory marked locked for this memory object. PID The PID of the process which owns this memory object. Process name The name of the process which owns this memory object. Description A description in English of the memory object. For the "Process overhead": Column Meaning PTDA linear The linear address of the PTDA. Process name The name of the process. PTDA size The amount of RAM consumed by the PTDA in hexadecimal bytes. PTDas are always resident. TCB size The amount of RAM consumed by the TCBs in hexadecimal bytes. TCBs are always resident. LDT size The amount of RAM consumed by the resident/locked portion of the LDT in hexadecimal bytes. Page_Table size The amount of RAM consumed by the resident/locked portion of the Page Tables in hexadecimal bytes. ═══ Related Topics ═══  Memory addressing  Nonswappable Memory display ═══ 11.6.17. Strip List ═══ Select one: Contents of Display Selecting Example Output Related Topics ═══ Selecting the Strip List Display ═══ This is selected by double clicking mouse button 1 after selecting a color bar on the Last Referenced Graphic display. It shows the memory objects surrounding the selected bar. ═══ Example of the Strip List Display ═══ Memory Objects around 00500000 for process = 'THESEUSn': Linear Size Description This memory object includes the preceeding bar. 000E0000 4096K THESEUSn allocated it 004E0000 64K THESEUSn allocated it 004F0000 64K HELPMGR allocated it This memory object starts at the requested bar. 00500000 64K HELPMGR allocated it 00510000 256K HELPMGR allocated it 00550000 256K HELPMGR allocated it 00590000 64K PMWIN allocated it 005A0000 64K PMGPI allocated it 005B0000 64K PMGPI allocated it 005C0000 256K PMGPI allocated it This memory object starts at the following bar. 00600000 64K PMGPI allocated it 00610000 256K PMGPI allocated it 00650000 256K THESEUSn allocated it 00690000 384K THESEUSn allocated it 006F0000 2752K THESEUSn allocated it ═══ Contents of the Strip List Display ═══ There is one line displayed for each memory object surrounding the requested bar: Column Meaning Linear The linear address of the memory object. Size The size in decimal kilobytes of the memory object. Description A description in English of the memory object. ═══ Related Topics ═══  Memory addressing  Last Referenced Graphic ═══ 11.7. Common Elements ═══ This section describes items common to several of the displays. Displays are: Descriptor Table Entry Displays fields of the entries in the GDT, LDT, and IDT displays. Page Table Entry/Page Directory Entry Displays fields of the entries in the Page Table Entry/Page Directory Entry displays. ═══ 11.7.1. Descriptor Table Entry ═══ The fields of the Descriptor Table Entry are decoded. (See the Intel 80386 Programmer's Reference Manual for details about each field.) Term Meaning Table This is either GDT, LDT, Trap, or Int. (number) For GDT and LDT, this is the selector referring to this entry. For Trap, this is the trap number referring to this entry. For Int, this is the interrupt number referring to this entry. Type Type of selector: Code Code segment Data Data segment ATSS16 Available Task State Segment - 286 mode ATSS32 Available Task State Segment - 386 mode BTSS16 Busy Task State Segment - 286 mode BTSS32 Busy Task State Segment - 386 mode LDT Selector that points to an LDT CallG Call Gate - 286 mode CallG32 Call Gate - 386 mode TaskG Task Gate IntG Interrupt Gate - 286 mode IntG32 Interrupt Gate - 386 mode TrapG Trap Gate - 286 mode TrapG32 Trap Gate - 386 mode. Base Base address (linear) of the segment. Limit Length (-1) of the segment. (For "expand up" segments, this is the largest offset that may be used. For "expand down" segments, this is the smallest offset that may be used.) DPL Descriptor Privilege Level (2 bits). CF Code segment is "Conforming" (0=not conforming, 1=conforming). R Code segment is "Readable" (0=not readable, 1=readable). ED Data segment is "Expand Down" (0=expand up, 1=expand down). W Data segment is "Writable" (0=not writable, 1=writable). A Segment has been Accessed (0=not accessed, 1=accessed) P Segment is Present (0=not present, 1=present). G Granularity of limit value (0=byte (64K segment), 1=page (4G segment)). D Code segment default operand size (0=16-bit, 1=32-bit). B Data segment default size (0=16-bit, 1=32-bit). Selector Selector of gate's target segment. Offset Offset within selector of target code. Word Count Number of words on stack to be copied. Alias The selector is an "alias". ═══ 11.7.2. Page Table Entry/Page Directory Entry ═══ The fields of the Page Table Entry or Page Directory Entry are decoded. (See the Intel 80386 Programmer's Reference Manual for details about each field.) Term Meaning * The asterisk (*) in the first column indicates a PDE. Linear The linear address associated with the entry. Physical The physical address of the page in memory. (The page is present.) Invalid page The entry indicates that there is no committed page for this address. Guard The page is a "guard page". FrameId The index into the Virtual Page Table for the page. (The page is not present.) D The page is "Dirty" (0=clean, 1=dirty). A The page has been "Accessed" (0=not accessed, 1=accessed). User The page is a "User page". The page can be accessed from any protection ring. Super The page is a "Supervisor page". The page can only be accessed from ring 0. R/W The page can be written. R/O The page can only be read. P The page is "Present" (0=not present, 1=present). Resident The page is not to be paged out nor discarded. UVirt The page is a UVirt page. Cache_disabled ??? Cache_write-through ??? ═══ 12. Application Programming Interface ═══ THESEUS provides an Application Programming Interface (API) for certain of its functions. These are provided with the THESEUS0.DLL file. CAUTION: These functions should only be used by a single thread of an application. They use the Microsoft** compiler's DLL library and it is probably not compatible with CSet/2*'s multi-thread environment. The functions provided by THESEUS0.DLL can be accessed from either a 'C' program or REXX. ═══ 12.1. Restriction ═══ You may not distribute the THESEUS0.DLL program with any product you develop unless you have a Software Technology License Agreement with IBM for the THESEUS0.DLL program. ═══ 12.2. 'C' Application Programming Interface ═══ The functions provided by THESEUS0.DLL are divided into the following categories: Error Handling, Initialization/Termination, and Handle Management Functions to handle errors, cause THESEUS0.DLL to initialize and terminate and THESEUS0 handle management. Free Memory, Swapper, and Process Functions Functions to determine information about the system as a whole. Working Set Functions Functions to perform working set analysis. Note: THESEUS0.DLL has 32-bit interfaces ONLY. If you want to interface to it from a 16-bit compiler, then you must provide the THUNKS yourself. ═══ 12.2.1. Error Handling, Initialization/Termination, and Handle Management ═══ These functions apply to all the APIs. Error handling function: error handler Specify the error handler provided by the user. Initialization/termination functions: T2Initialize Initialize THESEUS0.DLL for use. T2Terminate Terminate the use of THESEUS0.DLL. Handle management functions: T2GetHandle0 Get an instance handle. T2ReleaseHandle0 Release an instance handle. ═══ 12.2.1.1. error handler ═══ Select an item: Function Syntax Parameters Example Related Functions ═══ Syntax - error handler ═══ The error handler is provided by the user to format and display errors generated by the routines in THESEUS0.DLL. It must be provided by the user program because the lower level routines do not know what the output environment is. #include "THESEUS0.h" VOID EXPENTRY error_handler0( T2HANDLE0 t2handle0, ULONG error_code, ULONG p1, ULONG p2) { /* error handler code */ } ═══ Parameters - error handler ═══ t2handle0 (T2HANDLE0) - input The instance handle that was being used by the lower level routine when the error was detected. This is given to the error routine in case the output is handle specific. error_code (ULONG) - input The values of the error_code and meanings of the other two parameters are: ┌──────────┬──────┬──────┬─────────────────────────────────┐ │error_code│p1 │p2 │explanation │ ├──────────┼──────┼──────┼─────────────────────────────────┤ │1 │linear│n/a │The starting address (linear) has│ │ │ │ │no page table. │ ├──────────┼──────┼──────┼─────────────────────────────────┤ │2 │linear│length│The ending address │ │ │ │ │(linear+length-1) has no page │ │ │ │ │table. │ ├──────────┼──────┼──────┼─────────────────────────────────┤ │3 │linear│n/a │The page at the starting address │ │ │ │ │is not present. │ ├──────────┼──────┼──────┼─────────────────────────────────┤ │4 │linear│length│The page at the ending address │ │ │ │ │(linear+length-1) is not present.│ ├──────────┼──────┼──────┼─────────────────────────────────┤ │5 │linear│length│The address+length is greater │ │ │ │ │than 32 bits. │ ├──────────┼──────┼──────┼─────────────────────────────────┤ │6 │linear│n/a │The header for the System Arena │ │ │ │ │was not located. The value found │ │ │ │ │is returned, but is not valid. │ │ │ │ │System Working Set cannot be │ │ │ │ │measured. │ └──────────┴──────┴──────┴─────────────────────────────────┘ p1 (ULONG) - input see above p2 (ULONG) - input see above ═══ Example - error handler ═══ This example will print error messages to the STDOUT device. #include #include #include "THESEUS0.h" VOID EXPENTRY error_handler0( T2HANDLE0 t2handle0, ULONG error_code, ULONG p1, ULONG p2) { switch (error_code) { case 1: printf( "Linear address: no Page Table, linear=%0.8X.\n", p1); break; case 2: printf( "Linear address+length: no Page Table, linear=%0.8X, length=%0.8X.\n", p1, p2); break; case 3: printf( "Linear address: page not present, linear=%0.8X.\n", p1); break; case 4: printf( "Linear address+Length: page not present, linear=%0.8X, length=%0.8X.\n", p1, p2); break; case 5: printf( "Linear address+Length: > 32 bits, linear=%0.8X, length=%0.8X.\n", p1, p2); break; case 6: printf( "SystemArenaHeaderLinear = %0.8X.\n", p1); printf( "SystemArenaHeaderLinear was not properly located.\n"); printf( "System Working Set cannot be measured.\n"); break; default: printf( "unknown error to error_handler0: t2handle0=%0.8X, error_code=%i, p1=%i, p2=%i.\n", t2handle0, error_code, p1, p2); break; } } ═══ Related Topics ═══  T2Initialize  T2GetHandle0 ═══ 12.2.1.2. T2Initialize ═══ Select an item: Function Syntax Parameters Return Values Example Related Functions ═══ Syntax - T2Initialize ═══ T2Initialize is used to cause THESEUS0 to initialize all its internal information that is required for later use. #include "THESEUS0.h" PULONG ulDDVersion; ULONG ulrc; ulrc = T2Initialize0( error_handler0); ═══ Parameters - T2Initialize ═══ error_handler0 (function) - input The address (name) of the error handler provided by the user program. ═══ Return Values - T2Initialize ═══ ulrc (ULONG) return code Theseus2OK Initialization completed successfully. Theseus2BadPTDA The initialization code could not determine the size of the PTDA. The program cannot continue. Theseus2NoMte The initialization code could not determine the format for the resident portion of the MTE. The program cannot continue. ═══ Example - T2Initialize ═══ This example will cause T2Initialize to perform the initialization of the internal functions. VOID EXPENTRY error_handler0( ULONG error_code, ULONG p1, ULONG p2) { ··· } rc = T2Initialize0( error_handler0); switch ( rc ) { case Theseus2BadPTDA: printf( "PTDA_findSize did not determine the size of a PTDA.\n"); break; case Theseus2OK: printf( "Initialization completed normally.\n"); /* Execute program functions. */ T2Terminate0(); break; } ═══ Related Topics ═══  error handler  T2Terminate ═══ 12.2.1.3. T2Terminate ═══ Select an item: Function Syntax Example Related Functions ═══ Syntax - T2Terminate ═══ T2Terminate is used to cause THESEUS0 to close the device driver. #include "THESEUS0.h" T2Terminate0( VOID ); ═══ Example - T2Terminate ═══ This example will cause T2Terminate to close out all the processing of THESEUS0.DLL. rc = T2Initialize0( error_handler0); switch ( rc ) { ··· case Theseus2OK: printf( "Initialization completed normally.\n"); /* Execute program functions. */ T2Terminate0(); break; } ═══ Related Topics ═══  T2Initialize ═══ 12.2.1.4. T2GetHandle0 ═══ Select an item: Function Syntax Parameters Return Values Example Related Functions ═══ Syntax - T2GetHandle0 ═══ T2GetHandle0 is used to cause THESEUS0 to allocate an instance handle. #include "THESEUS0.h" VOID EXPENTRY error_handler0( ULONG error_code, ULONG p1, ULONG p2) { ··· } T2HANDLE0 t2handle0; t2handle0 = T2GetHandle0( error_handler0); ═══ Parameters - T2GetHandle0 ═══ error_handler0 (function) - input The address (name) of the error handler provided by the user program. ═══ Return Values - T2GetHandle0 ═══ t2handle0 (T2HANDLE0) The new instance handle. This handle must be passed to other functions. ═══ Example - T2GetHandle0 ═══ This example will allocate an instance handle. #include "THESEUS0.h" T2HANDLE0 t2handle0; t2handle0 = T2GetHandle0( error_handler0); ═══ Related Topics ═══  error handler  T2ReleaseHandle0 ═══ 12.2.1.5. T2ReleaseHandle0 ═══ Select an item: Function Syntax Parameters Example Related Functions ═══ Syntax - T2ReleaseHandle0 ═══ T2ReleaseHandle0 is used to cause THESEUS0 to release an instance handle and free the resources associated with it. #include "THESEUS0.h" T2HANDLE0 *pT2Handle0; T2ReleaseHandle0( pT2Handle0); ═══ Parameters - T2ReleaseHandle0 ═══ t2handle0 (T2HANDLE0) - input/output An instance handle acquired from T2GetHandle0. It is zeroed by the function. ═══ Example - T2ReleaseHandle0 ═══ This example will release the instance handle previously acquired. #include "THESEUS0.h" T2HANDLE0 t2handle0; T2ReleaseHandle0( &t2handle0); ═══ Related Topics ═══  T2GetHandle0 ═══ 12.2.2. Free Memory, Swapper, and Process Functions ═══ These functions are used to acquire specific information about the system as a whole. Free memory function: T2FreeMemory Determine the amount of free, idle, and locked memory. SWAPPER.DAT analysis function: T2AnalyzeSwapper Determine the amount of free and used space in the SWAPPER.DAT file. Process functions: T2FindProcesses Returns an array with the current processes. T2RamUseByProcess Returns an array with the current RAM usage by each process. ═══ 12.2.2.1. T2FreeMemory ═══ Select an item: Function Syntax Parameters Example Related Functions ═══ Syntax - T2FreeMemory ═══ T2FreeMemory is used to cause THESEUS0 to calculate the amount of free, idle, and locked memory. #include "THESEUS0.h" T2HANDLE0 t2handle0; PULONG pFreeRam, pIdleRam, pDirtyRam, pLLockRam, pSLockRam, pBLockRam; T2FreeMemory( t2handle0, pFreeRam, pIdleRam, pDirtyRam, pLLockRam, pSLockRam, pBLockRam); ═══ Parameters - T2FreeMemory ═══ t2handle0 (T2HANDLE0) - input An instance handle previously allocated by T2GetHandle0. pFreeRam (PULONG) - output Address of the ULONG where the amount of free memory is returned. pIdleRam (PULONG) - output Address of the ULONG where the amount of idle memory is returned. pDirtyRam (PULONG) - output Address of the ULONG where the amount of dirty memory is returned. This memory is included in the idle memory. pLLockRam (PULONG) - output Address of the ULONG where the amount of long-term locked memory is returned. pSLockRam (PULONG) - output Address of the ULONG where the amount of short-term locked memory is returned. pBLockRam (PULONG) - output Address of the ULONG where the amount of memory which is locked both long-term and short-term is returned. ═══ Example - T2FreeMemory ═══ This example will cause T2FreeMemory to calculate the free, idle, and locked memory. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG freeRam, idleRam, dirtyRam, LLockRam, SLockRam, BLockRam; T2FreeMemory( t2handle0, &freeRam, &idleRam, &dirtyRam, &LLockRam, &SLockRam, &BLockRam); ═══ Related Topics ═══  T2GetHandle0  Contents of the Free, Idle, and Locked Memory Display ═══ 12.2.2.2. T2AnalyzeSwapper ═══ Select an item: Function Syntax Parameters Example Related Functions ═══ Syntax - T2AnalyzeSwapper ═══ T2AnalyzeSwapper is used to cause THESEUS0 to calculate the amount of free and used space in the SWAPPER.DAT file. #include "THESEUS0.h" T2HANDLE0 t2handle0; PULONG SwapUsed, SwapFree; T2AnalyzeSwapper( t2handle0, SwapUsed, SwapFree); ═══ Parameters - T2AnalyzeSwapper ═══ t2handle0 (T2HANDLE0) - input An instance handle previously allocated by T2GetHandle0. SwapUsed (PULONG) - output The address of a ULONG where the number of used disk frames is returned. SwapFree (PULONG) - output The address of a ULONG where the number of free disk frames is returned. Each disk frame is 4K bytes. ═══ Example - T2AnalyzeSwapper ═══ This example will cause T2AnalyzeSwapper to calculate the free and used space in the SWAPPER.DAT file. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG SwapUsed, SwapFree; T2AnalyzeSwapper( t2handle0, &SwapUsed, &SwapFree); ═══ Related Topics ═══  T2GetHandle0  Contents of the Swapper Display ═══ 12.2.2.3. T2FindProcesses ═══ Select an item: Function Syntax Parameters Return Values Example Related Functions ═══ Syntax - T2FindProcesses ═══ T2FindProcesses is used to cause THESEUS0 to count the number of processes in the system. It also returns an array which contains some information about each process. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG ulProcessCount; T2PROCESS_TABLE *pProcessTable; ulProcessCount = T2FindProcesses( t2handle0, pProcessTable); ═══ Parameters - T2FindProcesses ═══ t2handle0 (T2HANDLE0) - input An instance handle previously allocated by T2GetHandle0. pProcessTable (T2PROCESS_TABLE *) - output Address of a pointer which will point to the Process Table which is returned. The array contains an entry for each process currently running: ptdaPID The PID of this process. pidParent The pid of this process's parent process. cThreads The number of threads in this process. processName The name of this process. Note: It is the users responsibility to issue a DosFreeMem on this array when it is no longer needed. ═══ Return Values - T2FindProcesses ═══ ulProcessCount (ULONG) The number of processes currently running in the system. This will also be the number of entries in pProcessTable. ═══ Example - T2FindProcesses ═══ This example will cause T2FindProcesses to return an array with process names and PIDs. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG cProcess; T2PROCESS_TABLE *tProcessTable; cProcess = T2FindProcesses( t2handle0, &tProcessTable); ═══ Related Topics ═══  T2GetHandle0  Contents of the Process List Display ═══ 12.2.2.4. T2RamUseByProcess ═══ Select an item: Function Syntax Parameters Return Values Example Related Functions ═══ Syntax - T2RamUseByProcess ═══ T2RamUseByProcess is used to cause THESEUS0 to determine the RAM used by each process in the system. It returns an array which contains the usage of each process. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG ulProcessCount; T2RAM_TABLE *pRamTable; PULONG ulFreeRam; ulProcessCount = T2RamUseByProcess( t2handle0, pProcessTable, ulFreeRam); ═══ Parameters - T2RamUseByProcess ═══ t2handle0 (T2HANDLE0) - input An instance handle previously allocated by T2GetHandle0. pRamTable (T2RAM_TABLE *) - output Address of a pointer which will point to the RAM Table which is returned. The array contains an entry for each process currently running: ptdaPID The PID of this process. The entry with PID = 0000 contains the memory used by the "system". ulPrivate The amount of memory in the private arena of this process. If multiple processes have the same page in their private arenas, the process with the lowest PID value is charged with the memory. ulShared The amount of memory from the shared arena that is owned by this process. Note: It is the users responsibility to issue a DosFreeMem on this array when it is no longer needed. ulFreeRam (ULONG) - output The address of a ULONG where the amount of free memory is returned. ═══ Return Values - T2RamUseByProcess ═══ ulProcessCount (ULONG) The number of processes currently running in the system. This will also be the number of entries in pRamTable. ═══ Example - T2RamUseByProcess ═══ This example will cause T2RamUseByProcess to return an array with PIDs and RAM usage for each process. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG cProcess; T2RAM_TABLE *tRamTable; ULONG ulFreeRam; cProcess = T2RamUseByProcess( t2handle0, &tRamTable, &ulFreeRam); ═══ Related Topics ═══  T2GetHandle0  Contents of the RAM Usage by Process Display ═══ 12.2.3. Working Set Functions ═══ These functions are used to acquire working set information. Working Set functions: T2WSStart Sets up to do working set analysis for a particular process or the entire system. T2WSSystemTick Collects data when doing working set for the entire system. T2WSProcessTick Collects data when doing working set for a particular process. T2WSProcessTick2 Collects data when doing working set for a particular process. (This is the same as T2WSProcessTick, with the addition of the System DLL information.) T2WSStop Stops the collection of working set data and returns summary information. T2WSStop2 Stops the collection of working set data and returns summary information. (This is the same as T2WSStop, with the addition of the System DLL information.) T2WSCheck See if it is valid to collect working set data for a particular process or the entire system. The general way that these functions are used is: T2WSStart. do { Wait for the desired interval to elapse. T2WSSystemTick or T2WSProcessTick or T2WSProcessTick2. } while (data is desired). T2WSStop or T2WSStop2. ═══ 12.2.3.1. T2WSStart ═══ Select an item: Function Syntax Parameters Return Values System Example Process Example Related Functions ═══ Syntax - T2WSStart ═══ T2WSStart is used to cause THESEUS0 to set up for working set data collection for a particular process or the entire system. #include "THESEUS0.h" T2HANDLE0 t2handle0; WS_HANDLE0 ws_handle0; ULONG pid; ulrc = T2WSStart( t2handle0, ws_handle0, pid); ═══ Parameters - T2WSStart ═══ t2handle0 (T2HANDLE0) - input An instance handle previously allocated by T2GetHandle0. ws_handle0 (WS_HANDLE0) - output The address of a WS_HANDLE0 where the working set handle is returned. This handle must be used in the T2WSSystemTick/T2WSProcessTick/T2WSProcessTick2 and T2WSStop/T2WSStop2 calls. pid (ULONG) - input The pid of the process that you want to measure. If 0 is specified, then the working set of the entire system is measured. The process with pid of 0001 is not valid for measurement. ═══ Return Values - T2WSStart ═══ ulrc (ULONG) return code T2WS_OK The T2WSStart call completed properly. The ws_handle0 value is returned. T2WS_InUse The process requested is already having working set data collected for it. A process can have working set data collected for it from only one place. T2WS_SystemBeingDone Working set collection is being done for the system. If system is being done, no process can have data collected for it. T2WS_PidNotFound The requested process was not found as an active process. T2WS_BadArena An error occurred during initialization. Working set data cannot be collected. ═══ Example - T2WSStart System Working Set ═══ This example will cause THESEUS0 to collect working set data for the entire system. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG rc; int i; WS_HANDLE0 ws_handle0; ULONG ulNow, ulWS, ulAccessed, ulFree, ulIdle, ulProcessesUsed, ulProcessCount, ulResident, ulTotalRam; ULONG iIntervals, ulMinimum, ulRecommended; rc = T2WSStart( t2handle0, &ws_handle0, 0); if (rc == T2WS_OK) { for (i=0; i<5; i++) { printf( " waiting 2 seconds."); DosSleep( 2000); rc = T2WSSystemTick( ws_handle0, 3, &ulNow, &ulWS, &ulAccessed, &ulFree, &ulIdle, &ulProcessesUsed, &ulProcessCount, &ulResident, &ulTotalRam); printf( "\n tick (rc=%i), %i %i %i %i %i %i %i %i %i\n", rc, ulNow, ulWS, ulAccessed, ulFree, ulIdle, ulProcessesUsed, ulProcessCount, ulResident, ulTotalRam); } rc = T2WSStop( &ws_handle0, TRUE, &iIntervals, &ulMinimum, &ulRecommended, &ulAccessed); printf( " count = %i, minimum = %i, recommended = %i, accessed = %i\n", iIntervals, ulMinimum, ulRecommended, ulAccessed); } ═══ Example - T2WSStart Process Working Set ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG rc; int i; WS_HANDLE0 ws_handle0; ULONG ulNow, ulWS, ulAccessed; ULONG iIntervals, ulMinimum, ulRecommended, ulTotalRam; rc = T2WSStart( t2handle0, &ws_handle0, 2); if (rc == T2WS_OK) { for (i=0; i<5; i++) { printf( " waiting 2 seconds."); DosSleep( 2000); rc = T2WSProcessTick( ws_handle0, 3, &ulNow, &ulWS, &ulAccessed, &ulTotalRam); printf( " tick (rc=%i) pid=%i, %i %i %i %i\n", rc, i, ulNow, ulWS, ulAccessed, ulTotalRam); } rc = T2WSStop( &ws_handle0, TRUE, &iIntervals, &ulMinimum, &ulRecommended, &ulAccessed); printf( " count = %i, minimum = %i, recommended = %i, accessed = %i\n", iIntervals, ulMinimum, ulRecommended, ulAccessed); } ═══ Related Topics ═══  T2GetHandle0  T2WSSystemTick  T2WSProcessTick  T2WSProcessTick2  T2WSStop  T2WSStop2  Working Set of the Entire System?  Working Set of a Single Process? ═══ 12.2.3.2. T2WSSystemTick ═══ Select an item: Function Syntax Parameters Return Values Notes Example Related Functions ═══ Syntax - T2WSSystemTick ═══ T2WSSystemTick is used to cause THESEUS0 to determine the amount of memory accessed since the last T2WSSystemTick call or from the T2WSStart call. #include "THESEUS0.h" ULONG rc; WS_HANDLE0 ws_handle0; ULONG ulIntervals; PULONG ulNow, ulWS, ulAccessed, ulFree, ulIdle, ulProcessesUsed, ulProcessCount, ulResident, ulTotalRam; rc = T2WSSystemTick( ws_handle0, ulIntervals, ulNow, ulWS, ulAccessed, ulFree, ulIdle, ulProcessesUsed, ulProcessCount, ulResident, ulTotalRam); ═══ Parameters - T2WSSystemTick ═══ ws_handle0 (WS_HANDLE0) - input An instance handle previously allocated by T2WSStart. ulIntervals (ULONG) - input The number of intervals that constitute the working set. This value must be less than 254 for the computations to work properly. ulNow (PULONG) - output The address of a ULONG where the number of pages of memory that was accessed during the last interval is returned. ulWS (PULONG) - output The address of a ULONG where the number of pages of memory in the working set is returned. ulAccessed (PULONG) - output The address of a ULONG where the number of pages of memory accessed since the T2WSStart was issued is returned. ulFree (PULONG) - output The address of a ULONG where the number of pages of free memory is returned. ulIdle (PULONG) - output The address of a ULONG where the number of pages of idle memory is returned. ulProcessesUsed (PULONG) - output The address of a ULONG where the number of processes that had memory accessed during the interval is returned. This value indicates the number of processes which are both running and touching non-system memory. ulProcessCount (PULONG) - output The address of a ULONG where the total number of processes found during the interval is returned. This number changes as processes are created or destroyed. ulResident (PULONG) - output The address of a ULONG where the number of pages of resident memory is returned. ulTotalRam (PULONG) - output The address of a ULONG where the total number of pages of RAM being used by OS/2* is returned. ═══ Return Values - T2WSSystemTick ═══ ulrc (ULONG) return code T2WS_OK The T2WSSystemTick call completed properly. T2WS_InvalidHandle The ws_handle0 passed was not valid. ═══ Notes - T2WSSystemTick ═══ The interval between calls to T2WSSystemTick should be chosen carefully. If the interval is too short, the processing could cause the rest of the system to have problems. However, if the interval is too long, dynamic memory allocated and freed will be missed. The overhead is dependent on the number of processes, more so than the amount of RAM in the machine. The interval should never be less than 1 second nor longer than 1 minute. ═══ Example - T2WSSystemTick ═══ This example will cause THESEUS0 to collect working set data for the entire system. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG rc; int i; WS_HANDLE0 ws_handle0; ULONG ulNow, ulWS, ulAccessed, ulFree, ulIdle, ulProcessesUsed, ulProcessCount, ulResident, ulTotalRam; ULONG iIntervals, ulMinimum, ulRecommended; rc = T2WSStart( t2handle0, &ws_handle0, 0); if (rc == T2WS_OK) { for (i=0; i<5; i++) { printf( " waiting 2 seconds."); DosSleep( 2000); rc = T2WSSystemTick( ws_handle0, 3, &ulNow, &ulWS, &ulAccessed, &ulFree, &ulIdle, &ulProcessesUsed, &ulProcessCount, &ulResident, &ulTotalRam); printf( "\n tick (rc=%i), %i %i %i %i %i %i %i %i %i\n", rc, ulNow, ulWS, ulAccessed, ulFree, ulIdle, ulProcessesUsed, ulProcessCount, ulResident, ulTotalRam); } rc = T2WSStop( &ws_handle0, TRUE, &iIntervals, &ulMinimum, &ulRecommended, &ulAccessed); printf( " count = %i, minimum = %i, recommended = %i, accessed = %i\n", iIntervals, ulMinimum, ulRecommended, ulAccessed); } ═══ Related Topics ═══  T2WSStart  T2WSStop  Working Set of the Entire System?  System Working Set ═══ 12.2.3.3. T2WSProcessTick ═══ Select an item: Function Syntax Parameters Return Values Notes Example Related Functions ═══ Syntax - T2WSProcessTick ═══ T2WSProcessTick is used to cause THESEUS0 to determine the amount of memory accessed since the last T2WSProcessTick call or from the T2WSStart call. #include "THESEUS0.h" ULONG rc; WS_HANDLE0 ws_handle0; ULONG ulIntervals; PULONG ulNow, ulWS, ulAccessed, ulTotalRam; rc = T2WSProcessTick( ws_handle0, ulIntervals, ulNow, ulWS, ulAccessed, ulTotalRam); ═══ Parameters - T2WSProcessTick ═══ ws_handle0 (WS_HANDLE0) - input An instance handle previously allocated by T2WSStart. ulIntervals (ULONG) - input The number of intervals that constitute the working set. This value must be less than 254 for the computations to work properly. ulNow (PULONG) - output The address of a ULONG where the number of pages of memory that was accessed during the last interval is returned. ulWS (PULONG) - output The address of a ULONG where the number of pages of memory in the working set is returned. ulAccessed (PULONG) - output The address of a ULONG where the number of pages of memory accessed since the T2WSStart was issued is returned. ulTotalRam (PULONG) - output The address of a ULONG where the total number of pages of RAM being used by OS/2* is returned. ═══ Return Values - T2WSProcessTick ═══ ulrc (ULONG) return code T2WS_OK The T2WSProcessTick call completed properly. T2WS_InvalidHandle The ws_handle0 passed was not valid. T2WS_PidNotFound The requested process was not found as an active process. It was found when the T2WSStart was done, but has since terminated. ═══ Notes - T2WSProcessTick ═══ The interval between calls to T2WSProcessTick should be chosen carefully. If the interval is too short, the processing could cause the rest of the system to have problems. However, if the interval is too long, dynamic memory allocated and freed will be missed. The overhead is dependent on the number of processes being monitored, more so than the amount of RAM in the machine. The interval should never be less than 1 second nor longer than 1 minute. ═══ Example - T2WSProcessTick ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG rc; int i; WS_HANDLE0 ws_handle0; ULONG ulNow, ulWS, ulAccessed; ULONG iIntervals, ulMinimum, ulRecommended, ulTotalRam; rc = T2WSStart( t2handle0, &ws_handle0, 2); if (rc == T2WS_OK) { for (i=0; i<5; i++) { printf( " waiting 2 seconds."); DosSleep( 2000); rc = T2WSProcessTick( ws_handle0, 3, &ulNow, &ulWS, &ulAccessed, &ulTotalRam); printf( " tick (rc=%i) pid=%i, %i %i %i %i\n", rc, i, ulNow, ulWS, ulAccessed, ulTotalRam); } rc = T2WSStop( &ws_handle0, TRUE, &iIntervals, &ulMinimum, &ulRecommended, &ulAccessed); printf( " count = %i, minimum = %i, recommended = %i, accessed = %i\n", iIntervals, ulMinimum, ulRecommended, ulAccessed); } ═══ Related Topics ═══  T2WSStart  T2WSProcessTick2  T2WSStop  T2WSStop2  Working Set of a Single Process?  Process Working Set ═══ 12.2.3.4. T2WSProcessTick2 ═══ Select an item: Function Syntax Parameters Return Values Notes Example Related Functions ═══ Syntax - T2WSProcessTick2 ═══ T2WSProcessTick2 is used to cause THESEUS0 to determine the amount of memory accessed since the last T2WSProcessTick2 call or from the T2WSStart call. #include "THESEUS0.h" ULONG rc; WS_HANDLE0 ws_handle0; ULONG ulIntervals; PULONG ulNow, ulWS, ulAccessed, ulDllNow, ulDllWS, ulDllAccessed, ulTotalRam; rc = T2WSProcessTick2( ws_handle0, ulIntervals, ulNow, ulWS, ulAccessed, ulDllNow, ulDllWS, ulDllAccessed, ulTotalRam); ═══ Parameters - T2WSProcessTick2 ═══ ws_handle0 (WS_HANDLE0) - input An instance handle previously allocated by T2WSStart. ulIntervals (ULONG) - input The number of intervals that constitute the working set. This value must be less than 254 for the computations to work properly. ulNow (PULONG) - output The address of a ULONG where the number of pages of memory that was accessed during the last interval is returned. ulWS (PULONG) - output The address of a ULONG where the number of pages of memory in the working set is returned. ulAccessed (PULONG) - output The address of a ULONG where the number of pages of memory accessed since the T2WSStart was issued is returned. ulDllNow (PULONG) - output The address of a ULONG where the number of pages of memory that was accessed by System DLLs during the last interval is returned. ulDllWS (PULONG) - output The address of a ULONG where the number of pages of memory in the working set of the System DLLs is returned. ulDllAccessed (PULONG) - output The address of a ULONG where the number of pages of memory accessed by System DLLs since the T2WSStart was issued is returned. ulTotalRam (PULONG) - output The address of a ULONG where the total number of pages of RAM being used by OS/2* is returned. ═══ Return Values - T2WSProcessTick2 ═══ ulrc (ULONG) return code T2WS_OK The T2WSProcessTick2 call completed properly. T2WS_InvalidHandle The ws_handle0 passed was not valid. T2WS_PidNotFound The requested process was not found as an active process. It was found when the T2WSStart was done, but has since terminated. ═══ Notes - T2WSProcessTick2 ═══ The interval between calls to T2WSProcessTick2 should be chosen carefully. If the interval is too short, the processing could cause the rest of the system to have problems. However, if the interval is too long, dynamic memory allocated and freed will be missed. The overhead is dependent on the number of processes being monitored, more so than the amount of RAM in the machine. The interval should never be less than 1 second nor longer than 1 minute. ═══ Example - T2WSProcessTick2 ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG rc; int i; WS_HANDLE0 ws_handle0; ULONG ulNow, ulWS, ulAccessed, ulDllNow, ulDllWS, ulDllAccessed; ULONG iIntervals, ulMinimum, ulRecommended, ulDllMinimum, ulDllRecommended, ulTotalRam; rc = T2WSStart( t2handle0, &ws_handle0, 2); if (rc == T2WS_OK) { for (i=0; i<5; i++) { printf( " waiting 2 seconds."); DosSleep( 2000); rc = T2WSProcessTick2( ws_handle0, 3, &ulNow, &ulWS, &ulAccessed, &ulDllNow, &ulDllWS, &ulDllAccessed, &ulTotalRam); printf( " tick (rc=%i) pid=%i, %i %i %i %i %i %i %i\n", rc, i, ulNow, ulWS, ulAccessed, ulDllNow, ulDllWS, ulDllAccessed, ulTotalRam); } rc = T2WSStop2( &ws_handle0, TRUE, &iIntervals, &ulMinimum, &ulRecommended, &ulAccessed, &ulDllMinimum, &ulDllRecommended, &ulDllAccessed); printf( " count = %i, min = %i, rec = %i, acc = %i, dllMin = %i, dllRec = %i, dllAcc = %i\n", iIntervals, ulMinimum, ulRecommended, ulAccessed, ulDllMinimum, ulDllRecommended, ulDllAccessed); } ═══ Related Topics ═══  T2WSStart  T2WSProcessTick  T2WSStop  T2WSStop2  Working Set of a Single Process?  Process Working Set ═══ 12.2.3.5. T2WSStop ═══ Select an item: Function Syntax Parameters Return Values System Example Process Example Related Functions ═══ Syntax - T2WSStop ═══ T2WSStop is used to cause THESEUS0 to terminate the Working Set computations and return summary information. #include "THESEUS0.h" WS_HANDLE0 ws_handle0; BOOL fCollectOne; PULONG iIntervals, ulMinimum, ulRecommended, ulAccessed; rc = T2WSStop( ws_handle0, fCollectOne, iIntervals, ulMinimum, ulRecommended, ulAccessed); ═══ Parameters - T2WSStop ═══ ws_handle0 (WS_HANDLE0) - input An instance handle previously allocated by T2WSStart. fCollectOne (BOOL) - input Indicate if at least one collection cycle must be accomplished. TRUE Perform a collection cycle (tick), if one has not already been done. FALSE Do not force a collection cycle. iIntervals (PULONG) - output Address of a ULONG where the number of data collections cycles completed is returned. ulMinimum (PULONG) - output The address of a ULONG where the maximum value from the now column is returned. This is the amount of memory absolutely required to run the application without "thrashing" memory. ulRecommended (PULONG) - output The address of a ULONG where the maximum value from the ws column is returned. This is the recommended amount of memory for the application to run with minimum impact on paging. ulAccessed (PULONG) - output The address of a ULONG where the maximum value from the accessed column is returned. This is the amount of memory required to run the application with no paging activity. ═══ Return Values - T2WSStop ═══ ulrc (ULONG) return code T2WS_OK The T2WSStop call completed properly. T2WS_InvalidHandle The ws_handle0 passed was not valid. ═══ Example - T2WSStop System Working Set ═══ This example will cause THESEUS0 to collect working set data for the entire system. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG rc; int i; WS_HANDLE0 ws_handle0; ULONG ulNow, ulWS, ulAccessed, ulFree, ulIdle, ulProcessesUsed, ulProcessCount, ulResident, ulTotalRam; ULONG iIntervals, ulMinimum, ulRecommended; rc = T2WSStart( t2handle0, &ws_handle0, 0); if (rc == T2WS_OK) { for (i=0; i<5; i++) { printf( " waiting 2 seconds."); DosSleep( 2000); rc = T2WSSystemTick( ws_handle0, 3, &ulNow, &ulWS, &ulAccessed, &ulFree, &ulIdle, &ulProcessesUsed, &ulProcessCount, &ulResident, &ulTotalRam); printf( "\n tick (rc=%i), %i %i %i %i %i %i %i %i %i\n", rc, ulNow, ulWS, ulAccessed, ulFree, ulIdle, ulProcessesUsed, ulProcessCount, ulResident, ulTotalRam); } rc = T2WSStop( &ws_handle0, TRUE, &iIntervals, &ulMinimum, &ulRecommended, &ulAccessed); printf( " count = %i, minimum = %i, recommended = %i, accessed = %i\n", iIntervals, ulMinimum, ulRecommended, ulAccessed); } ═══ Example - T2WSStop Process Working Set ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG rc; int i; WS_HANDLE0 ws_handle0; ULONG ulNow, ulWS, ulAccessed; ULONG iIntervals, ulMinimum, ulRecommended, ulTotalRam; rc = T2WSStart( t2handle0, &ws_handle0, 2); if (rc == T2WS_OK) { for (i=0; i<5; i++) { printf( " waiting 2 seconds."); DosSleep( 2000); rc = T2WSProcessTick( ws_handle0, 3, &ulNow, &ulWS, &ulAccessed, &ulTotalRam); printf( " tick (rc=%i) pid=%i, %i %i %i %i\n", rc, i, ulNow, ulWS, ulAccessed, ulTotalRam); } rc = T2WSStop( &ws_handle0, TRUE, &iIntervals, &ulMinimum, &ulRecommended, &ulAccessed); printf( " count = %i, minimum = %i, recommended = %i, accessed = %i\n", iIntervals, ulMinimum, ulRecommended, ulAccessed); } ═══ Related Topics ═══  T2GetHandle0  T2WSStart ═══ 12.2.3.6. T2WSStop2 ═══ Select an item: Function Syntax Parameters Return Values Process Example Related Functions ═══ Syntax - T2WSStop2 ═══ T2WSStop2 is used to cause THESEUS0 to terminate the Working Set computations and return summary information. #include "THESEUS0.h" WS_HANDLE0 ws_handle0; BOOL fCollectOne; PULONG iIntervals, ulMinimum, ulRecommended, ulAccessed, ulDllMinimum, ulDllRecommended, ulDllAccessed; rc = T2WSStop2( ws_handle0, fCollectOne, iIntervals, ulMinimum, ulRecommended, ulAccessed, ulDllMinimum, ulDllRecommended, ulDllAccessed); ═══ Parameters - T2WSStop2 ═══ ws_handle0 (WS_HANDLE0) - input An instance handle previously allocated by T2WSStart. fCollectOne (BOOL) - input Indicate if at least one collection cycle must be accomplished. TRUE Perform a collection cycle (tick), if one has not already been done. FALSE Do not force a collection cycle. iIntervals (PULONG) - output Address of a ULONG where the number of data collections cycles completed is returned. ulMinimum (PULONG) - output The address of a ULONG where the maximum value from the now column is returned. This is the amount of memory absolutely required to run the application without "thrashing" memory. ulRecommended (PULONG) - output The address of a ULONG where the maximum value from the ws column is returned. This is the recommended amount of memory for the application to run with minimum impact on paging. ulAccessed (PULONG) - output The address of a ULONG where the maximum value from the accessed column is returned. This is the amount of memory required to run the application with no paging activity. ulDllMinimum (PULONG) - output The address of a ULONG where the maximum value from the now column for System DLLs is returned. This is the amount of memory absolutely required to run the application without "thrashing" memory. ulDllRecommended (PULONG) - output The address of a ULONG where the maximum value from the ws column for System DLLs is returned. This is the recommended amount of memory for the application to run with minimum impact on paging. ulDllAccessed (PULONG) - output The address of a ULONG where the maximum value from the accessed column for System DLLs is returned. This is the amount of memory required to run the application with no paging activity. ═══ Return Values - T2WSStop2 ═══ ulrc (ULONG) return code T2WS_OK The T2WSStop2 call completed properly. T2WS_InvalidHandle The ws_handle0 passed was not valid. ═══ Example - T2WSStop2 Process Working Set ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. #include "THESEUS0.h" T2HANDLE0 t2handle0; ULONG rc; int i; WS_HANDLE0 ws_handle0; ULONG ulNow, ulWS, ulAccessed, ulDllNow, ulDllWS, ulDllAccessed; ULONG iIntervals, ulMinimum, ulRecommended, ulDllMinimum, ulDllRecommended, ulTotalRam; rc = T2WSStart( t2handle0, &ws_handle0, 2); if (rc == T2WS_OK) { for (i=0; i<5; i++) { printf( " waiting 2 seconds."); DosSleep( 2000); rc = T2WSProcessTick2( ws_handle0, 3, &ulNow, &ulWS, &ulAccessed, &ulDllNow, &ulDllWS, &ulDllAccessed, &ulTotalRam); printf( " tick (rc=%i) pid=%i, %i %i %i %i %i %i %i\n", rc, i, ulNow, ulWS, ulAccessed, ulDllNow, ulDllWS, ulDllAccessed, ulTotalRam); } rc = T2WSStop2( &ws_handle0, TRUE, &iIntervals, &ulMinimum, &ulRecommended, &ulAccessed, &ulDllMinimum, &ulDllRecommended, &ulDllAccessed); printf( " count = %i, min = %i, rec = %i, acc = %i, dllMin = %i, dllRec = %i, dllAcc = %i\n", iIntervals, ulMinimum, ulRecommended, ulAccessed, ulDllMinimum, ulDllRecommended, ulDllAccessed); } ═══ Related Topics ═══  T2GetHandle0  T2WSStart ═══ 12.2.3.7. T2WSCheck ═══ Select an item: Function Syntax Parameters Return Values Example Related Functions ═══ Syntax - T2WSCheck ═══ T2WSCheck is used to cause THESEUS0 to determine if a particular process or the entire system can have working set data collected. #include "THESEUS0.h" ULONG ulPidToCheck; BOOL fStatus; fStatus = T2WSCheck( ulPidToCheck); ═══ Parameters - T2WSCheck ═══ ulPidToCheck (ULONG) - input The pid of the process to be queried. If ulPidToCheck is 0, then check for the system as a whole. ═══ Return Values - T2WSCheck ═══ fStatus (BOOL) requestable status TRUE A T2WSStart request for this process would probably succeed. FALSE A T2WSStart request for this process will fail. See return values of T2WS_InUse and T2WS_SystemBemingDone in T2WSStart Return Values. ═══ Example - T2WSCheck ═══ To determine if it is possible to collect system working set data: if (T2WSCheck( 0)) /* I can collect system working set data */ else /* not valid, someone else is already doing it or someone is collecting process data */ To determine if it is possible to collect working set data for the process with pid 0002: if (T2WSCheck( 2)) /* I can collect process working set data */ else /* not valid, someone else is already doing it or someone is collecting system data */ ═══ Related Topics ═══  T2WSStart ═══ 12.3. REXX Application Programming Interface ═══ The functions provided by THESEUS0.DLL are divided into the following categories: Initialization Function to cause THESEUS0.DLL to initialize for use by REXX. Free Memory, Swapper, and Process Functions Functions to determine information about the system as a whole. Working Set Functions Functions to perform working set analysis. Errors are output to the stderr device. ═══ 12.3.1. RT2LoadFuncs ═══ Select an item: Function Syntax Return Values Example Related Functions ═══ Syntax - RT2LoadFuncs ═══ RT2LoadFuncs is used to cause THESEUS0 to initialize all its internal information that is required for later use and make the other functions available to REXX. rc = RT2LoadFuncs() ═══ Return Values - RT2LoadFuncs ═══ rc (number) return code 0 Initialization completed successfully. 1 The initialization code could not determine the size of the PTDA. The program cannot continue. 2 The initialization code could not determine the format for the resident portion of the MTE. The program cannot continue. 3 The global initialization failed. Look in the file called t3errlog.log for further return codes. 4 The initialization of the page frame physical arena failed. See t3errlog.log for further return codes. 5 This is an invalid OS/2 version for this version of theseus4. 6 The t3errlog.log failed to open. ═══ Example - RT2LoadFuncs ═══ This example will cause RT2LoadFuncs to perform the initialization of the internal functions. call RxFuncAdd "RT2LoadFuncs", "THESEUS0", "RT2LoadFuncs" rc = RT2LoadFuncs() if rc \= 0 then do say "THESEUS0 did not initialize properly. It's return code = "rc exit end ═══ Related Topics ═══ Although the following routines are not directly related, the discussion of errors is applicable.  error handler  T2Initialize ═══ 12.3.2. Free Memory, Swapper, and Process Functions ═══ These functions are used to acquire specific information about the system as a whole. Free memory function: RT2FreeMemory Determine the amount of free, idle, and locked memory. SWAPPER.DAT analysis function: RT2AnalyzeSwapper Determine the amount of free and used space in the SWAPPER.DAT file. Process functions: RT2FindProcesses Returns an array with the current processes. RT2RamUseByProcess Returns an array with the current RAM usage by each process. ═══ 12.3.2.1. RT2FreeMemory ═══ Select an item: Function Syntax Return Values Example Related Functions ═══ Syntax - RT2FreeMemory ═══ RT2FreeMemory is used to cause THESEUS0 to calculate the amount of free, idle, and locked memory. FreeReturn = RT2FreeMemory() FreeReturn contains: FreeRam IdleRam DirtyRam LLockRam SLockRam BLockRam ═══ Return Values - RT2FreeMemory ═══ FreeRam (number) The number of bytes of free memory. IdleRam (number) The number of bytes of idle memory. DirtyRam (number) The number of bytes of dirty memory. This memory is included in the idle memory. LLockRam (number) The number of bytes of long-term locked memory. SLockRam (number) The number of bytes of short-term locked memory. BLockRam (number) The number of bytes of memory which is locked both long-term and short-term. ═══ Example - RT2FreeMemory ═══ This example will cause RT2FreeMemory to calculate the free, idle, and locked memory. parse value RT2FreeMemory() with freeRam idleRam dirtyRam LLockRam SLockRam BLockRam say "freeRam = "freeRam say "idleRam = "idleRam say "dirtyRam = "dirtyRam say "LLockRam = "LLockRam say "SLockRam = "SLockRam say "BLockRam = "BLockRam say "cleanRam = "idleRam-dirtyRam" (computed value = idleRam - dirtyRam)" ═══ Related Topics ═══  RT2LoadFuncs  Contents of the Free, Idle, and Locked Memory Display ═══ 12.3.2.2. RT2AnalyzeSwapper ═══ Select an item: Function Syntax Return Values Example Related Functions ═══ Syntax - RT2AnalyzeSwapper ═══ RT2AnalyzeSwapper is used to cause THESEUS0 to calculate the amount of free and used space in the SWAPPER.DAT file. SwapReturn = RT2AnalyzeSwapper() SwapReturn contains: SwapUsed SwapFree ═══ Return Values - RT2AnalyzeSwapper ═══ SwapUsed (number) The number of used disk frames. SwapFree (number) The number of free disk frames. Each disk frame is 4K bytes. ═══ Example - RT2AnalyzeSwapper ═══ This example will cause RT2AnalyzeSwapper to calculate the free and used space in the SWAPPER.DAT file. parse value RT2AnalyzeSwapper() with SwapUsed SwapFree say "SwapUsed = "SwapUsed say "SwapFree = "SwapFree ═══ Related Topics ═══  RT2LoadFuncs  Contents of the Swapper Display ═══ 12.3.2.3. RT2FindProcesses ═══ Select an item: Function Syntax Parameters Return Values Example Related Functions ═══ Syntax - RT2FindProcesses ═══ RT2FindProcesses is used to cause THESEUS0 to count the number of processes in the system. It also returns an array which contains some information about each process. RT2FindProcesses "stem" ═══ Parameters - RT2FindProcesses ═══ stem (string) The name of the stem variable used to contain the return list of processes. ═══ Return Values - RT2FindProcesses ═══ stem.0 contains the number of processes found. The list contains an entry for each process currently running. Each entry contains: ptdaPID pidParent cThreads processName where: ptdaPID The PID of this process. pidParent The pid of this process's parent process. cThreads The number of threads in this process. processName The name of this process. ═══ Example - RT2FindProcesses ═══ This example will cause RT2FindProcesses to return an array with process names and PIDs. call RT2FindProcesses "pTable" say "pTable count = "pTable.0 do i = 1 to pTable.0 say i": '"pTable.i"'" end parse value pTable.1 with Pid Parent Threads Name say "pid = "Pid", parent = "Parent", threads = "Threads", name = '"Name"'" ═══ Related Topics ═══  RT2LoadFuncs  Contents of the Process List Display ═══ 12.3.2.4. RT2RamUseByProcess ═══ Select an item: Function Syntax Parameters Return Values Example Related Functions ═══ Syntax - RT2RamUseByProcess ═══ RT2RamUseByProcess is used to cause THESEUS0 to determine the RAM used by each process in the system. It returns an array which contains the usage of each process. T2RamUseByProcess "stem" ═══ Parameters - RT2RamUseByProcess ═══ stem (string) The name of the stem variable used to contain the return list of processes. ═══ Return Values - RT2RamUseByProcess ═══ stem.0 contains the number of processes found. The list contains an entry for each process currently running. Each entry contains: ptdaPID Private Shared where: ptdaPID The PID of this process. The entry with PID = 0000 contains the memory used by the "system". Private The number of bytes of memory in the private arena of this process. If multiple processes have the same page in their private arenas, the process with the lowest PID value is charged with the memory. Shared The number of bytes of memory from the shared arena that is owned by this process. ═══ Example - RT2RamUseByProcess ═══ This example will cause RT2RamUseByProcess to return an array with PIDs and RAM usage for each process. call RT2RamUseByProcess "rTable" say "rTable count = "rTable.0 do i = 1 to rTable.0 say i": '"rTable.i"'" end parse value rTable.1 with Pid Private Shared say "pid = "Pid", private = "Private", shared = "Shared ═══ Related Topics ═══  RT2LoadFuncs  Contents of the RAM Usage by Process Display ═══ 12.3.3. Working Set Functions ═══ These functions are used to acquire working set information. Working Set functions: RT2WSStart Sets up to do working set analysis for a particular process or the entire system. RT2WSSystemTick Collects data when doing working set for the entire system. RT2WSProcessTick Collects data when doing working set for a particular process. RT2WSProcessTick2 Collects data when doing working set for a particular process. (This is the same as RT2WSProcessTick, with the addition of the System DLL information.) RT2WSStop Stops the collection of working set data and returns summary information. RT2WSStop2 Stops the collection of working set data and returns summary information. (This is the same as RT2WSStop, with the addition of the System DLL information.) The general way that these functions are used is: RT2WSStart. do while data is desired Wait for the desired interval to elapse. RT2WSSystemTick or RT2WSProcessTick or RT2WSProcessTick2. end RT2WSStop or RT2WSStop. ═══ 12.3.3.1. RT2WSStart ═══ Select an item: Function Syntax Parameters Return Values System Example Process Example Related Functions ═══ Syntax - RT2WSStart ═══ RT2WSStart is used to cause THESEUS0 to set up for working set data collection for a particular process or the entire system. rc = RT2WSStart("ws_handle"─┬──────┬─) └─,pid─┘ ═══ Parameters - RT2WSStart ═══ ws_handle0 (string) The name of a variable that will be the working set handle. This handle must be used in the RT2WSSystemTick/RT2WSProcessTick and RT2WSStop calls. Note: The value returned in this variable must not be changed. pid (number) The pid of the process that you want to measure. If none is specified, then the working set of the entire system is measured. The process with pid of 1 is not valid for measurement. ═══ Return Values - RT2WSStart ═══ rc (number) return code 0 The RT2WSStart call completed properly. The ws_handle0 value is returned. 1 The process requested is already having working set data collected for it. A process can have working set data collected for it from only one place. 2 Working set collection is being done for the system. If system is being done, no process can have data collected for it. 4 An error occurred during initialization. Working set data cannot be collected. 5 The requested process was not found as an active process. ═══ Example - RT2WSStart System Working Set ═══ This example will cause THESEUS0 to collect working set data for the entire system. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. rc = RT2WSStart("ws_handle") if rc = 0 then do do i = 1 to 5 say "sleep for 2 seconds." call SysSleep 2 parse value RT2WSSystemTick("ws_handle",3) with Rc, Now WS Accessed Free Idle ProcUsed, ProcCount Resident TotalRam say Rc Now WS Accessed Free Idle, ProcUsed ProcCount Resident TotalRam end StopReturn = RT2WSStop("ws_handle") parse value StopReturn with Rc Intervals Minimum Recommended Accessed say Rc Intervals Minimum Recommended Accessed end ═══ Example - RT2WSStart Process Working Set ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. rc = RT2WSStart("ws_handle",2) if rc = 0 then do do i = 1 to 5 say "sleep for 2 seconds." call SysSleep 2 parse value RT2WSProcessTick("ws_handle",3) with Rc, Now WS Accessed TotalRam say Rc Now WS Accessed TotalRam end StopReturn = RT2WSStop("ws_handle") parse value StopReturn with Rc Intervals Minimum Recommended Accessed say Rc Intervals Minimum Recommended Accessed end ═══ Related Topics ═══  RT2LoadFuncs  RT2WSSystemTick  RT2WSProcessTick  RT2WSProcessTick2  RT2WSStop  RT2WSStop2  Working Set of the Entire System?  Working Set of a Single Process? ═══ 12.3.3.2. RT2WSSystemTick ═══ Select an item: Function Syntax Parameters Return Values Notes Example Related Functions ═══ Syntax - RT2WSSystemTick ═══ RT2WSSystemTick is used to cause THESEUS0 to determine the amount of memory accessed since the last RT2WSSystemTick call or from the RT2WSStart call. TickReturn = RT2WSSystemTick("ws_handle", Intervals) TickReturn contains: rc Now WS Accessed Free Idle ProcUsed ProcCount Resident TotalRam ═══ Parameters - RT2WSSystemTick ═══ ws_handle0 (string) The name of the variable that was used in the RT2WSStart. Intervals (number) The number of intervals that constitute the working set. This value must be less than 254 for the computations to work properly. ═══ Return Values - RT2WSSystemTick ═══ rc (number) return code 0 The RT2WSSystemTick call completed properly. 3 The ws_handle0 passed was not valid. Now (number) The number of pages of memory that was accessed during the last interval. WS (number) The number of pages of memory in the working set. Accessed (number) The number of pages of memory accessed since the RT2WSStart was issued. Free (number) The number of pages of free memory. Idle (number) The number of pages of idle memory. ProcUsed (number) The number of processes that had memory accessed during the interval. This value indicates the number of processes which are both running and touching non-system memory. ProcCount (number) The total number of processes found during the interval. This number changes as processes are created or destroyed. Resident (number) The number of pages of resident memory. TotalRam (number) The total number of pages of RAM being used by OS/2*. ═══ Notes - RT2WSSystemTick ═══ The interval between calls to RT2WSSystemTick should be chosen carefully. If the interval is too short, the processing could cause the rest of the system to have problems. However, if the interval is too long, dynamic memory allocated and freed will be missed. The overhead is dependent on the number of processes, more so than the amount of RAM in the machine. The interval should never be less than 1 second nor longer than 1 minute. ═══ Example - RT2WSSystemTick ═══ This example will cause THESEUS0 to collect working set data for the entire system. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. rc = RT2WSStart("ws_handle") if rc = 0 then do do i = 1 to 5 say "sleep for 2 seconds." call SysSleep 2 parse value RT2WSSystemTick("ws_handle",3) with Rc, Now WS Accessed Free Idle ProcUsed, ProcCount Resident TotalRam say Rc Now WS Accessed Free Idle, ProcUsed ProcCount Resident TotalRam end StopReturn = RT2WSStop("ws_handle") parse value StopReturn with Rc Intervals Minimum Recommended Accessed say Rc Intervals Minimum Recommended Accessed end ═══ Related Topics ═══  RT2LoadFuncs  RT2WSStart  RT2WSStop  Working Set of the Entire System?  System Working Set ═══ 12.3.3.3. RT2WSProcessTick ═══ Select an item: Function Syntax Parameters Return Values Notes Example Related Functions ═══ Syntax - RT2WSProcessTick ═══ RT2WSProcessTick is used to cause THESEUS0 to determine the amount of memory accessed since the last RT2WSProcessTick call or from the RT2WSStart call. TickReturn = RT2WSProcessTick("ws_handle", Intervals) TickReturn contains: rc Now WS Accessed TotalRam ═══ Parameters - RT2WSProcessTick ═══ ws_handle0 (string) The name of the variable that was used in the RT2WSStart. Intervals (number) The number of intervals that constitute the working set. This value must be less than 254 for the computations to work properly. ═══ Return Values - RT2WSProcessTick ═══ rc (number) return code 0 The T2WSProcessTick call completed properly. 3 The ws_handle0 passed was not valid. 5 The requested process was not found as an active process. It was found when the RT2WSStart was done, but has since terminated. Now (number) The number of pages of memory that was accessed during the last interval. WS (number) The number of pages of memory in the working set. Accessed (number) The number of pages of memory accessed since the RT2WSStart was issued. TotalRam (number) The total number of pages of RAM being used by OS/2*. ═══ Notes - RT2WSProcessTick ═══ The interval between calls to RT2WSProcessTick should be chosen carefully. If the interval is too short, the processing could cause the rest of the system to have problems. However, if the interval is too long, dynamic memory allocated and freed will be missed. The overhead is dependent on the number of processes being monitored, more so than the amount of RAM in the machine. The interval should never be less than 1 second nor longer than 1 minute. ═══ Example - RT2WSProcessTick ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. rc = RT2WSStart("ws_handle",2) if rc = 0 then do do i = 1 to 5 say "sleep for 2 seconds." call SysSleep 2 parse value RT2WSProcessTick("ws_handle",3) with Rc, Now WS Accessed TotalRam say Rc Now WS Accessed TotalRam end StopReturn = RT2WSStop("ws_handle") parse value StopReturn with Rc Intervals Minimum Recommended Accessed say Rc Intervals Minimum Recommended Accessed end ═══ Related Topics ═══  RT2LoadFuncs  RT2WSStart  RT2WSStop  Working Set of a Single Process?  Process Working Set ═══ 12.3.3.4. RT2WSProcessTick2 ═══ Select an item: Function Syntax Parameters Return Values Notes Example Related Functions ═══ Syntax - RT2WSProcessTick2 ═══ RT2WSProcessTick2 is used to cause THESEUS0 to determine the amount of memory accessed since the last RT2WSProcessTick2 call or from the RT2WSStart call. TickReturn = RT2WSProcessTick2("ws_handle", Intervals) TickReturn contains: rc Now WS Accessed DllNow DllWS DllAccessed TotalRam ═══ Parameters - RT2WSProcessTick2 ═══ ws_handle0 (string) The name of the variable that was used in the RT2WSStart. Intervals (number) The number of intervals that constitute the working set. This value must be less than 254 for the computations to work properly. ═══ Return Values - RT2WSProcessTick2 ═══ rc (number) return code 0 The T2WSProcessTick2 call completed properly. 3 The ws_handle0 passed was not valid. 5 The requested process was not found as an active process. It was found when the RT2WSStart was done, but has since terminated. Now (number) The number of pages of memory that was accessed during the last interval. WS (number) The number of pages of memory in the working set. Accessed (number) The number of pages of memory accessed since the RT2WSStart was issued. DllNow (number) The number of pages of memory that was accessed by System DLLs during the last interval. DllWS (number) The number of pages of memory in the working set of the System DLLs is returned. DllAccessed (number) The number of pages of memory accessed by System DLLs since the T2WSStart was issued is returned. TotalRam (number) The total number of pages of RAM being used by OS/2*. ═══ Notes - RT2WSProcessTick2 ═══ The interval between calls to RT2WSProcessTick2 should be chosen carefully. If the interval is too short, the processing could cause the rest of the system to have problems. However, if the interval is too long, dynamic memory allocated and freed will be missed. The overhead is dependent on the number of processes being monitored, more so than the amount of RAM in the machine. The interval should never be less than 1 second nor longer than 1 minute. ═══ Example - RT2WSProcessTick2 ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. rc = RT2WSStart("ws_handle",2) if rc = 0 then do do i = 1 to 5 say "sleep for 2 seconds." call SysSleep 2 parse value RT2WSProcessTick2("ws_handle",3) with Rc, Now WS Accessed DllNow DllWS DllAccessed TotalRam say Rc Now WS Accessed DllNow DllWS DllAccessed TotalRam end StopReturn = RT2WSStop2("ws_handle") parse value StopReturn with Rc Intervals, Minimum Recommended Accessed, DllMinimum DllRecommended DllAccessed say Rc Intervals, Minimum Recommended Accessed, DllMinimum DllRecommended DllAccessed end ═══ Related Topics ═══  RT2LoadFuncs  RT2WSStart  RT2WSStop2  Working Set of a Single Process?  Process Working Set ═══ 12.3.3.5. RT2WSStop ═══ Select an item: Function Syntax Parameters Return Values System Example Process Example Related Functions ═══ Syntax - RT2WSStop ═══ RT2WSStop is used to cause THESEUS0 to terminate the Working Set computations and return summary information. StopReturn = RT2WSStop("ws_handle") StopReturn contains: rc Intervals Minimum Recommended Accessed ═══ Parameters - RT2WSStop ═══ ws_handle0 (string) The name of the variable that was used in the RT2WSStart. Note: The value of this variable is destroyed. (A DROP is done on the variable by RT2WSStop.) ═══ Return Values - RT2WSStop ═══ rc (number) return code 0 The T2WSStop call completed properly. 3 The ws_handle0 passed was not valid. Intervals (number) The number of data collections cycles completed. Minimum (number) The maximum value from the now column. This is the amount of memory absolutely required to run the application without "thrashing" memory. Recommended (number) The maximum value from the ws column. This is the recommended amount of memory for the application to run with minimum impact on paging. Accessed (number) The maximum value from the accessed column. This is the amount of memory required to run the application with no paging activity. ═══ Example - RT2WSStop System Working Set ═══ This example will cause THESEUS0 to collect working set data for the entire system. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. rc = RT2WSStart("ws_handle") if rc = 0 then do do i = 1 to 5 say "sleep for 2 seconds." call SysSleep 2 parse value RT2WSSystemTick("ws_handle",3) with Rc, Now WS Accessed Free Idle ProcUsed, ProcCount Resident TotalRam say Rc Now WS Accessed Free Idle, ProcUsed ProcCount Resident TotalRam end StopReturn = RT2WSStop("ws_handle") parse value StopReturn with Rc Intervals Minimum Recommended Accessed say Rc Intervals Minimum Recommended Accessed end ═══ Example - RT2WSStop Process Working Set ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. rc = RT2WSStart("ws_handle",2) if rc = 0 then do do i = 1 to 5 say "sleep for 2 seconds." call SysSleep 2 parse value RT2WSProcessTick("ws_handle",3) with Rc, Now WS Accessed TotalRam say Rc Now WS Accessed TotalRam end StopReturn = RT2WSStop("ws_handle") parse value StopReturn with Rc Intervals Minimum Recommended Accessed say Rc Intervals Minimum Recommended Accessed end ═══ Related Topics ═══  RT2LoadFuncs  RT2WSStart ═══ 12.3.3.6. RT2WSStop2 ═══ Select an item: Function Syntax Parameters Return Values Process Example Related Functions ═══ Syntax - RT2WSStop2 ═══ RT2WSStop2 is used to cause THESEUS0 to terminate the Working Set computations and return summary information. StopReturn = RT2WSStop2("ws_handle") StopReturn contains: rc Intervals Minimum Recommended Accessed DllMinimum DllRecommended DllAccessed ═══ Parameters - RT2WSStop2 ═══ ws_handle0 (string) The name of the variable that was used in the RT2WSStart. Note: The value of this variable is destroyed. (A DROP is done on the variable by RT2WSStop2.) ═══ Return Values - RT2WSStop2 ═══ rc (number) return code 0 The T2WSStop2 call completed properly. 3 The ws_handle0 passed was not valid. Intervals (number) The number of data collections cycles completed. Minimum (number) The maximum value from the now column. This is the amount of memory absolutely required to run the application without "thrashing" memory. Recommended (number) The maximum value from the ws column. This is the recommended amount of memory for the application to run with minimum impact on paging. Accessed (number) The maximum value from the accessed column. This is the amount of memory required to run the application with no paging activity. DllMinimum (number) The maximum value from the now column for System DLLs is returned. This is the amount of memory absolutely required to run the application without "thrashing" memory. DllRecommended (number) The maximum value from the ws column for System DLLs is returned. This is the recommended amount of memory for the application to run with minimum impact on paging. DllAccessed (number) The maximum value from the accessed column for System DLLs is returned. This is the amount of memory required to run the application with no paging activity. ═══ Example - RT2WSStop2 Process Working Set ═══ This example will cause THESEUS0 to collect working set data for process with pid of 2. It will sample every 2 seconds and will take 5 samples. The working set interval is set as 3 intervals. The results are printed to the window. rc = RT2WSStart("ws_handle",2) if rc = 0 then do do i = 1 to 5 say "sleep for 2 seconds." call SysSleep 2 parse value RT2WSProcessTick2("ws_handle",3) with Rc, Now WS Accessed DllNow DllWS DllAccessed TotalRam say Rc Now WS Accessed DllNow DllWS DllAccessed TotalRam end StopReturn = RT2WSStop2("ws_handle") parse value StopReturn with Rc Intervals, Minimum Recommended Accessed, DllMinimum DllRecommended DllAccessed say Rc Intervals, Minimum Recommended Accessed, DllMinimum DllRecommended DllAccessed end ═══ Related Topics ═══  RT2LoadFuncs  RT2WSStart  RT2WSProcessTick2 ═══ 13. Errors ═══ THESEUS4 displays errors in two different ways:  in popup windows  imbedded within output. ═══ 13.1. Popup Window Errors ═══ THESEUS4 generates several popup windows:  Cannot describe an HCO  Clipboard error  Dependent window error  Error in decimal input  Error in hex input  Find text not entered  No monospaced font  Out of windows error  Process ended  PTDA size not determined  MTE format not recognized  File name not valid ═══ 13.1.1. Cannot describe an HCO ═══ Message text: An HCO cannot be described. Explanation: The hco is the only one of the address/handle type of hypertext links that THESEUS4 is not programmed to describe. Corrective action: Do not request a description of an hco. ═══ 13.1.2. Clipboard error ═══ Message text: Could not allocate memory for Clipboard data. Copy request cannot be done. Explanation: An error was received while trying allocate shared memory. This memory is required in order to copy the marked area into the clipboard. Corrective action: Free some memory and try the request again. ═══ 13.1.3. Dependent Window Error ═══ Message text: This window cannot be closed before its dependent window is closed. Explanation: Several explanation detail windows are dependent on other windows for their data. As long as the explanation detail window is present, the data source window cannot be closed. Corrective action: The dependent window will have the focus when you close the pop-up. Close the explanation detail window, then you can close the data source window. ═══ 13.1.4. Error in decimal input ═══ Message text: Enter a valid decimal number in the 's' field. s can be 'Interval' or 'Intervals per Working Set'. Explanation: An error was made when typing the desired decimal value into the dialog field. Corrective action: When you press OK, the cursor is placed in the erroneous field in the dialog. Type the correct decimal character and press Enter. ═══ 13.1.5. Error in hex input ═══ Message text: Enter a valid hex number in the 's' field. s can be 'Address', 'Length', 'Width', 'Selector', 'or Offset'. Explanation: An error was made when typing the desired hexadecimal value into the dialog field. Corrective action: When you press OK, the cursor is placed in the erroneous field in the dialog. Type the correct hexadecimal character and press Enter. ═══ 13.1.6. Find text not entered ═══ Message text: Text must be typed in the field. Explanation: You did not type a string to find. Corrective action: When you press OK, the cursor is placed in the erroneous field in the dialog. Type the string you want to find and press Enter. ═══ 13.1.7. No Monospaced Font ═══ Message text: A monospaced font was not found. Please install one. Explanation: THESEUS4 uses only monospaced Single Byte Character Set (SBCS) fonts. The "System Monospaced - 8x12" font is used, if it is present. If it is not present and another monospaced font is present, then the first monospaced font found will be used. If a monospaced font is not found, THESEUS4 cannot continue to run. Corrective action: Install a monospaced font, then try THESEUS4 again. ═══ 13.1.8. Out of Windows Error ═══ Message text: All THESEUS4 windows are in use. You must close one before another can be created. Explanation: THESEUS4 can generate only 16 Detail windows. Corrective action: Close one or more of the open THESEUS4 Detail windows. The Windows pull-down on the Process Hierarchy window contains a list of the Detail windows currently open. ═══ 13.1.9. Process Ended ═══ Message text: The selected process has ended. The request cannot be performed. Explanation: You had previously selected a process on the Process Hierarchy window. The process you had selected has ended and you have requested that a display be generated from that process. Corrective action: Only active processes can be used for display generation. ═══ 13.1.10. PTDA Size not Determined ═══ Message text: This version of OS/2 is not supported by THESEUS4. The size of the PTDA cannot be determined. Explanation: Different levels of OS/2 have different sizes of PTDAs. THESEUS4 must "discover" the size of the PTDA during its initialization. The version of OS/2that you have is so different from those THESEUS4 expects that it could not determine the PTDA size. Corrective action: Either:  Acquire a version of THESEUS4 that supports the installed version of OS/2 or  Install a version of OS/2 that THESEUS4 supports. ═══ 13.1.11. MTE Format not Recognized ═══ Message text: This version of OS/2 is not supported by THESEUS4. The Module Table Entry (MTE) format is unknown. Explanation: Different levels of OS/2 have different formats of the MTEs. THESEUS4 must "discover" the format of the MTE during its initialization. The version of OS/2 that you have is so different from those THESEUS4 expects that it could not determine the MTE format. Corrective action: Either:  Acquire a version of THESEUS4 that supports the installed version of OS/2 or  Install a version of OS/2 that THESEUS4 supports. ═══ 13.1.12. File Name not Valid ═══ Message text: The file name is not valid for the file system on the specified disk. Explanation: The file name supplied in the SaveAs dialog was not accepted by the operating system. You may have specified:  An invalid path, or  A long file name for a FAT disk. Corrective action: Specify a correct path and file name. ═══ 13.2. Imbedded Errors ═══ THESEUS4 generates some errors imbedded within the output:  Linear address: no Page Table  Linear address+length: no Page Table  Linear address: page not present  Linear address+Length: page not present  Linear address+Length: > 32 bits  SystemArenaHeaderLinear was not properly located  Unknown error to error_handler0 (When the low-level error routine cannot determine what window is generating data, these messages may appear in a popup window. However, they will normally appear in the output window text at the point that the error was detected.) ═══ 13.2.1. Linear address: no Page Table ═══ Message text: >>> Linear address: no Page Table, linear=llllllll. Explanation: A "read linear" request was done in the program. The requested linear address is not valid because there is no page table defined for that linear address. This is an internal error in the program. It is not caused by user input. It is normally caused by the program improperly interpreting a value in one of the OS/2 control blocks. It is presented for the program support personnel's use. ═══ 13.2.2. Linear address+length: no Page Table ═══ Message text: >>> Linear address+length: no Page Table, linear=llllllll, length=hhhhhhhh. Explanation: A "read linear" request was done in the program. The linear address at the end of the requested area is not valid because there is no page table defined for that linear address. This is an internal error in the program. It is not caused by user input. It is normally caused by the program improperly interpreting a value in one of the OS/2 control blocks. It is presented for the program support personnel's use. ═══ 13.2.3. Linear address: page not present ═══ Message text: >>> Linear address: page not present, linear=llllllll. Explanation: A "read linear" request was done in the program. The requested linear address is not valid because the page at that linear address is not present. This is an internal error in the program. It is not caused by user input. It is normally caused by the program improperly interpreting a value in one of the OS/2 control blocks. It is presented for the program support personnel's use. ═══ 13.2.4. Linear address+Length: page not present ═══ Message text: >>> Linear address+Length: page not present, linear=llllllll, length=hhhhhhhh. Explanation: A "read linear" request was done in the program. The linear address at the end of the requested area is not valid because the page at that linear address is not present. This is an internal error in the program. It is not caused by user input. It is normally caused by the program improperly interpreting a value in one of the OS/2 control blocks. It is presented for the program support personnel's use. ═══ 13.2.5. Linear address+Length: > 32 bits ═══ Message text: >>> Linear address+Length: > 32 bits, linear=llllllll, length=hhhhhhhh. Explanation: A "read linear" request was done in the program. The requested linear address is not valid because the address of the end of the area is greater than 32 bits. This is an internal error in the program. It is not caused by user input. It is normally caused by the program improperly interpreting a value in one of the OS/2 control blocks. It is presented for the program support personnel's use. ═══ 13.2.6. SystemArenaHeaderLinear was not properly located ═══ Message text: >>> SystemArenaHeaderLinear was not properly located at llllllll. Explanation: The "System Arena Header" was not found. This is an internal error in the program. It is not caused by user input. It is normally caused by the program improperly interpreting a value in one of the OS/2 control blocks. It is presented for the program support personnel's use. ═══ 13.2.7. Unknown error to error_handler0 ═══ Message text: >>> Unknown error to error_handler0: error_code=i1, p1=i2, p2=i3. Explanation: An error was sent to the error handler which had an unknown error code. The values printed (i1, i2, i3) are the inputs to the routine. This is an internal error in the program. It is not caused by user input. It is normally caused by the program improperly interpreting a value in one of the OS/2 control blocks. It is presented for the program support personnel's use. ═══ Enter Button ═══ When you press the Enter button, the action is performed. ═══ Find Button ═══ When you press the Find button, the search begins from the start of the window. ═══ OK Button ═══ When you press the OK button, the function is performed. ═══ Start Button ═══ When you press the Start button, the function is performed. Periodic updates are automatically started. ═══ Cancel Button ═══ When you press the Cancel button, the dialog is canceled and you are returned to the window.