Oberon || Library || Module Index || Search Engine || Definition || Module
PROCEDURE Start; PROCEDURE Stop(s: Streams.Stream);
During its initialization, a profil(2) buffer is allocated that is as large as the text segment. A profil(2) buffer consists of unsigned 16-bit counters. When profiling starts, the operating system increments on each clock tick the counter within the buffer that corresponds to the currently executed instruction. If a program runs for a sufficient number of clock ticks, the resulting statistics gives a rough impression how much time is spent within each procedure.
Start initializes the entire profil(2) buffer to zeroes and starts profiling.
Stop stops profiling and prints the resulting statistics to the given stream. An output line is generated for each procedure with at least one non-zero counter in the following format: Some optional spaces followed by a whole positive number, followed by one space and a qualified procedure name (module and procedure name, separated by a dot). The order of the output lines depends only of the order of modules and procedures within the SysModules data structure.
SysMonitor is not yet prepared for dynamically loaded modules.
Oberon || Library || Module Index || Search Engine || Definition || Module