forsyth20121205-174063a80cc13 years agoHistory
93 lines · 2.9 KB · Text
RawDownload
.TH PROF 3.SH NAMEprof \- profiling device.SH SYNOPSIS.nf.B bind #P /prof .BI /prof/ctl.BI /prof/ n /name.BI /prof/ n /path.BI /prof/ n /histogram.BI /prof/ n /pctl.fi.SH DESCRIPTIONThe.B profdevice serves a two-level directory structure. The first level contains a control file.B ctland zero or more numbered directories each corresponding to a module beingprofiled. Inside each of these numbered directories are further files which describethe particular module being profiled..PPThe write-only control file.B ctlprovides the facilities to profile a module. Messages written to this file initiate andcontrol the profiling..TP 10n.BI module " name"Add the module or the module whose path is.I nameto the list of modules to be profiled..TP 10n.B startStart profiling all modules in the above list or, if the list is empty, start profiling allmodules loaded by the kernel. The profiling is done by sampling..TP 10n.B startcpAs above but do coverage profiling. All instructions executed in the wanted modulesare counted..TP 10n.B startmpAs above but do memory profiling. All heap memory allocations are associatedwith a line of limbo source and all deallocations with the line that did the allocation..TP 10n.B stopStop all profiling..TP 10n.B endStop all profiling and free all memory associated with the modules being profiled.The profiler returns to it's initial state with no modules under profile..TP 10n.BI interval " i"Change the sampling interval to.I ims. The default sampling rate is 100 ms..PPThe second level directories contain information about each module under profile..PPThe read-only file .B namecontains the name of the module in the form it appears in it's module source file..PPThe read-only file.B pathcontains the path of the dis file that implements the module..PPThe write-only control file.B pctlallows finer control of the profiling of a module. It is not used at present..PPThe read-only file.B histogramcontains statistics about the profiled module. The file contains a list of pairsof integers seperated by a space. The first number of the pair is a program countervalue representing the address of a dis instruction. Addresses start from 0 and thelist is in order of increasing address. Thesecond number is the frequency with which this address was sampled. Each readof this file returns the next pair in the list. The frequency is guaranteed to be non-zero..PPWhen coverage profiling the second number of each pair is the number of timesthat dis instruction was executed, when memory profiling it's the amount of memory in bytes..SH SOURCE.B /emu/port/devprof.c.SH BUGSThe device profiles on a global basis and therefore does not distinguish between multiple profilers running at once. .PPThe coverage profiling can only be done on dis instructions..PPThe device can do only one of time, coverage or memory profiling at once.