Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
tracing.c File Reference
#include <errno.h>
#include "defs.h"
#include "tracing.h"
#include "erglob.h"
#include "flags.h"
#include "util.h"
Include dependency graph for tracing.c:

Go to the source code of this file.

Classes

struct  PDESC

Defines

#define INDENT   2
#define BB_COUNT   50 /* Number of traceable BBs */
#define PU_COUNT   10 /* Number of traceable PUs */
#define REGION_COUNT   10 /* Number of traceable REGIONs */
#define CTRL_COUNT   50 /* Number of control options */
#define PD_num(p)   (p->num)
#define PD_id(p)   (p->id)
#define PD_name(p)   (p->name)
#define RID_CREATE_NEW_ID   -1 /* see be/region/region_util.h */

Functions

INT32 Get_Trace_Phase_Number (char **cp, char *arg)
void List_Phase_Numbers (void)
void Set_Trace (INT func, INT arg)
void Set_Current_PU_For_Trace (char *name, INT number)
void Set_Current_Region_For_Trace (INT number)
void Set_Trace_Pu (char *name)
void Set_Trace_Pu_Number (INT number)
void Set_Trace_Region_Number (INT number)
BOOL Get_BB_Trace (INT32 bb_id)
BOOL Get_Trace (INT func, INT arg)
BOOL Stop_Execution (INT phase)
void Set_Trace_File (char *filename)
void Set_Trace_File_internal (FILE *f)
FILE * Get_Trace_File (void)
void Trace_To_Stderr (void)

Variables

static char * source_file = __FILE__
char * SBar = "-----------------------------------------------------------------------\n"
char * DBar = "=======================================================================\n"
char * Sharps = "#######################################################################\n"
static FILE * TFile_internal = NULL
INT32 Progress_Flags = 0
static BOOL Non_stdout_TFile = FALSE
static char * TFile_Name = "stdout"
static UINT TI_Mask
static UINT TD_Mask
static UINT TI_Phase [TP_COUNT]
static UINT TS_Phase [TP_COUNT]
static UINT TN_Phase [TP_COUNT]
static UINT TA_Phase [TP_COUNT]
static UINT TP_Mask [TP_COUNT]
static UINT TB_Enable [BB_COUNT]
static UINT BB_Cnt = 0
static UINT Xstop_Phase = TP_LAST
static UINT TC_Enable [CTRL_COUNT]
static char * PU_Enable [PU_COUNT]
static INT PU_Num_Enable [PU_COUNT]
static UINT PU_Cnt = 0
static UINT PU_NCnt = 0
static INT Region_Num_Enable [REGION_COUNT]
static UINT REGION_NCnt = 0
static char * Current_PU_Name = NULL
static INT Current_PU_Number = 0
static INT Current_Region_Number = 0
static PDESC Phases []

Define Documentation

#define BB_COUNT   50 /* Number of traceable BBs */

Definition at line 89 of file tracing.c.

Referenced by Set_Trace().

#define CTRL_COUNT   50 /* Number of control options */

Definition at line 92 of file tracing.c.

Referenced by Set_Trace().

#define INDENT   2

Definition at line 71 of file tracing.c.

#define PD_id (   p)    (p->id)

Definition at line 134 of file tracing.c.

Referenced by Get_Trace_Phase_Number(), and List_Phase_Numbers().

#define PD_name (   p)    (p->name)

Definition at line 135 of file tracing.c.

Referenced by List_Phase_Numbers().

#define PD_num (   p)    (p->num)

Definition at line 133 of file tracing.c.

Referenced by Get_Trace_Phase_Number(), and List_Phase_Numbers().

#define PU_COUNT   10 /* Number of traceable PUs */

Definition at line 90 of file tracing.c.

Referenced by Set_Trace_Pu(), and Set_Trace_Pu_Number().

#define REGION_COUNT   10 /* Number of traceable REGIONs */

Definition at line 91 of file tracing.c.

