2
/* $Id: tevmac.h,v 1.6 1997/12/23 20:24:43 pvmsrc Exp $ */
5
* PVM version 3.4: Parallel Virtual Machine System
6
* University of Tennessee, Knoxville TN.
7
* Oak Ridge National Laboratory, Oak Ridge TN.
8
* Emory University, Atlanta GA.
9
* Authors: J. J. Dongarra, G. E. Fagg, M. Fischer
10
* G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci,
11
* P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
12
* (C) 1997 All Rights Reserved
16
* Permission to use, copy, modify, and distribute this software and
17
* its documentation for any purpose and without fee is hereby granted
18
* provided that the above copyright notice appear in all copies and
19
* that both the copyright notice and this permission notice appear in
20
* supporting documentation.
22
* Neither the Institutions (Emory University, Oak Ridge National
23
* Laboratory, and University of Tennessee) nor the Authors make any
24
* representations about the suitability of this software for any
25
* purpose. This software is provided ``as is'' without express or
28
* PVM version 3 was funded in part by the U.S. Department of Energy,
29
* the National Science Foundation and the State of Tennessee.
38
* Revision 1.6 1997/12/23 20:24:43 pvmsrc
39
* Added new TEV_PUSHTOP, TEV_AMPUSHED and TEV_POPTOP macros.
40
* - to fake top level tracing, i.e. "push" the current tracing
41
* depth and turn on full tracing again (until next "pop").
42
* - for things like message handler functions whose whole existence
43
* is inside another PVM call.
44
* Renamed "xamtraced" local trace var (TEV_DECLS).
45
* -> "pvmamtraced", no chance of name clashes... (ha ha)
48
* Revision 1.5 1997/06/25 22:11:13 pvmsrc
49
* Markus adds his frigging name to the author list of
50
* every file he ever looked at...
52
* Revision 1.4 1997/04/30 21:33:25 pvmsrc
53
* SGI Compiler Warning Cleanup.
54
* - stupid ##@%&@(... made explicit boolean expressions out of
55
* assignments inside TEV_EXCLUSIVE conditional. :-Q
57
* Revision 1.3 1997/01/28 19:28:35 pvmsrc
58
* New Copyright Notice & Authors.
60
* Revision 1.2 1996/10/24 21:49:50 pvmsrc
61
* Modified for New Tracing Facility:
62
* - added new struct pvmtrcencvec for trace event packing.
63
* - modified tracing macros:
64
* * TEV_DO_TRACE() requires 2 args now, kind & entry_exit.
65
* * TEV_FIN(), tev_fin() now requires no args.
66
* * TEV_DECLS, no need for xtrcbuf, xtrcsbf now.
67
* - added TEV_PACK_*() macros for trace event contents,
68
* for performance, uses enc_*() routines directly.
70
* Revision 1.1 1996/09/23 23:43:37 pvmsrc
73
* Revision 1.1 1994/06/03 20:38:32 manchek
79
/*****************************
80
** Internal Trace Structs **
82
*****************************/
104
/*****************************
105
** Internal Trace Macros **
107
*****************************/
109
/* to check that task is connected without a function call */
111
#define BEATASK ( pvmmytid == -1 ? pvmbeatask() : 0 )
113
/* check tracing on event kind */
115
#define TEV_CHECK_TRACE( _kind ) \
116
( !BEATASK && pvmtrc.trctid > 0 && pvmtrc.trctid != pvmmytid \
117
&& TEV_MASK_CHECK( pvmtrc.tmask, _kind ) )
119
/* check tracing and generate start message */
121
#define TEV_DO_TRACE( _kind, _entry_exit ) \
122
( TEV_CHECK_TRACE( _kind ) && tev_begin( _kind, _entry_exit ) )
124
#define TEV_FIN tev_fin()
126
#define TEV_DECLS int pvmamtraced; \
130
#define TEV_EXCLUSIVE ( (pvmamtraced = pvmtoplvl) != 0 \
131
&& (pvmtoplvl = 0) == 0 )
132
#define TEV_AMEXCL pvmamtraced
133
#define TEV_ENDEXCL ( pvmtoplvl = pvmamtraced )
135
#define TEV_PUSHTOP ( pvmtoplvlsave = pvmtoplvl, pvmtoplvl = 1, \
137
#define TEV_AMPUSHED pvmampushed
138
#define TEV_POPTOP ( pvmtoplvl = pvmtoplvlsave, pvmampushed = 0 )
142
#define TEV_PACK_BYTE( _did, _array, _datap, _cnt, _std ) \
143
(pvmtrccodef->enc_byte)( _did, _array, \
144
(void *)(_datap), _cnt, _std )
146
#define TEV_PACK_CPLX( _did, _array, _datap, _cnt, _std ) \
147
(pvmtrccodef->enc_cplx)( _did, _array, \
148
(void *)(_datap), _cnt, _std )
150
#define TEV_PACK_DCPLX( _did, _array, _datap, _cnt, _std ) \
151
(pvmtrccodef->enc_dcplx)( _did, _array, \
152
(void *)(_datap), _cnt, _std )
154
#define TEV_PACK_DOUBLE( _did, _array, _datap, _cnt, _std ) \
155
(pvmtrccodef->enc_double)( _did, _array, \
156
(void *)(_datap), _cnt, _std )
158
#define TEV_PACK_FLOAT( _did, _array, _datap, _cnt, _std ) \
159
(pvmtrccodef->enc_float)( _did, _array, \
160
(void *)(_datap), _cnt, _std )
162
#define TEV_PACK_INT( _did, _array, _datap, _cnt, _std ) \
163
(pvmtrccodef->enc_int)( _did, _array, \
164
(void *)(_datap), _cnt, _std )
166
#define TEV_PACK_UINT( _did, _array, _datap, _cnt, _std ) \
167
(pvmtrccodef->enc_uint)( _did, _array, \
168
(void *)(_datap), _cnt, _std )
170
#define TEV_PACK_LONG( _did, _array, _datap, _cnt, _std ) \
171
(pvmtrccodef->enc_long)( _did, _array, \
172
(void *)(_datap), _cnt, _std )
174
#define TEV_PACK_ULONG( _did, _array, _datap, _cnt, _std ) \
175
(pvmtrccodef->enc_ulong)( _did, _array, \
176
(void *)(_datap), _cnt, _std )
178
#define TEV_PACK_SHORT( _did, _array, _datap, _cnt, _std ) \
179
(pvmtrccodef->enc_short)( _did, _array, \
180
(void *)(_datap), _cnt, _std )
182
#define TEV_PACK_USHORT( _did, _array, _datap, _cnt, _std ) \
183
(pvmtrccodef->enc_ushort)( _did, _array, \
184
(void *)(_datap), _cnt, _std )
186
#define TEV_PACK_STRING( _did, _array, _datap, _cnt, _std ) \
187
(pvmtrccodef->enc_str)( _did, _array, \
188
(void *)(_datap), _cnt, _std )