1
1
- extendet support for BlueGene/P:
	- building shared VT libraries
	- tracing 3rd-party libraries (e.g. libc I/O)
	- tracing multi-threaded applications 
VT configure fixes:
- fixed detection on CTool for 3rd-party library tracing
VT fixes:
- reduced memory overhead by using the trace buffer for string/array elements of some records
- do not shutdown call-stack if max. number of buffer flushes reached, because the additional function leaves suggest a wrong application flow
- vtunify-mpi:
	- fixed conversion of VTUnify_MPI_Aint arrays 
- vtwrapper:
	- if an OPARI modified object file (*.mod.o) cannot be renamed, abort only if the compiler wrapper runs in "only-compile" mode (-c) 
OTF fixes:
- otfinfo:
	- fixed and enhanced calculation of trace file size
	- changed unit of timer resolution (s -> Hz) 
- otfprofile:
	- fixed progress
	- kill '_' and '\' in process names to make LaTex happier

This commit was SVN r22963.
Этот коммит содержится в:
Matthias Jurenz 2010-04-13 07:20:56 +00:00
родитель b4dc28f075
Коммит 175fd07de4
22 изменённых файлов: 397 добавлений и 328 удалений

Просмотреть файл

@ -3,6 +3,8 @@
(see extlib/otf/ChangeLog)
- added support for tracing functions in shared libraries instrumented
by the GNU, Intel, PathScale, or PGI 9 compiler
- extended support for BlueGene/P in terms of tracing libraries
(e.g. libc I/O) and tracing of multi-threaded applications
- added support for PAPI-C counters which belong to different components
- added environment variable VT_METRICS_SEP to specify a string which
separate the counter names in VT_METRICS
@ -20,13 +22,15 @@
- use more portable 'nm' command instead of the BFD library to collect
symbol information for instrumentation with the GNU, Intel, PathScale,
and PGI 9 compiler
- fixed stack shutdown if maximum number of buffer flushes was reached
- do not shutdown call stack if maximum number of buffer flushes was
reached, because the additional leaves suggest a wrong application
flow
- fixed potential stack underflow in vtfilter which might be cause a
segmentation fault
- fixed detection of unique node id on MacOS platforms
- fixed support for LAM/MPI
- fixed potential segmentation fault in vtunify-mpi which might occur
on 32bit platforms using MPICH2
on 32bit platforms
- patched libtool to avoid a bug in detection of the PGI 10 compilers
5.8openmpi

Просмотреть файл

@ -8,8 +8,7 @@ CC_FOR_BUILD="xlc_r"
CXX_FOR_BUILD="xlC_r"
enable_shared="no"
enable_threads="no"
enable_libctrace="no"
enable_iotrace="no"
enable_libtrace="no"
enable_cpuidtrace="no"
with_cross_prefix="blrts_"
with_mpibgl="yes"

Просмотреть файл

@ -7,9 +7,6 @@ MPICXX="mpixlcxx_r"
CC_FOR_BUILD="xlc_r"
CXX_FOR_BUILD="xlC_r"
enable_shared="no"
enable_threads="no"
enable_libctrace="no"
enable_iotrace="no"
enable_cpuidtrace="no"
with_cross_prefix="bg"
with_mpibgp="yes"

Просмотреть файл

@ -17,8 +17,7 @@ OPENMP_CFLAGS="-Popenmp"
PTHREAD_LIBS="-lpthread"
enable_shared="no"
enable_memtrace="no"
enable_libctrace="no"
enable_iotrace="no"
enable_libtrace="no"
enable_cpuidtrace="no"
enable_mpi2_io="no"
enable_metrics="necsx"

Просмотреть файл

@ -24,6 +24,7 @@ AC_DEFUN([ACVT_COMPWRAP],
VT_WRAPPER_AVAIL_INST="manual"
VT_WRAPPER_DEFAULT_INST=manual
AC_REQUIRE([ACVT_PLATFORM])
AC_REQUIRE([ACVT_COMPINST])
AC_REQUIRE([ACVT_DYNINST])
AC_REQUIRE([ACVT_THREADS])
@ -78,6 +79,11 @@ AC_DEFUN([ACVT_COMPWRAP],
[extra flags to add to LIBS when using wrapper compilers]),
[VT_WRAPPER_EXTRA_LIBS=$withval])
AS_IF([test "$PLATFORM" = "bgp" -a x"$enable_shared" = "xyes"],
[
VT_WRAPPER_EXTRA_LDFLAGS="$VT_WRAPPER_EXTRA_LDFLAGS -Wl,-dy"
])
VT_WRAPPER_VTLIB="-lvt"
VT_WRAPPER_VTMPILIB="-lvt-mpi"
VT_WRAPPER_VTMTLIB="-lvt-mt"

Просмотреть файл