Referenced by Set_Trace_Region_Number().

#define RID_CREATE_NEW_ID   -1 /* see be/region/region_util.h */

Definition at line 390 of file tracing.c.

Referenced by Set_Current_PU_For_Trace().


Function Documentation

FILE* Get_Trace_File ( void  )

Definition at line 649 of file tracing.c.

References NULL, and TFile_internal.

Referenced by dump_INITO_idx(), dump_INITV_idx(), List_Phase_Numbers(), and Print_INITVs().

INT32 Get_Trace_Phase_Number ( char **  cp,
char *  arg 
)

Definition at line 226 of file tracing.c.

References EC_Trace_Phase, ErrMsg(), Get_Numeric_Flag(), PD_id, PD_num, Phases, TP_COUNT, TP_LAST, and TP_MIN.

Referenced by Process_Trace_Option().

Here is the call graph for this function:

void List_Phase_Numbers ( void  )

Definition at line 260 of file tracing.c.

References fprintf(), Get_Trace_File(), PD_id, PD_name, PD_num, Phases, TP_COUNT, and TP_Mask.

Referenced by Process_Command_Line().

Here is the call graph for this function:

void Set_Current_PU_For_Trace ( char *  name,
INT  number 
)

Definition at line 392 of file tracing.c.

References Current_PU_Name, Current_PU_Number, name, RID_CREATE_NEW_ID, and Set_Current_Region_For_Trace().

Referenced by Preprocess_PU().

Here is the call graph for this function:

Definition at line 401 of file tracing.c.

References Current_Region_Number.

Referenced by Do_WOPT_and_CG_with_Regions(), and Set_Current_PU_For_Trace().

void Set_Trace_File ( char *  filename)

Definition at line 614 of file tracing.c.

References EC_Trace_Open, ErrMsg(), errno, FALSE, Non_stdout_TFile, NULL, Set_Error_Trace(), TFile_internal, TFile_Name, and TRUE.

Referenced by Cleanup_Files(), and Prepare_Source().

Here is the call graph for this function:

void Set_Trace_File_internal ( FILE *  f)

Definition at line 644 of file tracing.c.

References TFile_internal.

Referenced by dump_INITO_idx(), dump_INITV_idx(), PDGCS_initialize(), and Print_INITVs().

void Set_Trace_Pu ( char *  name)

Definition at line 416 of file tracing.c.

References EC_Trace_PUs, ErrMsg(), name, PU_Cnt, PU_COUNT, and PU_Enable.

Referenced by Process_Trace_Option().

Here is the call graph for this function:

void Set_Trace_Pu_Number ( INT  number)

Definition at line 428 of file tracing.c.

References EC_Trace_PUs, ErrMsg(), PU_COUNT, PU_NCnt, and PU_Num_Enable.

Referenced by Process_Trace_Option().

Here is the call graph for this function:

void Set_Trace_Region_Number ( INT  number)

Definition at line 448 of file tracing.c.

References EC_Trace_REGIONs, ErrMsg(), REGION_COUNT, REGION_NCnt, and Region_Num_Enable.

Referenced by Process_Trace_Option().

Here is the call graph for this function:

BOOL Stop_Execution ( INT  phase)

Definition at line 595 of file tracing.c.

References Xstop_Phase.

void Trace_To_Stderr ( void  )

Definition at line 658 of file tracing.c.

References FALSE, Non_stdout_TFile, NULL, Set_Error_Trace(), TFile_internal, and TFile_Name.

Here is the call graph for this function:


Variable Documentation

UINT BB_Cnt = 0 [static]

Definition at line 101 of file tracing.c.

Referenced by Get_BB_Trace(), and Set_Trace().

char* Current_PU_Name = NULL [static]

Definition at line 111 of file tracing.c.

Referenced by Get_BB_Trace(), Get_Trace(), and Set_Current_PU_For_Trace().

INT Current_PU_Number = 0 [static]

