2
/* $Id: trctype.h,v 1.1 2002/10/14 15:00:18 chanceli Exp $ */
5
* Tracer version 1.0: A Trace File Generator for PVM
6
* Oak Ridge National Laboratory, Oak Ridge TN.
7
* Authors: James Arthur Kohl and G. A. Geist
8
* (C) 1994 All Rights Reserved
12
* Permission to use, copy, modify, and distribute this software and
13
* its documentation for any purpose and without fee is hereby granted
14
* provided that the above copyright notice appear in all copies and
15
* that both the copyright notice and this permission notice appear
16
* in supporting documentation.
18
* Neither the Institution, Oak Ridge National Laboratory, nor the
19
* Authors make any representations about the suitability of this
20
* software for any purpose. This software is provided ``as is''
21
* without express or implied warranty.
23
* Tracer was funded by the U.S. Department of Energy.
27
/* Host Name Macros */
29
#define TRC_LOCALHOST( _name ) \
31
( TRC_HOST_NAME != NULL && TRC_HOST_ALIAS != NULL \
32
&& ( !strcmp( TRC_HOST_NAME, _name ) \
33
|| !strcmp( TRC_HOST_ALIAS, _name ) \
34
|| ( TRC_TMP_HOST = trc_host_alias_str( _name ), \
35
TRC_TMP_CMP = !strcmp( TRC_HOST_NAME, TRC_TMP_HOST ), \
36
free( TRC_TMP_HOST ), \
40
#define TRC_HOST_COMPARE( _host, _name ) \
42
( !strcmp( (_host)->name, _name ) \
43
|| !strcmp( (_host)->alias, _name ) \
44
|| ( TRC_TMP_HOST = trc_host_alias_str( _name ), \
45
TRC_TMP_CMP = !strcmp( (_host)->name, TRC_TMP_HOST ), \
46
free( TRC_TMP_HOST ), \
51
/* Group Task Check Macro */
53
#define TRC_GROUPTASK( _name ) \
54
( trc_compare( "pvmg", _name ) || trc_compare( "pvmcg", _name ) )
57
/* Trace Event Record Access Macros */
59
#define TRC_GET_TEVREC( _tr, _trptr, _did ) \
61
( (_trptr) = trc_get_tevrec( _tr, _did ), \
65
#define TRC_GET_TEVREC_VALUE( _tr, _did, _dtype ) \
67
( (TRC_TMP_TR = trc_get_tevrec( _tr, _did )) != NULL ? \
68
TRC_VALUE_OF( TRC_TMP_TR->value, _dtype ) : (_dtype) -1 ) \
71
#define TRC_ARR_VALUE_OF( _ptr, _dtype, _index ) \
72
( ((_dtype *) (_ptr))[_index] )
74
#define TRC_VALUE_OF( _ptr, _dtype ) ( *( (_dtype *) (_ptr) ) )
77
/* Host Life Status Constants */
79
#define TRC_NOT_IN_PVM 0
83
/* TEV Type Constants */
85
#define TRC_ENTRY_TEV 0
86
#define TRC_EXIT_TEV 1
87
#define TRC_IGNORE_TEV 2
91
/* Trace Message Status Constants */
93
#define TRC_MSG_STATUS_NONE 0
94
#define TRC_MSG_STATUS_ACTIVE 1
95
#define TRC_MSG_STATUS_MORE 2
96
#define TRC_MSG_STATUS_OVERWRITE 4
97
#define TRC_MSG_STATUS_CLEANUP 8
100
/* General Constants */
106
/* Tracer Data Structures & Types */
109
typedef void (*trc_vfp)();
112
struct trc_trie_struct
117
/* TRC_TRIE */ struct trc_trie_struct *next;
120
typedef struct trc_trie_struct *TRC_TRIE;
123
struct trc_did_struct
128
/* TRC_DID */ struct trc_did_struct *next;
131
typedef struct trc_did_struct *TRC_DID;
134
typedef void *TRC_VALUE;
137
struct trc_datadesc_struct
144
/* TRC_DATADESC */ struct trc_datadesc_struct *next;
147
typedef struct trc_datadesc_struct *TRC_DATADESC;
150
struct trc_tevdesc_struct
160
/* TRC_TEVDESC */ struct trc_tevdesc_struct *next;
163
typedef struct trc_tevdesc_struct *TRC_TEVDESC;
166
struct trc_tevdesc_info_struct
173
typedef struct trc_tevdesc_info_struct TRC_TEVDESC_INFO_STRUCT;
174
typedef TRC_TEVDESC_INFO_STRUCT *TRC_TEVDESC_INFO;
177
struct trc_tevtask_struct
185
/* TRC_TEVTASK */ struct trc_tevtask_struct *next;
188
typedef struct trc_tevtask_struct *TRC_TEVTASK;
191
struct trc_tevrec_struct
196
/* TRC_TEVREC */ struct trc_tevrec_struct *next;
199
typedef struct trc_tevrec_struct *TRC_TEVREC;
202
struct trc_host_struct
208
struct timeval delta;
209
struct timeval last_time;
220
/* Extension Structure for Drawing, Etc. */
223
/* TRC_HOST */ struct trc_host_struct *next;
226
typedef struct trc_host_struct *TRC_HOST;
237
TRC_TEVTASK tevtask_list;
244
trc_vfp event_dump_hdr;
245
trc_vfp output_dump_hdr;
246
trc_vfp handle_host_add_notify;
247
trc_vfp handle_host_del_notify;
248
trc_vfp handle_descriptor;
249
trc_vfp handle_old_descriptor;
250
trc_vfp handle_event;
251
trc_vfp handle_old_event;
252
trc_vfp handle_command;
253
trc_vfp handle_comment;
254
/* TRC_ID */ struct trc_id_struct *next;
257
typedef struct trc_id_struct *TRC_ID;