Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | StackNum | |||
integer, | intent(in) | :: | InstructionNum | |||
type(ErlValueType), | intent(in) | :: | ReturnValue |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE WriteTrace(StackNum, InstructionNum, ReturnValue)
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN June 2006
! MODIFIED Brent Griffith, May 2009
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
!
! METHODOLOGY EMPLOYED:
!
! USE STATEMENTS:
USE General, ONLY : CreateSysTimeIntervalString
USE DataEnvironment, ONLY : EnvironmentName,CurMnDy
USE DataGlobals, ONLY : WarmupFlag,DoingSizing
USE InputProcessor, ONLY: ProcessNumber
USE DataGlobals, ONLY: OutputFileDebug
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: StackNum
INTEGER, INTENT(IN) :: InstructionNum
TYPE(ErlValueType), INTENT(IN) :: ReturnValue
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=2*MaxNameLength) :: NameString
CHARACTER(len=2*MaxNameLength) :: LineNumString
CHARACTER(len=2*MaxNameLength) :: LineString
CHARACTER(len=2*MaxNameLength) :: cValueString
CHARACTER(len=2*MaxNameLength) :: TimeString
INTEGER :: LineNum
CHARACTER(len=45) :: DuringWarmup
LOGICAL, SAVE :: MyOneTimeFlag = .FALSE.
! FLOW:
IF ((.NOT. OutputFullEMSTrace) .AND. (.NOT. OutputEMSErrors)) RETURN
IF ((OutputEMSErrors) .AND. (.NOT. OutputFullEMSTrace)) THEN
!see if error needs to be reported.
IF (ReturnValue%Type /= ValueError) RETURN
ENDIF
IF (.NOT. MyOneTimeFlag) THEN
WRITE(OutputEMSFileUnitNum, '(A)') '**** Begin EMS Language Processor Error and Trace Output *** '
WRITE(OutputEMSFileUnitNum, '(A)') '<Erl program name, line #, line text, result, occurance timing information ... >'
MyOneTimeFlag = .TRUE.
ENDIF
! if have not return'd yet then write out full trace
NameString = ErlStack(StackNum)%Name
LineNum = ErlStack(StackNum)%Instruction(InstructionNum)%LineNum
LineNumString = IntegerToString(LineNum)
LineString = ErlStack(StackNum)%Line(LineNum)
cValueString = ValueToString(ReturnValue)
! put together timestamp info
IF (WarmupFlag) THEN
IF (.not. DoingSizing) THEN
DuringWarmup=' During Warmup, Occurrence info='
ELSE
DuringWarmup=' During Warmup & Sizing, Occurrence info='
ENDIF
ELSE
IF (.not. DoingSizing) THEN
DuringWarmup=' Occurrence info='
ELSE
DuringWarmup=' During Sizing, Occurrence info='
ENDIF
ENDIF
TimeString = TRIM(DuringWarmup)//TRIM(EnvironmentName)//', '// &
TRIM(CurMnDy)//' '//TRIM(CreateSysTimeIntervalString())
WRITE(OutputEMSFileUnitNum, '(A)') TRIM(NameString)//',Line '//TRIM(LineNumString)//','//TRIM(LineString) &
//','//TRIM(cValueString)//','//Trim(TimeString)
END SUBROUTINE WriteTrace