Definition at line 112 of file tracing.c.

Referenced by Get_BB_Trace(), Get_Trace(), and Set_Current_PU_For_Trace().

INT Current_Region_Number = 0 [static]

Definition at line 113 of file tracing.c.

Referenced by Get_Trace(), and Set_Current_Region_For_Trace().

char* DBar = "=======================================================================\n"

Definition at line 85 of file tracing.c.

Referenced by Set_Trace_File(), and Trace_To_Stderr().

PDESC Phases[] [static]

Definition at line 144 of file tracing.c.

Referenced by Get_Trace_Phase_Number(), List_Phase_Numbers(), main(), and sgi_cmd_line().

Definition at line 82 of file tracing.c.

UINT PU_Cnt = 0 [static]

Definition at line 106 of file tracing.c.

Referenced by Get_BB_Trace(), Get_Trace(), and Set_Trace_Pu().

char* PU_Enable[PU_COUNT] [static]

Definition at line 104 of file tracing.c.

Referenced by Get_BB_Trace(), Get_Trace(), and Set_Trace_Pu().

UINT PU_NCnt = 0 [static]

Definition at line 107 of file tracing.c.

Referenced by Get_BB_Trace(), Get_Trace(), and Set_Trace_Pu_Number().

Definition at line 105 of file tracing.c.

Referenced by Get_BB_Trace(), Get_Trace(), and Set_Trace_Pu_Number().

UINT REGION_NCnt = 0 [static]

Definition at line 109 of file tracing.c.

Referenced by Get_Trace(), and Set_Trace_Region_Number().

Definition at line 108 of file tracing.c.

Referenced by Get_Trace(), and Set_Trace_Region_Number().

char* SBar = "-----------------------------------------------------------------------\n"

Definition at line 64 of file tracing.c.

Referenced by List_Compile_Options(), and Print_Option_Group().

char* Sharps = "#######################################################################\n"

Definition at line 68 of file tracing.c.

char* source_file = __FILE__ [static]

Definition at line 53 of file tracing.c.

UINT TA_Phase[TP_COUNT] [static]

Definition at line 98 of file tracing.c.

Referenced by Get_Trace(), and Set_Trace().

UINT TB_Enable[BB_COUNT] [static]

Definition at line 100 of file tracing.c.

Referenced by Get_BB_Trace(), and Set_Trace().

Definition at line 103 of file tracing.c.

Referenced by Get_Trace(), and Set_Trace().

UINT TD_Mask [static]

Definition at line 94 of file tracing.c.

Referenced by Get_Trace(), and Set_Trace().

FILE* TFile_internal = NULL [static]

Definition at line 74 of file tracing.c.

Referenced by Get_Trace_File(), Set_Trace_File(), Set_Trace_File_internal(), and Trace_To_Stderr().

char* TFile_Name = "stdout" [static]

Definition at line 86 of file tracing.c.

Referenced by Set_Trace_File(), and Trace_To_Stderr().

UINT TI_Mask [static]

Definition at line 93 of file tracing.c.

Referenced by Get_Trace(), and Set_Trace().

UINT TI_Phase[TP_COUNT] [static]

Definition at line 95 of file tracing.c.

Referenced by Get_Trace(), and Set_Trace().

UINT TN_Phase[TP_COUNT] [static]

Definition at line 97 of file tracing.c.

Referenced by Get_Trace(), and Set_Trace().

UINT TP_Mask[TP_COUNT] [static]

Definition at line 99 of file tracing.c.

Referenced by Get_Trace(), List_Phase_Numbers(), and Set_Trace().

UINT TS_Phase[TP_COUNT] [static]

Definition at line 96 of file tracing.c.

Referenced by Get_Trace(), and Set_Trace().

UINT Xstop_Phase = TP_LAST [static]

Definition at line 102 of file tracing.c.

Referenced by Set_Trace(), and Stop_Execution().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines