INTERFACEThis interface controls the collection of per-call-site allocation statistics. This interface is only useful on platforms with a stack walker (ie. DS3100 & ALPHA_OSF), on all other platforms these routines are no-ops.RTAllocStats ;
NOTE: The implementation of this interface uses the spare
fields of REF headers.
FROM RT0 IMPORT Typecode; VAR siteDepth := 3;
The number of procedure frames included in a site
.
PROCEDURE EnableTrace (tc: Typecode);
Begin recording allocation statistics for type tc
. It is a
checked runtime error to pass an improper typecode or one that
corresponds to an untraced type.
PROCEDURE NSites (tc: Typecode): INTEGER;
Returns the number of sites recorded for typetc
. If sites are not being recorded fortc
, returns -1.
PROCEDURE GetSiteText (tc: Typecode; site, depth: CARDINAL): TEXT;
If sites are being traced for typetc
,site
is a valid tag for the type, anddepth
is less than thesiteDepth
when the site was captured, return a description of the procedure frame corresponding to the captured PC. Otherwise, returnNIL
.
END RTAllocStats.