3
"$Id: tev.c,v 1.6 1997/12/23 20:25:50 pvmsrc Exp $";
6
* PVM version 3.4: Parallel Virtual Machine System
7
* University of Tennessee, Knoxville TN.
8
* Oak Ridge National Laboratory, Oak Ridge TN.
9
* Emory University, Atlanta GA.
10
* Authors: J. J. Dongarra, G. E. Fagg, M. Fischer
11
* G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci,
12
* P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
13
* (C) 1997 All Rights Reserved
17
* Permission to use, copy, modify, and distribute this software and
18
* its documentation for any purpose and without fee is hereby granted
19
* provided that the above copyright notice appear in all copies and
20
* that both the copyright notice and this permission notice appear in
21
* supporting documentation.
23
* Neither the Institutions (Emory University, Oak Ridge National
24
* Laboratory, and University of Tennessee) nor the Authors make any
25
* representations about the suitability of this software for any
26
* purpose. This software is provided ``as is'' without express or
29
* PVM version 3 was funded in part by the U.S. Department of Energy,
30
* the National Science Foundation and the State of Tennessee.
45
#include "..\xdr\types.h"
46
#include "..\xdr\xdr.h"
48
#include <rpc/types.h>
69
struct pmsg *midtobuf();
78
/* "High Performance" Direct Packing Guts Macros :-) */
80
#define PACK_BYTE( _vp, _cnt, _std ) \
81
(pvmtrcmp->m_codef->enc_byte) \
82
( pvmtrcmp, (void *) _vp, _cnt, _std, 1 )
84
#define PACK_CPLX( _vp, _cnt, _std ) \
85
(pvmtrcmp->m_codef->enc_cplx) \
86
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(float) * 2 )
88
#define PACK_DCPLX( _vp, _cnt, _std ) \
89
(pvmtrcmp->m_codef->enc_dcplx) \
90
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(double) * 2 )
92
#define PACK_DOUBLE( _vp, _cnt, _std ) \
93
(pvmtrcmp->m_codef->enc_double) \
94
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(double) )
96
#define PACK_FLOAT( _vp, _cnt, _std ) \
97
(pvmtrcmp->m_codef->enc_float) \
98
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(float) )
100
#define PACK_INT( _vp, _cnt, _std ) \
101
(pvmtrcmp->m_codef->enc_int) \
102
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(int) )
104
#define PACK_UINT( _vp, _cnt, _std ) \
105
(pvmtrcmp->m_codef->enc_int) \
106
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(int) )
108
#define PACK_LONG( _vp, _cnt, _std ) \
109
(pvmtrcmp->m_codef->enc_long) \
110
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(long) )
112
#define PACK_ULONG( _vp, _cnt, _std ) \
113
(pvmtrcmp->m_codef->enc_long) \
114
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(long) )
116
#define PACK_SHORT( _vp, _cnt, _std ) \
117
(pvmtrcmp->m_codef->enc_short) \
118
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(short) )
120
#define PACK_USHORT( _vp, _cnt, _std ) \
121
(pvmtrcmp->m_codef->enc_short) \
122
( pvmtrcmp, (void *) _vp, _cnt, _std, sizeof(short) )
124
#define PACK_STRING( _vp ) \
125
( pvmtrctmp = strlen( _vp ) + 1, \
126
(pvmtrcmp->m_codef->enc_int) \
127
( pvmtrcmp, (void *) &pvmtrctmp, 1, 1, sizeof(int) ), \
128
(pvmtrcmp->m_codef->enc_byte) \
129
( pvmtrcmp, (void *) _vp, pvmtrctmp, 1, 1 ) )
132
/* Trace Event Data Packing Routines - Descriptor */
135
tev_pack_byte_desc( did, array, datap, cnt, std )
145
if ( (cc = PACK_INT( &did, 1, 1 )) )
148
type = TEV_DATA_BYTE | array;
149
if ( (cc = PACK_INT( &type, 1, 1 )) )
152
if ( array == TEV_DATA_ARRAY )
154
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
158
return( PACK_BYTE( datap, cnt, std ) );
162
tev_pack_cplx_desc( did, array, datap, cnt, std )
172
if ( (cc = PACK_INT( &did, 1, 1 )) )
175
type = TEV_DATA_CPLX | array;
176
if ( (cc = PACK_INT( &type, 1, 1 )) )
179
if ( array == TEV_DATA_ARRAY )
181
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
185
return( PACK_CPLX( datap, cnt, std ) );
189
tev_pack_dcplx_desc( did, array, datap, cnt, std )
199
if ( (cc = PACK_INT( &did, 1, 1 )) )
202
type = TEV_DATA_DCPLX | array;
203
if ( (cc = PACK_INT( &type, 1, 1 )) )
206
if ( array == TEV_DATA_ARRAY )
208
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
212
return( PACK_DCPLX( datap, cnt, std ) );
216
tev_pack_double_desc( did, array, datap, cnt, std )
226
if ( (cc = PACK_INT( &did, 1, 1 )) )
229
type = TEV_DATA_DOUBLE | array;
230
if ( (cc = PACK_INT( &type, 1, 1 )) )
233
if ( array == TEV_DATA_ARRAY )
235
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
239
return( PACK_DOUBLE( datap, cnt, std ) );
243
tev_pack_float_desc( did, array, datap, cnt, std )
253
if ( (cc = PACK_INT( &did, 1, 1 )) )
256
type = TEV_DATA_FLOAT | array;
257
if ( (cc = PACK_INT( &type, 1, 1 )) )
260
if ( array == TEV_DATA_ARRAY )
262
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
266
return( PACK_FLOAT( datap, cnt, std ) );
270
tev_pack_int_desc( did, array, datap, cnt, std )
280
if ( (cc = PACK_INT( &did, 1, 1 )) )
283
type = TEV_DATA_INT | array;
284
if ( (cc = PACK_INT( &type, 1, 1 )) )
287
if ( array == TEV_DATA_ARRAY )
289
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
293
return( PACK_INT( datap, cnt, std ) );
297
tev_pack_uint_desc( did, array, datap, cnt, std )
307
if ( (cc = PACK_INT( &did, 1, 1 )) )
310
type = TEV_DATA_UINT | array;
311
if ( (cc = PACK_INT( &type, 1, 1 )) )
314
if ( array == TEV_DATA_ARRAY )
316
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
320
return( PACK_UINT( datap, cnt, std ) );
324
tev_pack_long_desc( did, array, datap, cnt, std )
334
if ( (cc = PACK_INT( &did, 1, 1 )) )
337
type = TEV_DATA_LONG | array;
338
if ( (cc = PACK_INT( &type, 1, 1 )) )
341
if ( array == TEV_DATA_ARRAY )
343
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
347
return( PACK_LONG( datap, cnt, std ) );
351
tev_pack_ulong_desc( did, array, datap, cnt, std )
361
if ( (cc = PACK_INT( &did, 1, 1 )) )
364
type = TEV_DATA_ULONG | array;
365
if ( (cc = PACK_INT( &type, 1, 1 )) )
368
if ( array == TEV_DATA_ARRAY )
370
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
374
return( PACK_ULONG( datap, cnt, std ) );
378
tev_pack_short_desc( did, array, datap, cnt, std )
388
if ( (cc = PACK_INT( &did, 1, 1 )) )
391
type = TEV_DATA_SHORT | array;
392
if ( (cc = PACK_INT( &type, 1, 1 )) )
395
if ( array == TEV_DATA_ARRAY )
397
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
401
return( PACK_SHORT( datap, cnt, std ) );
405
tev_pack_ushort_desc( did, array, datap, cnt, std )
415
if ( (cc = PACK_INT( &did, 1, 1 )) )
418
type = TEV_DATA_USHORT | array;
419
if ( (cc = PACK_INT( &type, 1, 1 )) )
422
if ( array == TEV_DATA_ARRAY )
424
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
428
return( PACK_USHORT( datap, cnt, std ) );
432
tev_pack_string_desc( did, array, datap, cnt, std )
444
if ( (cc = PACK_INT( &did, 1, 1 )) )
447
type = TEV_DATA_STRING | array;
448
if ( (cc = PACK_INT( &type, 1, 1 )) )
451
if ( array == TEV_DATA_ARRAY )
454
return( PvmBadParam );
456
num = ( cnt + ( std - 1 ) ) / std;
457
if ( (cc = PACK_INT( &num, 1, 1 )) )
460
for ( i=0 ; i < cnt ; i += std )
461
if ( (cc = PACK_STRING( ((char **) datap)[i] )) )
468
return( PACK_STRING( (char *) datap ) );
472
/* Trace Event Data Packing Routines - Raw */
475
tev_pack_byte_raw( did, array, datap, cnt, std )
484
if ( array == TEV_DATA_ARRAY )
486
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
490
return( PACK_BYTE( datap, cnt, std ) );
494
tev_pack_cplx_raw( did, array, datap, cnt, std )
503
if ( array == TEV_DATA_ARRAY )
505
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
509
return( PACK_CPLX( datap, cnt, std ) );
513
tev_pack_dcplx_raw( did, array, datap, cnt, std )
522
if ( array == TEV_DATA_ARRAY )
524
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
528
return( PACK_DCPLX( datap, cnt, std ) );
532
tev_pack_double_raw( did, array, datap, cnt, std )
541
if ( array == TEV_DATA_ARRAY )
543
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
547
return( PACK_DOUBLE( datap, cnt, std ) );
551
tev_pack_float_raw( did, array, datap, cnt, std )
560
if ( array == TEV_DATA_ARRAY )
562
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
566
return( PACK_FLOAT( datap, cnt, std ) );
570
tev_pack_int_raw( did, array, datap, cnt, std )
579
if ( array == TEV_DATA_ARRAY )
581
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
585
return( PACK_INT( datap, cnt, std ) );
589
tev_pack_uint_raw( did, array, datap, cnt, std )
598
if ( array == TEV_DATA_ARRAY )
600
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
604
return( PACK_UINT( datap, cnt, std ) );
608
tev_pack_long_raw( did, array, datap, cnt, std )
617
if ( array == TEV_DATA_ARRAY )
619
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
623
return( PACK_LONG( datap, cnt, std ) );
627
tev_pack_ulong_raw( did, array, datap, cnt, std )
636
if ( array == TEV_DATA_ARRAY )
638
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
642
return( PACK_ULONG( datap, cnt, std ) );
646
tev_pack_short_raw( did, array, datap, cnt, std )
655
if ( array == TEV_DATA_ARRAY )
657
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
661
return( PACK_SHORT( datap, cnt, std ) );
665
tev_pack_ushort_raw( did, array, datap, cnt, std )
674
if ( array == TEV_DATA_ARRAY )
676
if ( (cc = PACK_INT( &cnt, 1, 1 )) )
680
return( PACK_USHORT( datap, cnt, std ) );
684
tev_pack_string_raw( did, array, datap, cnt, std )
695
if ( array == TEV_DATA_ARRAY )
698
return( PvmBadParam );
700
num = ( cnt + ( std - 1 ) ) / std;
701
if ( (cc = PACK_INT( &num, 1, 1 )) )
704
for ( i=0 ; i < cnt ; i += std )
705
if ( (cc = PACK_STRING( ((char **) datap)[i] )) )
712
return( PACK_STRING( (char *) datap ) );
718
tev_pack_nop( did, array, datap, cnt, std )
729
/* Trace Descriptor Packing Vector */
731
static struct pvmtrcencvec pvmtrccodef_desc = {
735
tev_pack_double_desc,
742
tev_pack_ushort_desc,
743
tev_pack_string_desc };
746
/* Trace Raw Packing Vector */
748
static struct pvmtrcencvec pvmtrccodef_raw = {
760
tev_pack_string_raw };
763
/* Trace NOP Packing Vector */
765
static struct pvmtrcencvec pvmtrccodef_nop = {
783
* Initialize Trace Status Vector.
791
if ( pvmtrc.trctid > 0 && pvmmytid != pvmtrc.trctid )
793
/* Reset Trace Descriptor Counts */
795
for ( i=TEV_FIRST ; i <= TEV_MAX ; i++ )
797
pvmtevinfo[i].desc_status = 0;
799
pvmtevinfo[i].mark.tv_sec =
800
pvmtevinfo[i].mark.tv_usec = 0;
802
pvmtevinfo[i].total.tv_sec =
803
pvmtevinfo[i].total.tv_usec = 0;
805
pvmtevinfo[i].count = 0;
814
* Trace Event Begin - create message, pack header
818
tev_begin( kind, entry_exit )
822
struct timeval timestamp;
829
if ( pvmtrc.trcopt != PvmTraceCount )
830
gettimeofday( ×tamp, (struct timezone *) 0 );
832
switch ( pvmtrc.trcopt )
836
/* Check for Descriptor Dump (one each, begin/end events) */
838
if ( !( (pvmtevinfo[ kind - TEV_FIRST ].desc_status)
841
pvmtevinfo[ kind - TEV_FIRST ].desc_status |=
844
/* Set Trace Event Packing Vector */
846
pvmtrccodef = &pvmtrccodef_desc;
848
/* Set Descriptor Mode */
853
/* Set Regular Trace Event Packing & Mode */
857
pvmtrccodef = &pvmtrccodef_raw;
862
/* Initialize Trace Event Message Buffer? */
868
pvmtrcsbf = pvm_mkbuf( PvmDataDefault );
869
pvmtrcmp = midtobuf( pvmtrcsbf );
874
/* Select Trace Event Buffer (save current) */
876
pvmtrcsbfsave = pvm_setsbuf( pvmtrcsbf );
878
/* Pack Event Buffer Marker */
880
if ( newbuffer && pvmtrc.trcbuf )
882
tmp = TEV_MARK_EVENT_BUFFER;
883
pvm_pkint( &tmp, 1, 1 );
886
/* Descriptor Header */
890
/* Pack Event Marker */
892
tmp = TEV_MARK_EVENT_DESC;
893
pvm_pkint( &tmp, 1, 1 );
895
/* Pack Descriptor Event ID & Event Name */
897
tmp = kind | entry_exit;
898
pvm_pkint( &tmp, 1, 1 );
900
pvm_pkstr( pvmtevinfo[ kind - TEV_FIRST ].name );
907
/* Pack Event Marker */
909
tmp = TEV_MARK_EVENT_RECORD;
910
pvm_pkint( &tmp, 1, 1 );
914
tmp = kind | entry_exit;
915
pvm_pkint( &tmp, 1, 1 );
918
/* Pack Event Header */
920
TEV_PACK_INT( TEV_DID_TS, TEV_DATA_SCALAR,
921
(int *) &(timestamp.tv_sec), 1, 1 );
922
TEV_PACK_INT( TEV_DID_TU, TEV_DATA_SCALAR,
923
(int *) &(timestamp.tv_usec), 1, 1 );
924
TEV_PACK_INT( TEV_DID_TID, TEV_DATA_SCALAR,
931
pvmtrccodef = &pvmtrccodef_nop;
932
pvmtevinfo[ kind - TEV_FIRST ].mark = timestamp;
933
pvmtrcsavekind = kind;
937
pvmtrccodef = &pvmtrccodef_nop;
938
pvmtrcsavekind = kind;
943
"Uh-Oh! Bogus Tracing Option (%d) in tev_begin()...\n",
945
pvmtrccodef = &pvmtrccodef_nop;
956
* Trace Event End - send message (check trace buffering)
962
struct timeval timestamp;
968
switch ( pvmtrc.trcopt )
972
/* Pack End of Event Descriptor Marker */
976
tmp = TEV_MARK_EVENT_DESC_END;
977
pvm_pkint( &tmp, 1, 1 );
980
/* Pack End of Event Marker */
984
tmp = TEV_MARK_EVENT_RECORD_END;
985
pvm_pkint( &tmp, 1, 1 );
988
/* Reset Send Buffer (Done Packing Stuff) */
990
pvm_setsbuf( pvmtrcsbfsave );
993
/* Check for Trace Message Send */
994
/* (pvmtrc.trcbuf == 0 means no buffering) */
998
if ( !pvmtrc.trcbuf )
1003
if ( pvm_bufinfo( pvmtrcsbf, &size,
1004
(int *) NULL, (int *) NULL ) ) {
1006
"tev_fin() error - get trace buffer size\n" );
1010
if ( size >= pvmtrc.trcbuf )
1021
gettimeofday( ×tamp, (struct timezone *) 0 );
1022
TVXSUBY( &(pvmtevinfo[ pvmtrcsavekind - TEV_FIRST ].total),
1024
&(pvmtevinfo[ pvmtrcsavekind - TEV_FIRST ].mark) );
1025
(pvmtevinfo[ pvmtrcsavekind - TEV_FIRST ].count)++;
1029
(pvmtevinfo[ pvmtrcsavekind - TEV_FIRST ].count)++;
1034
"Uh-Oh! Bogus Tracing Option (%d) in tev_fin()...\n",
1044
* tev_flush( setflag )
1046
* setflag - indicates whether current send buffer is
1047
* already the trace buffer (0), or whether it needs
1050
* Trace Event Flush - send message, flush any trace buffer
1054
tev_flush( setflag )
1057
char *event_names[ TEV_MAX - TEV_FIRST + 1 ];
1059
int timings_usec[ TEV_MAX - TEV_FIRST + 1 ];
1060
int timings_sec[ TEV_MAX - TEV_FIRST + 1 ];
1061
int counts[ TEV_MAX - TEV_FIRST + 1 ];
1063
struct timeval timestamp;
1072
if ( pvmtrc.trctid <= 0 || pvmmytid == pvmtrc.trctid )
1075
switch ( pvmtrc.trcopt )
1081
/* Verify Trace Record Message Buffer */
1086
/* Set Send Buffer */
1088
savebuf = pvm_setsbuf( pvmtrcsbf );
1091
/* Pack End of Event Buffer Marker */
1092
/* (pvmtrcbuf == 0 means no buffering) */
1094
if ( pvmtrc.trcbuf )
1096
tmp = TEV_MARK_EVENT_BUFFER_END;
1097
pvm_pkint( &tmp, 1, 1 );
1105
/* Set Up Send Buffer */
1107
pvmtrccodef = &pvmtrccodef_desc;
1109
pvmtrcsbf = pvm_mkbuf( PvmDataDefault );
1110
pvmtrcmp = midtobuf( pvmtrcsbf );
1112
savebuf = pvm_setsbuf( pvmtrcsbf );
1114
/* Pack Event Marker */
1116
tmp = TEV_MARK_EVENT_DESC;
1117
pvm_pkint( &tmp, 1, 1 );
1119
/* Pack Descriptor Event ID & Event Name */
1122
pvm_pkint( &tmp, 1, 1 );
1124
pvm_pkstr( pvmtevinfo[ TEV_TIMING - TEV_FIRST ].name );
1126
/* Pack Event Header */
1128
gettimeofday( ×tamp, (struct timezone *) 0 );
1130
TEV_PACK_INT( TEV_DID_TS, TEV_DATA_SCALAR,
1131
(int *) &(timestamp.tv_sec), 1, 1 );
1132
TEV_PACK_INT( TEV_DID_TU, TEV_DATA_SCALAR,
1133
(int *) &(timestamp.tv_usec), 1, 1 );
1134
TEV_PACK_INT( TEV_DID_TID, TEV_DATA_SCALAR,
1137
/* Collect Timing Array */
1141
for ( i=TEV_FIRST ; i <= TEV_MAX ; i++ )
1143
if ( pvmtevinfo[i].count > 0 )
1145
event_names[num] = pvmtevinfo[i].name;
1147
timings_sec[num] = pvmtevinfo[i].total.tv_sec;
1148
timings_usec[num] = pvmtevinfo[i].total.tv_usec;
1150
counts[num] = pvmtevinfo[i].count;
1152
pvmtevinfo[i].total.tv_sec =
1153
pvmtevinfo[i].total.tv_usec = 0;
1155
pvmtevinfo[i].count = 0;
1161
/* Pack Number of Events & Arrays */
1163
TEV_PACK_INT( TEV_DID_VCT, TEV_DATA_SCALAR,
1166
TEV_PACK_STRING( TEV_DID_VID, TEV_DATA_ARRAY,
1167
event_names, num, 1 );
1169
TEV_PACK_INT( TEV_DID_TGS, TEV_DATA_ARRAY,
1170
timings_sec, num, 1 );
1172
TEV_PACK_INT( TEV_DID_TGU, TEV_DATA_ARRAY,
1173
timings_usec, num, 1 );
1175
TEV_PACK_INT( TEV_DID_PRF, TEV_DATA_ARRAY,
1178
/* Pack End of Descriptor Marker */
1180
tmp = TEV_MARK_EVENT_DESC_END;
1181
pvm_pkint( &tmp, 1, 1 );
1190
/* Set Up Send Buffer */
1192
pvmtrccodef = &pvmtrccodef_desc;
1194
pvmtrcsbf = pvm_mkbuf( PvmDataDefault );
1195
pvmtrcmp = midtobuf( pvmtrcsbf );
1197
savebuf = pvm_setsbuf( pvmtrcsbf );
1199
/* Pack Event Marker */
1201
tmp = TEV_MARK_EVENT_DESC;
1202
pvm_pkint( &tmp, 1, 1 );
1204
/* Pack Descriptor Event ID & Event Name */
1206
tmp = TEV_PROFILING;
1207
pvm_pkint( &tmp, 1, 1 );
1209
pvm_pkstr( pvmtevinfo[ TEV_PROFILING - TEV_FIRST ].name );
1211
/* Pack Event Header */
1213
gettimeofday( ×tamp, (struct timezone *) 0 );
1215
TEV_PACK_INT( TEV_DID_TS, TEV_DATA_SCALAR,
1216
(int *) &(timestamp.tv_sec), 1, 1 );
1217
TEV_PACK_INT( TEV_DID_TU, TEV_DATA_SCALAR,
1218
(int *) &(timestamp.tv_usec), 1, 1 );
1219
TEV_PACK_INT( TEV_DID_TID, TEV_DATA_SCALAR,
1222
/* Collect Profiling Array */
1226
for ( i=TEV_FIRST ; i <= TEV_MAX ; i++ )
1228
if ( pvmtevinfo[i].count > 0 )
1230
event_names[num] = pvmtevinfo[i].name;
1232
counts[num] = pvmtevinfo[i].count;
1234
pvmtevinfo[i].count = 0;
1240
/* Pack Number of Events & Arrays */
1242
TEV_PACK_INT( TEV_DID_VCT, TEV_DATA_SCALAR,
1245
TEV_PACK_STRING( TEV_DID_VID, TEV_DATA_ARRAY,
1246
event_names, num, 1 );
1248
TEV_PACK_INT( TEV_DID_PRF, TEV_DATA_ARRAY,
1251
/* Pack End of Descriptor Marker */
1253
tmp = TEV_MARK_EVENT_DESC_END;
1254
pvm_pkint( &tmp, 1, 1 );
1263
"Uh-Oh! Bogus Tracing Option (%d) in tev_flush()...\n",
1268
/* Reset Send Buffer (Done Packing Stuff) */
1271
pvm_setsbuf( savebuf );
1273
/* Clear Out Trace Buffer Global Before Entering mroute()... */
1274
/* (save in tmpbuf for sending, needed for mhf_invoke event) */
1282
if ( (routetmp = pvmrouteopt) == PvmRouteDirect )
1283
pvmrouteopt = PvmAllowDirect;
1285
pvmtrcmp->m_ctx = pvmtrc.trcctx;
1287
mroute( tmpbuf, pvmtrc.trctid, pvmtrc.trctag, &pvmtrcztv );
1289
pvmrouteopt = routetmp;
1293
pvm_freebuf( tmpbuf );
1300
* Export TEV_DO_TRACE() so user code doesn't have to import
1301
* masks and trace tid, etc.
1305
tev_do_trace( kind, entry_exit )
1311
return( TEV_DO_TRACE( kind, entry_exit ) );