Changeset 41cca44


Ignore:
Timestamp:
Sep 25, 2018, 10:49:02 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
13a984c
Parents:
fcc57ba
Message:

Added check for libfibre for use in benchmark

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • benchmark/Makefile.am

    rfcc57ba r41cca44  
    3333TIME_FORMAT = "%E"
    3434PRINT_FORMAT = %20s: #Comments needed for spacing
    35 
    36 LIBFIBRE_DIR ?= /home/tdelisle/software/KOS/src/
    3735
    3836.NOTPARALLEL:
     
    111109
    112110## =========================================================================================================
    113 ctxswitch$(EXEEXT): \
     111CTXSWITCH_DEPEND  =                \
    114112        loop.run                                \
    115113        function.run                    \
     
    121119        ctxswitch-upp_coroutine.run     \
    122120        ctxswitch-upp_thread.run        \
    123         -ctxswitch-kos_fibre.run        \
    124         -ctxswitch-kos_fibre2.run       \
    125121        ctxswitch-goroutine.run         \
    126122        ctxswitch-java_thread.run
    127123
     124if WITH_LIBFIBRE
     125CTXSWITCH_DEPEND  +=           \
     126        ctxswitch-kos_fibre.run  \
     127        ctxswitch-kos_fibre2.run
     128
     129
     130ctxswitch-kos_fibre$(EXEEXT):
     131        @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
     132
     133ctxswitch-kos_fibre2$(EXEEXT):
     134        @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
     135endif
     136
     137ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND)
     138
    128139ctxswitch-pthread$(EXEEXT):
    129140        @$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c
     
    143154ctxswitch-upp_thread$(EXEEXT):
    144155        @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc
    145 
    146 ctxswitch-kos_fibre$(EXEEXT):
    147         @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
    148 
    149 ctxswitch-kos_fibre2$(EXEEXT):
    150         @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
    151156
    152157ctxswitch-goroutine$(EXEEXT):
  • benchmark/Makefile.in

    rfcc57ba r41cca44  
    9393host_triplet = @host@
    9494noinst_PROGRAMS =
     95@WITH_LIBFIBRE_TRUE@am__append_1 = \
     96@WITH_LIBFIBRE_TRUE@    ctxswitch-kos_fibre.run  \
     97@WITH_LIBFIBRE_TRUE@    ctxswitch-kos_fibre2.run
     98
    9599subdir = benchmark
    96100ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    273277TIME_FORMAT = "%E"
    274278PRINT_FORMAT = %20s: #Comments needed for spacing
     279CTXSWITCH_DEPEND = loop.run function.run fetch_add.run \
     280        ctxswitch-pthread.run ctxswitch-cfa_coroutine.run \
     281        ctxswitch-cfa_thread.run ctxswitch-cfa_thread2.run \
     282        ctxswitch-upp_coroutine.run ctxswitch-upp_thread.run \
     283        ctxswitch-goroutine.run ctxswitch-java_thread.run \
     284        $(am__append_1)
    275285testdir = $(top_srcdir)/tests
    276286all: all-am
     
    470480        $(am__mv) $$depbase.Tpo $$depbase.Po
    471481
    472 LIBFIBRE_DIR ?= /home/tdelisle/software/KOS/src/
    473 
    474482.NOTPARALLEL:
    475483
     
    541549        $(COMPILE) -DBENCH_N=500000000  fetch_add.c
    542550
    543 ctxswitch$(EXEEXT): \
    544         loop.run                                \
    545         function.run                    \
    546         fetch_add.run                   \
    547         ctxswitch-pthread.run           \
    548         ctxswitch-cfa_coroutine.run     \
    549         ctxswitch-cfa_thread.run        \
    550         ctxswitch-cfa_thread2.run       \
    551         ctxswitch-upp_coroutine.run     \
    552         ctxswitch-upp_thread.run        \
    553         -ctxswitch-kos_fibre.run        \
    554         -ctxswitch-kos_fibre2.run       \
    555         ctxswitch-goroutine.run         \
    556         ctxswitch-java_thread.run
     551@WITH_LIBFIBRE_TRUE@ctxswitch-kos_fibre$(EXEEXT):
     552@WITH_LIBFIBRE_TRUE@    @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
     553
     554@WITH_LIBFIBRE_TRUE@ctxswitch-kos_fibre2$(EXEEXT):
     555@WITH_LIBFIBRE_TRUE@    @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
     556
     557ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND)
    557558
    558559ctxswitch-pthread$(EXEEXT):
     
    573574ctxswitch-upp_thread$(EXEEXT):
    574575        @$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc
    575 
    576 ctxswitch-kos_fibre$(EXEEXT):
    577         @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
    578 
    579 ctxswitch-kos_fibre2$(EXEEXT):
    580         @$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
    581576
    582577ctxswitch-goroutine$(EXEEXT):
  • configure

    rfcc57ba r41cca44  
    630630GREP
    631631CPP
     632WITH_LIBFIBRE_FALSE
     633WITH_LIBFIBRE_TRUE
    632634RANLIB
    633635LEXLIB
     
    54395441
    54405442# Checks for libraries.
     5443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fibre::yield in -lfibre" >&5
     5444$as_echo_n "checking for Fibre::yield in -lfibre... " >&6; }
     5445if ${ac_cv_lib_fibre_Fibre__yield+:} false; then :
     5446  $as_echo_n "(cached) " >&6
     5447else
     5448  ac_check_lib_save_LIBS=$LIBS
     5449LIBS="-lfibre  $LIBS"
     5450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     5451/* end confdefs.h.  */
     5452
     5453/* Override any GCC internal prototype to avoid an error.
     5454   Use char because int might match the return type of a GCC
     5455   builtin and then its argument prototype would still apply.  */
     5456#ifdef __cplusplus
     5457extern "C"
     5458#endif
     5459char Fibre::yield ();
     5460int
     5461main ()
     5462{
     5463return Fibre::yield ();
     5464  ;
     5465  return 0;
     5466}
     5467_ACEOF
     5468if ac_fn_c_try_link "$LINENO"; then :
     5469  ac_cv_lib_fibre_Fibre__yield=yes
     5470else
     5471  ac_cv_lib_fibre_Fibre__yield=no
     5472fi
     5473rm -f core conftest.err conftest.$ac_objext \
     5474    conftest$ac_exeext conftest.$ac_ext
     5475LIBS=$ac_check_lib_save_LIBS
     5476fi
     5477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fibre_Fibre__yield" >&5
     5478$as_echo "$ac_cv_lib_fibre_Fibre__yield" >&6; }
     5479if test "x$ac_cv_lib_fibre_Fibre__yield" = xyes; then :
     5480  HAVE_LIBFIBRE=1
     5481else
     5482  HAVE_LIBFIBRE=0
     5483fi
     5484
     5485 if test "$HAVE_LIBFIBRE" -eq 1; then
     5486  WITH_LIBFIBRE_TRUE=
     5487  WITH_LIBFIBRE_FALSE='#'
     5488else
     5489  WITH_LIBFIBRE_TRUE='#'
     5490  WITH_LIBFIBRE_FALSE=
     5491fi
     5492
    54415493
    54425494# Checks for header files.
     
    64786530if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
    64796531  as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
     6532Usually this means the macro was only invoked conditionally." "$LINENO" 5
     6533fi
     6534if test -z "${WITH_LIBFIBRE_TRUE}" && test -z "${WITH_LIBFIBRE_FALSE}"; then
     6535  as_fn_error $? "conditional \"WITH_LIBFIBRE\" was never defined.
    64806536Usually this means the macro was only invoked conditionally." "$LINENO" 5
    64816537fi
  • configure.ac

    rfcc57ba r41cca44  
    204204
    205205# Checks for libraries.
     206AC_CHECK_LIB([fibre], [Fibre::yield], [HAVE_LIBFIBRE=1], [HAVE_LIBFIBRE=0])
     207AM_CONDITIONAL([WITH_LIBFIBRE], [test "$HAVE_LIBFIBRE" -eq 1])
    206208
    207209# Checks for header files.
Note: See TracChangeset for help on using the changeset viewer.