@ -37,23 +37,23 @@ AC_DEFUN([ACVT_CTOOL],
sav_LDFLAGS=$LDFLAGS; LDFLAGS=$LDFLAGS_FOR_BUILD
sav_LIBS=$LIBS; LIBS=$LIBS_FOR_BUILD
sav_CPPFLAGS=$CPPFLAGS
sav2_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $CTOOLINCDIR"
AC_CHECK_HEADER([ctool/ctool.h], [],
[
AC_MSG_NOTICE([error: no ctool/ctool.h found; check path for CTool package first...])
ctool_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
CPPFLAGS=$sav2_CPPFLAGS
AS_IF([test x"$CTOOLLIB" = x -a x"$ctool_error" = "xno"],
[
sav_LIBS=$LIBS
sav2_LIBS=$LIBS
LIBS="$LIBS $CTOOLLIBDIR -lctool"
AC_MSG_CHECKING([whether linking with -lctool works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); CTOOLLIB=-lctool],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
LIBS=$sav2_LIBS
])
CXX=$sav_CXX

Просмотреть файл

@ -33,11 +33,15 @@ AC_DEFUN([ACVT_DL],
AC_HELP_STRING([--with-dl-lib=DLLIB], [use given libdl lib, default: -ldl]),
[DLLIB="$withval"])
AS_IF([test "$PLATFORM" = "bgl" -o "$PLATFORM" = "bgp" -o "$PLATFORM" = "crayxt"],
AS_IF([test "$PLATFORM" = "bgl" -o "$PLATFORM" = "crayxt"],
[
AC_MSG_NOTICE([error: dynamic linking library (libdl) isn't suitable on this platform])
dl_error="yes"
])
AS_IF([test "$PLATFORM" = "bgp"],
[
ac_cv_have_decl_RTLD_NEXT="no"
])
AS_IF([test x"$dl_error" = "xno"],
[

Просмотреть файл

@ -5,16 +5,27 @@ AC_DEFUN([ACVT_JAVA],
force_java="no"
have_java="no"
AC_REQUIRE([ACVT_PLATFORM])
AC_ARG_ENABLE(java,
AC_HELP_STRING([--enable-java],
[enable Java support, default: enable if JVMTI found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_java="yes"], [check_java="no"])])
AS_IF([test x"$check_java" = "xyes"],
[
AS_IF([test "$PLATFORM" = "bgp"],
[
AC_MSG_NOTICE([error: Java tracing not supported on this platform])
java_error="yes"
])
AS_IF([test x"$java_error" = "xno"],
[
AC_MSG_CHECKING([whether we can build shared libraries])
AS_IF([test x"$enable_shared" = "xyes"],
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); java_error="yes"])
])
AS_IF([test x"$java_error" = "xno"],
[

Просмотреть файл

@ -4,6 +4,8 @@ AC_DEFUN([ACVT_LIBC],
libc_pathname=
AC_REQUIRE([ACVT_PLATFORM])
AC_ARG_WITH(libc,
AC_HELP_STRING([--with-libc=NAME],
[give the pathname for LIBC, default: automatically by configure]),
@ -16,6 +18,11 @@ AC_DEFUN([ACVT_LIBC],
AC_MSG_CHECKING([for LIBC's pathname])
AS_IF([test x"$libc_pathname" = x],
[
AS_IF([test "$PLATFORM" = "bgp"],
[
libc_pathname="/lib/libc.so.6"
],
[
rm -f conftest
AC_TRY_LINK([], [],
@ -37,6 +44,7 @@ AC_DEFUN([ACVT_LIBC],
libc_error="yes"
])
])
])
AS_IF([test x"$libc_pathname" != x -a x"$libc_error" = "xno"],
[

Просмотреть файл

@ -10,6 +10,8 @@ AC_DEFUN([ACVT_LIBWRAP],
force_libcwrap="no"
force_iowrap="no"
AC_REQUIRE([ACVT_PLATFORM])
AC_ARG_ENABLE(libtrace,
AC_HELP_STRING([--enable-libtrace=LIST],
[enable library tracing support (gen,libc,io), default: automatically by configure]),
@ -41,9 +43,18 @@ AC_DEFUN([ACVT_LIBWRAP],
])
AS_IF([test x"$check_libwrap" != "xno"],
[
AS_IF([test "$PLATFORM" = "bgp" -a x"$enable_shared" = "xno"],
[
AC_MSG_NOTICE([error: library tracing requires building of shared libraries on this platform; re-configure with \`--enable-shared'])
libwrap_error="yes"
])
AS_IF([test x"$libwrap_error" = "xno"],
[
ACVT_DL
AS_IF([test x"$have_dl" = "xno"], [libwrap_error="yes"])
])
AS_IF([test x"$libwrap_error" = "xno"],
[

Просмотреть файл

@ -79,6 +79,12 @@ AC_DEFUN([ACVT_PLATFORM],
BITMODE=$withval
])
AS_IF([test "$PLATFORM" = "bgp"],
[
CPPFLAGS="$CPPFLAGS -I/bgsys/drivers/ppcfloor/arch/include"
])
AC_SUBST(PLATFORM)
AC_SUBST(BITMODE)
])

Просмотреть файл

@ -59,7 +59,6 @@ AC_DEFUN([ACVT_TIMER],
timer=TIMER_RTS_GET_TIMEBASE
;;
bgp)
CPPFLAGS="$CPPFLAGS -I/bgsys/drivers/ppcfloor/arch/include"
AC_DEFINE([TIMER_BGP_GET_TIMEBASE], [1], [Use `_bgp_GetTimeBase' function])
timer=TIMER_BGP_GET_TIMEBASE
;;

Просмотреть файл

@ -147,14 +147,20 @@ AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strdup])
# Check for libtool
ACVT_CONF_TITLE([Libtool])
AS_IF([test "$PLATFORM" = "bgl" -o "$PLATFORM" = "bgp"],
[
AS_IF([test x"$enable_shared" = "xyes"],
[AC_MSG_WARN([VampirTrace does not support shared libraries on IBM BlueGene; build static libraries])])
enable_shared="no"; enable_static="yes"
])
# Override the configure options '--enable-static' and '--enable-shared' to
# enforce building only static libraries on CrayXT and BlueGene/L platforms.
AS_IF([test "$PLATFORM" = "crayxt" -o "$PLATFORM" = "bgl"],
[enable_static="yes"; enable_shared="no"])
AC_PROG_LIBTOOL
# If building of shared libraries is desired on BlueGene/P, add '-Wl,-dy'
# to linker flags on BlueGene/P platforms to lead libtool to believe that
# dynamic linking is the default behaviour of the linker.
AS_IF([test "$PLATFORM" = "bgp" -a x"$enable_shared" = "xyes"],
[export LDFLAGS="$LDFLAGS -Wl,-dy"])
# Check for OTF
ACVT_CONF_TITLE([Open Trace Format (OTF)])
ACVT_OTF

Просмотреть файл

@ -2,7 +2,10 @@
- enforce building position independent code (PIC) for the static
version of the OTF library
(so it's possible to add these objects to 3rd-party shared libraries)
- patched libtool to avoid a bug in detection of the PGI 10 C++ compiler
- fixed and enhanced calculation of trace file size in otfinfo
- patched libtool:
- to avoid a bug in detection of the PGI 10 C++ compiler
- to detect IBM cross compilers on BlueGene/P
1.6.4openmpi
- enhanced reading of process group definition records

Просмотреть файл

@ -11,6 +11,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#define PROGRESSBARLEN 20
@ -42,10 +45,12 @@ int main(int argc, char **argv)
uint64_t size = 0; /*size of the event files*/
uint64_t minRead = 0; /*variable for progress*/
uint64_t currRead = 0; /*count of current read bytes*/
uint32_t numStreams = 0;
char* parameter = NULL; /*reference to the parameters*/
char* fileLocation = NULL; /*path to the tracefiles*/
OTF_FileManager *manager = NULL;
OTF_Reader *reader = NULL;
OTF_MasterControl* master = NULL;
OTF_HandlerArray *handles = NULL;
int showProgress = 0;
int infoLevel = 1; /*level for the output of information (local)*/
@ -167,18 +172,44 @@ int main(int argc, char **argv)
/*read definition file*/
checkVal = OTF_Reader_readDefinitions( reader, handles );
otfinfo_assert( checkVal != OTF_READ_ERROR );
checkVal = OTF_Reader_readMarkers( reader, handles );
otfinfo_assert( checkVal != OTF_READ_ERROR );
/*getting the size of the event files*/
OTF_Reader_setRecordLimit( reader, 0 );
checkVal = OTF_Reader_readEvents( reader, handles );
otfinfo_assert(checkVal != OTF_READ_ERROR);
checkVal = OTF_Reader_eventBytesProgress( reader, &minRead,
&currRead, &size);
otfinfo_assert( checkVal != OTF_READ_ERROR );
info.traceFileSize = size;
master = OTF_Reader_getMasterControl( reader );
otfinfo_assert( master );
numStreams = OTF_MasterControl_getCount( master );
otfinfo_assert( numStreams > 0 );
info.traceFileSize = 0;
for( i = 0; i < (int)numStreams; i++ )
{
static char filename[1024];
static uint32_t filecomp = OTF_FILECOMPRESSION_COMPRESSED;
static struct stat filestat;
/*get event file name of stream*/
OTF_getFilename( fileLocation, i+1, OTF_FILETYPE_EVENT | filecomp,
sizeof(filename), filename );
/*if stat succeeds, compute total file size*/
if( stat( filename, &filestat ) == 0 )
{
info.traceFileSize += (uint64_t)filestat.st_size;
}
/*otherwise, re-try with uncompressed file*/
else
{
if( filecomp == OTF_FILECOMPRESSION_COMPRESSED )
{
filecomp = OTF_FILECOMPRESSION_UNCOMPRESSED;
i--; continue;
}
}
filecomp = OTF_FILECOMPRESSION_COMPRESSED;
}
/*printing the results and cleanup*/
if( 0 < infoLevel )
@ -339,15 +370,15 @@ static void show_info_level_1( definitionInfoT *info )
}
switch( i )
{
case 0: unitTimer = "s";break;
case 1: unitTimer = "ms";break;
case 2: unitTimer = "µs";break;
default: unitTimer = "ns";break;
case 0: unitTimer = "Hz";break;
case 1: unitTimer = "KHz";break;
case 2: unitTimer = "MHz";break;
default: unitTimer = "GHz";break;
}
/*formating the size of the event files*/
i = 0;
while( (fileSize / 1024 >= 1.0) && (i < 4) )
while( (fileSize / 1024 >= 1.0) && (i < 5) )
{
fileSize /= 1024;
i++;
@ -357,6 +388,7 @@ static void show_info_level_1( definitionInfoT *info )
case 0: unitFileSize = "Bytes"; break;
case 1: unitFileSize = "KB"; break;
case 2: unitFileSize = "MB"; break;
case 3: unitFileSize = "GB"; break;
default: unitFileSize = "TB";break;
}

Просмотреть файл

@ -119,7 +119,18 @@ int handleDefProcess(void* firsthandlerarg, uint32_t streamid,
}
else
{
gd_ptr->sum_container.adddef_Proc(p_def_key, strdup(name));
char* dup= strdup( name );
char* p= dup;
while ( '\0' != *p ) {
if ( '_' == *p ) *p= ' ';
if ( '\\' == *p ) *p= ' ';
p++;
}
gd_ptr->sum_container.adddef_Proc(p_def_key, dup );
}
Process p;

Просмотреть файл

@ -554,7 +554,9 @@ int main( int argc, const char** argv )
}
# ifdef _OPENMP
if(status) {
# pragma omp barrier
}
# endif
if( (read <= 0) && (ready == false) ) {
# ifdef _OPENMP
@ -585,11 +587,10 @@ int main( int argc, const char** argv )
}
}
}
# ifdef _OPENMP
# pragma omp barrier
# endif
if(status && ready == false) {
# ifdef _OPENMP
# pragma omp barrier
# pragma omp single nowait
# endif
{
@ -599,6 +600,7 @@ int main( int argc, const char** argv )
}
}
}
OTF_Reader_setRecordLimit( reader, (uint64_t) OTF_READ_MAXRECORDS );
OTF_Reader_close(reader);

Просмотреть файл

@ -248,23 +248,30 @@ VT_MPI_INT VTUnify_MPI_Type_free( VTUnify_MPI_Datatype * utype )
VT_MPI_INT VTUnify_MPI_Type_struct( VT_MPI_INT count,
VT_MPI_INT * array_of_blocklengths,
VTUnify_MPI_Aint * array_of_displacements,
VTUnify_MPI_Aint * array_of_udisplacements,
VTUnify_MPI_Datatype * array_of_utypes,
VTUnify_MPI_Datatype * newutype )
{
VT_MPI_INT error, i;
MPI_Aint * array_of_displacements;
MPI_Datatype * array_of_types;
MPI_Datatype newtype;
array_of_displacements = (MPI_Aint*)malloc( count * sizeof( MPI_Aint ));
assert( array_of_displacements );
for( i = 0; i < count; i++ )
array_of_displacements[i] = (MPI_Aint)array_of_udisplacements[i];
array_of_types = (MPI_Datatype*)malloc( count * sizeof( MPI_Datatype ));
assert( array_of_types );
for( i = 0; i < count; i++ )
array_of_types[i] = get_mpi_type( array_of_utypes[i] );
error = MPI_Type_struct( count, array_of_blocklengths,
(MPI_Aint*)array_of_displacements, array_of_types,
array_of_displacements, array_of_types,
&newtype );
free( array_of_displacements );
free( array_of_types );
if( error == MPI_SUCCESS )

Просмотреть файл

@ -95,7 +95,7 @@ EXTERN VT_MPI_INT VTUnify_MPI_Type_free( VTUnify_MPI_Datatype * utype );
EXTERN VT_MPI_INT VTUnify_MPI_Type_struct( VT_MPI_INT count,
VT_MPI_INT * array_of_blocklengths,
VTUnify_MPI_Aint * array_of_displacements,
VTUnify_MPI_Aint * array_of_udisplacements,
VTUnify_MPI_Datatype * array_of_utypes,
VTUnify_MPI_Datatype * newutype );

Просмотреть файл

@ -981,7 +981,8 @@ Wrapper::run()
std::cout << "+++ rename " << m_pConfig->m_vecOpari_ModObjFiles[i]
<< " to " << target << std::endl;
if( rename( m_pConfig->m_vecOpari_ModObjFiles[i].c_str(),
if( m_pConfig->m_bCompOnly &&
rename( m_pConfig->m_vecOpari_ModObjFiles[i].c_str(),
target.c_str() ) == -1 )
{
std::cerr << ExeName << ": could not rename "

Просмотреть файл

@ -133,7 +133,7 @@ struct VTGen_struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
} VTBuf_Entry_Base;
/* BUF_ENTRY_TYPE__DefinitionComment */
@ -141,9 +141,9 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
char* comment;
char comment[1];
} VTBuf_Entry_DefinitionComment;
/* BUF_ENTRY_TYPE__DefSclFile */
@ -151,10 +151,10 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t fid;
char* fname;
char fname[1];
} VTBuf_Entry_DefSclFile;
/* BUF_ENTRY_TYPE__DefScl */
@ -162,7 +162,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t sid;
uint32_t fid;
@ -174,10 +174,10 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t gid;
char* gname;
char gname[1];
} VTBuf_Entry_DefFileGroup;
/* BUF_ENTRY_TYPE__DefFile */
@ -185,11 +185,11 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t fid;
char* fname;
uint32_t gid;
char fname[1];
} VTBuf_Entry_DefFile;
/* BUF_ENTRY_TYPE__DefFunctionGroup */
@ -197,10 +197,10 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t rdid;
char* rdesc;
char rdesc[1];
} VTBuf_Entry_DefFunctionGroup;
/* BUF_ENTRY_TYPE__DefFunction */
@ -208,12 +208,12 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t rid;
char* rname;
uint32_t rdid;
uint32_t sid;
char rname[1];
} VTBuf_Entry_DefFunction;
/* BUF_ENTRY_TYPE__DefCollectiveOperation */
@ -221,11 +221,11 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t cid;
char* cname;
uint32_t ctype;
char cname[1];
} VTBuf_Entry_DefCollectiveOperation;
/* BUF_ENTRY_TYPE__DefCounterGroup */
@ -233,10 +233,10 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t gid;
char* gname;
char gname[1];
} VTBuf_Entry_DefCounterGroup;
/* BUF_ENTRY_TYPE__DefCounter */
@ -244,13 +244,13 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t cid;
char* cname;
uint32_t cprop;
uint32_t gid;
char* cunit;
char cunit[100];
char cname[1];
} VTBuf_Entry_DefCounter;
/* BUF_ENTRY_TYPE__DefProcessGroup */
@ -258,12 +258,12 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t cid;
char* grpn;
char grpn[100];
uint32_t grpc;
uint32_t* grpv;
uint32_t grpv[1];
} VTBuf_Entry_DefProcessGroup;
/* BUF_ENTRY_TYPE__DefMarker */
@ -271,11 +271,11 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint32_t mid;
char* mname;
uint32_t mtype;
char mname[1];
} VTBuf_Entry_DefMarker;
/* BUF_ENTRY_TYPE__Enter / BUF_ENTRY_TYPE__Leave */
@ -283,7 +283,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t rid;
@ -297,7 +297,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint64_t etime;
@ -311,7 +311,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint64_t hid;
@ -321,7 +321,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t fid;
@ -336,7 +336,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t cid;
@ -348,10 +348,10 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
char* comment;
char comment[1];
} VTBuf_Entry_Comment;
/* BUF_ENTRY_TYPE__Marker */
@ -359,11 +359,11 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t mid;
char* mtext;
char mtext[1];
} VTBuf_Entry_Marker;
/* BUF_ENTRY_TYPE__SendMsg / BUF_ENTRY_TYPE__RecvMsg */
@ -371,7 +371,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t pid;
@ -386,7 +386,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint64_t etime;
@ -403,7 +403,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t opid;
@ -419,7 +419,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t rpid;
@ -433,7 +433,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t rid;
@ -447,7 +447,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t peer;
@ -464,7 +464,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t cid;
@ -480,7 +480,7 @@ typedef struct
typedef struct
{
VTBuf_EntryTypes type;
uint8_t length;
uint32_t length;
uint64_t time;
uint32_t fid;
@ -583,7 +583,10 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
buffer_t p;
int i;
/* buffer empty? */
if(gen->buf->pos == gen->buf->mem) return;
/* intermediate flush and max. buffer flushes reached? */
if(!lastFlush && gen->flushcntr == 0) return;
/* Disable I/O tracing */
@ -706,7 +709,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
OTF_WStream_writeDefinitionComment(gen->filestream,
entry->comment);
free(entry->comment);
break;
}
case BUF_ENTRY_TYPE__DefSclFile:
@ -718,7 +720,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->fid,
entry->fname);
free(entry->fname);
break;
}
case BUF_ENTRY_TYPE__DefScl:
@ -742,7 +743,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->gid,
entry->gname);
free(entry->gname);
break;
}
case BUF_ENTRY_TYPE__DefFile:
@ -755,7 +755,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->fname,
entry->gid);
free(entry->fname);
break;
}
case BUF_ENTRY_TYPE__DefFunctionGroup:
@ -767,7 +766,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->rdid,
entry->rdesc);
free(entry->rdesc);
break;
}
case BUF_ENTRY_TYPE__DefFunction:
@ -781,7 +779,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->rdid,
entry->sid);
free(entry->rname);
break;
}
case BUF_ENTRY_TYPE__DefCollectiveOperation:
@ -794,7 +791,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->cname,
entry->ctype);
free(entry->cname);
break;
}
case BUF_ENTRY_TYPE__DefCounterGroup:
@ -806,7 +802,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->gid,
entry->gname);
free(entry->gname);
break;
}
case BUF_ENTRY_TYPE__DefCounter:
@ -821,8 +816,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->gid,
entry->cunit);
free(entry->cname);
free(entry->cunit);
break;
}
case BUF_ENTRY_TYPE__DefProcessGroup:
@ -836,8 +829,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->grpc,
entry->grpv);
free(entry->grpn);
free(entry->grpv);
break;
}
case BUF_ENTRY_TYPE__DefMarker:
@ -850,7 +841,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
entry->mname,
entry->mtype);
free(entry->mname);
break;
}
case BUF_ENTRY_TYPE__Enter:
@ -965,7 +955,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
65536 * gen->tid + vt_my_trace + 1,
entry->comment);
free(entry->comment);
break;
}
case BUF_ENTRY_TYPE__Marker:
@ -978,7 +967,6 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
65536 * gen->tid + vt_my_trace + 1,
entry->mid, entry->mtext);
free(entry->mtext);
break;
}
case BUF_ENTRY_TYPE__SendMsg:
@ -1167,8 +1155,9 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
if(!end_flush_marked &&
p + ((VTBuf_Entry_Base*)p)->length >= gen->buf->pos)
{
/* mark end of flush */
if(!lastFlush)
/* mark end of flush, if it's not the last (invisible) flush and
max flushes not reached */
if(!lastFlush && gen->flushcntr > 1)
{
uint64_t flush_etime = vt_pform_wtime();
vt_exit_flush(&flush_etime);
@ -1196,7 +1185,7 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush,
int max_flushes = vt_env_max_flushes();
vt_cntl_msg(1, "Maximum number of buffer flushes reached "
"(VT_MAX_FLUSHES=%d)", max_flushes);
vt_trace_off(0, 1);
vt_trace_off(1, 1);
vt_def_comment("__VT_COMMENT__ WARNING: This trace is "
"incomplete, because the maximum number of "
"buffer flushes was reached. "
@ -1413,6 +1402,8 @@ void VTGen_destroy(VTGen* gen)
uint8_t VTGen_get_buflevel(VTGen* gen)
{
VTGEN_CHECK(gen);
return (uint8_t)(((gen->buf->pos - gen->buf->mem) * 100) / gen->buf->size);
}
@ -1422,13 +1413,13 @@ uint8_t VTGen_get_buflevel(VTGen* gen)
/* - Definition records - */
void VTGen_write_DEFINITION_COMMENT(VTGen* gen,
const char* comment)
void VTGen_write_DEFINITION_COMMENT(VTGen* gen, const char* comment)
{
VTBuf_Entry_DefinitionComment* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefinitionComment));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefinitionComment) +
(strlen(comment) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1438,7 +1429,7 @@ void VTGen_write_DEFINITION_COMMENT(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefinitionComment;
new_entry->length = length;
new_entry->comment = strdup(comment);
strcpy(new_entry->comment, comment);
VTGEN_JUMP(gen, length);
}
@ -1449,8 +1440,9 @@ void VTGen_write_DEF_SCL_FILE(VTGen* gen,
{
VTBuf_Entry_DefSclFile* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefSclFile));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefSclFile) +
(strlen(fname) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1461,7 +1453,7 @@ void VTGen_write_DEF_SCL_FILE(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefSclFile;
new_entry->length = length;
new_entry->fid = fid;
new_entry->fname = strdup(fname);
strcpy(new_entry->fname, fname);
VTGEN_JUMP(gen, length);
}
@ -1473,7 +1465,7 @@ void VTGen_write_DEF_SCL(VTGen* gen,
{
VTBuf_Entry_DefScl* new_entry;
uint8_t length =
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefScl));
VTGEN_CHECK(gen);
@ -1496,8 +1488,9 @@ void VTGen_write_DEF_FILE_GROUP(VTGen* gen,
{
VTBuf_Entry_DefFileGroup* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefFileGroup));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefFileGroup) +
(strlen(gname) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1508,7 +1501,7 @@ void VTGen_write_DEF_FILE_GROUP(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefFileGroup;
new_entry->length = length;
new_entry->gid = gid;
new_entry->gname = strdup(gname);
strcpy(new_entry->gname, gname);
VTGEN_JUMP(gen, length);
}
@ -1520,8 +1513,9 @@ void VTGen_write_DEF_FILE(VTGen* gen,
{
VTBuf_Entry_DefFile* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefFile));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefFile) +
(strlen(fname) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1532,8 +1526,8 @@ void VTGen_write_DEF_FILE(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefFile;
new_entry->length = length;
new_entry->fid = fid;
new_entry->fname = strdup(fname);
new_entry->gid = gid;
strcpy(new_entry->fname, fname);
VTGEN_JUMP(gen, length);
}
@ -1544,8 +1538,9 @@ void VTGen_write_DEF_FUNCTION_GROUP(VTGen* gen,
{
VTBuf_Entry_DefFunctionGroup* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefFunctionGroup));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefFunctionGroup) +
(strlen(rdesc) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1556,7 +1551,7 @@ void VTGen_write_DEF_FUNCTION_GROUP(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefFunctionGroup;
new_entry->length = length;
new_entry->rdid = rdid;
new_entry->rdesc = strdup(rdesc);
strcpy(new_entry->rdesc, rdesc);
VTGEN_JUMP(gen, length);
}
@ -1569,8 +1564,9 @@ void VTGen_write_DEF_FUNCTION(VTGen* gen,
{
VTBuf_Entry_DefFunction* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefFunction));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefFunction) +
(strlen(rname) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1581,9 +1577,9 @@ void VTGen_write_DEF_FUNCTION(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefFunction;
new_entry->length = length;
new_entry->rid = rid;
new_entry->rname = strdup(rname);
new_entry->rdid = rdid;
new_entry->sid = sid;
strcpy(new_entry->rname, rname);
VTGEN_JUMP(gen, length);
}
@ -1595,8 +1591,9 @@ void VTGen_write_DEF_COLLECTIVE_OPERATION(VTGen* gen,
{
VTBuf_Entry_DefCollectiveOperation* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefCollectiveOperation));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefCollectiveOperation) +
(strlen(cname) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1607,8 +1604,8 @@ void VTGen_write_DEF_COLLECTIVE_OPERATION(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefCollectiveOperation;
new_entry->length = length;
new_entry->cid = cid;
new_entry->cname = strdup(cname);
new_entry->ctype = ctype;
strcpy(new_entry->cname, cname);
VTGEN_JUMP(gen, length);
}
@ -1619,8 +1616,9 @@ void VTGen_write_DEF_COUNTER_GROUP(VTGen* gen,
{
VTBuf_Entry_DefCounterGroup* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefCounterGroup));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefCounterGroup) +
(strlen(gname) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1631,7 +1629,7 @@ void VTGen_write_DEF_COUNTER_GROUP(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefCounterGroup;
new_entry->length = length;
new_entry->gid = gid;
new_entry->gname = strdup(gname);
strcpy(new_entry->gname, gname);
VTGEN_JUMP(gen, length);
}
@ -1645,8 +1643,9 @@ void VTGen_write_DEF_COUNTER(VTGen* gen,
{
VTBuf_Entry_DefCounter* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefCounter));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefCounter) +
(strlen(cname) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1657,10 +1656,11 @@ void VTGen_write_DEF_COUNTER(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefCounter;
new_entry->length = length;
new_entry->cid = cid;
new_entry->cname = strdup(cname);
new_entry->cprop = cprop;
new_entry->gid = gid;
new_entry->cunit = strdup(cunit);
strncpy(new_entry->cunit, cunit, sizeof(new_entry->cunit)-1);
new_entry->cunit[sizeof(new_entry->cunit)-1] = '\0';
strcpy(new_entry->cname, cname);
VTGEN_JUMP(gen, length);
}
@ -1673,8 +1673,9 @@ void VTGen_write_DEF_PROCESS_GROUP(VTGen* gen,
{
VTBuf_Entry_DefProcessGroup* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefProcessGroup));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefProcessGroup) +
(grpc > 0 ? (grpc - 1) * sizeof(uint32_t) : 0 )));
VTGEN_CHECK(gen);
@ -1685,12 +1686,10 @@ void VTGen_write_DEF_PROCESS_GROUP(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefProcessGroup;
new_entry->length = length;
new_entry->cid = cid;
new_entry->grpn = strdup(grpn);
strncpy(new_entry->grpn, grpn, sizeof(new_entry->grpn)-1);
new_entry->grpn[sizeof(new_entry->grpn)-1] = '\0';
new_entry->grpc = grpc;
new_entry->grpv = (uint32_t*)calloc(grpc, sizeof(uint32_t));
if(new_entry->grpv == NULL)
vt_error();
if( grpc > 0 )
memcpy(new_entry->grpv, grpv, grpc * sizeof(uint32_t));
VTGEN_JUMP(gen, length);
@ -1705,8 +1704,9 @@ void VTGen_write_DEF_MARKER(VTGen* gen,
{
VTBuf_Entry_DefMarker* new_entry;
uint8_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_DefMarker));
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_DefMarker) +
(strlen(mname) * sizeof(char))));
VTGEN_CHECK(gen);
@ -1717,8 +1717,8 @@ void VTGen_write_DEF_MARKER(VTGen* gen,
new_entry->type = BUF_ENTRY_TYPE__DefMarker;
new_entry->length = length;
new_entry->mid = mid;
new_entry->mname = vt_strdup(mname);
new_entry->mtype = mtype;
strcpy(new_entry->mname, mname);
VTGEN_JUMP(gen, length);
}
@ -1738,9 +1738,8 @@ void VTGen_write_ENTER(VTGen* gen, uint64_t* time, uint32_t rid, uint32_t sid,
{
VTBuf_Entry_EnterLeave* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
(metc > 0 ? (metc - 1) * sizeof(uint64_t) : 0 )));
VTGEN_ALLOC_EVENT(gen, length);
@ -1772,9 +1771,8 @@ void VTGen_write_LEAVE(VTGen* gen, uint64_t* time, uint32_t rid, uint32_t sid,
{
VTBuf_Entry_EnterLeave* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
(metc > 0 ? (metc - 1) * sizeof(uint64_t) : 0)));
VTGEN_ALLOC_EVENT(gen, length);
@ -1809,9 +1807,8 @@ void VTGen_write_FILE_OPERATION(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_FileOperation* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_FileOperation));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_FileOperation));
*etime -= *time;
VTGEN_ALLOC_EVENT(gen, length);
@ -1874,9 +1871,8 @@ void VTGen_write_BEGIN_FILE_OPERATION(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_BeginFileOperation* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_BeginFileOperation));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_BeginFileOperation));
VTGEN_ALLOC_EVENT(gen, length);
@ -1902,9 +1898,8 @@ void VTGen_write_END_FILE_OPERATION(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_EndFileOperation* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_EndFileOperation));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_EndFileOperation));
VTGEN_ALLOC_EVENT(gen, length);
@ -1969,9 +1964,8 @@ void VTGen_write_COUNTER(VTGen* gen, uint64_t* time, uint32_t cid,
{
VTBuf_Entry_Counter* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_Counter));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_Counter));
VTGEN_ALLOC_EVENT(gen, length);
@ -1998,7 +1992,7 @@ void VTGen_write_COMMENT(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_Comment* new_entry;
uint8_t length =
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_Comment));
VTGEN_ALLOC_EVENT(gen, length);
@ -2008,7 +2002,7 @@ void VTGen_write_COMMENT(VTGen* gen, uint64_t* time,
new_entry->type = BUF_ENTRY_TYPE__Comment;
new_entry->length = length;
new_entry->time = *time;
new_entry->comment = strdup(comment);
strcpy(new_entry->comment, comment);
VTGEN_JUMP(gen, length);
}
@ -2025,7 +2019,7 @@ void VTGen_write_MARKER(VTGen* gen, uint64_t* time, uint32_t mid,
{
VTBuf_Entry_Marker* new_entry;
uint8_t length =
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_Marker));
VTGEN_ALLOC_EVENT(gen, length);
@ -2036,7 +2030,7 @@ void VTGen_write_MARKER(VTGen* gen, uint64_t* time, uint32_t mid,
new_entry->length = length;
new_entry->time = *time;
new_entry->mid = mid;
new_entry->mtext = vt_strdup(mtext);
strcpy(new_entry->mtext, mtext);
VTGEN_JUMP(gen, length);
}
@ -2053,9 +2047,8 @@ void VTGen_write_SEND_MSG(VTGen* gen, uint64_t* time, uint32_t pid,
{
VTBuf_Entry_SendRecvMsg* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_SendRecvMsg));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_SendRecvMsg));
VTGEN_ALLOC_EVENT(gen, length);
@ -2086,9 +2079,8 @@ void VTGen_write_RECV_MSG(VTGen* gen, uint64_t* time, uint32_t pid,
{
VTBuf_Entry_SendRecvMsg* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_SendRecvMsg));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_SendRecvMsg));
VTGEN_ALLOC_EVENT(gen, length);
@ -2120,9 +2112,8 @@ void VTGen_write_COLLECTIVE_OPERATION(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_CollectiveOperation* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_CollectiveOperation));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_CollectiveOperation));
*etime -= *time;
VTGEN_ALLOC_EVENT(gen, length);
@ -2159,9 +2150,8 @@ void VTGen_write_RMA_PUT(VTGen* gen, uint64_t* time, uint32_t opid,
{
VTBuf_Entry_RMAPutGet* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_RMAPutGet));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_RMAPutGet));
VTGEN_ALLOC_EVENT(gen, length);
@ -2195,9 +2185,8 @@ void VTGen_write_RMA_PUTRE(VTGen* gen, uint64_t* time, uint32_t opid,
{
VTBuf_Entry_RMAPutGet* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_RMAPutGet));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_RMAPutGet));
VTGEN_ALLOC_EVENT(gen, length);
@ -2226,9 +2215,8 @@ void VTGen_write_RMA_GET(VTGen* gen, uint64_t* time, uint32_t opid,
{
VTBuf_Entry_RMAPutGet* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_RMAPutGet));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_RMAPutGet));
VTGEN_ALLOC_EVENT(gen, length);
@ -2257,9 +2245,8 @@ void VTGen_write_RMA_END(VTGen* gen, uint64_t* time, uint32_t rpid,
{
VTBuf_Entry_RMAEnd* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_RMAEnd));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_RMAEnd));
VTGEN_ALLOC_EVENT(gen, length);
@ -2288,9 +2275,8 @@ void VTGen_write_ENTER_STAT(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_EnterLeave* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
(metc > 0 ? (metc - 1) * sizeof(uint64_t) : 0)));
VTGEN_ALLOC_EVENT(gen, length);
@ -2319,9 +2305,8 @@ void VTGen_write_EXIT_STAT(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_EnterLeave* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
(metc > 0 ? (metc - 1) * sizeof(uint64_t) : 0)));
VTGEN_ALLOC_EVENT(gen, length);
@ -2350,9 +2335,8 @@ void VTGen_write_ENTER_FLUSH(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_EnterLeave* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
(metc > 0 ? (metc - 1) * sizeof(uint64_t) : 0)));
/* NB: No VTGEN_ALLOC_EVENT since space reserved at buffer creation */
@ -2381,9 +2365,8 @@ void VTGen_write_EXIT_FLUSH(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_EnterLeave* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
uint32_t length =
VTGEN_ALIGN_LENGTH((sizeof(VTBuf_Entry_EnterLeave) +
(metc > 0 ? (metc - 1) * sizeof(uint64_t) : 0)));
/* NB: No VTGEN_ALLOC_EVENT since space reserved at buffer creation */
@ -2416,9 +2399,8 @@ void VTGen_write_FUNCTION_SUMMARY(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_FunctionSummary* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_FunctionSummary));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_FunctionSummary));
VTGEN_ALLOC_EVENT(gen, length);
@ -2446,9 +2428,8 @@ void VTGen_write_MESSAGE_SUMMARY(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_MessageSummary* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_MessageSummary));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_MessageSummary));
VTGEN_ALLOC_EVENT(gen, length);
@ -2479,9 +2460,8 @@ void VTGen_write_COLLECTIVE_OPERATION_SUMMARY(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_CollectiveOperationSummary* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_CollectiveOperationSummary));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_CollectiveOperationSummary));
VTGEN_ALLOC_EVENT(gen, length);
@ -2511,9 +2491,8 @@ void VTGen_write_FILE_OPERATION_SUMMARY(VTGen* gen, uint64_t* time,
{
VTBuf_Entry_FileOperationSummary* new_entry;
uint8_t length;
length = VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_FileOperationSummary));
uint32_t length =
VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_FileOperationSummary));
VTGEN_ALLOC_EVENT(gen, length);

