Commit c79a6ba0 authored by Johnny Jazeix's avatar Johnny Jazeix

Add the otf library. Modification of the interface console to take care

of 
otf traces. Modification of the parsers to have the otf one, beginning 
of it (containers are printed), adding a new statistics on counters.

New macros in the main_ressource.hpp for the ViTE version (major, minor, 
and a string one).

Modification of the configure script to handle all the changes, you 
should have to restart the script to be able to compile (make distclean 
&& ./configure && make should work).

parent d919016d

Too many changes to show.

To preserve performance only 138 of 138+ files are displayed.

......@@ -28,7 +28,7 @@
# knowledge of the CeCILL-A license and that you accept its terms.
#
#
# ViTE developpers are (for version 0.* to 1.0):
# ViTE developers are (for version 0.* to 1.0):
#
# - COULOMB Kevin
# - FAVERGE Mathieu
......@@ -64,6 +64,7 @@ if [ -z "$MAKE" ]; then
fi
fi
OTFLIB_DIR=./src/general/otf
# Creates the makefile
cat > "$makefile" <<EOF
......@@ -75,7 +76,10 @@ cat > "$makefile" <<EOF
## ##
########################################################################
OTFLIB_DIR = ./src/general/otf
all:
make -C \$(OTFLIB_DIR)
EOF
if "$WHICH" qmake-qt4 >/dev/null 2>&1 ; then
......@@ -117,6 +121,7 @@ doc:
@echo " "
clean:
make -C \$(OTFLIB_DIR) clean
cd ./src && make clean
\$(RM) log.txt
@echo " "
......@@ -131,18 +136,15 @@ cleanall: clean
@(cd \$(DOCUMENTATION) && rm -rf html/ latex/)
distclean: cleanall
make -C \$(OTFLIB_DIR) distclean
\$(RM) Makefile
\$(RM) src/Makefile
#To remember how to create automaticaly a src.pro
#build:
# cd ./src && qmake-qt4 -project "RESOURCES= vite.qrc" "OBJECTS_DIR=../bin" "DESTDIR=../bin" "CONFIG+=uitools" "QT+=opengl" "LIBS += -lglut" && qmake-qt4 -makefile -o Makefile src.pro && make
# @echo " "
# @echo "Built and compiled! (release)"
# @echo " "
EOF
echo >&2 "Configuration of the otf library"
cd $OTFLIB_DIR && ./configure
# basename erase the path of acces of the command
MAKE=`basename $MAKE`
......
Andreas Knuepfer <andreas.knuepfer AT tu-dresden.de>
Ronny Brendel <ronny.brendel AT tu-dresden.de>
Matthias Jurenz <matthias.jurenz AT tu-dresden.de>
Johannes Spazier <johannes.spazier AT tu-dresden.de>
Michael Kluge <michael.kluge AT tu-dresden.de>
Holger Mickler <holger.mickler AT tu-dresden.de>
Holger Brunst <holger.brunst AT tu-dresden.de>
Hartmut Mix <hartmut.mix AT tu-dresden.de>
Copyright (c) 2005-2009, ZIH, Technische Universitaet Dresden,
Federal Republic of Germany
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name of ZIH, TU Dresden nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.0
- initial version
1.1.1
- OTF_Reader now considers the return values of the handlers
- added OTF_VERBOSE, OTF_DEBUG macro for error treatment
- introduced 'UnknownRecord' handler which allows to catch
unknown record types
1.1.2
- inverted return value of call-back handlers:
'0' is non-error, '!= 0' is regarded as an error, now!
(this makes OTF conform with the VTF3 scheme.)
1.1.3
- fixed a minor bug in otfaux
1.1.4
- fixed a bug in OTF_Reader which might have caused the very first
time stamp of a trace to be not properly sorted
- introduced '--snapshots' and '--statistics' switches to do only
snapshots or statistics. for statistics a selective mode is allowed
which regards only some streams. By this means statistics can be created
in parallel by calling otfaux multiple times.
1.1.5
- have UnknownRecord report handle incomplete records or additional bytes at
the end of a file.
1.2
- introduce transparent zlib compression
1.2.1
- added progress functions using read bytes instead of timestamps
1.2.2
- important bugfix: definitionstream 0 was ignored since version 1.2
1.2.3
- bugfix: provided copy handlers returned wrong value
1.2.4
- bugfix: zlib compression bug, wrong sanity check fixed
1.2.5
- bugfix: correctly handle process groups with more than 1000 entries
1.2.6
- support shared libraries
1.2.7
- added progress functions to OTF_RStream
- added a progress counter to otfmerge
1.2.8
- allow suffix '.dylib' for zlib library file (from Mac OS X)
- removed configure warning
1.2.9
- changeable zlevel
- changeable zbuffersize
1.2.10
- bugfix: otfmerge does no longer accept traces with local streams
1.2.11
- changed OTF_RETURN*( 0=success, !0 = error )
- added these macros to all internal functions and tools for better
consistency
- fixed various memoryleaks in otf and otfmerge
- added otfconfig to tools. otfconfig shows installationparameters
important for developers
- updated documentation
1.2.12
- removed intel compiler warnings in otfmerge
- removed debug output
- fixed 64bit issue
1.2.13
- removed intel compiler warnings
- changed OTF_FILETYPE_*-macros
- fixed issues with OTF_getFilename()
1.2.14
- do not linke with '-lz' if '--with-zlibsymbols' was specified
- added zlib include line to otflib/Makefile.am
1.2.15
- 3 new records introduced (NOTE: these are experimental):
- DefFile
- DefFileGroup
- FileOperation
1.2.16
- fixed a problem with comments in otfmerge
- 2 new records introduced (NOTE: these are experimental):
- OpenFileSnapshot
- FileOperationSummary
1.2.17
- bugfixed parser (wrong treatment of unknown records)
- added FileGroupOperationSummary record
- changed FileOperation-, OpenFileSnapshot- and FileOperationSummary- record
NOTE: these records are still experimental
- included file operation records into all tools
NOTE: some parameters were added/changed
- the byte-parameter in the FileOperation record does now contain the
new position in the file file after the seek operation
- bugfixed otfmerge
1.2.18
- added fwrite check for writting less bytes than expected
- re-write of otfdump. Now, it uses OTF read lib instead of plain scanf.
It produces nicer output and numbers records in read order.
1.2.19
- finished otfdump
- removed debug output in OTF_Reader.c
- re-introduced DefVersion record as read only
1.2.20
- added own inttypes definitions in case there is no on the platform
(necessary on NEC SX6)
1.2.21
- fixed "--with-zlib-symbols"-bug
1.2.22
- fixed inttypes/stdint bug
1.2.23
- removed libtool from autoconf to make configure much faster,
libtool was not used by automake anyhow
- removed some autoconf-generated files from CVS,
you might need to re-run 'sh bootstrap' yourself
1.2.24
- minor change in otf[de|un]compress
- strictly avoid writing of unsorted time stamps. Now, there will be an
error message and the corresponding buffer/stream will be disabled for
further writing. The write routines provide an invlaid return code but
currently there is no way to "repair" the buffer/stream after an unsorted
time stamp has been issued.
1.3
- integrated libtool for shared and static linkage to otf
- removed the possibility to include zlib symbols into otf
- fixed warning which appeared when not using zlib
- added python bindings to the otf library
1.3.1
- if an fopen() call fails an error is now printed out every time
- OTF_READ_ERROR was introduced as an error return value for all
OTF_Reader_readXXX and OTF_RStream_readXXX functions. So (uint64_t)-1 is
now a reserved value, thus cannot be used as record limit.
The record limit always has to be smaller than or equal to
OTF_READ_MAXRECORDS.
- fixed issue in otfmerge, when using many streams
1.3.2
- added small functions to convert various variable types to common
counter type uint64_t. By this means, other types can be transported
as uint64_t and re-casted during reading.
This requires type information as additional counter property flags!
1.3.3
- fixed configure bug when searching for zlib on mac
- fixed bug in otfmerge, where the parameter "-n 0" caused an error
- added macros for specifing the data type of the counter
(OTF_COUNTER_VARTYPE_*)
- fixed otfconfig help text
- fixed bugs when using make dist
- python bindings disabled by default
- fixed configure bug, when using python bindings
- updated python bindings to support user defined counters
1.3.4
- bug fix in otfmerge: missing handling of DefCollectiveOperation
- bugfix in the documentation: overview.eps was broken
1.3.5
- added doxygen html documentation (docu/doxygen/html/index.html)
- fixed issue, where newlines were forbidden in def, stats and snaps
- added missing const to OTF_WStream_writeDefProcessGroup()
1.3.6
- OTF_{Keywords.h,Parse.h,Platform.h} will no longer be installed
- added a compile time assert making sure the correct sizes of the
integer types ([u]int*_T)
- OTF is now Windows Visual Studio compatible
1.3.7
- added example for using OTF_MasterControl to the doxygen documentation
- general improvement of the documentation
- improved autoconf's m4 scripts for cross buildings
1.3.8
- generate OTF_inttypes.h during configuring which provides
the integer types like int64_t, int8_t,...
- shared OTF library will be linked with zlib, thus additionally
linking with zlib is not necessary
- bugfix in otf2vtf: correctly handle function leave records with id 0
1.3.9
- fixed a portability bug: use own implementation of function
'strdup()'
- install a symbolic link 'otfdecompress' which is a synonym for
'otfcompress -d'
1.3.10
- added configure option '--[enable|disable]-binaries' to control
building of binaries (useful for multi-lib installations)
1.4
- added tool 'otfprofile' which can be used to generate CSV/Latex-
summaries about functions and P2P-messages of a trace
- build/install tool 'otfdump' by default
- install documentation
1.4.1
- bugfix: removed included system headers inside 'extern "C" {}'
- bugfix: added configure check for functions 'fseeko()' and 'ftello()'
(these functions are not available on NEC SX platforms)
- bugfix in otfprofile: fixed infinite loop while drawing the
statistics for "top 50 of counters"
1.5
- added file operation begin/end records
- added file operation types OTF_FILEOP_UNLINK, OTF_FILEOP_RENAME,
and OTF_FILEOP_OTHER
- use part of fileop for I/O flags (e.g. async, coll.)
- added collective operation begin/end records
- added remote memory access (RMA) operation records
- added marker records
1.5.1dolphin
- corrected package preparation for libtool
- build shared OTF library by default
- added version information to shared OTF library
1.5.2dolphin
- adapted python bindings to the current API (related to new record
types)
- if possible, otfprofile creates a PS-file
- fixed VPATH issue, when using python bindings
- fixed infinite recursion in python wrappers
pyOTF_COUNTER_VARTYPE_ISSIGNED and pyOTF_COUNTER_VARTYPE_ISUNSIGNED
1.6stingray
- added tool 'otfshrink' which can be used to reduce a trace to
specified processes
- introduced an error variable (otf_errno, otf_strerr) that indicates
whether an error occurred or not
- fixed build dependencies of otfprofile
- added file operation types OTF_FILEOP_DUP, OTF_FILEOP_SYNC,
OTF_FILEOP_LOCK, and OTF_FILEOP_UNLOCK
- changed datatype for sent/received data volume of collective
operation begin/end records from 'uint32_t' to 'uint64_t'
- replaced usage of PATH_MAX by VT_PATH_MAX to avoid compile errors
(See specific OTF related information at the end of this file.)
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions. OTF-specific options can be
found at the end of this document.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
OTF specific `configure' Examples
=================================
The '--with-vtf3' option allows to specify VTF3 include path and library path.
By default '../vtf3' is searched for headers & library unless '--without-vtf3'
is specified. Additional options '--with-vtf3-lib-dir' and
'--with-vtf3-include-dir' allow to give headers location and library location
separately.
Further options '--with-debug' and '--with-verbose' make the OTF library and
tools perform stricter checks and produce more verbose output (warnings/errors)
on stderr respectively.
On some platforms an error like "dereferencing type-punned pointer will break
strict-aliasing rules" may occur. If that is the case add "-fno-strict-aliasing"
(thats the parameter for gcc. It may be a bit different for other compilers)
to the CFLAGS and CXXFLAGS.
The '--with-zlib' option (default) enables tranparent compression/decompression
by ZLib, '--without-zlib' disables this feature. If '--with-zlibsymbols' is
specified in addition, all symbols from libz.a are directly included into
libotf.a. This makes it unnecessary to append '-lz' to another programs linker
list. However, it might cause collisions if '-lz' is present with the other
program already.
Note that '--with-zlibsymbols' is not compatible with shared libraries. The option
'--disable-shared' is necessary when ZLib symbols are included into OTF library.
Installing 32-bit and 64-bit Libraries Concurrently
===================================================
Some platforms support 32-bit and 64-bit executables and libraries. Please chose
one flavor as default and set appropriate options via './configure'. Then do
'make' and 'make install'. This will have everything built and installed with
default flavor: library, header files and tools.
In order to have alternative library flavor created, re-run './configure' with
alternative options and do 'make' but NOT 'make install'. Rather, copy the
library manually to the desired location. Make sure not to overwrite the default
library. Header files and tools are not affected by this issue because always
only the default version will be necessary.
Example configure Command Line
==============================
example on Linux:
%> ./configure CFLAGS="-O3 -g -Wall -Werror" CXXFLAGS="-O3 -g -Wall -Werror"
--with-vtf3=$HOME/prog/vtf/ --with-zlib --with-zlibsymbols --disable-shared
--prefix=$HOME
example on SGI Irix:
%> ./configure CC=cc CFLAGS="-O3 -n32 -g -ansiW" --with-vtf3=$HOME/prog/vtf/
example on NEC SX6i front end with cross compiler