summaryrefslogtreecommitdiffstats
path: root/pablo
diff options
context:
space:
mode:
authorDan Wells <dwells@cs.uiuc.edu>1998-10-30 19:45:00 (GMT)
committerDan Wells <dwells@cs.uiuc.edu>1998-10-30 19:45:00 (GMT)
commit6089dc90988e659f03cd9028146011f39a3c84cb (patch)
tree537e4fe0802e9fc6f6961f09a995e1116536eb2e /pablo
parent95ca8d543f798ceea3e853ff7fa2e603f20c3906 (diff)
downloadhdf5-6089dc90988e659f03cd9028146011f39a3c84cb.zip
hdf5-6089dc90988e659f03cd9028146011f39a3c84cb.tar.gz
hdf5-6089dc90988e659f03cd9028146011f39a3c84cb.tar.bz2
[svn-r852] Include files used for building trace routines.
Diffstat (limited to 'pablo')
-rw-r--r--pablo/HDF5record_RT.h254
-rw-r--r--pablo/ProcIDs.h153
2 files changed, 407 insertions, 0 deletions
diff --git a/pablo/HDF5record_RT.h b/pablo/HDF5record_RT.h
new file mode 100644
index 0000000..8a62f82
--- /dev/null
+++ b/pablo/HDF5record_RT.h
@@ -0,0 +1,254 @@
+/*
+ * This file is part of the Pablo Performance Analysis Environment
+ *
+ * (R)
+ * The Pablo Performance Analysis Environment software is NOT in
+ * the public domain. However, it is freely available without fee for
+ * education, research, and non-profit purposes. By obtaining copies
+ * of this and other files that comprise the Pablo Performance Analysis
+ * Environment, you, the Licensee, agree to abide by the following
+ * conditions and understandings with respect to the copyrighted software:
+ *
+ * 1. The software is copyrighted in the name of the Board of Trustees
+ * of the University of Illinois (UI), and ownership of the software
+ * remains with the UI.
+ *
+ * 2. Permission to use, copy, and modify this software and its documentation
+ * for education, research, and non-profit purposes is hereby granted
+ * to Licensee, provided that the copyright notice, the original author's
+ * names and unit identification, and this permission notice appear on
+ * all such copies, and that no charge be made for such copies. Any
+ * entity desiring permission to incorporate this software into commercial
+ * products should contact:
+ *
+ * Professor Daniel A. Reed reed@cs.uiuc.edu
+ * University of Illinois
+ * Department of Computer Science
+ * 2413 Digital Computer Laboratory
+ * 1304 West Springfield Avenue
+ * Urbana, Illinois 61801
+ * USA
+ *
+ * 3. Licensee may not use the name, logo, or any other symbol of the UI
+ * nor the names of any of its employees nor any adaptation thereof in
+ * advertizing or publicity pertaining to the software without specific
+ * prior written approval of the UI.
+ *
+ * 4. THE UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE
+ * SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS
+ * OR IMPLIED WARRANTY.
+ *
+ * 5. The UI shall not be liable for any damages suffered by Licensee from
+ * the use of this software.
+ *
+ * 6. The software was developed under agreements between the UI and the
+ * Federal Government which entitle the Government to certain rights.
+ *
+ **************************************************************************
+ *
+ * Developed by: The Pablo Research Group
+ * University of Illinois at Urbana-Champaign
+ * Department of Computer Science
+ * 1304 W. Springfield Avenue
+ * Urbana, IL 61801
+ *
+ * http://www-pablo.cs.uiuc.edu
+ *
+ * Send comments to: pablo-feedback@guitar.cs.uiuc.edu
+ *
+ * Copyright (c) 1987-1996
+ * The University of Illinois Board of Trustees.
+ * All Rights Reserved.
+ *
+ * PABLO is a registered trademark of
+ * The Board of Trustees of the University of Illinois
+ * registered in the U.S. Patent and Trademark Office.
+ *
+ * Author: Dan Wells (dwells@cs.uiuc.edu)
+ *
+ * Project Manager and Principal Investigator:
+ * Daniel A. Reed (reed@cs.uiuc.edu)
+ *
+ * Funded in part by National Science Foundation grants NSF CCR87-06653
+ * and NSF CDA87-22836 (Tapestry), DARPA contracts DABT63-91-K-0004,
+ * DABT63-93-C-0040, DABT63-94-C-0049 (SIO), and F30602-96-C-0161, NASA
+ * contracts NAG-1-613 (ICLASS), USRA 5555-22, and NGT-51023, and a
+ * collaborative research agreement with the Intel Supercomputer
+ * Systems Division
+ */
+/*
+ * HDFrecord.h: Class to represent HDF records.
+ *
+ * $Header$
+ */
+
+#ifndef HDF5RECORD_RT_H
+#define HDF5RECORD_RT_H
+#ifndef NULL
+#define NULL 0
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+#include <limits.h>
+#include "ProcIDs.h"
+
+#ifndef min
+#define min( x , y ) ( x <= y ? x : y )
+#endif
+#ifndef max
+#define max( x , y ) ( x >= y ? x : y )
+#endif
+/*======================================================================*
+// Enumeration of time fields in an HDFrec_t below *
+//======================================================================*/
+enum TimeFields { HDF_, MPI, Malloc, AllIO, Open, Close, Read, Write, ARead,
+ AWrite, Seek, Wait, Misc, nTallyFields };
+/*======================================================================*
+// Enumeration of byte fields in an HDFrec_t below *
+//======================================================================*/
+enum ByteFields{ MallocBytes, ReadBytes, WriteBytes, AReadBytes, AWriteBytes,
+ nByteFields };
+/*======================================================================*
+// Definition of first and last IO event. *
+//======================================================================*/
+#define FirstIO Open
+#define LastIO Misc
+#define nBkts 4
+#define ONEK 1024
+int BktLim[] = { 1, 4*ONEK, 64*ONEK, 256*ONEK, INT_MAX } ;
+/*======================================================================*
+// Definition of structure used to account activity in an HDF call *
+//======================================================================*/
+typedef struct {
+ int nCalls; /* number of proc calls */
+ double lastCall; /* time of last call */
+ double incDur; /* inclusive duration */
+ double excDur; /* exclusive duration */
+ double times[nTallyFields]; /* Tally op/calls times */
+ int counts[nTallyFields]; /* Tally op/calls counts */
+ int bytes[nByteFields]; /* Tally bytes transferred */
+ int Hists[nByteFields][nBkts]; /* Historgrams */
+ long hdfID; /* data set ID */
+ long xRef; /* data set cross reference */
+} HDFrec_t;
+/*======================================================================*
+// Node used to maintain linked lists of HDF procedure activity. *
+//======================================================================*/
+typedef struct HDFnode {
+ double lastIOtime; /* last IO time stamp */
+ HDFrec_t record; /* data */
+ struct HDFnode *ptr; /* link pointer */
+ int eventID; /* event ID */
+} HDFnode_t;
+/*======================================================================*
+// Structure used to produce SDDF packets for Named identifiers. *
+//======================================================================*/
+typedef struct {
+ int packetLength; /* bytes in packet */
+ int packetType; /* == PKT_DATA */
+ int packetTag; /* == FAMILY_<name> */
+ int fileType; /* Type of data set */
+ int fileID; /* File ID */
+ int nameLen; /* length of file */
+} HDFNamePacket_t;
+/*======================================================================*
+// Node used to form linked lists to track named identifiers. *
+//======================================================================*/
+typedef struct fileRec {
+ struct fileRec *ptr;
+ int hdfID;
+ int PabloID;
+ char *fileName;
+} fileRec_t;
+/*=======================================================================
+// Utility programs to determine field index for a given eventID *
+//=====================================================================*/
+int getHDFFieldIndex( int eventID );
+int getHDFByteFieldIndex( int eventID );
+
+#define IOerrorID 700000
+
+#define openBeginID 700001
+#define openEndID 700002
+
+#define fopenBeginID 700003
+#define fopenEndID 700004
+
+#define closeBeginID 700005
+#define closeEndID 700006
+
+#define fcloseBeginID 700007
+#define fcloseEndID 700008
+
+#define readBeginID 700009
+#define readEndID 700010
+
+#define freadBeginID 700011
+#define freadEndID 700012
+
+#define lseekBeginID 700013
+#define lseekEndID 700014
+
+#define fseekBeginID 700015
+#define fseekEndID 700016
+
+#define writeBeginID 700017
+#define writeEndID 700018
+
+#define fwriteBeginID 700019
+#define fwriteEndID 700020
+
+#define fflushBeginID 700021
+#define fflushEndID 700022
+
+#define flushBeginID 700023
+#define flushEndID 700024
+
+#define rewindBeginID 700025
+#define rewindEndID 700026
+
+#define fsetposBeginID 700027
+#define fsetposEndID 700028
+
+#define lifetimeID 700040
+#define timeSummaryID 700041
+#define regionSummaryID 700042
+
+#define IOinitTraceID 700100
+#define IOendTraceID 700101
+#define IOenableTraceID 700102
+#define IOdisableTraceID 700103
+#define IOenableDetailID 700104
+#define IOdisableDetailID 700105
+#define IOenableLifeSummID 700106
+#define IOdisableLifeSummID 700107
+#define IOenableTimeSummID 700108
+#define IOdisableTimeSummID 700109
+#define IOchangeTimeWindowID 700110
+#define IOenableRegionSummID 700111
+#define IOdisableRegionSummID 700112
+#define IOchangeFileRegionID 700113
+
+/*
+ * Define the masks for the I/O event families,
+ */
+#define FAMILY_OPEN 0500
+#define FAMILY_FLUSH 0510
+#define FAMILY_CLOSE 0520
+#define FAMILY_READ 0530
+#define FAMILY_SEEK 0540
+#define FAMILY_WRITE 0550
+#define FAMILY_LIFETIME 0560
+#define FAMILY_TIME_SUMMARY 0570
+#define FAMILY_REGION_SUMMARY 0600
+#define FAMILY_IOTRACE_STATE 0610
+#define FAMILY_IO_MISC 0620
+
+/*
+ * Define flags to distinguish misc i/o begin from misc i/o end
+ */
+#define MISC_BEGIN 0
+#define MISC_END 1
+
+#endif /* HDF5RECORD_RT_H */
diff --git a/pablo/ProcIDs.h b/pablo/ProcIDs.h
new file mode 100644
index 0000000..87e63c0
--- /dev/null
+++ b/pablo/ProcIDs.h
@@ -0,0 +1,153 @@
+/* This file is part of the Pablo Performance Analysis Environment
+//
+// (R)
+// The Pablo Performance Analysis Environment software is NOT in
+// the public domain. However, it is freely available without fee for
+// education, research, and non-profit purposes. By obtaining copies
+// of this and other files that comprise the Pablo Performance Analysis
+// Environment, you, the Licensee, agree to abide by the following
+// conditions and understandings with respect to the copyrighted software:
+//
+// 1. The software is copyrighted in the name of the Board of Trustees
+// of the University of Illinois (UI), and ownership of the software
+// remains with the UI.
+//
+// 2. Permission to use, copy, and modify this software and its documentation
+// for education, research, and non-profit purposes is hereby granted
+// to Licensee, provided that the copyright notice, the original author's
+// names and unit identification, and this permission notice appear on
+// all such copies, and that no charge be made for such copies. Any
+// entity desiring permission to incorporate this software into commercial
+// products should contact:
+//
+// Professor Daniel A. Reed reed@cs.uiuc.edu
+// University of Illinois
+// Department of Computer Science
+// 2413 Digital Computer Laboratory
+// 1304 West Springfield Avenue
+// Urbana, Illinois 61801
+// USA
+//
+// 3. Licensee may not use the name, logo, or any other symbol of the UI
+// nor the names of any of its employees nor any adaptation thereof in
+// advertizing or publicity pertaining to the software without specific
+// prior written approval of the UI.
+//
+// 4. THE UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE
+// SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS
+// OR IMPLIED WARRANTY.
+//
+// 5. The UI shall not be liable for any damages suffered by Licensee from
+// the use of this software.
+//
+// 6. The software was developed under agreements between the UI and the
+// Federal Government which entitle the Government to certain rights.
+//
+// *************************************************************************
+//
+// Developed by: The Pablo Research Group
+// University of Illinois at Urbana-Champaign
+// Department of Computer Science
+// 1304 W. Springfield Avenue
+// Urbana, IL 61801
+//
+// http://www-pablo.cs.uiuc.edu
+//
+// Send comments to: pablo-feedback@guitar.cs.uiuc.edu
+//
+// Copyright (c) 1987-1998
+// The University of Illinois Board of Trustees.
+// All Rights Reserved.
+//
+// PABLO is a registered trademark of
+// The Board of Trustees of the University of Illinois
+// registered in the U.S. Patent and Trademark Office.
+//
+// Project Manager and Principal Investigator:
+// Daniel A. Reed (reed@cs.uiuc.edu)
+//
+// Funded in part by the Defense Advanced Research Projects Agency under
+// DARPA contracts DABT63-94-C0049 (SIO Initiative), F30602-96-C-0161,
+// and DABT63-96-C-0027 by the National Science Foundation under the PACI
+// program and grants NSF CDA 94-01124 and ASC 97-20202, and by the
+// Department of Energy under contracts DOE B-341494, W-7405-ENG-48, and
+// 1-B-333164.
+//-------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------
+ * File: ProcIDs.h
+ * Purpose: define IDs for identifying procedures in traces
+ *-------------------------------------------------------------------------*/
+
+#ifndef PROCIDS_H /* avoid re-inclusion */
+#define PROCIDS_H
+
+#include "ProcMasks.h"
+extern unsigned procTrace;
+/*
+ * Define the event IDs that will be used for the various I/O events
+ */
+
+/*======================================================================*/
+/* Assign HDF identifier routine tags */
+/*======================================================================*/
+enum HDF_IDS {
+ ID_HDFprocName=9996,
+ ID_malloc=9997,
+ ID_free=9998,
+ ID_timeStamp=9999,
+ DUMMY_HDF = 10000,
+/*======================================================================*/
+/* the following part of the enumeration is only needed when the */
+/* instrumented HDF library is built. It is created in the pablo */
+/* subdirectory of HDF. */
+/*======================================================================*/
+#include "HDFidList.h"
+ID_HDF_Last_Entry
+} ;
+
+#define BEGIN_HDF (DUMMY_HDF + 1)
+#define END_HDF ID_HDF_Last_Entry
+#define NumHDFProcs ( END_HDF - BEGIN_HDF )
+/*======================================================================*/
+/* HDF attribute, file, data_set, etc ID codes. May not be used. */
+/*======================================================================*/
+#define NoDSid 0 /* no data set id */
+#define HDF_NULL_ID 0
+#define HDF_File_ID 1
+#define HDF_SDS_ID 2
+#define HDF_Dim_ID 3
+#define HDF_Attribute_ID 4
+#define HDF_Label_ID 5
+#define HDF_Access_ID 6
+#define HDF_Directory_ID 7
+#define HDF_Annotation_ID 8
+#define HDF_Gen_Raster_ID 9
+#define HDF_Look_Up_Table_ID 10
+#define HDF_Vdata_ID 11
+#define BEGIN_MPIO 900800
+#define END_MPIO 900899
+/*======================================================================*/
+/* Macros to tell if the ID is that of an HDF Entry or Exit */
+/*======================================================================*/
+#define isBeginHDFEvent( ID ) ( BEGIN_HDF <= (ID) && (ID) < END_HDF )
+#define isEndHDFEvent( ID ) isBeginHDFEvent(-(ID))
+#define isBeginMPIOEvent( ID ) \
+ ( BEGIN_MPIO <= (ID) && (ID) <= END_MPIO && (ID)%2 == 0 )
+
+#define isEndMPIOEvent( ID ) \
+ ( BEGIN_MPIO <= (ID) && (ID) <= END_MPIO && (ID)%2 == 1 )
+#define isBeginIOEvent( ID ) \
+ ( IOerrorID < (ID) && (ID) <= fsetposEndID && (ID)%2 == 1 )
+#define isEndIOEvent( ID ) \
+ ( IOerrorID < (ID) && (ID) <= fsetposEndID && (ID)%2 == 0 )
+#define ProcIndex( ID ) ( (ID) - BEGIN_HDF )
+#define ProcIndexForHDFEntry( ID ) ( (ID) - BEGIN_HDF )
+#define ProcIndexForHDFExit( ID ) ProcIndexForHDFEntry(-ID)
+#define HDFProcIXtoEventID( ID ) ( (ID) + BEGIN_HDF )
+
+#define TRACE_ON(mask, eventID) \
+ if (procTrace & mask) startHDFtraceEvent(eventID)
+#define TRACE_OFF(mask, eventID ) \
+ if (procTrace & mask) endHDFtraceEvent(-eventID, 0, NULL, 0 )
+
+#endif /* PROCIDS_H */