Commit 7277579c authored by Olivier Lagrasse's avatar Olivier Lagrasse

- Split core and interface: create a 'core' directory and put in it the...

- Split core and interface: create a 'core' directory and put in it the interface_console class. (rename Core class)
- Update help menu.
- Update with trunk. (rev 821 to 867)
- Change some shortcuts. (double clic to display event information)


parent 9682ab76
......@@ -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
......@@ -105,17 +109,19 @@ fi
@echo "Compilation completed! File created in 'bin' folder."
@echo " "
DOC = ../documentation/
DOCUMENTATION = ../documentation/
doc:
doxygen Doxyfile
make -C \$(DOC)/user_manual
make -C \$(DOC)/technical_manual
make -C \$(DOCUMENTATION)/latex
make -C \$(DOCUMENTATION)/user_manual
make -C \$(DOCUMENTATION)/technical_manual
@echo " "
@echo "Documentation generated successfully!"
@echo "It could be find in the \$(DOC) folder."
@echo "It could be find in the \$(DOCUMENTATION) folder."
@echo " "
clean:
make -C \$(OTFLIB_DIR) clean
cd ./src && make clean
\$(RM) log.txt
@echo " "
......@@ -124,24 +130,21 @@ clean:
cleanall: clean
make -C \$(DOC)/user_manual cleanall
make -C \$(DOC)/technical_manual cleanall
make -C \$(DOCUMENTATION)/user_manual cleanall
make -C \$(DOCUMENTATION)/technical_manual cleanall
@(cd bin/ && \$(RM) vite)
@(cd ../documentation/ && rm -rf html/ latex/)
@(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`
......
......@@ -48,10 +48,27 @@
#include "interface_console.hpp"
#include "Core.hpp"
#include "../interface/Interface_graphic.hpp"
#include "../render/Render_opengl_dl.hpp"
#include "../render/render_svg.hpp"
#include "../trace/Trace.hpp"
#include "../trace/DrawTrace.hpp"
#include "../parser/ParserPaje.hpp"
#include "../parser/ParserOTF.hpp"
#include "resource.hpp"
#include "../general/Tools.hpp"
#include "parsing_thread.hpp"
using namespace std;
#define message *Message::get_instance() << "(" << __FILE__ << " l." << __LINE__ << "): "
......@@ -66,7 +83,7 @@ using namespace std;
*
**********************************/
Interface_console::Interface_console(int argc, char ** argv){
Core::Core(int argc, char ** argv){
bool useGUI;/* if window interface can be displayed */
......@@ -117,7 +134,7 @@ Interface_console::Interface_console(int argc, char ** argv){
}
Interface_console::~Interface_console(){
Core::~Core(){
delete app;
if(_trace != NULL){
......@@ -142,7 +159,7 @@ Interface_console::~Interface_console(){
*
**********************************/
bool Interface_console::draw_trace(const string & filename, const int format){
bool Core::draw_trace(const string & filename, const int format){
ParserPaje parser;
Svg svg;
......@@ -277,7 +294,7 @@ bool Interface_console::draw_trace(const string & filename, const int format){
}
int Interface_console::run(){
int Core::run(){
/*
* If a window is displayed, enter in the Qt event loop.
......@@ -303,7 +320,7 @@ int Interface_console::run(){
*
**********************************/
int Interface_console::get_state(int argc, char** argv){
int Core::get_state(int argc, char** argv){
/*The following statics must be initialised in case their are not overrided by a command line request*/
......@@ -469,7 +486,7 @@ int Interface_console::get_state(int argc, char** argv){
return state;
}
void Interface_console::extract_times(const char *name) {
void Core::extract_times(const char *name) {
bool has_time_start = false;
bool has_time_end = false;
string temp = name;
......@@ -499,7 +516,7 @@ void Interface_console::extract_times(const char *name) {
}
}
void Interface_console::launch_action(int state, void* arg) {
void Core::launch_action(int state, void* arg) {
DrawTrace<Render_opengl> buf;
......@@ -661,7 +678,7 @@ void Interface_console::launch_action(int state, void* arg) {
}
void Interface_console::display_help(){
void Core::display_help(){
cerr << endl
<< " *** ViTE ***" << endl << endl << endl
<< "SYNOPSIS:" << endl
......@@ -690,45 +707,45 @@ void Interface_console::display_help(){
*
**********************************/
void Interface_console::error(const string s) const{
void Core::error(const string s) const{
cerr << "ERROR: " << s <<endl;
}
void Interface_console::warning(const string s) const{
void Core::warning(const string s) const{
cerr << "Warning: "<< s <<endl;
}
void Interface_console::information(const string s) const{
void Core::information(const string s) const{
cerr << s <<endl;
}
const string Interface_console::get_filename() const{
const string Core::get_filename() const{
return _file_opened;
}
void Interface_console::set_path_to_export(const string& path){
void Core::set_path_to_export(const string& path){
_path_to_export = path;
}
const QString* Interface_console::get_runenv() const{
const QString* Core::get_runenv() const{
return _run_env;
}
void Interface_console::update_progress_bar(const int loaded){
void Core::update_progress_bar(const int loaded){
_progress_dialog->setValue(loaded);
_progress_dialog->update();
}
void Interface_console::set_min_value_for_export(const double d) {
void Core::set_min_value_for_export(const double d) {
_time_start = d;
}
void Interface_console::set_max_value_for_export(const double d) {
void Core::set_max_value_for_export(const double d) {
_time_end = d;
}
Trace *Interface_console::get_trace() const {
Trace *Core::get_trace() const {
return _trace;
}
......@@ -44,41 +44,31 @@
*\file interface_console.hpp
*/
#ifndef INTERFACE_CONSOLE_HPP
#define INTERFACE_CONSOLE_HPP
#ifndef CORE_HPP
#define CORE_HPP
class Interface_console;
class Core;
class Interface_graphic;
class Render_opengl;
class Trace;
#include "../interface/Interface.hpp"
#include "interface.hpp"
#include "interface_graphic.hpp"
/*
* render_opengl.hpp includes render_area.hpp.
* So do not include it twice.
*/
//#ifndef RENDER_AREA_HPP
#include "../render/Render_opengl_dl.hpp"
//#endif
#include "../render/render_svg.hpp"
#include "../trace/Trace.hpp"
#include "../trace/DrawTrace.hpp"
#include "../parser/ParserPaje.hpp"
#include "resource.hpp"
#include "../general/Tools.hpp"
//#endif
#include "parsing_thread.hpp"
/*!
*\brief This class is an terminal interface, it inherited from the Interface interface.
*/
class Interface_console : public Interface{
class Core : public Interface{
......@@ -362,12 +352,12 @@ public:
* \param argc The number of parameters given when the program was called.
* \param argv A set of strings which contains each parameter.
*/
Interface_console(int argc, char** argv);
Core(int argc, char** argv);
/*!
* \brief The destructor.
*/
virtual ~Interface_console();
virtual ~Core();
......@@ -380,7 +370,7 @@ public:
/*!
* \brief This function launch trace drawing.
* \param filename Path of the trace file.
* \param format Format of the render output between: Interface_console::_DRAW_OPENGL and Interface_console::_DRAW_SVG.
* \param format Format of the render output between: Core::_DRAW_OPENGL and Core::_DRAW_SVG.
*
* \return true if no errors occurs.
*/
......
......@@ -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
......@@ -41,6 +41,10 @@
**
*/
#include "Tools.hpp"
#include <cstdio>
// For translations
#include <QObject>
using namespace std;
......@@ -61,13 +65,13 @@ double convert_to_double(const string arg){
// We had dots initially, we need to have the english system
if(is_english_system_needed) {
if(setlocale(LC_NUMERIC, "en_GB.UTF-8") == NULL){
cerr << "The locale en_GB.UTF-8 is unavailable so the decimal pointed will not be printed" << endl;
cerr << QObject::tr("The locale en_GB.UTF-8 is unavailable so the decimal pointed will not be printed").toStdString() << endl;
}
}
else {
if ( setlocale(LC_NUMERIC, "fr_FR.UTF-8")==NULL && setlocale(LC_NUMERIC, "French") == NULL){
cerr << "The locale fr_FR.UTF-8 is unavailable so the decimal with comma will not be printed" << endl;
cerr << QObject::tr("The locale fr_FR.UTF-8 is unavailable so the decimal with comma will not be printed").toStdString() << endl;
}
}
......
......@@ -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
......
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
</