rsg -l 1000 <rsg.datthen it would be monitored by an MP
allocview
asallocview rsg -l 1000 <rsg.dat
link evinit # support procedures $include "evdefs.icn" # event definitions procedure main(args) EvInit(args) | ... # load and launch the SP while EvGet() do { # request event in SP ... # process event } # final processing (if any) end
evinit
includes procedures that support
monitoring activities
evdefs.icn
(on LPATH
) provides
symbolic definitions for event codes args
provides the command line arguments, including the
program to load and its argumentsEvInit(args)
calls load()
with the SP and
its command-line arguments, and initializes monitoring; it may failEvGet()
requests an event and turns control
over to the SPEvGet()
returns and
the event code and value are set in &eventcode
and &eventvalu
e
in the MP&eventvalue
contains (a pointer to) the set in SPEvGet(
) can be used to specify the kinds
of events that are wantedStructMask
is the name of the mask for structure access eventsEvGet(StructMask)limits the kinds of events reported to those associated with structure access
link evinit $include "evdefs.icn" procedure main(args) EvInit(args) | stop("*** cannot load icode file ***") proact := table(0) # Tabulate procedure events. while EvGet(ProcMask) do proact[&eventcode] +:= 1 # List the results. write("procedure calls: ",right(proact[E_Pcall], 6)) write("procedure returns: ", right(proact[E_Pret], 6)) write("procedure suspensions: ", right(proact[E_Psusp], 6)) write("procedure failures: ", right(proact[E_Pfail], 6)) write("procedure resumptions: ", right(proact[E_Presum], 6)) write("procedure removals: ", right(proact[E_Prem], 6)) end
ProcMask
, are:
E_Pcall procedure call E_Pfail procedure failure E_Prem suspended procedure removal E_Presum procedure resumption E_Pret procedure return E_Psusp procedure suspension
chess
is
procedure calls: 6333 procedure returns: 947 procedure suspensions: 15628 procedure failures: 5344 procedure resumptions: 15586 procedure removals: 42