1
1
- Updated date in copyright header of each source file
VT configure fixes:
- fixed configure's version detection for PAPI to support version 4.x
- added configure tests to detect Bull MPICH2
VT new features:
- added support for "re-locate" an existing VampirTrace? installation without re-build it from source (fixes OMPI's ticket #1990)
- added support for tracing functions in shared libraries instrumented by the GNU, Intel, Pathscale, ot PGI 9 compiler
- added support for PAPI-C counters which belong to different components
- extended usability of environment variable VT_METRICS for PAPI counters to specifiy whether a counter provides increasing or absolute values

This commit was SVN r22637.
Этот коммит содержится в:
Matthias Jurenz 2010-02-17 14:38:11 +00:00
родитель 3a3018deef
Коммит 1ce37bc5ce
184 изменённых файлов: 1074 добавлений и 529 удалений

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

@ -7,6 +7,7 @@ Andreas Knuepfer
Ronny Brendel
Matthias Lieber
Jens Doleschal
Joachim Protze
Holger Mickler
Michael Heyde
Matthias Mueller

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

@ -1,4 +1,4 @@
Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
Centre, Federal Republic of Germany

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

@ -1,11 +1,20 @@
5.8.1openmpi
- updated version of internal OTF to 1.6.5openmpi
(see extlib/otf/ChangeLog)
- if VampirTrace is configured for Open MPI use its Fortran wrapper
library 'libmpi_f77' to build Fortran programs
- added functions 'MPI_Group_range_<incl|excl>' to Fortran MPI wrappers
- added support for tracing functions in shared libraries instrumented
by the GNU, Intel, Pathscale, ot PGI 9 compiler
- 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
- extended usability of environment variable VT_METRICS for PAPI
counters to specifiy whether a counter provides increasing or
absolute values
- added support for "re-locate" an existing VampirTrace installation
without re-build it from source
- fixed configure's version detection for PAPI to support version 4.x
- added configure tests to detect Bull MPICH2
- use Open MPI provided Fortran wrapper library 'libmpi_f77'
- added functions 'MPI_Group_range_<incl|excl>' to Fortran MPI wrappers
- fixed detection of unique node id on MacOS platforms
- fixed support for LAM/MPI
- fixed build error: do not add objects from the static version of the

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

@ -1,4 +1,4 @@
Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
Centre, Federal Republic of Germany

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

@ -61,7 +61,11 @@ AC_DEFUN([ACVT_BFD],
bfd_error="yes"
])
AS_IF([test "$bfd_error" = "no"], [have_bfd="yes"])
AS_IF([test "$bfd_error" = "no"],
[
have_bfd="yes"
AC_DEFINE([HAVE_BFD], [1], [Define to 1 if you have the BFD.])
])
])
AC_SUBST(BFDINCDIR)

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

@ -201,6 +201,8 @@ AC_DEFUN([ACVT_COMPINST],
AS_IF([test x"$have_bfd" = "xyes"],
[ACVT_GNUDMGL])
])
AS_IF([test x"$dl_error" = x], [ACVT_DL])
])
])

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

