summaryrefslogtreecommitdiffstats
path: root/pablo/PabloHDF.c
diff options
context:
space:
mode:
authorDan Wells <dwells@cs.uiuc.edu>1998-10-30 19:46:05 (GMT)
committerDan Wells <dwells@cs.uiuc.edu>1998-10-30 19:46:05 (GMT)
commit75b0660dbc6b177e834675e62192a86cb05ae637 (patch)
tree9536546d7612939ca50440107720633394d601e7 /pablo/PabloHDF.c
parent6089dc90988e659f03cd9028146011f39a3c84cb (diff)
downloadhdf5-75b0660dbc6b177e834675e62192a86cb05ae637.zip
hdf5-75b0660dbc6b177e834675e62192a86cb05ae637.tar.gz
hdf5-75b0660dbc6b177e834675e62192a86cb05ae637.tar.bz2
[svn-r853] Updated code to better handle new HDF entry points.
Diffstat (limited to 'pablo/PabloHDF.c')
-rw-r--r--pablo/PabloHDF.c41
1 files changed, 37 insertions, 4 deletions
diff --git a/pablo/PabloHDF.c b/pablo/PabloHDF.c
index 4907e28..36bf0df 100644
--- a/pablo/PabloHDF.c
+++ b/pablo/PabloHDF.c
@@ -88,7 +88,6 @@ int fileno ( FILE * );
#define HDFtrace3OPEN__
int HDFtrace3OPEN( const char *, int, mode_t );
-/*#include "Assert_TrLib.h"*/
#include "SDDFparam.h"
#include "TraceParam.h"
@@ -115,7 +114,7 @@ int OUTPUT_SWITCH;
extern void preInitIOTrace( void );
#include "ProcIDs.h"
-#include "HDFTrace.h"
+#include "HDF5Trace.h"
#include "IOTrace.h"
#define NO_OUTPUT 0
#define SDDF_OUTPUT 1
@@ -127,6 +126,7 @@ void hdfendtrace_ ( void ) ;
void HDFendTrace (void);
void HDFendTrace_RT (void);
void HDFendTrace_SDDF(void);
+void HDFfinalTimeStamp( void );
void startHDFtraceEvent (int );
int computeProcMask (int eventID);
int computePacketTag(int eventID);
@@ -839,13 +839,13 @@ void *HDFtraceMALLOC(size_t bytes )
size_t byte_req;
byte_req = bytes;
if ( IOtracingEnabled ) {
- HDFtraceIOEvent ( ID_malloc, &byte_req, sizeof(size_t) );
+ HDFtraceIOEvent ( ID_malloc, NULL, 0 );
}
ptr = malloc( bytes );
if ( IOtracingEnabled ) {
- HDFtraceIOEvent ( -ID_malloc, NULL, 0 );
+ HDFtraceIOEvent ( -ID_malloc, &byte_req, sizeof(size_t) );
}
return ptr ;
@@ -860,3 +860,36 @@ void HDFtraceIOEvent( int eventType, void *dataPtr, unsigned dataLen )
HDFtraceEvent_RT( eventType, (HDFsetInfo *)dataPtr, dataLen );
}
}
+/*======================================================================*
+// record the final time stamp *
+//======================================================================*/
+void HDFfinalTimeStamp( void )
+{
+ TR_LOCK criticalSection;
+ CLOCK currentTime;
+ double seconds;
+ struct {
+ int packetLength,
+ packetType,
+ packetTag,
+ timeDim;
+ double Seconds;
+ int eventID,
+ node,
+ dataLen;
+ } Packet;
+
+ criticalSection = TRlock();
+ currentTime = getClock();
+ seconds = clockToSeconds( currentTime );
+
+ Packet.packetLength = sizeof(Packet);
+ Packet.packetType = PKT_DATA;
+ Packet.packetTag = FAMILY_EXTERNAL | RECORD_TRACE;
+ Packet.timeDim = 0; /* use fp time stamp only */
+ Packet.Seconds = seconds; /* fp time stamp */
+ Packet.eventID = ID_timeStamp;
+ Packet.node = TRgetNode();
+ Packet.dataLen = 0;
+ putBytes( (void *)&Packet , sizeof(Packet) );
+}