compbench-devel Mailing List for CompBenchmarks (Page 40)
Brought to you by:
xfred
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(51) |
Nov
(66) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(242) |
Feb
(56) |
Mar
(95) |
Apr
(120) |
May
(127) |
Jun
(32) |
Jul
(10) |
Aug
(55) |
Sep
(114) |
Oct
(3) |
Nov
|
Dec
|
From: Frederic T. <xf...@us...> - 2006-11-01 13:12:11
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14699 Added Files: CBM.h Log Message: First import. --- NEW FILE: CBM.h --- /* ---------------------------------------------------------------------------- $Id: CBM.h,v 1.1 2006/11/01 13:12:05 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef CBM_LIB #define CBM_LIB #include <libcompbenchmarks.h> #include <Compiler/Compiler.h> #include <Benchmark/Benchmark.h> #endif |
From: Frederic T. <xf...@us...> - 2006-11-01 13:11:53
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14463 Modified Files: Makefile.am Log Message: CBM.h added. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 1 Nov 2006 13:06:07 -0000 1.8 --- Makefile.am 1 Nov 2006 13:11:50 -0000 1.9 *************** *** 16,20 **** libcompbenchmarks_la_DEPENDENCIES = $(libcompbenchmarks_la_LIBADD) ! include_HEADERS = libcompbenchmarks.h config.h compbenchmarks_LDADD = libcompbenchmarks.la --- 16,20 ---- libcompbenchmarks_la_DEPENDENCIES = $(libcompbenchmarks_la_LIBADD) ! include_HEADERS = libcompbenchmarks.h config.h CBM.h compbenchmarks_LDADD = libcompbenchmarks.la |
From: Frederic T. <xf...@us...> - 2006-11-01 13:06:52
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12600 Modified Files: cloptions.cpp cloptions.h main.cpp Log Message: Class name changed. Index: cloptions.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/cloptions.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** cloptions.cpp 10 Oct 2006 16:53:36 -0000 1.8 --- cloptions.cpp 1 Nov 2006 13:06:47 -0000 1.9 *************** *** 1,5 **** #include <cloptions.h> #include <Benchmark/Benchmark-Selector.h> ! #include <Benchmark/Compiler/BenchmarkContext-Compiler.h> #include <System/System.h> #include <UI/UI.h> --- 1,5 ---- #include <cloptions.h> #include <Benchmark/Benchmark-Selector.h> ! #include <Compiler/Compiler.h> #include <System/System.h> #include <UI/UI.h> *************** *** 16,22 **** int parseExitValue = -1; - int UO_enableTestSuite = 1; - int UO_force = 0; - void cbmOptionsHelp(void) { --- 16,19 ---- *************** *** 89,95 **** CBMBenchmark *B = 0; ! CBMBenchmarkContextCompilerSelector SC(cbmSystem); ! CBMBenchmarkContextCompiler *C = 0; ! CBMBenchmarkContextCompilerOptions *O; std::string bench; std::string compiler; --- 86,93 ---- CBMBenchmark *B = 0; ! CBMCompilerSelector SC(cbmSystem); ! CBMCompiler *C = 0; ! CBMCompilerOptions *O; ! std::string bench; std::string compiler; *************** *** 256,261 **** options=""; } ! O=new CBMBenchmarkContextCompilerOptions(C, ! (char*) options.c_str()); if (B->getStatus()<CBMBenchmark::Preconfigured) { --- 254,259 ---- options=""; } ! O=new CBMCompilerOptions(C, ! (char*) options.c_str()); if (B->getStatus()<CBMBenchmark::Preconfigured) { Index: main.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/main.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** main.cpp 25 Sep 2006 17:29:32 -0000 1.5 --- main.cpp 1 Nov 2006 13:06:47 -0000 1.6 *************** *** 1,11 **** #include <config.h> ! ! #ifdef CBM_SYSTEM_LINUX ! # include <System/System-Linux.h> ! #endif ! ! #ifdef CBM_SYSTEM_CYGWIN ! # include <System/System-Cygwin.h> ! #endif #ifdef CBM_SYSTEM_FREEBSD --- 1,4 ---- #include <config.h> ! #include <libcompbenchmarks.h> #ifdef CBM_SYSTEM_FREEBSD Index: cloptions.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/cloptions.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cloptions.h 10 Oct 2006 16:52:51 -0000 1.3 --- cloptions.h 1 Nov 2006 13:06:47 -0000 1.4 *************** *** 8,18 **** #ifndef H_CBMCLOPTIONS ! #define H_CBMOPTIONS ! ! /** User option defining if package's test suite has to be run */ ! extern int UO_enableTestSuite; ! /** User option defining 'force' mode */ ! extern int UO_force; /** Parse command line arguments. --- 8,14 ---- #ifndef H_CBMCLOPTIONS ! #define H_CBMCLOPTIONS 1 ! #include <libcompbenchmarks.h> /** Parse command line arguments. |
From: Frederic T. <xf...@us...> - 2006-11-01 13:06:37
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12589 Modified Files: config.h.in Log Message: 0.3.3 Index: config.h.in =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/config.h.in,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** config.h.in 25 Sep 2006 17:29:32 -0000 1.7 --- config.h.in 1 Nov 2006 13:06:34 -0000 1.8 *************** *** 79,82 **** --- 79,85 ---- #undef HAVE_INTTYPES_H + /* Define to 1 if you have the `dl' library (-ldl). */ + #undef HAVE_LIBDL + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H |
From: Frederic T. <xf...@us...> - 2006-11-01 13:06:10
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12563 Modified Files: configure.in Makefile.am Log Message: 0.3.3. Shared library interface for benchmarks. Major hiercharchy refactorying. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 25 Sep 2006 16:06:47 -0000 1.7 --- Makefile.am 1 Nov 2006 13:06:07 -0000 1.8 *************** *** 1,3 **** ! SUBDIRS = share System Benchmark UI bin_PROGRAMS = compbenchmarks --- 1,4 ---- ! SUBDIRS = share System Compiler Benchmark UI ! lib_LTLIBRARIES = libcompbenchmarks.la bin_PROGRAMS = compbenchmarks *************** *** 5,14 **** compbenchmarks_SOURCES = cloptions.cpp main.cpp ! compbenchmarks_LDADD = System/libSystem.la \ Benchmark/libBenchmark.la \ UI/libUI.la # -lwwwcore -lwwwapp -lwwwinit # !!! ! noinst_HEADERS = cloptions.h main.h EXTRA_DIST = compbenchmarks-config Doxyfile compbenchmarks-config.1 compbenchmarks.pod compbenchmarks.1 --- 6,24 ---- compbenchmarks_SOURCES = cloptions.cpp main.cpp ! libcompbenchmarks_la_SOURCES = libcompbenchmarks.cpp ! ! libcompbenchmarks_la_LIBADD = System/libSystem.la \ ! Compiler/libCompiler.la \ Benchmark/libBenchmark.la \ UI/libUI.la # -lwwwcore -lwwwapp -lwwwinit # !!! ! libcompbenchmarks_la_DEPENDENCIES = $(libcompbenchmarks_la_LIBADD) ! ! include_HEADERS = libcompbenchmarks.h config.h ! ! compbenchmarks_LDADD = libcompbenchmarks.la ! ! noinst_HEADERS = cloptions.h main.h $(libcompbenchmarks_la_SOURCES:.cpp=.h) # !!! EXTRA_DIST = compbenchmarks-config Doxyfile compbenchmarks-config.1 compbenchmarks.pod compbenchmarks.1 Index: configure.in =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/configure.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** configure.in 10 Oct 2006 17:31:30 -0000 1.11 --- configure.in 1 Nov 2006 13:06:07 -0000 1.12 *************** *** 7,11 **** AC_CANONICAL_TARGET ! AM_INIT_AUTOMAKE(compbenchmarks, 0.3.2) AM_CONFIG_HEADER(config.h) --- 7,11 ---- AC_CANONICAL_TARGET ! AM_INIT_AUTOMAKE(compbenchmarks, 0.3.3) AM_CONFIG_HEADER(config.h) *************** *** 204,211 **** # Checks for libraries. # Checks for header files. AC_HEADER_STDC ! AC_CHECK_HEADERS(string time.h stat.h types.h getopt.h) # Checks for typedefs, structures, and compiler characteristics. --- 204,212 ---- # Checks for libraries. + AC_CHECK_LIB(dl, dlopen) # Checks for header files. AC_HEADER_STDC ! AC_CHECK_HEADERS(string time.h stat.h types.h getopt.h dlfcn.h) # Checks for typedefs, structures, and compiler characteristics. *************** *** 255,259 **** share/system/cygwin/Makefile System/Makefile ! Benchmark/Compiler/Makefile Benchmark/Makefile UI/Makefile --- 256,262 ---- share/system/cygwin/Makefile System/Makefile ! Compiler/Compiler-TCC/Makefile ! Compiler/Compiler-GCC/Makefile ! Compiler/Makefile Benchmark/Makefile UI/Makefile |
From: Frederic T. <xf...@us...> - 2006-11-01 13:05:22
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12213 Modified Files: ChangeLog compbenchmarks.1 compbenchmarks-config compbenchmarks-config.1 compbenchmarks.pod Doxyfile Log Message: 0.3.3 Index: Doxyfile =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Doxyfile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Doxyfile 10 Oct 2006 17:31:30 -0000 1.5 --- Doxyfile 1 Nov 2006 13:05:19 -0000 1.6 *************** *** 5,9 **** #--------------------------------------------------------------------------- PROJECT_NAME = CompBenchmarks ! PROJECT_NUMBER = 0.3.2 OUTPUT_DIRECTORY = doc CREATE_SUBDIRS = NO --- 5,9 ---- #--------------------------------------------------------------------------- PROJECT_NAME = CompBenchmarks ! PROJECT_NUMBER = 0.3.3 OUTPUT_DIRECTORY = doc CREATE_SUBDIRS = NO Index: compbenchmarks.pod =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/compbenchmarks.pod,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** compbenchmarks.pod 10 Oct 2006 17:28:39 -0000 1.4 --- compbenchmarks.pod 1 Nov 2006 13:05:19 -0000 1.5 *************** *** 1,5 **** =head1 NAME ! compbenchmarks 0.3.2 - Compilers' benchmarking environment =head1 SYNOPSIS --- 1,5 ---- =head1 NAME ! compbenchmarks 0.3.3 - Compilers' benchmarking environment =head1 SYNOPSIS Index: compbenchmarks-config =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/compbenchmarks-config,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** compbenchmarks-config 10 Oct 2006 17:34:47 -0000 1.25 --- compbenchmarks-config 1 Nov 2006 13:05:19 -0000 1.26 *************** *** 564,568 **** $w=60; } ! my $cmd = "echo 'EOF' | $CBM_PROGRAMS{'DIALOG'} --backtitle 'compbenchmarks 0.3.2' --gauge '$title' $h $w $percent"; system("$cmd"); --- 564,568 ---- $w=60; } ! my $cmd = "echo 'EOF' | $CBM_PROGRAMS{'DIALOG'} --backtitle 'compbenchmarks 0.3.3' --gauge '$title' $h $w $percent"; system("$cmd"); *************** *** 575,579 **** $args=~s/\n/\\n/g; ! my $cmd = "$CBM_PROGRAMS{'DIALOG'} --backtitle 'compbenchmarks 0.3.2' $args --stdout > $DIALOG_TMPFILE"; system("$cmd"); --- 575,579 ---- $args=~s/\n/\\n/g; ! my $cmd = "$CBM_PROGRAMS{'DIALOG'} --backtitle 'compbenchmarks 0.3.3' $args --stdout > $DIALOG_TMPFILE"; system("$cmd"); *************** *** 876,879 **** --- 876,880 ---- $SIG{INT} = \&sigint_compbenchmark; my $r = `$cmd`; + `./slowdown.sh`; $SIG{INT} = 'DEFAULT'; my $end = time(); *************** *** 1122,1126 **** =head1 NAME ! compbenchmarks-config 0.3.2 - compilers' benchmarking environment =head1 SYNOPSIS --- 1123,1127 ---- =head1 NAME ! compbenchmarks-config 0.3.3 - compilers' benchmarking environment =head1 SYNOPSIS Index: ChangeLog =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ChangeLog 12 Oct 2006 16:06:02 -0000 1.14 --- ChangeLog 1 Nov 2006 13:05:19 -0000 1.15 *************** *** 1,2 **** --- 1,8 ---- + 0.3.3 + * Interfaces to packages and benchmarks providen through independant + shared libraries. + * New libcompbenchmarks. + * Installation mechanism improved for headers and libraries. + 0.3.2 * Fixes in linpackc and benchpp benchmarks definition. Index: compbenchmarks.1 =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/compbenchmarks.1,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** compbenchmarks.1 10 Oct 2006 17:31:07 -0000 1.4 --- compbenchmarks.1 1 Nov 2006 13:05:19 -0000 1.5 *************** *** 130,136 **** .\" .IX Title "COMPBENCHMARKS 1" ! .TH COMPBENCHMARKS 1 "2006-10-10" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" ! compbenchmarks 0.3.2 \- Compilers' benchmarking environment .SH "SYNOPSIS" .IX Header "SYNOPSIS" --- 130,136 ---- .\" .IX Title "COMPBENCHMARKS 1" ! .TH COMPBENCHMARKS 1 "2006-10-31" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" ! compbenchmarks 0.3.3 \- Compilers' benchmarking environment .SH "SYNOPSIS" .IX Header "SYNOPSIS" Index: compbenchmarks-config.1 =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/compbenchmarks-config.1,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** compbenchmarks-config.1 12 Oct 2006 16:06:56 -0000 1.7 --- compbenchmarks-config.1 1 Nov 2006 13:05:19 -0000 1.8 *************** *** 130,136 **** .\" .IX Title "COMPBENCHMARKS-CONFIG 1" ! .TH COMPBENCHMARKS-CONFIG 1 "2006-10-12" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" ! compbenchmarks\-config 0.3.2 \- compilers' benchmarking environment .SH "SYNOPSIS" .IX Header "SYNOPSIS" --- 130,136 ---- .\" .IX Title "COMPBENCHMARKS-CONFIG 1" ! .TH COMPBENCHMARKS-CONFIG 1 "2006-10-31" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" ! compbenchmarks\-config 0.3.3 \- compilers' benchmarking environment .SH "SYNOPSIS" .IX Header "SYNOPSIS" |
From: Frederic T. <xf...@us...> - 2006-11-01 13:04:01
|
Update of /cvsroot/compbench/CompBenchmarks++/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11488 Modified Files: Makefile.am Log Message: Include files installed. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/System/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.am 25 Sep 2006 17:28:57 -0000 1.5 --- Makefile.am 1 Nov 2006 13:03:57 -0000 1.6 *************** *** 20,24 **** extra_DIST = System-Linux.cpp System-Cygwin.cpp System-FreeBSD.cpp ! noinst_HEADERS = $(sources:.cpp=.h) $(extra_DIST:.cpp=.h) CXXFLAGS += -DERRNO_DONE=1 -DDATAROOTDIR=\"@datarootdir@\" --- 20,25 ---- extra_DIST = System-Linux.cpp System-Cygwin.cpp System-FreeBSD.cpp ! libSysteminclude_HEADERS= $(sources:.cpp=.h) $(extra_DIST:.cpp=.h) ! libSystemincludedir = $(includedir)/System CXXFLAGS += -DERRNO_DONE=1 -DDATAROOTDIR=\"@datarootdir@\" |
From: Frederic T. <xf...@us...> - 2006-11-01 13:03:36
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11467 Added Files: benchmarks-genliblist.sh benchmarks-genlibwrapper.sh Log Message: Dynamic library handling inferface wrapper scripts. --- NEW FILE: benchmarks-genlibwrapper.sh --- #!/bin/sh PACKAGE=`echo $1 | cut -f2 -d'-' | cut -f1 -d'.'` if test "$2"x = "x"; then PREFIX=. else PREFIX=$2 fi number=0 idx=0 cat <<EOF CBMBenchmark *cbmlib_getBenchmark(int idx, CBMSystem *_system) { switch(idx) { EOF for l in $(cat $PREFIX/benchmarks.list); do package=`echo $l | cut -f2 -d':'` bench=`echo $l | cut -f3 -d':'` if test ! "$package" = "$PACKAGE"; then continue; fi number=`expr $number + 1` cat <<EOF case $idx: return(new CBMBenchmark$bench(_system)); ;; EOF idx=`expr $idx + 1` done cat <<EOF default: return(0); ;; } } EOF cat <<EOF CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, CBMSystem *_system) { std::string tmp = bench_id; EOF for l in $(cat $PREFIX/benchmarks.list); do package=`echo $l | cut -f2 -d':'` bench=`echo $l | cut -f1 -d':'` object=`echo $l | cut -f3 -d':'` if test ! "$package" = "$PACKAGE"; then continue; fi cat <<EOF if (tmp=="$bench") { return(new CBMBenchmark$object(_system)); } EOF done cat <<EOF return(0); } EOF cat <<EOF int cbmlib_getBenchmarkNumber(void) { return($number); } EOF --- NEW FILE: benchmarks-genliblist.sh --- #!/bin/sh if test "$1"x = "x"; then PREFIX=. else PREFIX=$1 fi for l in $(grep -v '^#' $PREFIX/benchmarks.list); do benchmark=`echo $l | cut -f1 -d':'` package=`echo $benchmark | cut -f1 -d'-'` cat <<EOF B=cbmlib_bench_load("$benchmark", system); if (B) B->display(); EOF done |
From: Frederic T. <xf...@us...> - 2006-11-01 13:03:17
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11449 Modified Files: Makefile.am Added Files: Benchmark-DLLoader.cpp Benchmark-DLLoader.h Log Message: Dynamic library handling inferface. --- NEW FILE: Benchmark-DLLoader.cpp --- #include <Benchmark/Benchmark-DLLoader.h> #include <string> #include <iostream> #include <vector> #include <config.h> /* cache... */ std::vector<cbmlib_internal*> cbmlib_loaded_libraries; cbmlib_internal *cbmlib_check_previousload(char *package_id) { int i; int s = cbmlib_loaded_libraries.size(); cbmlib_internal *l; for(i=0; i<s; i++) { l=cbmlib_loaded_libraries[i]; if (l->package_id==package_id) return(l); } return(0); } cbmlib_internal *cbmlib_load_internal(const char *lib, char *package_id) { void *library; cbmlib_internal *r; std::cout << "Loading " << lib << "... "; r=cbmlib_check_previousload(package_id); if (r) { std::cout << "found (cached)." << std::endl; return(r); } library=dlopen(lib, RTLD_NOW); if (library) { std::cout << "found." << std::endl; r=new cbmlib_internal; r->library=library; std::cout << " Checking cbmlib_getBenchmarkNumber... "; r->Number=(cbmlib_internal_number_t) (dlsym(r->library, "cbmlib_getBenchmarkNumber")); if (!r->Number) { dlclose(library); std::cout << "N.A." << std::endl; delete(r); return(0); } else { std::cout << "found." << std::endl; } std::cout << " Checking cbmlib_getBenchmark... "; r->Bench=(cbmlib_internal_bench_t) dlsym(r->library, "cbmlib_getBenchmark"); if (!r->Bench) { dlclose(library); std::cout << "N.A." << std::endl; delete(r); return(0); } else { std::cout << "found." << std::endl; } std::cout << " Checking cbmlib_getBenchmarkByName... "; r->BenchByName=(cbmlib_internal_benchbyname_t) dlsym(r->library, "cbmlib_getBenchmarkByName"); if (!r->Bench) { dlclose(library); std::cout << "N.A." << std::endl; delete(r); return(0); } else { std::cout << "found." << std::endl; } r->package_id=package_id; cbmlib_loaded_libraries.push_back(r); return(r); } else { std::cout << "N.A." << std::endl; } return(0); } cbmlib_internal *cbmlib_load(char *package_id) { std::string local = "./Benchmark/.libs/libcompbenchmarks-"; cbmlib_internal *r; local+=package_id; local+=".so"; r=cbmlib_load_internal(local.c_str(), package_id); if (r) return(r); local=PREFIX; local+="/lib/libcompbenchmarks-"; local+=package_id; local+=".so"; r=cbmlib_load_internal(local.c_str(), package_id); return(r); } CBMBenchmark *cbmlib_bench_load(char *bench_id, CBMSystem *_system) { std::string bench = bench_id; std::string package = _system->Split(bench, "-", 0); CBMBenchmark *b; cbmlib_internal *l = cbmlib_load((char*) package.c_str()); if (l) { b=l->BenchByName(bench_id, _system); return(b); } else return(0); } void cbmlib_done(void) { int i; int s = cbmlib_loaded_libraries.size(); cbmlib_internal *l; for(i=0; i<s; i++) { l=cbmlib_loaded_libraries[i]; dlclose(l->library); delete(l); } } --- NEW FILE: Benchmark-DLLoader.h --- /* ---------------------------------------------------------------------------- $Id: Benchmark-DLLoader.h,v 1.1 2006/11/01 13:03:13 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMBENCHMARKDLLOADER #define H_CBMBENCHMARKDLLOADER #include <System/System.h> #include <Benchmark/Benchmark.h> #include <dlfcn.h> /** Function prototype for getting benchmark's number in a shared library */ typedef int (*cbmlib_internal_number_t)(void); /** Function prototype for getting a benchmark object by its index */ typedef CBMBenchmark* (*cbmlib_internal_bench_t)(int, CBMSystem*); /** Function prototype for getting a benchmark object by its name */ typedef CBMBenchmark* (*cbmlib_internal_benchbyname_t)(char*, CBMSystem*); /** Internal benchmark's shared library object */ typedef struct cbmlib_internal { void *library; std::string package_id; cbmlib_internal_number_t Number; cbmlib_internal_bench_t Bench; cbmlib_internal_benchbyname_t BenchByName; }; /** \brief Load a library according to the benchmark/package's internal name. \param package_id something like gzip, bzip2, nbench and so on. */ cbmlib_internal *cbmlib_load(char *package_id); /** \brief Gets a CBMBenchmark instance from a shared library. \param bench_id gzip-1c, benchpp-whetstone and so on. \param _system A system instance. */ CBMBenchmark *cbmlib_bench_load(char *bench_id, CBMSystem *_system); /** \brief Remove any internal existing reference to shared library. */ void cbmlib_done(void); #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 1 Nov 2006 13:00:50 -0000 1.7 --- Makefile.am 1 Nov 2006 13:03:13 -0000 1.8 *************** *** 45,52 **** CBM_GENLIBWRAPPER = $(top_srcdir)/Benchmark/benchmarks-genlibwrapper.sh ! CBM_GENLIST = $(top_srcdir)/Benchmark/benchmarks-list.sh ! extra_DIST = benchmarks-genlibwrapper.sh benchmarks-list.sh benchmarks.list %.libwrapper.h: $(top_srcdir)/Benchmark/benchmarks.list $(CBM_GENLIBWRAPPER) --- 45,52 ---- CBM_GENLIBWRAPPER = $(top_srcdir)/Benchmark/benchmarks-genlibwrapper.sh ! CBM_GENLIBLIST = $(top_srcdir)/Benchmark/benchmarks-genliblist.sh ! extra_DIST = benchmarks-genlibwrapper.sh benchmarks-genliblist.sh benchmarks.list %.libwrapper.h: $(top_srcdir)/Benchmark/benchmarks.list $(CBM_GENLIBWRAPPER) *************** *** 54,60 **** @$(CBM_GENLIBWRAPPER) $@ $(top_srcdir)/Benchmark > $@ ! Benchmark-Selector.liblist.h: $(top_srcdir)/Benchmark/benchmarks.list $(CBM_GENLIST) @echo "Generating benchmark's list in $@" ! @$(CBM_GENLIST) > $@ clean-all: rm *.libwrapper.h *.liblist.h \ No newline at end of file --- 54,60 ---- @$(CBM_GENLIBWRAPPER) $@ $(top_srcdir)/Benchmark > $@ ! Benchmark-Selector.liblist.h: $(top_srcdir)/Benchmark/benchmarks.list $(CBM_GENLIBLIST) @echo "Generating benchmark's list in $@" ! @$(CBM_GENLIBLIST) > $@ clean-all: rm *.libwrapper.h *.liblist.h \ No newline at end of file |
From: Frederic T. <xf...@us...> - 2006-11-01 13:00:53
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10332 Modified Files: Makefile.am Log Message: Some class names changed. Shared library interface. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 1 Oct 2006 19:36:11 -0000 1.6 --- Makefile.am 1 Nov 2006 13:00:50 -0000 1.7 *************** *** 1,22 **** ! noinst_LTLIBRARIES = libBenchmark.la ! SUBDIRS = Compiler ! sources = Benchmark.cpp \ ! Benchmark-Selector.cpp \ ! Benchmark-Autotools.cpp \ ! Benchmark-xZIP.cpp \ ! Benchmark-GZIP.cpp \ ! Benchmark-BZIP2.cpp \ ! Benchmark-NBENCH.cpp \ ! Benchmark-SCIMARK2.cpp \ ! Benchmark-BENCHPP.cpp \ ! Benchmark-LINPACKC.cpp ! libBenchmark_la_LIBADD = Compiler/libBenchmarkCompiler.la ! libBenchmark_la_SOURCES = $(sources) ! noinst_HEADERS = $(sources:.cpp=.h) ! INCLUDES = -I $(top_srcdir) --- 1,60 ---- ! noinst_LTLIBRARIES = libBenchmark.la ! lib_LTLIBRARIES = libcompbenchmarks-gzip.la \ ! libcompbenchmarks-bzip2.la \ ! libcompbenchmarks-nbench.la \ ! libcompbenchmarks-scimark2.la \ ! libcompbenchmarks-benchpp.la \ ! libcompbenchmarks-linpackc.la ! # SUBDIRS = Compiler + sources = Benchmark.cpp \ + Benchmark-DLLoader.cpp \ + Benchmark-Selector.cpp \ + Benchmark-Autotools.cpp \ + Benchmark-xZIP.cpp ! Benchmark-Selector.cpp: Benchmark-Selector.liblist.h ! Benchmark-GZIP.cpp: Benchmark-GZIP.libwrapper.h ! libcompbenchmarks_gzip_la_SOURCES = Benchmark-GZIP.cpp Benchmark-GZIP.h Benchmark-GZIP.libwrapper.h ! Benchmark-BZIP2.cpp: Benchmark-BZIP2.libwrapper.h ! libcompbenchmarks_bzip2_la_SOURCES = Benchmark-BZIP2.cpp Benchmark-BZIP2.h Benchmark-BZIP2.libwrapper.h ! Benchmark-NBENCH.cpp: Benchmark-NBENCH.libwrapper.h ! libcompbenchmarks_nbench_la_SOURCES = Benchmark-NBENCH.cpp Benchmark-NBENCH.h Benchmark-NBENCH.libwrapper.h ! ! Benchmark-SCIMARK2.cpp: Benchmark-SCIMARK2.libwrapper.h ! libcompbenchmarks_scimark2_la_SOURCES = Benchmark-SCIMARK2.cpp Benchmark-SCIMARK2.h Benchmark-SCIMARK2.libwrapper.h ! ! Benchmark-BENCHPP.cpp: Benchmark-BENCHPP.libwrapper.h ! libcompbenchmarks_benchpp_la_SOURCES = Benchmark-BENCHPP.cpp Benchmark-BENCHPP.h Benchmark-BENCHPP.libwrapper.h ! ! Benchmark-LINPACKC.cpp: Benchmark-LINPACKC.libwrapper.h ! libcompbenchmarks_linpackc_la_SOURCES = Benchmark-LINPACKC.cpp Benchmark-LINPACKC.h Benchmark-LINPACKC.libwrapper.h ! ! # libBenchmark_la_LIBADD = Compiler/libBenchmarkCompiler.la ! ! libBenchmark_la_SOURCES = $(sources) ! ! libBenchmarkinclude_HEADERS = $(sources:.cpp=.h) ! libBenchmarkincludedir = $(includedir)/Benchmark ! ! INCLUDES = -I $(top_srcdir) ! ! CBM_GENLIBWRAPPER = $(top_srcdir)/Benchmark/benchmarks-genlibwrapper.sh ! CBM_GENLIST = $(top_srcdir)/Benchmark/benchmarks-list.sh ! ! ! extra_DIST = benchmarks-genlibwrapper.sh benchmarks-list.sh benchmarks.list ! ! %.libwrapper.h: $(top_srcdir)/Benchmark/benchmarks.list $(CBM_GENLIBWRAPPER) ! @echo "Generating $@" ! @$(CBM_GENLIBWRAPPER) $@ $(top_srcdir)/Benchmark > $@ ! ! Benchmark-Selector.liblist.h: $(top_srcdir)/Benchmark/benchmarks.list $(CBM_GENLIST) ! @echo "Generating benchmark's list in $@" ! @$(CBM_GENLIST) > $@ ! ! clean-all: rm *.libwrapper.h *.liblist.h \ No newline at end of file |
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9919 Modified Files: Benchmark-BENCHPP.cpp Benchmark-BENCHPP.h Benchmark-BZIP2.cpp Benchmark-BZIP2.h Benchmark.cpp Benchmark-GZIP.cpp Benchmark-GZIP.h Benchmark.h Benchmark-LINPACKC.cpp Benchmark-LINPACKC.h Benchmark-NBENCH.cpp Benchmark-NBENCH.h Benchmark-SCIMARK2.cpp Benchmark-SCIMARK2.h Benchmark-Selector.cpp Log Message: Some class names changed. Shared library interface. Index: Benchmark.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Benchmark.h 10 Oct 2006 16:48:49 -0000 1.8 --- Benchmark.h 1 Nov 2006 12:59:56 -0000 1.9 *************** *** 10,15 **** #define H_CBMBENCHMARK ! #include <Benchmark/Compiler/BenchmarkContext-Compiler.h> ! #include <Benchmark/Compiler/BenchmarkContext-CompilerOptions.h> class CBMSystem; --- 10,15 ---- #define H_CBMBENCHMARK ! #include <Compiler/Compiler.h> ! #include <Compiler/Compiler-Options.h> class CBMSystem; *************** *** 109,115 **** protected: /** Stores current compiler. */ ! CBMBenchmarkContextCompiler *currentCompiler; /** Stores current (compiler) options. */ ! CBMBenchmarkContextCompilerOptions *currentOptions; /** System used */ --- 109,115 ---- protected: /** Stores current compiler. */ ! CBMCompiler *currentCompiler; /** Stores current (compiler) options. */ ! CBMCompilerOptions *currentOptions; /** System used */ *************** *** 195,200 **** * \sa Configure() * \return 1 if ok */ ! virtual int configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) = 0; /** Pure virtual method to build package --- 195,200 ---- * \sa Configure() * \return 1 if ok */ ! virtual int configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) = 0; /** Pure virtual method to build package *************** *** 237,242 **** * \sa ContextMatches() */ ! virtual std::string contextID(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); /** Stores (compilation) context ID --- 237,242 ---- * \sa ContextMatches() */ ! virtual std::string contextID(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); /** Stores (compilation) context ID *************** *** 246,251 **** * \return 1 if ok */ ! virtual int storeContext(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); public: --- 246,251 ---- * \return 1 if ok */ ! virtual int storeContext(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); public: *************** *** 267,272 **** * \sa Make() */ ! virtual int ContextMatches(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); /** Download package. * Gets downloadURL() object from Internet and verify checksum. --- 267,272 ---- * \sa Make() */ ! virtual int ContextMatches(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); /** Download package. * Gets downloadURL() object from Internet and verify checksum. *************** *** 322,327 **** * \sa Make(). * \sa status */ ! virtual int Configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); --- 322,327 ---- * \sa Make(). * \sa status */ ! virtual int Configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); *************** *** 401,403 **** --- 401,408 ---- }; + #define lib_declare() \ + extern "C" int cbmlib_getBenchmarkNumber(void); \ + extern "C" CBMBenchmark *cbmlib_getBenchmark(int idx, class CBMSystem *_system); \ + extern "C" CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, class CBMSystem *_system) + #endif Index: Benchmark-BENCHPP.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-BENCHPP.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Benchmark-BENCHPP.cpp 12 Oct 2006 16:07:23 -0000 1.5 --- Benchmark-BENCHPP.cpp 1 Nov 2006 12:59:56 -0000 1.6 *************** *** 6,9 **** --- 6,11 ---- #include <fstream> + #include "Benchmark/Benchmark-BENCHPP.libwrapper.h" + CBMBenchmarkBENCHPP::CBMBenchmarkBENCHPP(CBMSystem *_system) : CBMBenchmark(_system) *************** *** 134,139 **** } ! int CBMBenchmarkBENCHPP::configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { std::string cmd; --- 136,141 ---- } ! int CBMBenchmarkBENCHPP::configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { std::string cmd; Index: Benchmark-NBENCH.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-NBENCH.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-NBENCH.h 19 Sep 2006 17:09:35 -0000 1.3 --- Benchmark-NBENCH.h 1 Nov 2006 12:59:56 -0000 1.4 *************** *** 46,51 **** virtual int extract(int _force = 0); virtual int preConfigure(int _force); ! virtual int configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); virtual int make(void); --- 46,51 ---- virtual int extract(int _force = 0); virtual int preConfigure(int _force); ! virtual int configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); virtual int make(void); *************** *** 223,225 **** --- 223,227 ---- }; + lib_declare(); + #endif Index: Benchmark-LINPACKC.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-LINPACKC.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-LINPACKC.h 1 Oct 2006 19:19:19 -0000 1.1 --- Benchmark-LINPACKC.h 1 Nov 2006 12:59:56 -0000 1.2 *************** *** 34,39 **** * \sa Make() */ ! virtual int ContextMatches(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); virtual std::string packageComments(void); --- 34,39 ---- * \sa Make() */ ! virtual int ContextMatches(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); virtual std::string packageComments(void); *************** *** 58,63 **** virtual int extract(int _force = 0); virtual int preConfigure(int _force); ! virtual int configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); virtual int make(void); --- 58,63 ---- virtual int extract(int _force = 0); virtual int preConfigure(int _force); ! virtual int configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); virtual int make(void); *************** *** 160,165 **** }; ! ! #endif --- 160,164 ---- }; ! lib_declare(); #endif Index: Benchmark-SCIMARK2.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-SCIMARK2.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-SCIMARK2.h 19 Sep 2006 17:09:35 -0000 1.3 --- Benchmark-SCIMARK2.h 1 Nov 2006 12:59:56 -0000 1.4 *************** *** 45,50 **** virtual int extract(int _force = 0); virtual int preConfigure(int _force); ! virtual int configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); virtual int make(void); --- 45,50 ---- virtual int extract(int _force = 0); virtual int preConfigure(int _force); ! virtual int configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); virtual int make(void); *************** *** 137,139 **** --- 137,141 ---- }; + lib_declare(); + #endif Index: Benchmark-NBENCH.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-NBENCH.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-NBENCH.cpp 25 Sep 2006 15:38:51 -0000 1.3 --- Benchmark-NBENCH.cpp 1 Nov 2006 12:59:56 -0000 1.4 *************** *** 5,8 **** --- 5,9 ---- #include <fstream> + #include "Benchmark/Benchmark-NBENCH.libwrapper.h" CBMBenchmarkNBENCH::CBMBenchmarkNBENCH(CBMSystem *_system) *************** *** 110,115 **** } ! int CBMBenchmarkNBENCH::configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { return(1); --- 111,116 ---- } ! int CBMBenchmarkNBENCH::configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { return(1); Index: Benchmark-GZIP.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-GZIP.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Benchmark-GZIP.h 3 Oct 2006 15:48:36 -0000 1.4 --- Benchmark-GZIP.h 1 Nov 2006 12:59:56 -0000 1.5 *************** *** 77,79 **** --- 77,80 ---- }; + lib_declare(); #endif Index: Benchmark-BZIP2.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-BZIP2.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Benchmark-BZIP2.cpp 4 Oct 2006 15:49:34 -0000 1.4 --- Benchmark-BZIP2.cpp 1 Nov 2006 12:59:56 -0000 1.5 *************** *** 6,9 **** --- 6,12 ---- #include <fstream> + + #include "Benchmark/Benchmark-BZIP2.libwrapper.h" + CBMBenchmarkBZIP2::CBMBenchmarkBZIP2(CBMSystem *_system) : CBMBenchmarkxZIP(_system) *************** *** 51,56 **** } ! int CBMBenchmarkBZIP2::configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { return(1); --- 54,59 ---- } ! int CBMBenchmarkBZIP2::configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { return(1); Index: Benchmark-GZIP.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-GZIP.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Benchmark-GZIP.cpp 4 Oct 2006 15:49:34 -0000 1.5 --- Benchmark-GZIP.cpp 1 Nov 2006 12:59:56 -0000 1.6 *************** *** 6,9 **** --- 6,11 ---- #include <config.h> + #include "Benchmark/Benchmark-GZIP.libwrapper.h" + CBMBenchmarkGZIP::CBMBenchmarkGZIP(CBMSystem *_system) : CBMBenchmarkxZIP(_system) Index: Benchmark.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Benchmark.cpp 11 Oct 2006 16:34:11 -0000 1.13 --- Benchmark.cpp 1 Nov 2006 12:59:56 -0000 1.14 *************** *** 31,34 **** --- 31,35 ---- r=system->read((char*) id.c_str()); + if (r!="") { s=r.c_str()[0]; *************** *** 129,134 **** } ! std::string CBMBenchmark::contextID(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { std::string what = _currentCompiler->Binary(); --- 130,135 ---- } ! std::string CBMBenchmark::contextID(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { std::string what = _currentCompiler->Binary(); *************** *** 138,143 **** } ! int CBMBenchmark::storeContext(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { std::string context = contextID(_currentCompiler, --- 139,144 ---- } ! int CBMBenchmark::storeContext(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { std::string context = contextID(_currentCompiler, *************** *** 155,160 **** } ! int CBMBenchmark::ContextMatches(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { std::string previousContext; --- 156,161 ---- } ! int CBMBenchmark::ContextMatches(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { std::string previousContext; *************** *** 346,351 **** } ! int CBMBenchmark::Configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { int r; --- 347,352 ---- } ! int CBMBenchmark::Configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { int r; *************** *** 494,497 **** --- 495,499 ---- r=bench(); + system->Chomp(r); if (r!="0") { Index: Benchmark-Selector.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-Selector.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Benchmark-Selector.cpp 10 Oct 2006 16:50:46 -0000 1.5 --- Benchmark-Selector.cpp 1 Nov 2006 12:59:56 -0000 1.6 *************** *** 2,11 **** #include <UI/UI.h> ! #include <Benchmark/Benchmark-GZIP.h> ! #include <Benchmark/Benchmark-BZIP2.h> ! #include <Benchmark/Benchmark-NBENCH.h> ! #include <Benchmark/Benchmark-SCIMARK2.h> ! #include <Benchmark/Benchmark-BENCHPP.h> ! #include <Benchmark/Benchmark-LINPACKC.h> CBMBenchmarkSelector::CBMBenchmarkSelector(CBMSystem *_system) --- 2,6 ---- #include <UI/UI.h> ! #include <Benchmark/Benchmark-DLLoader.h> CBMBenchmarkSelector::CBMBenchmarkSelector(CBMSystem *_system) *************** *** 16,130 **** CBMBenchmark *CBMBenchmarkSelector::select(char *benchmarkName) { ! std::string tmp = benchmarkName; ! ! if (tmp=="gzip-1c") { ! return(new CBMBenchmarkGZIP1(system)); ! } ! ! if (tmp=="gzip-9c") { ! return(new CBMBenchmarkGZIP9(system)); ! } ! ! if (tmp=="bzip2-1c") { ! return(new CBMBenchmarkBZIP21(system)); ! } ! ! if (tmp=="bzip2-9c") { ! return(new CBMBenchmarkBZIP29(system)); ! } ! ! if (tmp=="nbench-numsort") { ! return(new CBMBenchmarkNBENCH_NUMSORT(system)); ! } ! ! if (tmp=="nbench-stringsort") { ! return(new CBMBenchmarkNBENCH_STRINGSORT(system)); ! } ! ! if (tmp=="nbench-bitfield") { ! return(new CBMBenchmarkNBENCH_BITFIELD(system)); ! } ! ! if (tmp=="nbench-emf") { ! return(new CBMBenchmarkNBENCH_EMF(system)); ! } ! ! if (tmp=="nbench-fourier") { ! return(new CBMBenchmarkNBENCH_FOURIER(system)); ! } ! ! if (tmp=="nbench-assign") { ! return(new CBMBenchmarkNBENCH_ASSIGN(system)); ! } ! ! if (tmp=="nbench-huffman") { ! return(new CBMBenchmarkNBENCH_HUFFMAN(system)); ! } ! ! if (tmp=="nbench-idea") { ! return(new CBMBenchmarkNBENCH_IDEA(system)); ! } ! ! if (tmp=="nbench-nnet") { ! return(new CBMBenchmarkNBENCH_NNET(system)); ! } ! ! if (tmp=="nbench-lu") { ! return(new CBMBenchmarkNBENCH_LU(system)); ! } ! ! if (tmp=="scimark2-fourier") { ! return(new CBMBenchmarkSCIMARK2_FOURIER(system)); ! } ! ! if (tmp=="scimark2-sor") { ! return(new CBMBenchmarkSCIMARK2_SOR(system)); ! } ! ! if (tmp=="scimark2-mc") { ! return(new CBMBenchmarkSCIMARK2_MC(system)); ! } ! ! if (tmp=="scimark2-smm") { ! return(new CBMBenchmarkSCIMARK2_SMM(system)); ! } ! ! if (tmp=="scimark2-lu") { ! return(new CBMBenchmarkSCIMARK2_LU(system)); ! } ! ! if (tmp=="benchpp-dhrystone") { ! return(new CBMBenchmarkBENCHPP_DHRYSTONE(system)); ! } ! ! if (tmp=="benchpp-whetstone") { ! return(new CBMBenchmarkBENCHPP_WHETSTONE(system)); ! } ! ! if (tmp=="benchpp-stepanov-al12") { ! return(new CBMBenchmarkBENCHPP_STEPANOV_AL12(system)); ! } ! ! if (tmp=="linpackc-sp-unroll") { ! return(new CBMBenchmarkLINPACKC_SP_UNROLL(system)); ! } ! ! if (tmp=="linpackc-sp-roll") { ! return(new CBMBenchmarkLINPACKC_SP_ROLL(system)); ! } ! ! if (tmp=="linpackc-dp-unroll") { ! return(new CBMBenchmarkLINPACKC_DP_UNROLL(system)); ! } ! ! if (tmp=="linpackc-dp-roll") { ! return(new CBMBenchmarkLINPACKC_DP_ROLL(system)); ! } ! tmp="Unknown benchmark '"; ! tmp+=benchmarkName; ! tmp+="'"; ! UI->Fatal(tmp); ! return(0); } --- 11,26 ---- CBMBenchmark *CBMBenchmarkSelector::select(char *benchmarkName) { ! CBMBenchmark *result; ! std::string tmp; ! result=cbmlib_bench_load(benchmarkName, system); ! if (!result) { ! tmp="Unknown benchmark '"; ! tmp+=benchmarkName; ! tmp+="'"; ! UI->Fatal(tmp); ! return(0); ! } else ! return(result); } *************** *** 132,197 **** void CBMBenchmarkSelector::displayList(void) { ! CBMBenchmarkGZIP1 gzip1(system); ! CBMBenchmarkGZIP9 gzip9(system); ! ! CBMBenchmarkBZIP21 bzip21(system); ! CBMBenchmarkBZIP29 bzip29(system); ! ! CBMBenchmarkNBENCH_NUMSORT nbench_numsort(system); ! CBMBenchmarkNBENCH_STRINGSORT nbench_stringsort(system); ! CBMBenchmarkNBENCH_BITFIELD nbench_bitfield(system); ! CBMBenchmarkNBENCH_EMF nbench_emf(system); ! CBMBenchmarkNBENCH_FOURIER nbench_fourier(system); ! CBMBenchmarkNBENCH_ASSIGN nbench_assign(system); ! CBMBenchmarkNBENCH_HUFFMAN nbench_huffman(system); ! CBMBenchmarkNBENCH_IDEA nbench_idea(system); ! CBMBenchmarkNBENCH_NNET nbench_nnet(system); ! CBMBenchmarkNBENCH_LU nbench_lu(system); ! ! CBMBenchmarkSCIMARK2_FOURIER scimark2_fourier(system); ! CBMBenchmarkSCIMARK2_SOR scimark2_sor(system); ! CBMBenchmarkSCIMARK2_MC scimark2_mc(system); ! CBMBenchmarkSCIMARK2_SMM scimark2_smm(system); ! CBMBenchmarkSCIMARK2_LU scimark2_lu(system); ! ! CBMBenchmarkBENCHPP_DHRYSTONE benchpp_dry(system); ! CBMBenchmarkBENCHPP_WHETSTONE benchpp_wet(system); ! CBMBenchmarkBENCHPP_STEPANOV_AL12 benchpp_ste_al12(system); ! CBMBenchmarkLINPACKC_SP_UNROLL linpackc_sp_unroll(system); ! CBMBenchmarkLINPACKC_SP_ROLL linpackc_sp_roll(system); ! CBMBenchmarkLINPACKC_DP_UNROLL linpackc_dp_unroll(system); ! CBMBenchmarkLINPACKC_DP_ROLL linpackc_dp_roll(system); ! ! gzip1.display(); ! gzip9.display(); ! ! bzip21.display(); ! bzip29.display(); ! ! nbench_numsort.display(); ! nbench_stringsort.display(); ! nbench_bitfield.display(); ! nbench_emf.display(); ! nbench_fourier.display(); ! nbench_assign.display(); ! nbench_huffman.display(); ! nbench_idea.display(); ! nbench_nnet.display(); ! nbench_lu.display(); ! ! scimark2_fourier.display(); ! scimark2_sor.display(); ! scimark2_mc.display(); ! scimark2_smm.display(); ! scimark2_lu.display(); ! ! benchpp_dry.display(); ! benchpp_wet.display(); ! benchpp_ste_al12.display(); ! ! linpackc_sp_unroll.display(); ! linpackc_sp_roll.display(); ! linpackc_dp_unroll.display(); ! linpackc_dp_roll.display(); } --- 28,33 ---- void CBMBenchmarkSelector::displayList(void) { ! CBMBenchmark *B; ! #include "Benchmark/Benchmark-Selector.liblist.h" } Index: Benchmark-BENCHPP.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-BENCHPP.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-BENCHPP.h 28 Sep 2006 17:52:45 -0000 1.3 --- Benchmark-BENCHPP.h 1 Nov 2006 12:59:56 -0000 1.4 *************** *** 46,51 **** virtual int extract(int _force = 0); virtual int preConfigure(int _force); ! virtual int configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); virtual int make(void); --- 46,51 ---- virtual int extract(int _force = 0); virtual int preConfigure(int _force); ! virtual int configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); virtual int make(void); *************** *** 120,122 **** --- 120,124 ---- }; + lib_declare(); + #endif Index: Benchmark-SCIMARK2.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-SCIMARK2.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Benchmark-SCIMARK2.cpp 25 Sep 2006 15:38:51 -0000 1.4 --- Benchmark-SCIMARK2.cpp 1 Nov 2006 12:59:56 -0000 1.5 *************** *** 4,7 **** --- 4,9 ---- #include <config.h> + #include "Benchmark/Benchmark-SCIMARK2.libwrapper.h" + CBMBenchmarkSCIMARK2::CBMBenchmarkSCIMARK2(CBMSystem *_system) : CBMBenchmark(_system) *************** *** 124,129 **** } ! int CBMBenchmarkSCIMARK2::configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { return(1); --- 126,131 ---- } ! int CBMBenchmarkSCIMARK2::configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { return(1); Index: Benchmark-LINPACKC.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-LINPACKC.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-LINPACKC.cpp 1 Oct 2006 19:19:19 -0000 1.1 --- Benchmark-LINPACKC.cpp 1 Nov 2006 12:59:56 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- #include <config.h> + #include "Benchmark/Benchmark-LINPACKC.libwrapper.h" + CBMBenchmarkLINPACKC::CBMBenchmarkLINPACKC(CBMSystem *_system) : CBMBenchmark(_system) *************** *** 43,48 **** } ! int CBMBenchmarkLINPACKC::ContextMatches(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { std::string localFlags; --- 45,50 ---- } ! int CBMBenchmarkLINPACKC::ContextMatches(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { std::string localFlags; *************** *** 155,160 **** } ! int CBMBenchmarkLINPACKC::configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { return(1); --- 157,162 ---- } ! int CBMBenchmarkLINPACKC::configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { return(1); Index: Benchmark-BZIP2.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-BZIP2.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-BZIP2.h 3 Oct 2006 15:48:36 -0000 1.3 --- Benchmark-BZIP2.h 1 Nov 2006 12:59:56 -0000 1.4 *************** *** 26,31 **** \return Always 1 (ok). */ ! virtual int configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); virtual int make(void); --- 26,31 ---- \return Always 1 (ok). */ ! virtual int configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); virtual int make(void); *************** *** 76,78 **** --- 76,80 ---- }; + lib_declare(); + #endif |
From: Frederic T. <xf...@us...> - 2006-11-01 12:59:11
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9726 Modified Files: Benchmark-Autotools.cpp Benchmark-Autotools.h Log Message: Some class names changed. Index: Benchmark-Autotools.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-Autotools.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-Autotools.cpp 25 Sep 2006 15:38:48 -0000 1.3 --- Benchmark-Autotools.cpp 1 Nov 2006 12:59:04 -0000 1.4 *************** *** 30,35 **** } ! int CBMBenchmarkAutotools::configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions) { --- 30,35 ---- } ! int CBMBenchmarkAutotools::configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { Index: Benchmark-Autotools.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-Autotools.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-Autotools.h 19 Sep 2006 17:09:35 -0000 1.3 --- Benchmark-Autotools.h 1 Nov 2006 12:59:04 -0000 1.4 *************** *** 36,41 **** \return 1 if ok. */ ! virtual int configure(CBMBenchmarkContextCompiler *_currentCompiler, ! CBMBenchmarkContextCompilerOptions *_currentOptions); /** Build package. --- 36,41 ---- \return 1 if ok. */ ! virtual int configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); /** Build package. |
From: Frederic T. <xf...@us...> - 2006-11-01 11:32:16
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8847 Added Files: Makefile.am Log Message: Moved from Benchmark/Compiler. Refactorying. --- NEW FILE: Makefile.am --- noinst_LTLIBRARIES = libCompiler.la SUBDIRS = Compiler-TCC Compiler-GCC libCompiler_la_LIBADD = Compiler-TCC/libCompilerTCC.la \ Compiler-GCC/libCompilerGCC.la sources = Compiler.cpp \ Compiler-Options.cpp libCompiler_la_SOURCES = $(sources) libCompilerinclude_HEADERS = $(sources:.cpp=.h) libCompilerincludedir = $(includedir)/Compiler INCLUDES = -I $(top_srcdir) |
From: Frederic T. <xf...@us...> - 2006-11-01 11:31:48
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8489 Added Files: Compiler.cpp Compiler.h Compiler-Options.cpp Compiler-Options.h Log Message: Class name changed. --- NEW FILE: Compiler-Options.h --- /* ---------------------------------------------------------------------------- $Id: Compiler-Options.h,v 1.1 2006/11/01 11:31:39 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMCOMPILER_OPTIONS #define H_CBMCOMPILER_OPTIONS #include <string> class CBMCompiler; /** \brief Abstraction layer for handling compilers' options. * * This class defines the base object for all options to supported compilers. * It only stores options (std::string, or char*) into an object and allows * querying them. */ class CBMCompilerOptions { private: /** Stores options. Initialised by constructor. * \sa Options() */ std::string options; /** Stores compiler using options. Initialised by constructor. * \sa Compiler() */ class CBMCompiler *compiler; protected: public: /** Constructor \param _compiler Compiler object related to given options \param _options Options to manage in current object. */ CBMCompilerOptions(class CBMCompiler *_compiler, char *_options); /** Retrives compiler \return Compiler instance declared in constructor */ virtual class CBMCompiler *Compiler(void); /** Retrives options \return Options (to compiler instance) declared in constructor */ virtual std::string Options(void); virtual ~CBMCompilerOptions(); }; #endif --- NEW FILE: Compiler.h --- /* ---------------------------------------------------------------------------- $Id: Compiler.h,v 1.1 2006/11/01 11:31:39 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMCOMPILER #define H_CBMCOMPILER #include <string> class CBMSystem; /** \brief Abstraction layer for handling compilers. * * This class defines the base abstract (pure) object for all supported compilers. */ class CBMCompiler { private: /** Internal usage * Speeds up compilerName(). */ std::string cacheCompilerName; /** Internal usage * Speeds up compilerVersion(). */ std::string cacheCompilerVersion; protected: /** Used internally to get information on compiler's binary */ class CBMSystem *system; /** Initialised by constructor. \sa CBMCompiler() */ char *compilerBinary; /** Constructor \param _system the CBMSystem to use internaly. \param _compilerBinary absolute or relative path to the compiler program */ CBMCompiler(class CBMSystem *_system, char *_compilerBinary); /** Gets compiler's name * \return std::string containing the name of the compiler * \sa getCompilerName() */ virtual std::string getCompilerName(void) = 0; /** Gets compiler's version * \return std::string containing the version of the compiler * \sa getCompilerVersion() */ virtual std::string getCompilerVersion(void) = 0; public: /** Display compiler's information. * Format is strict. This output is used by compbenchmark-config. */ virtual void display(void); /** Internal compiler id. \return std::string like 'gcc' or 'g++'. */ virtual std::string compiler(void) = 0; /** Gets compiler's name. Do not overload. \sa getCompilerName() \return The compiler name. */ virtual std::string compilerName(void); /** Gets compiler's version. Do not overload. \sa getCompilerVersion() \return The compiler version. */ virtual std::string compilerVersion(void); /** Gets compiler's program (as specified in constructor). \return The compiler program (absolute or relative, depending on method used in instanciation). */ virtual std::string Binary(void); /** Gets compiler's language. \return C or C++. */ virtual char *language(void) = 0; /** Virtual destructor */ virtual ~CBMCompiler(); }; /** \brief Gives a compiler object according to a binary (or executable) program. * * This class creates CBMCompiler objects. It is only instancied once, and I currently see no need to derivate it. */ class CBMCompilerSelector { private: protected: class CBMSystem *system; public: /** Constructor */ CBMCompilerSelector(class CBMSystem *_system); /** Main method. * Returns a CBMCompiler object. * \param compilerBinary Absolute or relative name of the compiler program */ CBMCompiler *select(char *compilerBinary); /** Virtual destructor */ ~CBMCompilerSelector(); }; #endif --- NEW FILE: Compiler.cpp --- /* ---------------------------------------------------------------------------- $Id: Compiler.cpp,v 1.1 2006/11/01 11:31:39 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <Compiler/Compiler.h> #include <Compiler/Compiler-GCC/Compiler-GCC.h> #include <Compiler/Compiler-TCC/Compiler-TCC.h> #include <System/System.h> #include <iostream> CBMCompiler::CBMCompiler(CBMSystem *_system, char *_compilerBinary) { system=_system; compilerBinary=_compilerBinary; } std::string CBMCompiler::compilerName(void) { if (cacheCompilerName!="") return(cacheCompilerName); cacheCompilerName=getCompilerName(); system->Chomp(cacheCompilerName); return(cacheCompilerName); } std::string CBMCompiler::compilerVersion(void) { if (cacheCompilerVersion!="") return(cacheCompilerVersion); cacheCompilerVersion=getCompilerVersion(); system->Chomp(cacheCompilerVersion); return(cacheCompilerVersion); } std::string CBMCompiler::Binary(void) { return(compilerBinary); } void CBMCompiler::display(void) { std::cout << "compiler::id=" << compiler() << std::endl << "compiler::name=" << compilerName() << std::endl << "compiler::version=" << compilerVersion() << std::endl << "compiler::language=" << language() << std::endl << "compiler::binary=" << Binary() << std::endl; } CBMCompiler::~CBMCompiler() { } CBMCompilerSelector::CBMCompilerSelector(CBMSystem *_system) { system=_system; } CBMCompiler *CBMCompilerSelector::select(char *compilerBinary) { std::string cmd; std::string raw; cmd="("; cmd+=compilerBinary; cmd+=" --version) 2> /dev/null"; system->exec(cmd, raw); if (raw!="") { if (((int) raw.find("(GCC)")>0) && ((int) raw.find("Free Software Foundation")>0)) { if ((int) raw.find("g++")>=0) { return(new CBMCompilerGCC_cpp(system, compilerBinary)); } else return(new CBMCompilerGCC(system, compilerBinary)); } raw=compilerBinary; if (((int) raw.find("g++")>0) || (raw=="g++")) { return(new CBMCompilerGCC_cpp(system, compilerBinary)); } if (((int) raw.find("gcc")>0) || (raw=="gcc")) { return(new CBMCompilerGCC(system, compilerBinary)); } } cmd="("; cmd+=compilerBinary; cmd+=" -h) 2> /dev/null"; system->exec(cmd, raw); /* !!! */ if (raw!="") { if ((int) raw.find("Tiny C Compiler">0)) { return(new CBMCompilerTCC(system, compilerBinary)); } } /* !!! */ return(0); } CBMCompilerSelector::~CBMCompilerSelector() { } --- NEW FILE: Compiler-Options.cpp --- /* ---------------------------------------------------------------------------- $Id: Compiler-Options.cpp,v 1.1 2006/11/01 11:31:39 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <Compiler/Compiler-Options.h> #include <Compiler/Compiler.h> CBMCompilerOptions::CBMCompilerOptions(CBMCompiler *_compiler, char *_options) { compiler=_compiler; options=_options; } CBMCompiler *CBMCompilerOptions::Compiler(void) { return(compiler); } std::string CBMCompilerOptions::Options(void) { return(options); } CBMCompilerOptions::~CBMCompilerOptions() { } |
From: Frederic T. <xf...@us...> - 2006-11-01 11:31:29
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-TCC In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8477 Modified Files: Compiler-TCC.cpp Compiler-TCC.h Log Message: Class name changed. Index: Compiler-TCC.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-TCC/Compiler-TCC.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Compiler-TCC.h 1 Nov 2006 11:19:30 -0000 1.1 --- Compiler-TCC.h 1 Nov 2006 11:31:23 -0000 1.2 *************** *** 14,18 **** /** \brief Defines the tcc compiler */ ! class CBMBenchmarkContextCompilerTCC : public CBMBenchmarkContextCompiler { private: --- 14,18 ---- /** \brief Defines the tcc compiler */ ! class CBMCompilerTCC : public CBMCompiler { private: *************** *** 24,32 **** public: ! CBMBenchmarkContextCompilerTCC (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); ! virtual ~CBMBenchmarkContextCompilerTCC(); }; --- 24,32 ---- public: ! CBMCompilerTCC (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); ! virtual ~CBMCompilerTCC(); }; Index: Compiler-TCC.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-TCC/Compiler-TCC.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Compiler-TCC.cpp 1 Nov 2006 11:19:30 -0000 1.1 --- Compiler-TCC.cpp 1 Nov 2006 11:31:23 -0000 1.2 *************** *** 10,20 **** #include <System/System.h> ! CBMBenchmarkContextCompilerTCC::CBMBenchmarkContextCompilerTCC(CBMSystem *_system, char *_compilerBinary) ! : CBMBenchmarkContextCompiler(_system, _compilerBinary) { } ! std::string CBMBenchmarkContextCompilerTCC::compiler(void) { std::string str = "tcc"; --- 10,20 ---- #include <System/System.h> ! CBMCompilerTCC::CBMCompilerTCC(CBMSystem *_system, char *_compilerBinary) ! : CBMCompiler(_system, _compilerBinary) { } ! std::string CBMCompilerTCC::compiler(void) { std::string str = "tcc"; *************** *** 23,27 **** } ! std::string CBMBenchmarkContextCompilerTCC::getCompilerName(void) { std::string result = "Tiny C Compiler "; --- 23,27 ---- } ! std::string CBMCompilerTCC::getCompilerName(void) { std::string result = "Tiny C Compiler "; *************** *** 30,34 **** } ! std::string CBMBenchmarkContextCompilerTCC::getCompilerVersion(void) { std::string cmd; --- 30,34 ---- } ! std::string CBMCompilerTCC::getCompilerVersion(void) { std::string cmd; *************** *** 42,51 **** } ! char *CBMBenchmarkContextCompilerTCC::language(void) { return("C"); } ! CBMBenchmarkContextCompilerTCC::~CBMBenchmarkContextCompilerTCC() { } --- 42,51 ---- } ! char *CBMCompilerTCC::language(void) { return("C"); } ! CBMCompilerTCC::~CBMCompilerTCC() { } |
From: Frederic T. <xf...@us...> - 2006-11-01 11:31:10
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-GCC In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8074 Modified Files: Compiler-GCC.cpp Compiler-GCC.h Log Message: Class name changed. Index: Compiler-GCC.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-GCC/Compiler-GCC.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Compiler-GCC.h 1 Nov 2006 11:18:54 -0000 1.1 --- Compiler-GCC.h 1 Nov 2006 11:31:05 -0000 1.2 *************** *** 13,17 **** /** \brief Defines the gcc compiler */ ! class CBMBenchmarkContextCompilerGCC : public CBMBenchmarkContextCompiler { private: --- 13,17 ---- /** \brief Defines the gcc compiler */ ! class CBMCompilerGCC : public CBMCompiler { private: *************** *** 23,31 **** public: ! CBMBenchmarkContextCompilerGCC (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); ! virtual ~CBMBenchmarkContextCompilerGCC(); }; --- 23,31 ---- public: ! CBMCompilerGCC (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); ! virtual ~CBMCompilerGCC(); }; *************** *** 33,37 **** /** \brief Defines the g++ compiler */ ! class CBMBenchmarkContextCompilerGCC_cpp : public CBMBenchmarkContextCompiler { private: --- 33,37 ---- /** \brief Defines the g++ compiler */ ! class CBMCompilerGCC_cpp : public CBMCompiler { private: *************** *** 43,51 **** public: ! CBMBenchmarkContextCompilerGCC_cpp (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); ! virtual ~CBMBenchmarkContextCompilerGCC_cpp(); }; #endif --- 43,51 ---- public: ! CBMCompilerGCC_cpp (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); ! virtual ~CBMCompilerGCC_cpp(); }; #endif Index: Compiler-GCC.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-GCC/Compiler-GCC.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Compiler-GCC.cpp 1 Nov 2006 11:18:54 -0000 1.1 --- Compiler-GCC.cpp 1 Nov 2006 11:31:05 -0000 1.2 *************** *** 12,22 **** #include <config.h> ! CBMBenchmarkContextCompilerGCC::CBMBenchmarkContextCompilerGCC(CBMSystem *_system, char *_compilerBinary) ! : CBMBenchmarkContextCompiler(_system, _compilerBinary) { } ! std::string CBMBenchmarkContextCompilerGCC::compiler(void) { std::string str = "gcc"; --- 12,22 ---- #include <config.h> ! CBMCompilerGCC::CBMCompilerGCC(CBMSystem *_system, char *_compilerBinary) ! : CBMCompiler(_system, _compilerBinary) { } ! std::string CBMCompilerGCC::compiler(void) { std::string str = "gcc"; *************** *** 25,29 **** } ! std::string CBMBenchmarkContextCompilerGCC::getCompilerName(void) { std::string cmd = compilerBinary; --- 25,29 ---- } ! std::string CBMCompilerGCC::getCompilerName(void) { std::string cmd = compilerBinary; *************** *** 44,48 **** } ! std::string CBMBenchmarkContextCompilerGCC::getCompilerVersion(void) { std::string cmd = "I=`"; --- 44,48 ---- } ! std::string CBMCompilerGCC::getCompilerVersion(void) { std::string cmd = "I=`"; *************** *** 65,84 **** } ! char *CBMBenchmarkContextCompilerGCC::language(void) { return("C"); } ! CBMBenchmarkContextCompilerGCC::~CBMBenchmarkContextCompilerGCC() { } ! CBMBenchmarkContextCompilerGCC_cpp::CBMBenchmarkContextCompilerGCC_cpp(CBMSystem *_system, char *_compilerBinary) ! : CBMBenchmarkContextCompiler(_system, _compilerBinary) { } ! std::string CBMBenchmarkContextCompilerGCC_cpp::compiler(void) { std::string str = "g++"; --- 65,84 ---- } ! char *CBMCompilerGCC::language(void) { return("C"); } ! CBMCompilerGCC::~CBMCompilerGCC() { } ! CBMCompilerGCC_cpp::CBMCompilerGCC_cpp(CBMSystem *_system, char *_compilerBinary) ! : CBMCompiler(_system, _compilerBinary) { } ! std::string CBMCompilerGCC_cpp::compiler(void) { std::string str = "g++"; *************** *** 87,91 **** } ! std::string CBMBenchmarkContextCompilerGCC_cpp::getCompilerName(void) { std::string cmd = compilerBinary; --- 87,91 ---- } ! std::string CBMCompilerGCC_cpp::getCompilerName(void) { std::string cmd = compilerBinary; *************** *** 106,110 **** } ! std::string CBMBenchmarkContextCompilerGCC_cpp::getCompilerVersion(void) { std::string cmd = "I=`"; --- 106,110 ---- } ! std::string CBMCompilerGCC_cpp::getCompilerVersion(void) { std::string cmd = "I=`"; *************** *** 127,136 **** } ! char *CBMBenchmarkContextCompilerGCC_cpp::language(void) { return("C++"); } ! CBMBenchmarkContextCompilerGCC_cpp::~CBMBenchmarkContextCompilerGCC_cpp() { } --- 127,136 ---- } ! char *CBMCompilerGCC_cpp::language(void) { return("C++"); } ! CBMCompilerGCC_cpp::~CBMCompilerGCC_cpp() { } |
From: Frederic T. <xf...@us...> - 2006-11-01 11:29:12
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7563 Removed Files: BenchmarkContext-Compiler.cpp BenchmarkContext-CompilerGCC.cpp BenchmarkContext-CompilerGCC.h BenchmarkContext-Compiler.h BenchmarkContext-CompilerOptions.cpp BenchmarkContext-CompilerOptions.h BenchmarkContext-CompilerTCC.cpp BenchmarkContext-CompilerTCC.h Makefile.am Log Message: Moved to Compiler/* --- BenchmarkContext-CompilerGCC.h DELETED --- --- BenchmarkContext-CompilerTCC.cpp DELETED --- --- BenchmarkContext-Compiler.h DELETED --- --- BenchmarkContext-CompilerOptions.cpp DELETED --- --- Makefile.am DELETED --- --- BenchmarkContext-CompilerGCC.cpp DELETED --- --- BenchmarkContext-CompilerTCC.h DELETED --- --- BenchmarkContext-Compiler.cpp DELETED --- --- BenchmarkContext-CompilerOptions.h DELETED --- |
From: Frederic T. <xf...@us...> - 2006-11-01 11:19:33
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-TCC In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3885 Added Files: Compiler-TCC.cpp Compiler-TCC.h Makefile.am Log Message: Moved from Benchmark/Compiler. Refactorying. --- NEW FILE: Compiler-TCC.h --- /* ---------------------------------------------------------------------------- $Id: Compiler-TCC.h,v 1.1 2006/11/01 11:19:30 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMCOMPILER_TCC #define H_CBMCOMPILER_TCC #include <Compiler/Compiler.h> /** \brief Defines the tcc compiler */ class CBMBenchmarkContextCompilerTCC : public CBMBenchmarkContextCompiler { private: protected: virtual std::string getCompilerName(void); virtual std::string getCompilerVersion(void); virtual char *language(void); public: CBMBenchmarkContextCompilerTCC (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); virtual ~CBMBenchmarkContextCompilerTCC(); }; #endif --- NEW FILE: Makefile.am --- noinst_LTLIBRARIES = libCompilerTCC.la sources = Compiler-TCC.cpp libCompilerTCC_la_SOURCES = $(sources) libCompilerinclude_HEADERS = $(sources:.cpp=.h) libCompilerincludedir = $(includedir)/Compiler/Compiler-TCC INCLUDES = -I $(top_srcdir) --- NEW FILE: Compiler-TCC.cpp --- /* ---------------------------------------------------------------------------- $Id: Compiler-TCC.cpp,v 1.1 2006/11/01 11:19:30 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <Compiler/Compiler-TCC/Compiler-TCC.h> #include <System/System.h> CBMBenchmarkContextCompilerTCC::CBMBenchmarkContextCompilerTCC(CBMSystem *_system, char *_compilerBinary) : CBMBenchmarkContextCompiler(_system, _compilerBinary) { } std::string CBMBenchmarkContextCompilerTCC::compiler(void) { std::string str = "tcc"; return(str); } std::string CBMBenchmarkContextCompilerTCC::getCompilerName(void) { std::string result = "Tiny C Compiler "; result+=getCompilerVersion(); return(result); } std::string CBMBenchmarkContextCompilerTCC::getCompilerVersion(void) { std::string cmd; std::string result; cmd+=compilerBinary; cmd+=" -v"; system->exec(cmd, result); /* !!! */ return(result); } char *CBMBenchmarkContextCompilerTCC::language(void) { return("C"); } CBMBenchmarkContextCompilerTCC::~CBMBenchmarkContextCompilerTCC() { } |
From: Frederic T. <xf...@us...> - 2006-11-01 11:19:01
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-GCC In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3527 Added Files: Compiler-GCC.cpp Compiler-GCC.h Makefile.am Log Message: Moved from Benchmark/Compiler. Refactorying. --- NEW FILE: Compiler-GCC.h --- /* ---------------------------------------------------------------------------- $Id: Compiler-GCC.h,v 1.1 2006/11/01 11:18:54 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMCOMPILER_GCC #define H_CBMCOMPILER_GCC #include <Compiler/Compiler.h> /** \brief Defines the gcc compiler */ class CBMBenchmarkContextCompilerGCC : public CBMBenchmarkContextCompiler { private: protected: virtual std::string getCompilerName(void); virtual std::string getCompilerVersion(void); virtual char *language(void); public: CBMBenchmarkContextCompilerGCC (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); virtual ~CBMBenchmarkContextCompilerGCC(); }; /** \brief Defines the g++ compiler */ class CBMBenchmarkContextCompilerGCC_cpp : public CBMBenchmarkContextCompiler { private: protected: virtual std::string getCompilerName(void); virtual std::string getCompilerVersion(void); virtual char *language(void); public: CBMBenchmarkContextCompilerGCC_cpp (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); virtual ~CBMBenchmarkContextCompilerGCC_cpp(); }; #endif --- NEW FILE: Makefile.am --- noinst_LTLIBRARIES = libCompilerGCC.la sources = Compiler-GCC.cpp libCompilerGCC_la_SOURCES = $(sources) libCompilerinclude_HEADERS = $(sources:.cpp=.h) libCompilerincludedir = $(includedir)/Compiler/Compiler-GCC INCLUDES = -I $(top_srcdir) --- NEW FILE: Compiler-GCC.cpp --- /* ---------------------------------------------------------------------------- $Id: Compiler-GCC.cpp,v 1.1 2006/11/01 11:18:54 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <Compiler/Compiler-GCC/Compiler-GCC.h> #include <System/System.h> #include <config.h> CBMBenchmarkContextCompilerGCC::CBMBenchmarkContextCompilerGCC(CBMSystem *_system, char *_compilerBinary) : CBMBenchmarkContextCompiler(_system, _compilerBinary) { } std::string CBMBenchmarkContextCompilerGCC::compiler(void) { std::string str = "gcc"; return(str); } std::string CBMBenchmarkContextCompilerGCC::getCompilerName(void) { std::string cmd = compilerBinary; std::string result; std::string tmp; cmd+=" --version | "; cmd+=CBM_PROG_HEAD; cmd+=" -1"; system->exec(cmd, result); /* !!! */ if ((int) result.find("gcc")<0) { tmp="gcc "; tmp+=result; result=tmp; } return(result); } std::string CBMBenchmarkContextCompilerGCC::getCompilerVersion(void) { std::string cmd = "I=`"; std::string result; cmd+=compilerBinary; cmd+=" --version | "; cmd+=CBM_PROG_HEAD; cmd+=" -1`; echo $I | "; cmd+=CBM_PROG_GREP; cmd+=" prerelease > /dev/null; if test $? = 0; then echo $I | "; cmd+=CBM_PROG_CUT; cmd+=" -f3-5 -d' '; else echo $I | "; cmd+=CBM_PROG_CUT; cmd+=" -f3 -d' '; fi"; /* !!! */ system->exec(cmd, result); /* !!! */ return(result); } char *CBMBenchmarkContextCompilerGCC::language(void) { return("C"); } CBMBenchmarkContextCompilerGCC::~CBMBenchmarkContextCompilerGCC() { } CBMBenchmarkContextCompilerGCC_cpp::CBMBenchmarkContextCompilerGCC_cpp(CBMSystem *_system, char *_compilerBinary) : CBMBenchmarkContextCompiler(_system, _compilerBinary) { } std::string CBMBenchmarkContextCompilerGCC_cpp::compiler(void) { std::string str = "g++"; return(str); } std::string CBMBenchmarkContextCompilerGCC_cpp::getCompilerName(void) { std::string cmd = compilerBinary; std::string result; std::string tmp; cmd+=" --version | "; cmd+=CBM_PROG_HEAD; cmd+=" -1"; system->exec(cmd, result); /* !!! */ if ((int) result.find("g++")<0) { tmp="g++ "; tmp+=result; result=tmp; } return(result); } std::string CBMBenchmarkContextCompilerGCC_cpp::getCompilerVersion(void) { std::string cmd = "I=`"; std::string result; cmd+=compilerBinary; cmd+=" --version | "; cmd+=CBM_PROG_HEAD; cmd+=" -1`; echo $I | "; cmd+=CBM_PROG_GREP; cmd+=" prerelease > /dev/null; if test $? = 0; then echo $I | "; cmd+=CBM_PROG_CUT; cmd+=" -f3-5 -d' '; else echo $I | "; cmd+=CBM_PROG_CUT; cmd+=" -f3 -d' '; fi"; /* !!! */ system->exec(cmd, result); /* !!! */ return(result); } char *CBMBenchmarkContextCompilerGCC_cpp::language(void) { return("C++"); } CBMBenchmarkContextCompilerGCC_cpp::~CBMBenchmarkContextCompilerGCC_cpp() { } |
From: Frederic T. <xf...@us...> - 2006-11-01 11:13:22
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-TCC In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1555/Compiler-TCC Log Message: Directory /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-TCC added to the repository |
From: Frederic T. <xf...@us...> - 2006-11-01 11:10:56
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-GCC In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv429/Compiler-GCC Log Message: Directory /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-GCC added to the repository |
From: Frederic T. <xf...@us...> - 2006-11-01 10:59:15
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28753/Compiler Log Message: Directory /cvsroot/compbench/CompBenchmarks++/Compiler added to the repository |
From: Frederic T. <xf...@us...> - 2006-11-01 10:46:38
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24022 Modified Files: Makefile.am Log Message: Include files installed. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Compiler/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 8 Sep 2006 17:04:28 -0000 1.1.1.1 --- Makefile.am 1 Nov 2006 10:46:35 -0000 1.2 *************** *** 1,12 **** ! noinst_LTLIBRARIES = libBenchmarkCompiler.la ! sources = BenchmarkContext-Compiler.cpp \ ! BenchmarkContext-CompilerOptions.cpp \ ! BenchmarkContext-CompilerGCC.cpp \ ! BenchmarkContext-CompilerTCC.cpp libBenchmarkCompiler_la_SOURCES = $(sources) ! noinst_HEADERS = $(sources:.cpp=.h) ! INCLUDES = -I $(top_srcdir) \ No newline at end of file --- 1,14 ---- ! noinst_LTLIBRARIES = libBenchmarkCompiler.la ! sources = BenchmarkContext-Compiler.cpp \ ! BenchmarkContext-CompilerOptions.cpp \ ! BenchmarkContext-CompilerGCC.cpp \ ! BenchmarkContext-CompilerTCC.cpp libBenchmarkCompiler_la_SOURCES = $(sources) ! libBenchmarkCompilerinclude_HEADERS = $(sources:.cpp=.h) ! libBenchmarkCompilerincludedir = $(includedir)/Benchmark/Compiler ! ! INCLUDES = -I $(top_srcdir) \ No newline at end of file |
From: Frederic T. <xf...@us...> - 2006-11-01 10:34:14
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19648 Modified Files: BenchmarkContext-Compiler.cpp Log Message: Chomp() used : strings from system() call are now given without any trailling \n or \r. Index: BenchmarkContext-Compiler.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Compiler/BenchmarkContext-Compiler.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BenchmarkContext-Compiler.cpp 26 Sep 2006 16:03:27 -0000 1.5 --- BenchmarkContext-Compiler.cpp 1 Nov 2006 10:34:10 -0000 1.6 *************** *** 27,30 **** --- 27,31 ---- cacheCompilerName=getCompilerName(); + system->Chomp(cacheCompilerName); return(cacheCompilerName); } *************** *** 36,39 **** --- 37,41 ---- cacheCompilerVersion=getCompilerVersion(); + system->Chomp(cacheCompilerVersion); return(cacheCompilerVersion); } *************** *** 47,52 **** { std::cout << "compiler::id=" << compiler() << std::endl ! << "compiler::name=" << compilerName() ! << "compiler::version=" << compilerVersion() << "compiler::language=" << language() << std::endl << "compiler::binary=" << Binary() << std::endl; --- 49,54 ---- { std::cout << "compiler::id=" << compiler() << std::endl ! << "compiler::name=" << compilerName() << std::endl ! << "compiler::version=" << compilerVersion() << std::endl << "compiler::language=" << language() << std::endl << "compiler::binary=" << Binary() << std::endl; |
From: Frederic T. <xf...@us...> - 2006-11-01 10:32:20
|
Update of /cvsroot/compbench/CompBenchmarks++/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18917 Modified Files: System-FreeBSD.cpp System-Linux.cpp System-Unix.cpp Log Message: Chomp() used : strings from system() call are now given without any trailling \n or \r. Index: System-FreeBSD.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/System/System-FreeBSD.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** System-FreeBSD.cpp 26 Sep 2006 16:03:14 -0000 1.5 --- System-FreeBSD.cpp 1 Nov 2006 10:32:17 -0000 1.6 *************** *** 19,38 **** std::string CBMSystemFreeBSD::processor_name(void) { ! return(exec0("echo $(/sbin/sysctl hw.model | head -1 | cut -f2 -d'=')")); } std::string CBMSystemFreeBSD::processor_mhz(void) { ! return(exec0("echo $(/sbin/sysctl hw.cpuspeed | head -1 | cut -f2 -d'=')")); } std::string CBMSystemFreeBSD::processor_cache(void) { ! return(exec0("echo $(/sbin/sysctl hw.l2cachesize 2> /dev/null | head -1 | cut -f2 -d'=')")); } std::string CBMSystemFreeBSD::processor_number(void) { ! return(exec0("echo $(/sbin/sysctl hw.ncpu | head -1 | cut -f2 -d'=')")); } --- 19,51 ---- std::string CBMSystemFreeBSD::processor_name(void) { ! std::string r = exec0("echo $(/sbin/sysctl hw.model | head -1 | cut -f2 -d'=')"); ! ! Chomp(r); ! ! return(r); } std::string CBMSystemFreeBSD::processor_mhz(void) { ! std::string r = exec0("echo $(/sbin/sysctl hw.cpuspeed | head -1 | cut -f2 -d'=')"); ! Chomp(r); ! ! return(r); } std::string CBMSystemFreeBSD::processor_cache(void) { ! std::string r = exec0("echo $(/sbin/sysctl hw.l2cachesize 2> /dev/null | head -1 | cut -f2 -d'=')"); ! Chomp(r); ! ! return(r); } std::string CBMSystemFreeBSD::processor_number(void) { ! std::string r = exec0("echo $(/sbin/sysctl hw.ncpu | head -1 | cut -f2 -d'=')"); ! Chomp(r); ! ! return(r); } Index: System-Unix.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/System/System-Unix.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** System-Unix.cpp 3 Oct 2006 15:46:56 -0000 1.4 --- System-Unix.cpp 1 Nov 2006 10:32:17 -0000 1.5 *************** *** 73,77 **** std::string CBMSystemUnix::arch(void) { ! return(exec0("uname -m 2> /dev/null")); } --- 73,79 ---- std::string CBMSystemUnix::arch(void) { ! std::string r = exec0("uname -m 2> /dev/null"); ! Chomp(r); ! return(r); } *************** *** 79,98 **** std::string CBMSystemUnix::hostid(void) { ! return(exec0("hostid 2> /dev/null")); } std::string CBMSystemUnix::hostname(void) { ! return(exec0("hostname 2> /dev/null")); } std::string CBMSystemUnix::os(void) { ! return(exec0("uname 2> /dev/null")); } std::string CBMSystemUnix::os_version(void) { ! return(exec0("uname -r 2> /dev/null")); } --- 81,111 ---- std::string CBMSystemUnix::hostid(void) { ! std::string r = exec0("hostid 2> /dev/null"); ! Chomp(r); ! return(r); } std::string CBMSystemUnix::hostname(void) { ! std::string r = exec0("hostname 2> /dev/null"); ! Chomp(r); ! ! return(r); } std::string CBMSystemUnix::os(void) { ! std::string r = exec0("uname 2> /dev/null"); ! ! Chomp(r); ! return(r); } std::string CBMSystemUnix::os_version(void) { ! std::string r = exec0("uname -r 2> /dev/null"); ! Chomp(r); ! ! return(r); } Index: System-Linux.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/System/System-Linux.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** System-Linux.cpp 26 Sep 2006 16:03:15 -0000 1.4 --- System-Linux.cpp 1 Nov 2006 10:32:17 -0000 1.5 *************** *** 19,38 **** std::string CBMSystemLinux::processor_name(void) { ! return(exec0("cat /proc/cpuinfo | grep 'model name' | head -1 | cut -f2 -d':' | sed 's/^ //' 2> /dev/null")); } std::string CBMSystemLinux::processor_mhz(void) { ! return(exec0("(cat /proc/cpuinfo | grep 'cpu MHz' | head -1 | cut -f2 -d':' | sed 's/^ //' | cut -f1 -d'.') 2> /dev/null")); } std::string CBMSystemLinux::processor_cache(void) { ! return(exec0("(cat /proc/cpuinfo | grep 'cache size' | head -1 | cut -f2 -d':' | sed 's/^ //' | sed 's/KB//') 2> /dev/null")); } std::string CBMSystemLinux::processor_number(void) { ! return(exec0("(cat /proc/cpuinfo | grep 'model name' | wc -l) 2> /dev/null")); } --- 19,52 ---- std::string CBMSystemLinux::processor_name(void) { ! std::string r; ! ! r=exec0("cat /proc/cpuinfo | grep 'model name' | head -1 | cut -f2 -d':' | sed 's/^ //' 2> /dev/null"); ! Chomp(r); ! ! return(r); } std::string CBMSystemLinux::processor_mhz(void) { ! std::string r = exec0("(cat /proc/cpuinfo | grep 'cpu MHz' | head -1 | cut -f2 -d':' | sed 's/^ //' | cut -f1 -d'.') 2> /dev/null"); ! ! Chomp(r); ! ! return(r); } std::string CBMSystemLinux::processor_cache(void) { ! std::string r = exec0("(cat /proc/cpuinfo | grep 'cache size' | head -1 | cut -f2 -d':' | sed 's/^ //' | sed 's/KB//') 2> /dev/null"); ! Chomp(r); ! ! return(r); } std::string CBMSystemLinux::processor_number(void) { ! std::string r = exec0("(cat /proc/cpuinfo | grep 'model name' | wc -l) 2> /dev/null"); ! Chomp(r); ! return(r); } |