	RSTS/E V9.0 PC HISTOGRAM

1) To be done at SYSGEN time:

	You must have included the Monitor Statistics (JSTATS) optional
	code at SYSGEN time for the PC Histogram to function. Note,
	DSTATS are not required or used.

	You must have saved your load maps from SYSGEN (If you want address
	labels).

2) To install the PC Histogram package:

	You must have the RT11 Run-Time System installed (ADDed)
	and $PIP.SAV and $UTILTY.SAV in the system library.

	Copy and RTS name the necessary files as follows:

	RUN $PIP.SAV
	*SY0:$*.*<124>=DEV:$DMPHIS.SAV
	*SY0:$*.*<124>=DEV:$PRTHIS.SAV
	*SY0:*.*<60>=DEV:$MAPHIS.BAS
	*SY0:*.*<60>=DEV:$ADDHIS.BAS
	*^Z

	RUN $UTILTY.SAV
	*NAME RT11=$DMPHIS.SAV
	*NAME RT11=$PRTHIS.SAV
	*^Z

	Now your must build a small binary file from your load
	maps. This file is used by PRTHIS.SAV to add the symbolic
	address information to the histogram. The following load
	maps must exist (all in the same account):

		RSTS.MAP
		TER.MAP
		GEN.MAP
		EMT.MAP
		FIP.MAP
		OVR.MAP
		DSK.MAP
		EM2.MAP
		OPN.MAP
		RSX.MAP

	The follow load maps are optional (meaning that they must
	be present if the option was generated into the monitor
	and absent if the option wasn't generated):

		FMS.MAP		(If FMS support included)
		NSP.MAP		(If DECNET/E was generated)
		TRN.MAP		(If DECNET/E was generated)
		SES.MAP		(If DECNET/E was generated)
		XVR.MAP		(If the DMC driver was generated)
		MCP.MAP		(If MSCP device support was generated)
		BBR.MAP		(If MSCP device support was generated)

	The small binary file is built as follows:

	RUN MAPHIS
	Output to <SY:RSTS.SYM> ?	(The standard response is <CR>)
	Read .MAPs from <SY:CURRENT ACCOUNT> ?	(respond <CR> if maps
						in current account)
	Done building SY:RSTS.SYM


3) To be done at each system startup (usually by $START.CTL):

	RUN ADDHIS

	This program will add the histogram dynamic region at the top
	of available memory.

4) To take a histogram:

	RUN $DMPHIS.SAV
	*name

	Data dump completed

	RUN $PRTHIS.SAV
	*name=name		(Assumes RSTS.SYM exists in current account)

	Done creating Histogram

	PIP name.DMP/DE

	Your PC Histogram now exists in the file "name.HIS". It may be
	queued to the line printer, etc.

5) Interperting the histogram:

	The PC histogram starts out as follows:

PC Histogram Dump with a divisor of x,xxx

	This is the divisor used to "normalize" the highest bar in the
	histogram to aprox 130(10) units of length. In general, a longer
	sample time gives a larger divisor.

	Next is the histogram of monitor memory from virtual address
	000000 through 117700 and the histogram of the "driver" phase
	of the monitor from virtual address 120000 through 137700.
	The format is:

cccccc,oooooo aaaaaa pp.ppp% !OOONNNFFFEEETTTRRR

	Where:

	cccccc	is the .CSECT name the address falls within.

	oooooo	is the offset (byte address) within that .CSECT.

	aaaaaa	is the absolute (virtual) address.

	pp.ppp%	is the percentage of monitor CPU time spent there.

	!	is the base line of the histogram bars.

	An example would be:

SUB   ,001702 107300   .298% !EEERRRRRRRRRRR
SUB   ,002002 107400   .129% !ERRRRR
SUB   ,002102 107500   .019% !*
SUB   ,002202 107600   .000% !

	0.129% of the monitor's total CPU time was spend within virtual
	addresses 107400 through 107477 which correspond to offsets
	2002 through 2101 in the .CSECT SUB in this monitor. 0.129%
	gets 6 units of histogram bar (the ERRRRR). The characters
	making up the bar tell you what phase the monitor was in
	when the PC was sampled within the 107400 through 107477 range.

		R	for the "RSTS" phase (I/O drivers mostly).
		G	for the GEN phase
		E	for the EMT services phase (monitor calls mostly).
		2	for the secondary EMT services phase
		F	for the FIP phase (file processor).
		T	for the terminal service phase.
		D	for the DSK phase
		Z	for the FMS phase
		S	for the SES phase
		N	for the NSP phase (DECNET/E NSP code).
		X	for the TRN phase
		V	for the XVR phase
		M	for the MCP phase
		B	for the BBR phase
		O	for the OPN phase
		U	for the RSX phase
		?	for "other" (2780 or resident FIP overlays usually).
		*	if the percentage is non-zero, but not enough to merit
			a full character unit.

	Monitor code (and the "driver" phase) always ends at or before
	virtual address 140000.

	Next come separate histograms of the other monitor phases.

	The next portion of the histogram is a report of FIP overlay
	usage, when FIP is in one of the following states:

		FIP running
		FIP waiting for FIBUF data
		FIP waiting for SATBUF data
		FIP waiting for OVRBUF data
		FIP waiting for something indeterminable
		FIP queue depth

	The next portion is a histogram of the FIP function usage, by
	FIP function code.