@ -10,8 +10,6 @@ AC_DEFUN([ACVT_COMPWRAP],
VT_WRAPPER_EXTRA_FCFLAGS=
VT_WRAPPER_EXTRA_LDFLAGS=
VT_WRAPPER_EXTRA_LIBS=
VT_WRAPPER_INCDIR=
VT_WRAPPER_LIBDIR=
VT_WRAPPER_VTLIB=
VT_WRAPPER_VTMPILIB=
VT_WRAPPER_VTMTLIB=
@ -80,13 +78,6 @@ AC_DEFUN([ACVT_COMPWRAP],
[extra flags to add to LIBS when using wrapper compilers]),
[VT_WRAPPER_EXTRA_LIBS=$withval])
ACVT_CONF_EXPAND_VARS([$includedir], [VT_WRAPPER_INCDIR])
AS_IF([test x"$VT_WRAPPER_INCDIR" = "x/usr/include"],
[VT_WRAPPER_INCDIR=""])
ACVT_CONF_EXPAND_VARS([$libdir], [VT_WRAPPER_LIBDIR])
AS_IF([test x"$VT_WRAPPER_LIBDIR" = "x/usr/lib"],
[VT_WRAPPER_LIBDIR=""])
VT_WRAPPER_VTLIB="-lvt"
VT_WRAPPER_VTMPILIB="-lvt-mpi"
VT_WRAPPER_VTMTLIB="-lvt-mt"
@ -132,8 +123,6 @@ AC_DEFUN([ACVT_COMPWRAP],
AC_SUBST(VT_WRAPPER_EXTRA_FCFLAGS)
AC_SUBST(VT_WRAPPER_EXTRA_LDFLAGS)
AC_SUBST(VT_WRAPPER_EXTRA_LIBS)
AC_SUBST(VT_WRAPPER_INCDIR)
AC_SUBST(VT_WRAPPER_LIBDIR)
AC_SUBST(VT_WRAPPER_VTLIB)
AC_SUBST(VT_WRAPPER_VTMPILIB)
AC_SUBST(VT_WRAPPER_VTMTLIB)

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

@ -3,6 +3,9 @@ AC_DEFUN([ACVT_DL],
dl_error="no"
have_dl="no"
have_rtld_default="no"
have_rtld_next="no"
DLDIR=
DLINCDIR=
DLLIBDIR=
@ -56,9 +59,12 @@ AC_DEFUN([ACVT_DL],
AS_IF([test x"$dl_error" = "xno"],
[
have_dl="yes"
AC_DEFINE([HAVE_DL], [1], [Define to 1 if you have the DL.])
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $DLINCDIR -D_GNU_SOURCE"
AC_CHECK_DECLS([RTLD_NEXT], [], [], [#include <dlfcn.h>])
AC_CHECK_DECLS([RTLD_DEFAULT], [have_rtld_default="yes"], [], [#include <dlfcn.h>])
AC_CHECK_DECLS([RTLD_NEXT], [have_rtld_next="yes"], [], [#include <dlfcn.h>])
CPPFLAGS=$sav_CPPFLAGS
])

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

@ -340,6 +340,25 @@ AC_DEFUN([ACVT_MPI],
])
])
AC_ARG_WITH(mpibull2,
AC_HELP_STRING([--with-mpibull2], [set MPI-libs for Bull MPICH2]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
AS_IF([test x"$MPILIBDIR" = x],
[pmilibdir="-L/usr/lib/pmi"], [pmilibdir="$MPILIBDIR/pmi"])
MPILIBDIR="$MPILIBDIR $pmilibdir"
MPILIB="-lmpi -lpmi"
PMPILIB="$MPILIB"
FMPILIB="-lmpibinding_f77"
MPICFLAGS="$MPICFLAGS -DMPICH_IGNORE_CXX_SEEK"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
])
])
AC_ARG_WITH(mpi-lib,
AC_HELP_STRING([--with-mpi-lib], [use given mpi lib]),
[MPILIB="$withval"])
@ -431,6 +450,40 @@ AC_DEFUN([ACVT_MPI],
dnl check for MPILIB
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmpi"
AC_MSG_CHECKING([whether linking with -lmpi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB=-lmpi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
AS_IF([test x"$MPILIB" != x],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -llam"
AC_MSG_CHECKING([whether linking with -llam works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB="-lmpi -llam"],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
])
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
AS_IF([test x"$MPILIBDIR" = x],
[pmilibdir="-L/usr/lib/pmi"], [pmilibdir="$MPILIBDIR/pmi"])
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR $pmilibdir -lmpi -lpmi"
AC_MSG_CHECKING([whether linking with -lmpi $pmilibdir -lpmi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIBDIR="$MPILIBDIR $pmilibdir"; MPILIB="-lmpi -lpmi"],
[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
@ -476,26 +529,7 @@ dnl check for MPILIB
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmpi"
AC_MSG_CHECKING([whether linking with -lmpi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB=-lmpi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
AS_IF([test x"$MPILIB" != x],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -llam"
AC_MSG_CHECKING([whether linking with -llam works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB="-lmpi -llam"],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
])
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
AC_MSG_NOTICE([error: no libhpmpi, libmpich, libmpi, or liblam found; check path for MPI package first...])
AC_MSG_NOTICE([error: no libmpi, liblam, libmpich, or libhpmpi found; check path for MPI package first...])
mpi_error="yes"
])
@ -548,6 +582,26 @@ dnl check for PMPILIB
dnl check for FMPILIB
AS_IF([test x"$FMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmpi_f77 $MPILIB"
AC_MSG_CHECKING([whether linking with -lmpi_f77 works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); FMPILIB=-lmpi_f77],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$FMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmpibinding_f77"
AC_MSG_CHECKING([whether linking with -lmpibinding_f77 works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); FMPILIB=-lmpibinding_f77],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$FMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
@ -578,23 +632,13 @@ dnl check for FMPILIB
LIBS=$sav_LIBS
])
AS_IF([test x"$FMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmpi_f77 $MPILIB"
AC_MSG_CHECKING([whether linking with -lmpi_f77 $MPILIB works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); FMPILIB=-lmpi_f77],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$mpi_error" = "xno"],
[
AS_IF([test x"$FMPILIB" = x],
[
AS_IF([test x"$check_fmpiwraplib" = "xyes"],
[
AC_MSG_WARN([no libfmpich, liblamf77mpi, or libfmpi found; build libvt-fmpi])
AC_MSG_WARN([no libmpi_f77, libmpibinding_f77, libfmpich, liblamf77mpi, or libfmpi found; build libvt-fmpi])
FMPILIB="-lvt-fmpi"
])
],
@ -645,8 +689,7 @@ dnl check for MPI-2 One-Sided Communications
AS_IF([test x"$check_mpi2_1sided" = "xyes"],
[
AC_CHECK_FUNC([MPI_Get],
[AC_CHECK_FUNC([MPI_Put], [have_mpi2_1sided="yes"
AC_CHECK_FUNCS([PMPI_Win_test PMPI_Win_lock PMPI_Win_unlock])])])
[AC_CHECK_FUNC([MPI_Put], [have_mpi2_1sided="yes"])])
AS_IF([test x"$force_mpi2_1sided" = "xyes" -a x"$have_mpi2_1sided" = "xno"], [exit 1])
],
[
@ -657,6 +700,10 @@ dnl check for MPI-2 One-Sided Communications
[AC_MSG_NOTICE([disabled via command line switch])])
])
])
AS_IF([test x"$have_mpi2_1sided" = "xyes"],
[
AC_CHECK_FUNCS([PMPI_Win_test PMPI_Win_lock PMPI_Win_unlock])
])
dnl check for MPI-2 Extended Collective Operations
@ -699,6 +746,10 @@ dnl check for MPI-2 I/O
[AC_MSG_NOTICE([disabled via command line switch])])
])
])
AS_IF([test x"$have_mpi2_io" = "xyes"],
[
AC_CHECK_FUNCS([MPI_Register_datarep])
])
CC=$sav_CC
CPPFLAGS=$sav_CPPFLAGS

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

@ -56,22 +56,22 @@ AC_DEFUN([ACVT_PAPI],
AS_IF([test x"$papi_error" = "xno"],
[
AC_MSG_CHECKING([whether PAPI version = 3.x])
AC_MSG_CHECKING([whether PAPI version >= 3])
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PAPIINCDIR"
AC_TRY_COMPILE([#include <papi.h>],
[
#ifndef PAPI_VERSION
# error "PAPI_VERSION not defined; version < 3.x"
#elif PAPI_VERSION_MAJOR(PAPI_VERSION) != 3
# error "PAPI_VERSION_MAJOR != 3"
# error "PAPI_VERSION not defined; version < 3"
#elif PAPI_VERSION_MAJOR(PAPI_VERSION) < 3
# error "PAPI_VERSION_MAJOR < 3"
#endif
],
[AC_MSG_RESULT([yes])],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([error: PAPI version could not be determined and/or is incompatible (!= 3.x)
AC_MSG_NOTICE([error: PAPI version could not be determined and/or is incompatible (< 3)
See \`config.log' for more details.])
papi_error="yes"
])

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

@ -48,7 +48,7 @@ cat <<End-of-File >$tmp.c
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -80,6 +80,19 @@ cat <<End-of-File >$tmp.awk
next
}
if (index(mpicall,"MPI_Win_test") != 0) {
printf "#if defined(HAVE_PMPI_WIN_TEST) && HAVE_PMPI_WIN_TEST\n\n"
}
if (index(mpicall,"MPI_Win_lock") != 0) {
printf "#if defined(HAVE_PMPI_WIN_LOCK) && HAVE_PMPI_WIN_LOCK\n\n"
}
if (index(mpicall,"MPI_Win_unlock") != 0) {
printf "#if defined(HAVE_PMPI_WIN_UNLOCK) && HAVE_PMPI_WIN_UNLOCK\n\n"
}
if (index(mpicall,"MPI_Register_datarep") != 0) {
printf "#if defined(HAVE_MPI_REGISTER_DATAREP) && HAVE_MPI_REGISTER_DATAREP\n\n"
}
printf "/* -- %s -- */\n\n", mpicall
printf "%s %s(", rettype, mpicall
@ -90,10 +103,7 @@ cat <<End-of-File >$tmp.awk
type[i-2]=typeandpara[1]
para[i-2]=typeandpara[2]
if (i > 3) printf ", "
if (index(\$i, "*") == 0)
printf "%s %s",type[i-2],para[i-2]
else
printf "%s %s",type[i-2],para[i-2]
printf "%s %s",type[i-2],para[i-2]
}
}
print ")"
@ -147,6 +157,19 @@ cat <<End-of-File >$tmp.awk
print " return result;"
print "}"
print ""
if (index(mpicall,"MPI_Win_test") != 0) {
printf "#endif /* HAVE_PMPI_WIN_TEST */\n\n"
}
if (index(mpicall,"MPI_Win_lock") != 0) {
printf "#endif /* HAVE_PMPI_WIN_LOCK */\n\n"
}
if (index(mpicall,"MPI_Win_unlock") != 0) {
printf "#endif /* HAVE_PMPI_WIN_UNLOCK */\n\n"
}
if (index(mpicall,"MPI_Register_datarep") != 0) {
printf "#endif /* HAVE_MPI_REGISTER_DATAREP */\n\n"
}
}
End-of-File

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

@ -60,7 +60,7 @@ cat <<End-of-File >$tmp.c
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -92,6 +92,19 @@ cat <<End-of-File >$tmp.awk
next
}
if (index(mpicall,"MPI_Win_test") != 0) {
printf "#if defined(HAVE_PMPI_WIN_TEST) && HAVE_PMPI_WIN_TEST\n\n"
}
if (index(mpicall,"MPI_Win_lock") != 0) {
printf "#if defined(HAVE_PMPI_WIN_LOCK) && HAVE_PMPI_WIN_LOCK\n\n"
}
if (index(mpicall,"MPI_Win_unlock") != 0) {
printf "#if defined(HAVE_PMPI_WIN_UNLOCK) && HAVE_PMPI_WIN_UNLOCK\n\n"
}
if (index(mpicall,"MPI_Register_datarep") != 0) {
printf "#if defined(HAVE_MPI_REGISTER_DATAREP) && HAVE_MPI_REGISTER_DATAREP\n\n"
}
stringcnt=0
printf "/* -- %s -- */\n\n", mpicall
@ -207,6 +220,19 @@ cat <<End-of-File >$tmp.awk
}
printf "))\n\n"
}
if (index(mpicall,"MPI_Win_test") != 0) {
printf "#endif /* HAVE_PMPI_WIN_TEST */\n\n"
}
if (index(mpicall,"MPI_Win_lock") != 0) {
printf "#endif /* HAVE_PMPI_WIN_LOCK */\n\n"
}
if (index(mpicall,"MPI_Win_unlock") != 0) {
printf "#endif /* HAVE_PMPI_WIN_UNLOCK */\n\n"
}
if (index(mpicall,"MPI_Register_datarep") != 0) {
printf "#endif /* HAVE_MPI_REGISTER_DATAREP */\n\n"
}
}
# =================================================

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

@ -48,7 +48,7 @@ cat <<End-of-File >$tmp.h
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -97,7 +97,7 @@ cat <<End-of-File >$tmp.c
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -14,7 +14,13 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Check whether we are inside Open MPI package
inside_openmpi="no"
AC_ARG_WITH(openmpi-inside, [],
[AS_IF([test x"$withval" != "xno"], [inside_openmpi="yes"])])
[
AS_IF([test x"$withval" != "xno"],
[
inside_openmpi="yes"
CPPFLAGS="-DINSIDE_OPENMPI $CPPFLAGS"
])
])
ACVT_CONF_INIT
@ -57,7 +63,6 @@ AS_IF([test "$top_vt_builddir" != "$top_vt_srcdir"],
# If VPATH build, including of the source directory needed
# to find '<srcdir>/config_bottom.h' and '<srcdir>/util/util.h'
CPPFLAGS='-I$(top_srcdir)'" $CPPFLAGS"
CXXCPPFLAGS='-I$(top_srcdir)'" $CXXCPPFLAGS"
])
# Check for file system case sensitivity
@ -66,7 +71,7 @@ AM_CONDITIONAL(AMHAVECSFS, test x"$have_csfs" = "xyes")
# Correct install paths
AS_IF([test x"$prefix" = "xNONE"], [prefix="$ac_default_prefix"])
AS_IF([test x"$exec_prefix" = "xNONE"], [exec_prefix="$prefix"])
AS_IF([test x"$exec_prefix" = "xNONE"], [exec_prefix="\${prefix}"])
AS_IF([test x"$includedir" = x -o "$includedir" = "\${prefix}/include"],
[includedir="$includedir/vampirtrace"])
AS_IF([test x"$datarootdir" = x -o "$datarootdir" = "\${prefix}/share"],
@ -308,6 +313,7 @@ ACVT_COMPWRAP
# Output files
AC_CONFIG_FILES([Makefile
util/Makefile
util/installdirs_conf.h
extlib/Makefile
vtlib/Makefile
tools/Makefile

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

@ -52,8 +52,10 @@ DIV.navigation { }
SPAN.textbf { font-weight: bold }
SPAN.arabic { }
SPAN.textit { font-style: italic }
body {font-family: sans-serif;}
</STYLE>
</HEAD>
<BODY >
@ -92,166 +94,168 @@ Contents</A>
<!--Table of Contents-->
<UL CLASS="TofC">
<LI><A NAME="tex2html98"
HREF="UserManual.html#SECTION00200000000000000000">Introduction</A>
<LI><A NAME="tex2html99"
HREF="UserManual.html#SECTION00200000000000000000">Introduction</A>
<LI><A NAME="tex2html100"
HREF="UserManual.html#SECTION00300000000000000000">Instrumentation</A>
<UL>
<LI><A NAME="tex2html100"
HREF="UserManual.html#SECTION00310000000000000000">Compiler Wrappers</A>
<LI><A NAME="tex2html101"
HREF="UserManual.html#SECTION00320000000000000000">Instrumentation Types</A>
HREF="UserManual.html#SECTION00310000000000000000">Compiler Wrappers</A>
<LI><A NAME="tex2html102"
HREF="UserManual.html#SECTION00320000000000000000">Instrumentation Types</A>
<LI><A NAME="tex2html103"
HREF="UserManual.html#SECTION00330000000000000000">Automatic Instrumentation</A>
<UL>
<LI><A NAME="tex2html103"
HREF="UserManual.html#SECTION00331000000000000000">Supported Compilers</A>
<LI><A NAME="tex2html104"
HREF="UserManual.html#SECTION00332000000000000000">Notes for Using the GNU, Intel, or PathScale Compiler</A>
HREF="UserManual.html#SECTION00331000000000000000">Supported Compilers</A>
<LI><A NAME="tex2html105"
HREF="UserManual.html#SECTION00333000000000000000">Known License Issues with BFD</A>
HREF="UserManual.html#SECTION00332000000000000000">Notes for Using the GNU, Intel, or PathScale Compiler</A>
<LI><A NAME="tex2html106"
HREF="UserManual.html#SECTION00334000000000000000">Notes on Instrumentation of Inline Functions</A>
HREF="UserManual.html#SECTION00333000000000000000">Known License Issues with BFD</A>
<LI><A NAME="tex2html107"
HREF="UserManual.html#SECTION00334000000000000000">Notes on Instrumentation of Inline Functions</A>
<LI><A NAME="tex2html108"
HREF="UserManual.html#SECTION00335000000000000000">Instrumentation of Loops with OpenUH Compiler</A>
</UL>
<LI><A NAME="tex2html108"
<LI><A NAME="tex2html109"
HREF="UserManual.html#SECTION00340000000000000000">Manual Instrumentation</A>
<UL>
<LI><A NAME="tex2html109"
HREF="UserManual.html#SECTION00341000000000000000">Using the VampirTrace API</A>
<LI><A NAME="tex2html110"
HREF="UserManual.html#SECTION00341000000000000000">Using the VampirTrace API</A>
<LI><A NAME="tex2html111"
HREF="UserManual.html#SECTION00342000000000000000">Measurement Controls</A>
</UL>
<LI><A NAME="tex2html111"
HREF="UserManual.html#SECTION00350000000000000000">Binary Instrumentation Using Dyninst</A>
<LI><A NAME="tex2html112"
HREF="UserManual.html#SECTION00360000000000000000">Tracing Java Applications Using JVMTI</A>
HREF="UserManual.html#SECTION00350000000000000000">Binary Instrumentation Using Dyninst</A>
<LI><A NAME="tex2html113"
HREF="UserManual.html#SECTION00360000000000000000">Tracing Java Applications Using JVMTI</A>
<LI><A NAME="tex2html114"
HREF="UserManual.html#SECTION00370000000000000000">Tracing Calls to 3rd-Party Libraries</A>
</UL>
<BR>
<LI><A NAME="tex2html114"
<LI><A NAME="tex2html115"
HREF="UserManual.html#SECTION00400000000000000000">Runtime Measurement</A>
<UL>
<LI><A NAME="tex2html115"
HREF="UserManual.html#SECTION00410000000000000000">Trace File Name and Location</A>
<LI><A NAME="tex2html116"
HREF="UserManual.html#SECTION00420000000000000000">Environment Variables</A>
HREF="UserManual.html#SECTION00410000000000000000">Trace File Name and Location</A>
<LI><A NAME="tex2html117"
HREF="UserManual.html#SECTION00430000000000000000">Influencing Trace Buffer Size</A>
HREF="UserManual.html#SECTION00420000000000000000">Environment Variables</A>
<LI><A NAME="tex2html118"
HREF="UserManual.html#SECTION00440000000000000000">Profiling an Application</A>
HREF="UserManual.html#SECTION00430000000000000000">Influencing Trace Buffer Size</A>
<LI><A NAME="tex2html119"
HREF="UserManual.html#SECTION00450000000000000000">Unification of Local Traces</A>
HREF="UserManual.html#SECTION00440000000000000000">Profiling an Application</A>
<LI><A NAME="tex2html120"
HREF="UserManual.html#SECTION00460000000000000000">Synchronized Buffer Flush</A>
HREF="UserManual.html#SECTION00450000000000000000">Unification of Local Traces</A>
<LI><A NAME="tex2html121"
HREF="UserManual.html#SECTION00460000000000000000">Synchronized Buffer Flush</A>
<LI><A NAME="tex2html122"
HREF="UserManual.html#SECTION00470000000000000000">Enhanced Timer Synchronization</A>
</UL>
<BR>
<LI><A NAME="tex2html122"
<LI><A NAME="tex2html123"
HREF="UserManual.html#SECTION00500000000000000000">Recording Additional Events and Counters</A>
<UL>
<LI><A NAME="tex2html123"
HREF="UserManual.html#SECTION00510000000000000000">Hardware Performance Counters</A>
<LI><A NAME="tex2html124"
HREF="UserManual.html#SECTION00520000000000000000">Resource Usage Counters</A>
HREF="UserManual.html#SECTION00510000000000000000">Hardware Performance Counters</A>
<LI><A NAME="tex2html125"
HREF="UserManual.html#SECTION00530000000000000000">Memory Allocation Counter</A>
HREF="UserManual.html#SECTION00520000000000000000">Resource Usage Counters</A>
<LI><A NAME="tex2html126"
HREF="UserManual.html#SECTION00540000000000000000">CPU ID Counter</A>
HREF="UserManual.html#SECTION00530000000000000000">Memory Allocation Counter</A>
<LI><A NAME="tex2html127"
HREF="UserManual.html#SECTION00550000000000000000">Pthread API Calls</A>
HREF="UserManual.html#SECTION00540000000000000000">CPU ID Counter</A>
<LI><A NAME="tex2html128"
HREF="UserManual.html#SECTION00560000000000000000">I/O Calls</A>
HREF="UserManual.html#SECTION00550000000000000000">Pthread API Calls</A>
<LI><A NAME="tex2html129"
HREF="UserManual.html#SECTION00570000000000000000">fork/system/exec Calls</A>
HREF="UserManual.html#SECTION00560000000000000000">I/O Calls</A>
<LI><A NAME="tex2html130"
HREF="UserManual.html#SECTION00580000000000000000">MPI Correctness Checking Using UniMCI</A>
HREF="UserManual.html#SECTION00570000000000000000">fork/system/exec Calls</A>
<LI><A NAME="tex2html131"
HREF="UserManual.html#SECTION00590000000000000000">User-defined Counters</A>
HREF="UserManual.html#SECTION00580000000000000000">MPI Correctness Checking Using UniMCI</A>
<LI><A NAME="tex2html132"
HREF="UserManual.html#SECTION00590000000000000000">User-defined Counters</A>
<LI><A NAME="tex2html133"
HREF="UserManual.html#SECTION005100000000000000000">User-defined Markers</A>
</UL>
<BR>
<LI><A NAME="tex2html133"
<LI><A NAME="tex2html134"
HREF="UserManual.html#SECTION00600000000000000000">Filtering &amp; Grouping</A>
<UL>
<LI><A NAME="tex2html134"
HREF="UserManual.html#SECTION00610000000000000000">Function Filtering</A>
<LI><A NAME="tex2html135"
HREF="UserManual.html#SECTION00620000000000000000">Java Specific Filtering</A>
HREF="UserManual.html#SECTION00610000000000000000">Function Filtering</A>
<LI><A NAME="tex2html136"
HREF="UserManual.html#SECTION00620000000000000000">Java Specific Filtering</A>
<LI><A NAME="tex2html137"
HREF="UserManual.html#SECTION00630000000000000000">Function Grouping</A>
</UL>
<BR>
<LI><A NAME="tex2html137"
<LI><A NAME="tex2html138"
HREF="UserManual.html#SECTION00700000000000000000">VampirTrace Installation</A>
<UL>
<LI><A NAME="tex2html138"
HREF="UserManual.html#SECTION00710000000000000000">Basics</A>
<LI><A NAME="tex2html139"
HREF="UserManual.html#SECTION00720000000000000000">Configure Options</A>
HREF="UserManual.html#SECTION00710000000000000000">Basics</A>
<LI><A NAME="tex2html140"
HREF="UserManual.html#SECTION00730000000000000000">Cross Compilation</A>
HREF="UserManual.html#SECTION00720000000000000000">Configure Options</A>
<LI><A NAME="tex2html141"
HREF="UserManual.html#SECTION00740000000000000000">Environment Set-Up</A>
HREF="UserManual.html#SECTION00730000000000000000">Cross Compilation</A>
<LI><A NAME="tex2html142"
HREF="UserManual.html#SECTION00740000000000000000">Environment Set-Up</A>
<LI><A NAME="tex2html143"
HREF="UserManual.html#SECTION00750000000000000000">Notes for Developers</A>
</UL>
<BR>
<LI><A NAME="tex2html143"
<LI><A NAME="tex2html144"
HREF="UserManual.html#SECTION00800000000000000000">Command Reference</A>
<UL>
<LI><A NAME="tex2html144"
HREF="UserManual.html#SECTION00810000000000000000">Compiler Wrappers (vtcc,vtcxx,vtf77,vtf90)</A>
<LI><A NAME="tex2html145"
HREF="UserManual.html#SECTION00820000000000000000">Local Trace Unifier (vtunify)</A>
HREF="UserManual.html#SECTION00810000000000000000">Compiler Wrappers (vtcc,vtcxx,vtf77,vtf90)</A>
<LI><A NAME="tex2html146"
HREF="UserManual.html#SECTION00830000000000000000">Dyninst Mutator (vtdyn)</A>
HREF="UserManual.html#SECTION00820000000000000000">Local Trace Unifier (vtunify)</A>
<LI><A NAME="tex2html147"
HREF="UserManual.html#SECTION00840000000000000000">Trace Filter Tool (vtfilter)</A>
HREF="UserManual.html#SECTION00830000000000000000">Dyninst Mutator (vtdyn)</A>
<LI><A NAME="tex2html148"
HREF="UserManual.html#SECTION00840000000000000000">Trace Filter Tool (vtfilter)</A>
<LI><A NAME="tex2html149"
HREF="UserManual.html#SECTION00850000000000000000">Library Wrapper Generator (vtlibwrapgen)</A>
</UL>
<BR>
<LI><A NAME="tex2html149"
<LI><A NAME="tex2html150"
HREF="UserManual.html#SECTION00900000000000000000">Counter Specifications</A>
<UL>
<LI><A NAME="tex2html150"
HREF="UserManual.html#SECTION00910000000000000000">PAPI</A>
<LI><A NAME="tex2html151"
HREF="UserManual.html#SECTION00920000000000000000">CPC</A>
HREF="UserManual.html#SECTION00910000000000000000">PAPI</A>
<LI><A NAME="tex2html152"
HREF="UserManual.html#SECTION00930000000000000000">NEC SX Hardware Performance Counter</A>
HREF="UserManual.html#SECTION00920000000000000000">CPC</A>
<LI><A NAME="tex2html153"
HREF="UserManual.html#SECTION00930000000000000000">NEC SX Hardware Performance Counter</A>
<LI><A NAME="tex2html154"
HREF="UserManual.html#SECTION00940000000000000000">Resource Usage</A>
</UL>
<BR>
<LI><A NAME="tex2html154"
<LI><A NAME="tex2html155"
HREF="UserManual.html#SECTION001000000000000000000">FAQ</A>
<UL>
<LI><A NAME="tex2html155"
HREF="UserManual.html#SECTION001010000000000000000">Can I use different compilers for VampirTrace and my application?</A>
<LI><A NAME="tex2html156"
HREF="UserManual.html#SECTION001020000000000000000">Why does my application takes such a long time to start up?</A>
HREF="UserManual.html#SECTION001010000000000000000">Can I use different compilers for VampirTrace and my application?</A>
<LI><A NAME="tex2html157"
HREF="UserManual.html#SECTION001030000000000000000">How can I trace functions in shared libraries?</A>
HREF="UserManual.html#SECTION001020000000000000000">Why does my application takes such a long time to start up?</A>
<LI><A NAME="tex2html158"
HREF="UserManual.html#SECTION001040000000000000000">How can I speed up trace unification?</A>
HREF="UserManual.html#SECTION001030000000000000000">How can I trace functions in shared libraries?</A>
<LI><A NAME="tex2html159"
HREF="UserManual.html#SECTION001050000000000000000">The application has run to completion, but there is no *.otf file. What can I do?</A>
HREF="UserManual.html#SECTION001040000000000000000">How can I speed up trace unification?</A>
<LI><A NAME="tex2html160"
HREF="UserManual.html#SECTION001060000000000000000">What limitations are associated with VT_ON/VT_OFF?</A>
HREF="UserManual.html#SECTION001050000000000000000">The application has run to completion, but there is no *.otf file. What can I do?</A>
<LI><A NAME="tex2html161"
HREF="UserManual.html#SECTION001070000000000000000">How to fix strange function names in C++ application traces?</A>
HREF="UserManual.html#SECTION001060000000000000000">What limitations are associated with VT_ON/VT_OFF?</A>
<LI><A NAME="tex2html162"
HREF="UserManual.html#SECTION001080000000000000000">VampirTrace warns that it ``cannot lock file a.lock'', what's wrong?</A>
HREF="UserManual.html#SECTION001070000000000000000">How to fix strange function names in C++ application traces?</A>
<LI><A NAME="tex2html163"
HREF="UserManual.html#SECTION001090000000000000000">I have a question that is not answered in this document!</A>
HREF="UserManual.html#SECTION001080000000000000000">VampirTrace warns that it ``cannot lock file a.lock'', what's wrong?</A>
<LI><A NAME="tex2html164"
HREF="UserManual.html#SECTION0010100000000000000000">I need support for additional features so I can trace application xyz.</A>
HREF="UserManual.html#SECTION001090000000000000000">Can I re-locate my VampirTrace installation without re-build from source?</A>
<LI><A NAME="tex2html165"
HREF="UserManual.html#SECTION0010100000000000000000">I have a question that is not answered in this document!</A>
<LI><A NAME="tex2html166"
HREF="UserManual.html#SECTION0010110000000000000000">I need support for additional features so I can trace application xyz.</A>
</UL></UL>
<!--End of Table of Contents-->
<P>
@ -288,18 +292,18 @@ OpenMP events, and performance counters.
<P>
After a successful tracing run, VampirTrace writes all collected data to a
trace file in the Open Trace Format (OTF)<A NAME="tex2html3"
HREF="#foot1149"><SUP>[+]</SUP></A>.
HREF="#foot1156"><SUP>[+]</SUP></A>.
As a result, the information is available for post-mortem analysis and
visualization by various tools.
Most notably, VampirTrace provides the input data for the Vampir analysis
and visualization tool<A NAME="tex2html5"
HREF="#foot1150"><SUP>[+]</SUP></A>.
HREF="#foot1157"><SUP>[+]</SUP></A>.
<P>
VampirTrace is included in OpenMPI&nbsp;1.3 and later versions.
If not disabled explicitly, VampirTrace is built automatically when installing
OpenMPI<A NAME="tex2html7"
HREF="#foot1151"><SUP>[+]</SUP></A>.
HREF="#foot1158"><SUP>[+]</SUP></A>.
<P>
Trace files can quickly become very large, especially with automatic instrumentation.
@ -1047,7 +1051,7 @@ Binary Instrumentation Using Dyninst
The option <TT>-vt:inst dyninst</TT> is used with the compiler wrapper to
instrument the application during runtime (binary instrumentation), by using
Dyninst<A NAME="tex2html10"
HREF="#foot1175"><SUP>[+]</SUP></A>.
HREF="#foot1182"><SUP>[+]</SUP></A>.
Recompiling is not necessary for this kind of instrumentation,
but relinking:
@ -1309,7 +1313,7 @@ of a VampirTrace instrumented executable:
<TD ALIGN="LEFT">1</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT>VT_MAX_THREADS</TT></TD>
<TD ALIGN="LEFT">Maximum number of threads (<SPAN CLASS="MATH"><A NAME="tex2html_wrap_inline2602"
<TD ALIGN="LEFT">Maximum number of threads (<SPAN CLASS="MATH"><A NAME="tex2html_wrap_inline2617"
HREF="img3.png">[IMAGE png]</A></SPAN>) per process that VampirTrace reserves resources for.</TD>
<TD ALIGN="LEFT">65536</TD>
</TR>
@ -1687,7 +1691,7 @@ for the enhanced timer synchronization:
<UL>
<LI>CLAPACK<A NAME="tex2html12"
HREF="#foot1185"><SUP>[+]</SUP></A>
HREF="#foot1192"><SUP>[+]</SUP></A>
</LI>
<LI>AMD ACML
</LI>
@ -1767,11 +1771,13 @@ If the PAPI library is used to access hardware performance counters,
<P>
<BR>
<BR>
<code> VT_METRICS=PAPI_FP_OPS:PAPI_L2_TCM</code>
<code> VT_METRICS=PAPI_FP_OPS:PAPI_L2_TCM:!CPU_TEMP1</code>
<BR>
<BR>
<BR>
to record the number of floating point instructions and level 2 cache misses.
to record the number of floating point instructions and level 2 cache misses (PAPI preset counters),
cpu temperature from the lm_sensors component.
The leading exclamation mark let CPU_TEMP1 be interpreted as absolute value counter.
See Section&nbsp;<A HREF="#papi">[*]</A> for a full list of PAPI preset counters.
<P>
@ -2622,7 +2628,7 @@ default: automatically by configure
enable support for Dyninst instrumentation,
default: enable if found by configure
<SPAN CLASS="textbf">Note:</SPAN> Requires Dyninst<A NAME="tex2html17"
HREF="#foot1201"><SUP>[+]</SUP></A> version 5.1 or higher!
HREF="#foot1208"><SUP>[+]</SUP></A> version 5.1 or higher!
<P>
</DD>
@ -4062,6 +4068,30 @@ Alternatively, you can manually control the unique file naming by setting
<P>
<H1><A NAME="SECTION001090000000000000000">&#160;</A>
<A NAME="faq_relocate">&#160;</A>
<BR>
Can I re-locate my VampirTrace installation without re-build from source?
</H1>
<P>
VampirTrace hard-codes some directory paths in its executables and libraries based on installation
paths specified by the <TT>configure</TT> script. However, it's possible to move an existing VampirTrace
installation to another location and use it without re-build from source.
Therefore it's necessary to set the environment variable <TT>VT_PREFIX</TT> to the new installation prefix
before using VampirTrace's Compiler Wrappers (&rArr;&nbsp;Section&nbsp;<A HREF="#compiler_wrappers">[*]</A>) or launching an
instrumented application. For example:
<P>
<PRE>
./configure --prefix=/opt/vampirtrace
make install
mv /opt/vampirtrace $HOME/vampirtrace
export VT_PREFIX=$HOME/vampirtrace
</PRE>
<P>
<H1><A NAME="SECTION0010100000000000000000">&#160;</A>
<A NAME="faq_unanswered">&#160;</A>
<BR>
I have a question that is not answered in this document!
@ -4073,7 +4103,7 @@ for support on installing and using VampirTrace.
<P>
<H1><A NAME="SECTION0010100000000000000000">&#160;</A>
<H1><A NAME="SECTION0010110000000000000000">&#160;</A>
<A NAME="faq_morefeatures">&#160;</A>
<BR>
I need support for additional features so I can trace application xyz.
@ -4093,39 +4123,39 @@ into the official VampirTrace package.
<P>
<BR><HR><H4>Footnotes</H4>
<DL>
<DT><A NAME="foot1149">... (OTF)</A><A
<DT><A NAME="foot1156">... (OTF)</A><A
HREF="UserManual.html#tex2html3"><SUP>[+]</SUP></A></DT>
<DD><TT><A NAME="tex2html4"
HREF="http://www.tu-dresden.de/zih/otf">http://www.tu-dresden.de/zih/otf</A></TT>
</DD>
<DT><A NAME="foot1150">... tool </A><A
<DT><A NAME="foot1157">... tool </A><A
HREF="UserManual.html#tex2html5"><SUP>[+]</SUP></A></DT>
<DD><TT><A NAME="tex2html6"
HREF="http://www.vampir.eu">http://www.vampir.eu</A></TT>
</DD>
<DT><A NAME="foot1151">...
<DT><A NAME="foot1158">...
Open MPI </A><A
HREF="UserManual.html#tex2html7"><SUP>[+]</SUP></A></DT>
<DD><TT><A NAME="tex2html8"
HREF="http://www.open-mpi.org/faq/?category=vampirtrace">http://www.open-mpi.org/faq/?category=vampirtrace</A></TT>
</DD>
<DT><A NAME="foot1175">...
<DT><A NAME="foot1182">...
Dyninst </A><A
HREF="UserManual.html#tex2html10"><SUP>[+]</SUP></A></DT>
<DD><TT><A NAME="tex2html11"
HREF="http://www.dyninst.org">http://www.dyninst.org</A></TT>
</DD>
<DT><A NAME="foot1185">... CLAPACK</A><A
<DT><A NAME="foot1192">... CLAPACK</A><A
HREF="UserManual.html#tex2html12"><SUP>[+]</SUP></A></DT>
<DD><TT><A NAME="tex2html13"
HREF="www.netlib.org/clapack">www.netlib.org/clapack</A></TT>
</DD>
<DT><A NAME="foot1201">... Dyninst </A><A
<DT><A NAME="foot1208">... Dyninst </A><A
HREF="UserManual.html#tex2html17"><SUP>[+]</SUP></A></DT>
<DD><TT><A NAME="tex2html18"
HREF="http://www.dyninst.org">http://www.dyninst.org</A></TT>

Двоичные данные
ompi/contrib/vt/vt/doc/UserManual.pdf

Двоичный файл не отображается.

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -3,7 +3,7 @@
# VampirTrace
# http://www.tu-dresden.de/zih/vampirtrace
#
# Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
# Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
#
# Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
# Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@ if AMBUILDBINARIES
bin_PROGRAMS = vtlibwrapgen
endif
INCLUDES = $(CTOOLINCDIR) -I$(top_srcdir)/vtlib/
INCLUDES = $(CTOOLINCDIR) -I$(top_srcdir)/util -I$(top_builddir)/util -I$(top_srcdir)/vtlib/
CC = $(CC_FOR_BUILD)
CFLAGS = $(CFLAGS_FOR_BUILD)
@ -14,8 +14,6 @@ CPPFLAGS = $(CPPFLAGS_FOR_BUILD)
LDFLAGS = $(LDFLAGS_FOR_BUILD)
LIBS = $(LIBS_FOR_BUILD)
vtlibwrapgen_CXXFLAGS = -DINCLUDEDIR=\"$(includedir)\" -DDATADIR=\"$(datadir)\"
vtlibwrapgen_SOURCES = \
vt_libwrapgen.h \
vt_libwrapgen_filter.h \
@ -23,6 +21,7 @@ vtlibwrapgen_SOURCES = \
vt_libwrapgen.cc \
vt_libwrapgen_filter.cc \
vt_libwrapgen_parser.cc \
$(top_srcdir)/util/installdirs.c \
$(top_srcdir)/util/util.c
nodist_vtlibwrapgen_SOURCES = \

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -12,6 +12,8 @@
#include "vt_libwrapgen.h"
#include "util/installdirs.h"
#include <iostream>
#include <sstream>
@ -19,6 +21,7 @@
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
@ -514,12 +517,22 @@ getParams( int argc, char** argv )
if( Params.b_ld_flags.length() == 0 )
Params.b_ld_flags = Params.b_cc_flags;
// expand install directories from libtool command, if necessary
//
if( Params.b_libtool_cmd.length() == 0 )
{
char* tmp = vt_installdirs_expand( VT_LIBWRAPGEN_DEFAULT_LIBTOOL );
Params.b_libtool_cmd = tmp;
free( tmp );
}
// disable libtool verbosity, if necessary
if( Params.verbose_level == 0 )
Params.b_libtool_flags = "--quiet";
// add VT include directory to compiler flags
Params.b_cc_flags += " -I"INCLUDEDIR;
Params.b_cc_flags += " -I" +
std::string(vt_installdirs_get( VT_INSTALLDIR_INCLUDEDIR ));
// add libtool arg. '-static' or '-shared' to compiler/linker flags,
// if necessary
@ -598,15 +611,19 @@ showUsage()
<< std::endl
<< " build-options:" << std::endl
<< " -o, --output=PREFIX Prefix of output wrapper library." << std::endl
<< " (default: "VT_LIBWRAPGEN_DEFAULT_OUTPUT_LIB_PREFIX")" << std::endl
<< " (default: "VT_LIBWRAPGEN_DEFAULT_OUTPUT_LIB_PREFIX")" << std::endl
<< std::endl
<< " --shared Do only build shared wrapper library." << std::endl
<< std::endl
<< " --static Do only build static wrapper library." << std::endl
<< std::endl
<< " --libtool=LT Libtool command" << std::endl
<< " (default: "VT_LIBWRAPGEN_DEFAULT_LIBTOOL")" << std::endl
<< std::endl
<< " --libtool=LT Libtool command" << std::endl;
char* tmp = vt_installdirs_expand( VT_LIBWRAPGEN_DEFAULT_LIBTOOL );
std::cout << " (default: " << tmp << ")" << std::endl;
free( tmp );
std::cout
<< " --cc=CC C compiler command" << std::endl
<< " (default: "VT_LIBWRAPGEN_DEFAULT_CC")" << std::endl
<< std::endl
@ -657,7 +674,7 @@ bool
GeneratorC::genSource()
{
VPrint( 1, "Generating library wrapper source file\n" );
// create instance of class Filter
m_filter = new FilterC();
@ -711,7 +728,7 @@ bool
GeneratorC::buildLib()
{
VPrint( 1, "Building wrapper library\n" );
// check whether input source file exists
//
if( access( Params.b_input_srcfile.c_str(), R_OK ) == -1 )

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -52,7 +52,7 @@ struct ParamsS
g_cpp_cmd(VT_LIBWRAPGEN_DEFAULT_CPP),
g_use_cpp(true), g_keep_cpp_file(false),
b_output_libprefix(VT_LIBWRAPGEN_DEFAULT_OUTPUT_LIB_PREFIX),
b_libtool_cmd(VT_LIBWRAPGEN_DEFAULT_LIBTOOL),
b_libtool_cmd(""),
b_cc_cmd(VT_LIBWRAPGEN_DEFAULT_CC),
b_cc_flags(VT_LIBWRAPGEN_DEFAULT_CFLAGS),
b_shared(false), b_static(false) {}

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -17,7 +17,7 @@
#define VT_LIBWRAPGEN_DEFAULT_OUTPUT_SRC_FILE "wrap.c"
#define VT_LIBWRAPGEN_DEFAULT_OUTPUT_LIB_PREFIX "libwrap"
#define VT_LIBWRAPGEN_DEFAULT_LIBTOOL DATADIR"/libtool"
#define VT_LIBWRAPGEN_DEFAULT_LIBTOOL "${datadir}/libtool"
#define VT_LIBWRAPGEN_DEFAULT_CC "@CC@"
#define VT_LIBWRAPGEN_DEFAULT_CPP "@CPP@"
#define VT_LIBWRAPGEN_DEFAULT_CFLAGS "@CFLAGS@"

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich GmbH, Federal
* Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich GmbH, Federal
* Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich GmbH, Federal
* Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich GmbH, Federal
* Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -100,10 +100,10 @@ else # AMHAVECROSSPREFIX
CROSSPREFIXCLEANFILES =
endif # AMHAVECROSSPREFIX
INCLUDES = -I$(top_srcdir)/vtlib/
INCLUDES = -I$(top_srcdir)/util -I$(top_builddir)/util -I$(top_srcdir)/vtlib/
CXX = $(CXX_FOR_BUILD)
CXXFLAGS = $(CXXFLAGS_FOR_BUILD) -DDATADIR=\"$(datadir)\"
CXXFLAGS = $(CXXFLAGS_FOR_BUILD)
CXXCPP = $(CXXCPP_FOR_BUILD)
CPPFLAGS = $(CPPFLAGS_FOR_BUILD)
LDFLAGS = $(LDFLAGS_FOR_BUILD)
@ -111,7 +111,9 @@ LIBS = $(LIBS_FOR_BUILD)
@CROSS_PREFIX@vtwrapper_SOURCES = \
vt_wrapper.cc \
vt_wrapper.h
vt_wrapper.h \
$(top_srcdir)/util/installdirs.c \
$(top_srcdir)/util/util.c
@CROSS_PREFIX@vtwrapper_CXXFLAGS = \
$(HAVEF77CXXFLAGS) \

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -79,7 +79,9 @@ Wrapper::readDataFile()
{
bool error = false;
const std::string data_file = DATADIR"/" + std::string(ExeName) + "-wrapper-data.txt";
const std::string data_file =
std::string(vt_installdirs_get(VT_INSTALLDIR_DATADIR)) + "/" +
std::string(ExeName) + "-wrapper-data.txt";
const uint32_t keys_num = 22;
const std::string keys[] = {
@ -201,13 +203,41 @@ Wrapper::readDataFile()
case 9: // includedir
{
if( value.length() > 0 )
m_pConfig->m_sVT_IncDir = "-I" + value;
{
char* includedir = vt_installdirs_expand( value.c_str() );
if( includedir )
{
m_pConfig->m_sVT_IncDir = "-I" + std::string(includedir);
free( includedir );
}
else
{
std::cerr << ExeName << ": "
<< data_file << ":" << line_no << ": "
<< "could not be parsed" << std::endl;
error = true;
}
}
break;
}
case 10: // libdir
{
if( value.length() > 0 )
m_pConfig->m_sVT_LibDir = "-L" + value;
{
char* libdir = vt_installdirs_expand( value.c_str() );
if( libdir )
{
m_pConfig->m_sVT_LibDir = "-L" + std::string(libdir);
free( libdir );
}
else
{
std::cerr << ExeName << ": "
<< data_file << ":" << line_no << ": "
<< "could not be parsed" << std::endl;
error = true;
}
}
break;
}
case 11: // vtlib
@ -1043,7 +1073,9 @@ Wrapper::showUsageText()
<< std::endl << std::endl
<< " -vt:opari <args> Set options for OPARI command."
<< std::endl
<< " (see "DATADIR"/doc/opari/Readme.html for more information)"
<< " (see "
<< vt_installdirs_get(VT_INSTALLDIR_DATADIR)
<< "/doc/opari/Readme.html for more information)"
<< std::endl << std::endl
<< " -vt:<seq|mpi|mt|hyb>"
<< std::endl

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -29,6 +29,8 @@
#include "vt_inttypes.h"
#include "util/installdirs.h"
// languages types
//
typedef enum { LANG_CC, LANG_CXX, LANG_F77, LANG_F90 } LangTypeT;

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

@ -6,8 +6,8 @@ compiler=@VT_WRAPPER_CXX@
compiler_flags=@PTHREAD_CFLAGS@ @VT_WRAPPER_EXTRA_CXXFLAGS@
linker_flags=@VT_WRAPPER_EXTRA_LDFLAGS@
libs=@OTFLIBDIR@ @OTFLIB@ @BFDLIBDIR@ @BFDLIB@ @LIBERTYLIBDIR@ @LIBERTYLIB@ @PAPILIBDIR@ @PAPILIB@ @CPCLIBDIR@ @CPCLIB@ @DLLIBDIR@ @DLLIB@ @MATHLIB@ @VT_WRAPPER_EXTRA_LIBS@
includedir=@VT_WRAPPER_INCDIR@
libdir=@VT_WRAPPER_LIBDIR@
includedir=${includedir}
libdir=${libdir}
vtlib=@VT_WRAPPER_VTLIB@
vtmpilib=@VT_WRAPPER_VTMPILIB@ @UNIMCI_CXXLIBS@ @PMPILIB@
vtmtlib=@VT_WRAPPER_VTMTLIB@ @PTHREAD_LIBS@

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

@ -6,8 +6,8 @@ compiler=@VT_WRAPPER_CC@
compiler_flags=@PTHREAD_CFLAGS@ @VT_WRAPPER_EXTRA_CFLAGS@
linker_flags=@VT_WRAPPER_EXTRA_LDFLAGS@
libs=@OTFLIBDIR@ @OTFLIB@ @BFDLIBDIR@ @BFDLIB@ @LIBERTYLIBDIR@ @LIBERTYLIB@ @PAPILIBDIR@ @PAPILIB@ @CPCLIBDIR@ @CPCLIB@ @DLLIBDIR@ @DLLIB@ @MATHLIB@ @VT_WRAPPER_EXTRA_LIBS@
includedir=@VT_WRAPPER_INCDIR@
libdir=@VT_WRAPPER_LIBDIR@
includedir=${includedir}
libdir=${libdir}
vtlib=@VT_WRAPPER_VTLIB@
vtmpilib=@VT_WRAPPER_VTMPILIB@ @UNIMCI_CLIBS@ @PMPILIB@
vtmtlib=@VT_WRAPPER_VTMTLIB@ @PTHREAD_LIBS@

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

@ -6,8 +6,8 @@ compiler=@VT_WRAPPER_F77@
compiler_flags=@VT_WRAPPER_EXTRA_FFLAGS@
linker_flags=@VT_WRAPPER_EXTRA_LDFLAGS@
libs=@OTFLIBDIR@ @OTFLIB@ @BFDLIBDIR@ @BFDLIB@ @LIBERTYLIBDIR@ @LIBERTYLIB@ @PAPILIBDIR@ @PAPILIB@ @CPCLIBDIR@ @CPCLIB@ @DLLIBDIR@ @DLLIB@ @MATHLIB@ @VT_WRAPPER_EXTRA_LIBS@
includedir=@VT_WRAPPER_INCDIR@
libdir=@VT_WRAPPER_LIBDIR@
includedir=${includedir}
libdir=${libdir}
vtlib=@VT_WRAPPER_VTLIB@
vtmpilib=@FMPILIB@ @VT_WRAPPER_VTMPILIB@ @UNIMCI_FLIBS@ @PMPILIB@
vtmtlib=@VT_WRAPPER_VTMTLIB@ @PTHREAD_LIBS@

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

@ -6,8 +6,8 @@ compiler=@VT_WRAPPER_FC@
compiler_flags=@VT_WRAPPER_EXTRA_FCFLAGS@
linker_flags=@VT_WRAPPER_EXTRA_LDFLAGS@
libs=@OTFLIBDIR@ @OTFLIB@ @BFDLIBDIR@ @BFDLIB@ @LIBERTYLIBDIR@ @LIBERTYLIB@ @PAPILIBDIR@ @PAPILIB@ @CPCLIBDIR@ @CPCLIB@ @DLLIBDIR@ @DLLIB@ @MATHLIB@ @VT_WRAPPER_EXTRA_LIBS@
includedir=@VT_WRAPPER_INCDIR@
libdir=@VT_WRAPPER_LIBDIR@
includedir=${includedir}
libdir=${libdir}
vtlib=@VT_WRAPPER_VTLIB@
vtmpilib=@FMPILIB@ @VT_WRAPPER_VTMPILIB@ @UNIMCI_FCLIBS@ @PMPILIB@
vtmtlib=@VT_WRAPPER_VTMTLIB@ @PTHREAD_LIBS@

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

@ -4,7 +4,12 @@ libutil_la_CFLAGS = -static -prefer-pic
libutil_la_LDFLAGS = -static
libutil_la_SOURCES = \
hash.h \
installdirs.h \
util.h \
hash.c \
installdirs.c \
util.c
nodist_libutil_la_SOURCES = \
installdirs_conf.h

161
ompi/contrib/vt/vt/util/installdirs.c Обычный файл
Просмотреть файл

@ -0,0 +1,161 @@
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the package base directory for details
**/
#include "installdirs.h"
#include "installdirs_conf.h"
#include "util.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef INSIDE_OPENMPI
# define ENV_PREFIX "OPAL_"
#else /* INSIDE_OPENMPI */
# define ENV_PREFIX "VT_"
#endif /* INSIDE_OPENMPI */
/* macro for getting install directory path (dir) either from env. variable or
from macro in Autoconf generated header file 'installdirs_conf.h'; the
result will be stored in 'install_dirs' */
#define GETDIR(type, dir) \
if( (dir = install_dirs.type) == NULL ) { \
char* tmp = getenv( ENV_PREFIX#type ); \
if( tmp != NULL && strlen( tmp ) > 0 ) \
dir = vt_strdup( tmp ); \
else \
dir = vt_installdirs_expand( VT_##type ); \
install_dirs.type = dir; \
}
/* data structure for holding install directory paths */
static struct install_dirs_struct
{
char* PREFIX;
char* EXEC_PREFIX;
char* BINDIR;
char* INCLUDEDIR;
char* LIBDIR;
char* DATADIR;
char* DATAROOTDIR;
char* SYSCONFDIR;
} install_dirs;
char* vt_installdirs_get( VTInstallDirT type )
{
char* ret;
/* get install directory path by 'type' and store it in 'ret' */
switch( type )
{
case VT_INSTALLDIR_PREFIX:
{
GETDIR( PREFIX, ret );
break;
}
case VT_INSTALLDIR_EXEC_PREFIX:
{
GETDIR( EXEC_PREFIX, ret );
break;
}
case VT_INSTALLDIR_BINDIR:
{
GETDIR( BINDIR, ret );
break;
}
case VT_INSTALLDIR_INCLUDEDIR:
{
GETDIR( INCLUDEDIR, ret );
break;
}
case VT_INSTALLDIR_LIBDIR:
{
GETDIR( LIBDIR, ret );
break;
}
case VT_INSTALLDIR_DATADIR:
{
GETDIR( DATADIR, ret );
break;
}
case VT_INSTALLDIR_DATAROOTDIR:
{
GETDIR( DATAROOTDIR, ret );
break;
}
case VT_INSTALLDIR_SYSCONFDIR:
{
GETDIR( SYSCONFDIR, ret );
break;
}
default:
{
/* unknown type - this should never happen */
return NULL;
}
}
return ret;
}
char* vt_installdirs_expand(const char* input)
{
char* ret;
char* start;
char* end;
if( input == NULL ) return NULL;
/* 'input' cannot be modified, so copy it to a new allocated string 'ret' */
ret = vt_strdup( input );
/* expand all variables from directory path 'ret' */
while( ret != NULL && (start = strchr( ret, '$' )) != NULL )
{
char* insert;
char* tmp = ret;
/* check for variables which can be expanded */
if( strncmp( start, "${prefix}", 9 ) == 0 )
insert = vt_installdirs_get( VT_INSTALLDIR_PREFIX );
else if( strncmp( start, "${exec_prefix}", 14 ) == 0 )
insert = vt_installdirs_get( VT_INSTALLDIR_EXEC_PREFIX );
else if( strncmp( start, "${bindir}", 9 ) == 0 )
insert = vt_installdirs_get( VT_INSTALLDIR_BINDIR );
else if( strncmp( start, "${includedir}", 13 ) == 0 )
insert = vt_installdirs_get( VT_INSTALLDIR_INCLUDEDIR );
else if( strncmp( start, "${libdir}", 9 ) == 0 )
insert = vt_installdirs_get( VT_INSTALLDIR_LIBDIR );
else if( strncmp( start, "${datadir}", 10 ) == 0 )
insert = vt_installdirs_get( VT_INSTALLDIR_DATADIR );
else if( strncmp( start, "${datarootdir}", 14 ) == 0 )
insert = vt_installdirs_get( VT_INSTALLDIR_DATAROOTDIR );
else if( strncmp( start, "${sysconfdir}", 13 ) == 0 )
insert = vt_installdirs_get( VT_INSTALLDIR_SYSCONFDIR );
else
break;
/* compose output directory path */
end = strchr( start, '}' );
*start = '\0';
vt_asprintf( &ret, "%s%s%s", tmp, insert, end + 1 );
free( tmp );
}
return ret;
}

37
ompi/contrib/vt/vt/util/installdirs.h Обычный файл
Просмотреть файл

@ -0,0 +1,37 @@
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the package base directory for details
**/
#ifndef _INSTALLDIRS_H
#define _INSTALLDIRS_H
#ifdef __cplusplus
# define EXTERN extern "C"
#else
# define EXTERN extern
#endif
typedef enum {
VT_INSTALLDIR_PREFIX,
VT_INSTALLDIR_EXEC_PREFIX,
VT_INSTALLDIR_BINDIR,
VT_INSTALLDIR_INCLUDEDIR,
VT_INSTALLDIR_LIBDIR,
VT_INSTALLDIR_DATADIR,
VT_INSTALLDIR_DATAROOTDIR,
VT_INSTALLDIR_SYSCONFDIR
} VTInstallDirT;
EXTERN char* vt_installdirs_get( VTInstallDirT type );
EXTERN char* vt_installdirs_expand( const char* input );
#endif /* _INSTALLDIRS_H */

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

@ -0,0 +1,27 @@
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the package base directory for details
*
* @configure_input@
**/
#ifndef _INSTALLDIRS_CONF_H
#define _INSTALLDIRS_CONF_H
#define VT_PREFIX "@prefix@"
#define VT_EXEC_PREFIX "@exec_prefix@"
#define VT_BINDIR "@bindir@"
#define VT_INCLUDEDIR "@includedir@"
#define VT_LIBDIR "@libdir@"
#define VT_DATADIR "@datadir@"
#define VT_DATAROOTDIR "@datarootdir@"
#define VT_SYSCONFDIR "@sysconfdir@"
#endif /* _INSTALLDIRS_CONF_H */

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

@ -15,7 +15,7 @@
*
* Copyright (c) 2007, Cisco Systems, Inc.
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -23,8 +23,6 @@
* See the file COPYING in the package base directory for details
**/
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <string.h>
@ -194,9 +192,9 @@ int vt_vasprintf(char** ptr, const char* fmt, va_list ap)
/* va_list might have pointer to internal state and using
it twice is a bad idea. So make a copy for the second
use. Copy order taken from Autoconf docs. */
#if defined(HAVE_VA_COPY) && HAVE_VA_COPY
#if defined(va_copy)
va_copy(ap2, ap);
#elif defined(HAVE_UNDERSCORE_VA_COPY) && HAVE_UNDERSCORE_VA_COPY
#elif defined(__va_copy)
__va_copy(ap2, ap);
#else
memcpy (&ap2, &ap, sizeof(va_list));
@ -215,9 +213,9 @@ int vt_vasprintf(char** ptr, const char* fmt, va_list ap)
/* fill the buffer */
length = vsprintf(*ptr, fmt, ap2);
#if (defined(HAVE_VA_COPY) && HAVE_VA_COPY) || (defined(HAVE_UNDERSCORE_VA_COPY) && HAVE_UNDERSCORE_VA_COPY)
#if defined(va_copy) || defined(__va_copy)
va_end(ap2);
#endif /* HAVE_VA_COPY || HAVE_UNDERSCORE_VA_COPY */
#endif /* va_copy || __va_copy */
/* realloc */
*ptr = (char*)realloc(*ptr, (size_t)length + 1);

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

@ -15,7 +15,7 @@
*
* Copyright (c) 2007, Cisco Systems, Inc.
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -221,7 +221,7 @@ DYNINSTSOURCES =
endif
if AMHAVEBFD
BFDCFLAGS = -DVT_BFD $(BFDINCDIR)
BFDCFLAGS = $(BFDINCDIR)
# On some platforms only a static version of the BFD library is available
# which might be built without PIC, so do not add its objects to the shared
# VT libraries.
@ -373,7 +373,7 @@ VT_FMPI_SOURCES = \
$(FMPI2CONSTSOURCES)
CC = $(MPICC)
AM_CFLAGS = -DBINDIR=\"$(bindir)\" -DDATADIR=\"$(datadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" $(OTFCFLAGS) $(BFDCFLAGS) $(LIBERTYCFLAGS) $(DLCFLAGS) $(LIBWRAPCFLAGS) $(LIBCWRAPCFLAGS) $(IOWRAPCFLAGS) $(MEMHOOKCFLAGS) $(GETCPUCFLAGS) $(RUSAGECFLAGS) $(METRCFLAGS)
AM_CFLAGS = $(OTFCFLAGS) $(BFDCFLAGS) $(LIBERTYCFLAGS) $(DLCFLAGS) $(LIBWRAPCFLAGS) $(LIBCWRAPCFLAGS) $(IOWRAPCFLAGS) $(MEMHOOKCFLAGS) $(GETCPUCFLAGS) $(RUSAGECFLAGS) $(METRCFLAGS)
libvt_la_LIBADD = $(top_builddir)/util/libutil.la $(OTFLIBRARY) $(BFDLIBRARY) $(LIBERTYLIBRARY) $(METRLIBRARY) $(DLLIBRARY) $(MATHLIBRARY)
libvt_la_DEPENDENCIES = $(top_builddir)/util/libutil.la $(OTFDEPENDENCIES)

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -10,24 +10,10 @@
* See the file COPYING in the package base directory for details
**/
#define _GNU_SOURCE
#include "config.h"
#ifdef VT_BFD
# include "bfd.h"
# if defined(HAVE_GNU_DEMANGLE) && HAVE_GNU_DEMANGLE
# if defined(HAVE_DEMANGLE_H) && HAVE_DEMANGLE_H
# include "demangle.h"
# else /* HAVE_DEMANGLE_H */
extern char* cplus_demangle (const char* mangled, int options);
# define DMGL_NO_OPTS 0
# define DMGL_PARAMS (1 << 0)
# define DMGL_ANSI (1 << 1)
# define DMGL_JAVA (1 << 2)
# define DMGL_VERBOSE (1 << 3)
# define DMGL_TYPES (1 << 4)
# endif /* HAVE_DEMANGLE_H */
# endif /* HAVE_GNU_DEMANGLE */
#endif /* VT_BFD */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -42,6 +28,37 @@
#include "vt_trc.h"
#include "vt_thrd.h"
#if defined(HAVE_BFD) && HAVE_BFD
# include "bfd.h"
# if defined(HAVE_GNU_DEMANGLE) && HAVE_GNU_DEMANGLE
# if defined(HAVE_DEMANGLE_H) && HAVE_DEMANGLE_H
# include "demangle.h"
# else /* HAVE_DEMANGLE_H */
extern char* cplus_demangle (const char* mangled, int options);
# define DMGL_NO_OPTS 0
# define DMGL_PARAMS (1 << 0)
# define DMGL_ANSI (1 << 1)
# define DMGL_JAVA (1 << 2)
# define DMGL_VERBOSE (1 << 3)
# define DMGL_TYPES (1 << 4)
# endif /* HAVE_DEMANGLE_H */
# endif /* HAVE_GNU_DEMANGLE */
#endif /* HAVE_BFD */
#if (defined(HAVE_DL) && HAVE_DL) && (defined(HAVE_DECL_RTLD_DEFAULT) && HAVE_DECL_RTLD_DEFAULT)
# include <dlfcn.h>
# define GET_ADDR_OF_UNDEF_FUNC(func) \
DEREF_IA64_FUNC_PTR(dlsym(RTLD_DEFAULT, (func)))
#else /* HAVE_DL && HAVE_DECL_RTLD_DEFAULT */
# define GET_ADDR_OF_UNDEF_FUNC(func) 0
#endif /* HAVE_DL && HAVE_DECL_RTLD_DEFAULT */
#ifdef __ia64__
# define DEREF_IA64_FUNC_PTR(ptr) ((ptr) ? *(void**)(ptr) : (ptr))
#else /* __ia64__ */
# define DEREF_IA64_FUNC_PTR(ptr) (ptr)
#endif /* __ia64__ */
static int gnu_init = 1; /* is initialization needed? */
/*
@ -70,7 +87,7 @@ static uint32_t n_htab_entries = 0;
static void hash_put(long h, const char* n, const char* fn, int lno) {
long id = h % HASH_MAX;
HashNode *add = (HashNode*)malloc(sizeof(HashNode));
HashNode* add = (HashNode*)malloc(sizeof(HashNode));
add->id = h;
add->name = (char*)n;
add->fname = fn ? strdup(fn) : (char*)fn;
@ -88,7 +105,7 @@ static void hash_put(long h, const char* n, const char* fn, int lno) {
static HashNode* hash_get(long h) {
long id = h % HASH_MAX;
HashNode *curr = htab[id];
HashNode* curr = htab[id];
while ( curr ) {
if ( curr->id == h ) {
return curr;
@ -98,19 +115,19 @@ static HashNode* hash_get(long h) {
return NULL;
}
#ifdef VT_BFD
#if defined(HAVE_BFD) && HAVE_BFD
/*
* Get symbol table by using BFD
*/
static void get_symtab_bfd(void) {
bfd * BfdImage = 0;
bfd* BfdImage = 0;
int nr_all_syms;
int i;
size_t size;
char* exe_env;
asymbol **syms;
asymbol** syms;
int do_getsrc = vt_env_gnu_getsrc();
#if defined(HAVE_GNU_DEMANGLE) && HAVE_GNU_DEMANGLE
int do_demangle = vt_env_gnu_demangle();
@ -124,8 +141,10 @@ static void get_symtab_bfd(void) {
if ( ! exe_env )
{
vt_error_msg("Could not determine path of executable.\n"
"There are two possible ways to solve this problem:\n"
"Set either the environment variable VT_APPPATH to the path of the executable or set VT_GNU_NMFILE to a symbol list file, created with 'nm'.");
"There are two possible ways to solve this problem:\n"
"Set either the environment variable VT_APPPATH to the path "
"of the executable or set VT_GNU_NMFILE to a symbol list "
"file, created with 'nm'.");
}
else
{
@ -133,8 +152,10 @@ static void get_symtab_bfd(void) {
BfdImage = bfd_openr(exe_env, 0 );
if ( ! BfdImage )
vt_error_msg("BFD: bfd_openr(): failed\n"
"Could not get executable image from %s.\n"
"A possible solution to the problem is to set the environment variable VT_GNU_NMFILE to a symbol list file, created with 'nm'.", exe_env);
"Could not get executable image from %s.\n"
"A possible solution to the problem is to set the "
"environment variable VT_GNU_NMFILE to a symbol list file, "
"created with 'nm'.", exe_env);
}
/* check image format */
@ -154,7 +175,7 @@ static void get_symtab_bfd(void) {
vt_error_msg("BFD: bfd_get_symtab_upper_bound(): < 1");
/* read canonicalized symbols */
syms = (asymbol **)malloc(size);
syms = (asymbol**)malloc(size);
nr_all_syms = bfd_canonicalize_symtab(BfdImage, syms);
if ( nr_all_syms < 1 )
vt_error_msg("BFD: bfd_canonicalize_symtab(): < 1");
@ -179,27 +200,35 @@ static void get_symtab_bfd(void) {
filename = NULL;
lno = VT_NO_LNO;
if ( do_getsrc ) {
bfd_find_nearest_line(BfdImage, bfd_get_section(syms[i]), syms,
syms[i]->value, &filename, &funcname, &lno);
bfd_find_nearest_line(BfdImage, bfd_get_section(syms[i]), syms,
syms[i]->value, &filename, &funcname, &lno);
}
/* calculate function address */
addr = syms[i]->section->vma+syms[i]->value;
/* try to get address of undefined function, if necessary */
if ( addr == 0 )
addr = (long)GET_ADDR_OF_UNDEF_FUNC(syms[i]->name);
/* ignore function, if its address could not be determined */
if ( addr == 0 )
continue;
/* use demangled name if possible */
#if defined(HAVE_GNU_DEMANGLE) && HAVE_GNU_DEMANGLE
if ( do_demangle ) {
dem_name = cplus_demangle(syms[i]->name,
DMGL_PARAMS | DMGL_ANSI
| DMGL_VERBOSE | DMGL_TYPES);
dem_name = cplus_demangle(syms[i]->name,
DMGL_PARAMS | DMGL_ANSI |
DMGL_VERBOSE | DMGL_TYPES);
}
#endif /* HAVE_GNU_DEMANGLE */
if( dem_name ) {
hash_put(addr, dem_name, filename, lno);
hash_put(addr, dem_name, filename, lno);
} else {
char* n = strdup(syms[i]->name);
hash_put(addr, n, filename, lno);
char* n = strdup(syms[i]->name);
hash_put(addr, n, filename, lno);
}
}
@ -207,7 +236,7 @@ static void get_symtab_bfd(void) {
bfd_close(BfdImage);
return;
}
#endif
#endif /* HAVE_BFD */
/*
* Get symbol table by parsing nm-file
@ -230,55 +259,74 @@ static void get_symtab_nm(const char* nmfilename)
char delim[2] = " ";
int nc = 0;
long addr = -1;
long addr = 0;
char* filename = NULL;
char* funcname = NULL;
unsigned int lno = VT_NO_LNO;
if( strlen(line) == 0 || line[0] == ' ' )
if( strlen(line) == 0 )
continue;
if( line[strlen(line)-1] == '\n' )
line[strlen(line)-1] = '\0';
/* split line to columns */
col = strtok(line, delim);
do
{
if( nc == 0 ) /* column 1 (address) */
{
addr = strtol(col, NULL, 16);
if( addr == 0 )
break;
/* undefined symbol?
try to get its address by dlsym() if we've a symbol name (nc==2) */
if( col[0] == 'U' )
{
nc++;
continue;
}
else
{
addr = strtol(col, NULL, 16);
if( addr == 0 )
break;
}
}
else if( nc == 1 ) /* column 2 (type) */
{
strcpy(delim, "\t");
strcpy(delim, "\t");
}
else if( nc == 2 ) /* column 3 (symbol) */
{
funcname = col;
strcpy(delim, ":");
funcname = col;
strcpy(delim, ":");
/* try to get address of undefined function, if necessary */
if( addr == 0 )
addr = (long)GET_ADDR_OF_UNDEF_FUNC(funcname);
/* ignore function, if its address could not be determined */
if( addr == 0 )
break;
}
else if( nc == 3 ) /* column 4 (filename) */
{
if( do_getsrc )
filename = col;
else
break;
if( do_getsrc )
filename = col;
else
break;
}
else /* column 5 (line) */
{
lno = atoi(col);
if( lno == 0 ) lno = VT_NO_LNO;
break;
lno = atoi(col);
if( lno == 0 ) lno = VT_NO_LNO;
break;
}
nc++;
} while( ( col = strtok(0, delim) ) );
col = strtok(0, delim);
} while( col );
/* add symbol to hash table */
if( nc >= 3 )
if( nc >= 3 && addr > 0 )
{
char* n = strdup(funcname);
hash_put(addr, n, filename, lno);
@ -306,11 +354,11 @@ static void get_symtab(void)
/* read application's executable by using BFD */
else
{
#ifdef VT_BFD
#if defined(HAVE_BFD) && HAVE_BFD
get_symtab_bfd();
#else
#else /* HAVE_BFD */
vt_error_msg("No symbol list file given. Please set the environment variable VT_GNU_NMFILE to the path of your symbol list file, created with 'nm'.");
#endif
#endif /* HAVE_BFD */
}
VT_RESUME_IO_TRACING();
@ -320,7 +368,7 @@ static void get_symtab(void)
* Register new region
*/
static void register_region(HashNode *hn) {
static void register_region(HashNode* hn) {
uint32_t fid = VT_NO_ID;
uint32_t lno = VT_NO_LNO;
@ -397,15 +445,11 @@ void gnu_finalize()
*/
void __cyg_profile_func_enter(void* func, void* callsite) {
HashNode *hn;
void * funcptr = func;
void* funcptr;
uint64_t time;
HashNode* hn;
#ifdef __ia64__
funcptr = *( void ** )func;
#endif
funcptr = DEREF_IA64_FUNC_PTR(func);
/* -- if not yet initialized, initialize VampirTrace -- */
if ( gnu_init ) {
@ -451,9 +495,11 @@ void __cyg_profile_func_enter(void* func, void* callsite) {
*/
void __cyg_profile_func_exit(void* func, void* callsite) {
void * funcptr = func;
void* funcptr;
uint64_t time;
funcptr = DEREF_IA64_FUNC_PTR(func);
/* -- if VampirTrace already finalized, return -- */
if ( !vt_is_alive ) return;
@ -461,10 +507,6 @@ void __cyg_profile_func_exit(void* func, void* callsite) {
time = vt_pform_wtime();
#ifdef __ia64__
funcptr = *( void ** )func;
#endif
/* -- write exit record -- */
if ( hash_get((long)funcptr) ) {
vt_exit(&time);

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
@ -17,6 +17,8 @@
#include "vt_defs.h"
#include "vt_pform.h"
#include "util/installdirs.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
@ -1049,15 +1051,12 @@ char* vt_env_metrics_spec()
snprintf(spec, len-1, "./%s", METRICS_SPEC);
snprintf(msg, sizeof(msg)-1, "[CURDIR] VT_METRICS_SPEC=%s", spec);
} else {
#ifdef DATADIR
char* datadir = vt_installdirs_get(VT_INSTALLDIR_DATADIR);
/* default to installation file */
len = strlen(DATADIR)+strlen(METRICS_SPEC)+3;
len = strlen(datadir)+strlen(METRICS_SPEC)+3;
spec = (char*)calloc(len, sizeof(char));
snprintf(spec, len-1, "%s/%s", DATADIR, METRICS_SPEC);
snprintf(spec, len-1, "%s/%s", datadir, METRICS_SPEC);
snprintf(msg, sizeof(msg)-1, "[DATADIR] VT_METRICS_SPEC=%s", spec);
#else
snprintf(msg, sizeof(msg)-1, "VT_METRICS_SPEC not set");
#endif
}
vt_cntl_msg(2, msg);
return spec;

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@ c **
c * VampirTrace
c * http://www.tu-dresden.de/zih/vampirtrace
c *
c * Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
c * Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
c *
c * Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
c * Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@ c **
c * VampirTrace
c * http://www.tu-dresden.de/zih/vampirtrace
c *
c * Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
c * Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
c *
c * Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
c * Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

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

@ -2,7 +2,7 @@
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
* Copyright (c) 2005-2010, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше