rtsDDe (1158446), страница 7
Текст из файла (страница 7)
GNS = { MsgPasGrp, StartRedGrp, WaitRedGrp, RedGrp, StartShdGrp, WaitShdGrp, ShdGrp, DistrGrp, ReDistrGrp, MapPLGrp, DoPLGrp, PrgBlockGrp, IOGrp, RemAccessGrp, UserDebGrp, StatistGrp, SystemGrp }
-
Characteristic of own productive time of the program execution itself (not taking into account Run-Time System calls):
OUPT = IM[UserGrp][UserGrp].ProductTime
-
Characteristic of own lost time of program execution itself (not taking into account Run-Time System calls):
OULT = IM[UserGrp][UserGrp].LostTime
-
Characteristic of productive execution time of i-th group functions, directly called by the user program (i MsgPasGrp):
SPTi =
jGNS
jMsgPasGrpIM[I][j].ProductTime
-
Characteristic of productive execution time of Run-Time System functions, directly called by the user program:
SPT =
iGNS
IMsgPasGrpSPTi
-
Characteristic of lost execution time of i-th group functions, directly called by the user program:
SLTi =
jGNSIM[i][j].LostTime
-
Characteristic of lost execution time of Run-Time System functions, directly called by the user program:
SLT =
IGNSSLTi
-
Characteristic of productive time of user program execution:
UPT = OUPT + SPT
-
Characteristic of lost time of the user program execution:
ULT = OULT + SLT
-
Characteristic of the number of Run-Time System function calls, performed directly by user program:
jGNSIM[UserGrp][j].CallCount
-
Characteristic of real dissynchronization time when executing i-th group functions, directly called by user program:
RMTi = IM[i][MsgPasGrp].ProductTime
-
Characteristic of real dissynchronization time of user program execution:
RMT =
IGNSRMTi
-
Characteristic of own productive time of j-th group function execution (not taking into account other group function calls) (j MsgPasGrp):
OSPTj =
iGNSIM[i][j].ProductTime
-
Characteristic of own time of j-th group function execution (not taking into account other group function calls):
| OSLTj = | | IM[i][j].LostTime |
11.1.4Auxiliary matrix of user program characteristics
To control and debug information accumulation and visualization for performance analysis Run-Time System has auxiliary matrix of user program execution characteristics:
s_GRPTIMES TaskInter[StatGrpCount][StatGrpCount]; .
The matrix TaskInter corresponds to initial interval of the user program execution. The information accumulation is performed independently on main mechanism of statistics accumulation. Program execution characteristics, contained in TaskInter matrix elements, are not corrected by the number of processors, executing the current branch.
On program termination specified part of TaskInter matrix is output to Run-Time System informational message stream.
The parameters TimeExpendPrint and StatGrpName of statist.* files control information accumulation in TaskInter matrix. If TimeExpendPrint is equal to zero, the information accumulation in TaskInter matrix is not done. Non-zero value of the parameter defines accumulation mode and structure and form of output information.
| 1 | | brief output mode; the following information is output: | - total time of Run-Time System operating (System Time) |
| - time of task solving (Task Time) and included in it execution time of Run-Time System functions (Function Time) (without division on productive and lost times); | |||
| 2 | | in addition to brief mode the characteristics of the column, which is the sum of TaskInter matrix columns, is output (s_GRPTIMES structures are summarized by element when TaskInter matrix elements are summarized). | |
| 3 | | in addition to brief mode the characteristics of the row, which is the sum of TaskInter matrix rows, is output; | |
| 4 | | in addition to brief mode the characteristics of the column, which name-number is defined by StatGrpName parameter value; | |
| 5 | | in addition to brief mode the characteristics of the row, which name-number is defined by StatGrpName parameter value; | |
11.1.5Supporting characteristic accumulation of input/output DVM-operations implemented in Fortran
Usually when the user program calls any Run-Time System function, the function group number is saved in global variable
int CurrOper; .
During the called function execution and on its completion the value of CurrOper variable is used as matrix IM row number to keep measured characteristics.
When DVM input/output operations in Fortran are executed, Run-Time System functions that are not input/output ones are called. To correct accumulation of characteristics of Fortran input/output operations it is necessary:
-
to assign CurrOper variable IOGrp value (input/output function is executed);
-
to save unchanged the value of CurrOper variable up to input/output operation completion when any Run-Time System function is called by the user program;
-
to allow CurrOper variable updating after input/output operation completion.
To implement these requirements Run-Time System provides the functions
void biof_(void);
and
void eiof_(void); .
The user program at the beginning of input/output operation calls the function biof_. The function biof_ assigns IOGrp value to CurrOper variable and 1 to global variable
unsigned char CurrOperFix; .
If CurrOperFix variable has non-zero value, CurrOper value is not changed when the user program invokes Run-Time System functions.
The function eiof_ is intended to inform Run-Time System about input/output operation completion. Its execution consists of the assignment to CurrOperFix zero value, allowing updating CurrOper value.
11.2Tools of external controlling statistics accumulation program
The external control of statistics accumulation program functioning is implemented by the following parameters, specified in parameter files statist.*:
| Is_DVM_STAT | | flag to enable statistics accumulation; |
| StatBufLength | | size in bytes of statistics accumulation buffer for one processor; |
| StatFileName | | name of the file for uploading the statistics accumulation buffers from all the processors, assigned to the task; |
| DelStatist | | flag to delete "old" (kept from previous startup) file with accumulated trace. |
| IsTimeExpend | | flag to count user program consumption time (flag to accumulate ProductTime and LostTime characteristics in interval characteristic matrix IM); |
| IsSynchrTime | | flag to count real dissynchronization time (flag to accumulate ProductTime characteristic in MsgPasGrp column of interval characteristic matrix IM); |
| IsTimeVariation | | flag to count time of potential dissynchronization and time variation; |
| MaxIntervalLevel | | maximal interval nesting level of the user program execution. |
11.3Initializing statistics accumulation program
When statistics accumulation program is initialized, the values are assigned to the following global variables (corresponding to the external parameters, considered in section 11.2):
| char *StatBufPtr | | pointer to the buffer of statistics information accumulation; |
| long StatBufLength | | size in bytes of the buffer of statistics information accumulation. |
After initialization of mentioned above global variables the function
void stat_init (void); (statist.c file)
is called to more specific statistics accumulation tuning.
In particular, stat_init function must give to Run-Time System initial interval characteristic matrix (must initialize CurrInterPtr pointer, see section 11.1.1).
After stat_init function return Run-Time System considers that statistics accumulation is activated.
11.4Processing calls of Run-Time System functions by statistics accumulation program
After exiting stat_init function, considered in section 11.3, Run-Time System begins to accumulate characteristics of user program execution in interval matrix of characteristics.
The characteristics are counted in IM matrix on entry in and exit from any Run-Time System function, accessible to the user program. Entry in and exit from some Run-Time System functions require additional processing. Such functions are the functions, which call and exit times are required to calculate user program potential dissynchronization and time variation. When entering and/or leaving such function Run-Time System calls the function
void stat_event(int EventNumber); (statist.c file),
where EventNumber is occurred trace event number. The parameter EventNumber exactly defines as processed function as occurred event type (entry in processed function or exit from it).
The stat_event function is called by EventNumber event only if EventNumber-th element of global array
unsigned char IsStat[];
is non-zero. Non-zero (1-255) value of IsStat[EventNumber] byte defines the processing way of the event with EventNumber number by stat_event function. The array IsStat is initialized in Run-Time System module statevnt.c, where for entry in and exit from each function, accessible for user program, zero or non-zero value of corresponding element of IsStat array is set.