Просмотреть файл

@ -941,31 +941,22 @@ void vt_trace_off(uint8_t mark, uint8_t permanent)
if ( vt_is_alive &&
VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) != VT_TRACE_OFF_PERMANENT )
{
uint64_t time;
if ( permanent )
{
/* shutdown call stack */
while(VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD]) > 0) {
time = vt_pform_wtime();
vt_exit(&time);
}
VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) = VT_TRACE_OFF_PERMANENT;
vt_cntl_msg(1, "Tracing switched off permanently");
}
else
{
if ( VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON )
{
if ( mark )
{
uint64_t time;
time = vt_pform_wtime();
vt_enter(&time, vt_trc_regid[VT__TRC_OFF]);
}
if ( permanent )
{
VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) = VT_TRACE_OFF_PERMANENT;
vt_cntl_msg(1, "Tracing switched off permanently");
}
else if ( VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON )
{
/* store current call stack level */
VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) = VT_TRACE_OFF;
VTTHRD_STACK_LEVEL_AT_OFF(VTThrdv[VT_MY_THREAD]) =
@ -975,7 +966,6 @@ void vt_trace_off(uint8_t mark, uint8_t permanent)
VTTHRD_STACK_LEVEL_AT_OFF(VTThrdv[VT_MY_THREAD]));
}
}
}
}
uint8_t vt_is_trace_on()
@ -1834,8 +1824,10 @@ uint8_t vt_enter(uint64_t* time, uint32_t rid) {
if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) ==
VT_TRACE_OFF_PERMANENT) return 0;
VTTHRD_STACK_PUSH(VTThrdv[VT_MY_THREAD]);
do_trace = ((VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON) &&
(VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD]) < max_stack_depth));
(VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD]) <= max_stack_depth));
#if !defined(VT_DISABLE_RFG)
if( !RFG_Regions_stackPush(VTTHRD_RFGREGIONS(VTThrdv[VT_MY_THREAD]),
@ -1924,11 +1916,6 @@ uint8_t vt_enter(uint64_t* time, uint32_t rid) {
UPDATE_RUSAGE(time);
}
/* push call stack, if tracing was not disabled by this event
(max buffer flushes reached) */
if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) != VT_TRACE_OFF_PERMANENT)
VTTHRD_STACK_PUSH(VTThrdv[VT_MY_THREAD]);
return do_trace;
}
@ -1944,8 +1931,10 @@ void vt_exit(uint64_t* time) {
if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) ==
VT_TRACE_OFF_PERMANENT) return;
VTTHRD_STACK_POP(VTThrdv[VT_MY_THREAD]);
do_trace = ((VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON) &&
(VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD])+1 < max_stack_depth));
(VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD])+1 <= max_stack_depth));
#if !defined(VT_DISABLE_RFG)
if (!RFG_Regions_stackPop(VTTHRD_RFGREGIONS(VTThrdv[VT_MY_THREAD]),
@ -1995,11 +1984,6 @@ void vt_exit(uint64_t* time) {
0, NULL);
# endif /* VT_METR */
}
/* pop call stack, if tracing was not disabled by this event
(max buffer flushes reached) */
if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) != VT_TRACE_OFF_PERMANENT)
VTTHRD_STACK_POP(VTThrdv[VT_MY_THREAD]);
}
/* -- File I/O -- */