Changeset b7170a64


Ignore:
Timestamp:
Oct 26, 2017, 12:16:10 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
6395817
Parents:
4149d9d
Message:

Updated the creation and ctxswitch benchmark to all be consistent and flexible

Files:
11 edited
1 moved

Legend:

Unmodified
Added
Removed
  • src/benchmark/Makefile.am

    r4149d9d rb7170a64  
    1919AM_CFLAGS = -g -Wall -Wno-unused-function -O2
    2020CC = @CFA_BINDIR@/@CFA_NAME@
    21 REPEAT = ${abs_top_srcdir}/tools/a.out
    22 repeats = 30
     21TOOLSDIR = ${abs_top_srcdir}/tools/
     22REPEAT   = ${TOOLSDIR}repeat
     23STATS    = ${TOOLSDIR}stat.py
     24repeats  = 30
    2325
    2426.NOTPARALLEL:
    2527
    26 noinst_PROGRAMS = bench$(EXEEXT) ctxswitch-coroutine$(EXEEXT) ctxswitch-thread$(EXEEXT) sched-int$(EXEEXT) monitor$(EXEEXT) csv-data$(EXEEXT)
     28noinst_PROGRAMS =
    2729
    2830bench$(EXEEXT) :
     
    4143## =========================================================================================================
    4244ctxswitch$(EXEEXT): \
    43         ctxswitch-cfa_coroutine.run     \
    44         ctxswitch-cfa_thread.run        \
    45         ctxswitch-upp_coroutine.run     \
    46         ctxswitch-upp_thread.run        \
    47         ctxswitch-pthread.run
     45        ctxswitch-pthread.run           \
     46        ctxswitch-cfa_coroutine.run     \
     47        ctxswitch-cfa_thread.run        \
     48        ctxswitch-upp_coroutine.run     \
     49        ctxswitch-upp_thread.run
    4850
    4951ctxswitch-cfa_coroutine$(EXEEXT):
    50         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -DN=50000000 ctxswitch/cfa_cor.c
     52        ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/cfa_cor.c
    5153
    5254ctxswitch-cfa_thread$(EXEEXT):
    53         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -DN=50000000 ctxswitch/cfa_thrd.c
     55        ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/cfa_thrd.c
    5456
    5557ctxswitch-upp_coroutine$(EXEEXT):
    56         u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -DN=50000000 ctxswitch/upp_cor.cc
     58        ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/upp_cor.cc
    5759
    5860ctxswitch-upp_thread$(EXEEXT):
    59         u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -DN=50000000 ctxswitch/upp_cor.cc
     61        ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/upp_thrd.cc
    6062
    6163ctxswitch-pthread$(EXEEXT):
    62         @BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DN=50000000 ctxswitch/pthreads.c
     64        ${AM_V_CC}@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=50000000 ctxswitch/pthreads.c
    6365
    6466## =========================================================================================================
    6567creation$(EXEEXT) :\
    6668        creation-pthread.run            \
    67         creation-cfa_coroutine.run      \
    68         creation-cfa_thread.run         \
    69         creation-upp_coroutine.run      \
     69        creation-cfa_coroutine.run      \
     70        creation-cfa_thread.run         \
     71        creation-upp_coroutine.run      \
    7072        creation-upp_thread.run
    7173
    7274creation-cfa_coroutine$(EXEEXT):
    73         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -DBENCH_N=500000000 creation/cfa_cor.c
     75        ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=500000000 creation/cfa_cor.c
    7476
    7577creation-cfa_thread$(EXEEXT):
    76         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -DBENCH_N=10000000 creation/cfa_thrd.c
     78        ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=10000000 creation/cfa_thrd.c
    7779
    7880creation-upp_coroutine$(EXEEXT):
    79         u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -DBENCH_N=50000000 creation/upp_cor.cc
     81        ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 creation/upp_cor.cc
    8082
    8183creation-upp_thread$(EXEEXT):
    82         u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -DBENCH_N=50000000 creation/upp_cor.cc
     84        ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 creation/upp_thrd.cc
    8385
    8486creation-pthread$(EXEEXT):
    85         @BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=2500000 creation/pthreads.c
     87        ${AM_V_CC}@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=250000 creation/pthreads.c
    8688
    8789## =========================================================================================================
     
    9294        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c
    9395
    94 %.run : %$(EXEEXT)
     96%.run : %$(EXEEXT) ${REPEAT}
    9597        @rm -f .result.log
    96         @./catchsig
     98        @echo "------------------------------------------------------"
     99        @echo $<
    97100        @${REPEAT} ${repeats} ./a.out | tee -a .result.log
    98         @./stat.py .result.log
     101        @${STATS} .result.log
     102        @echo "------------------------------------------------------"
    99103        @rm -f a.out .result.log
     104
     105${REPEAT} :
     106        @+make -C ${TOOLSDIR} repeat
  • src/benchmark/Makefile.in

    r4149d9d rb7170a64  
    9292build_triplet = @build@
    9393host_triplet = @host@
     94noinst_PROGRAMS =
    9495subdir = src/benchmark
    9596ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    103104CONFIG_CLEAN_VPATH_FILES =
    104105PROGRAMS = $(noinst_PROGRAMS)
    105 bench_SOURCES = bench.c
    106 bench_OBJECTS = bench.$(OBJEXT)
    107 bench_LDADD = $(LDADD)
    108 csv_data_SOURCES = csv-data.c
    109 csv_data_OBJECTS = csv-data.$(OBJEXT)
    110 csv_data_LDADD = $(LDADD)
    111 ctxswitch_coroutine_SOURCES = ctxswitch-coroutine.c
    112 ctxswitch_coroutine_OBJECTS = ctxswitch-coroutine.$(OBJEXT)
    113 ctxswitch_coroutine_LDADD = $(LDADD)
    114 ctxswitch_thread_SOURCES = ctxswitch-thread.c
    115 ctxswitch_thread_OBJECTS = ctxswitch-thread.$(OBJEXT)
    116 ctxswitch_thread_LDADD = $(LDADD)
    117 monitor_SOURCES = monitor.c
    118 monitor_OBJECTS = monitor.$(OBJEXT)
    119 monitor_LDADD = $(LDADD)
    120 sched_int_SOURCES = sched-int.c
    121 sched_int_OBJECTS = sched-int.$(OBJEXT)
    122 sched_int_LDADD = $(LDADD)
    123106AM_V_P = $(am__v_P_@AM_V@)
    124107am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
     
    133116am__v_at_0 = @
    134117am__v_at_1 =
    135 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
    136 depcomp = $(SHELL) $(top_srcdir)/automake/depcomp
    137 am__depfiles_maybe = depfiles
    138 am__mv = mv -f
    139 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    140         $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    141 AM_V_CC = $(am__v_CC_@AM_V@)
    142 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
    143 am__v_CC_0 = @echo "  CC      " $@;
    144 am__v_CC_1 =
    145 CCLD = $(CC)
    146 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
    147 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
    148 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
    149 am__v_CCLD_0 = @echo "  CCLD    " $@;
    150 am__v_CCLD_1 =
    151 SOURCES = bench.c csv-data.c ctxswitch-coroutine.c ctxswitch-thread.c \
    152         monitor.c sched-int.c
    153 DIST_SOURCES = bench.c csv-data.c ctxswitch-coroutine.c \
    154         ctxswitch-thread.c monitor.c sched-int.c
     118SOURCES =
     119DIST_SOURCES =
    155120am__can_run_installinfo = \
    156121  case $$AM_UPDATE_INFO_DIR in \
     
    159124  esac
    160125am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
    161 # Read a list of newline-separated strings from the standard input,
    162 # and print each of them once, without duplicates.  Input order is
    163 # *not* preserved.
    164 am__uniquify_input = $(AWK) '\
    165   BEGIN { nonempty = 0; } \
    166   { items[$$0] = 1; nonempty = 1; } \
    167   END { if (nonempty) { for (i in items) print i; }; } \
    168 '
    169 # Make sure the list of sources is unique.  This is necessary because,
    170 # e.g., the same source file might be shared among _SOURCES variables
    171 # for different programs/libraries.
    172 am__define_uniq_tagged_files = \
    173   list='$(am__tagged_files)'; \
    174   unique=`for i in $$list; do \
    175     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
    176   done | $(am__uniquify_input)`
    177 ETAGS = etags
    178 CTAGS = ctags
    179 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/automake/depcomp
     126am__DIST_COMMON = $(srcdir)/Makefile.in
    180127DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    181128ACLOCAL = @ACLOCAL@
     
    302249top_srcdir = @top_srcdir@
    303250AM_CFLAGS = -g -Wall -Wno-unused-function -O2
    304 REPEAT = ${abs_top_srcdir}/tools/a.out
     251TOOLSDIR = ${abs_top_srcdir}/tools/
     252REPEAT = ${TOOLSDIR}repeat
     253STATS = ${TOOLSDIR}stat.py
    305254repeats = 30
    306 noinst_PROGRAMS = bench$(EXEEXT) ctxswitch-coroutine$(EXEEXT) ctxswitch-thread$(EXEEXT) sched-int$(EXEEXT) monitor$(EXEEXT) csv-data$(EXEEXT)
    307255all: all-am
    308256
    309257.SUFFIXES:
    310 .SUFFIXES: .c .o .obj
    311258$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
    312259        @for dep in $?; do \
     
    341288clean-noinstPROGRAMS:
    342289        -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
    343 
    344 ctxswitch-coroutine$(EXEEXT): $(ctxswitch_coroutine_OBJECTS) $(ctxswitch_coroutine_DEPENDENCIES) $(EXTRA_ctxswitch_coroutine_DEPENDENCIES)
    345         @rm -f ctxswitch-coroutine$(EXEEXT)
    346         $(AM_V_CCLD)$(LINK) $(ctxswitch_coroutine_OBJECTS) $(ctxswitch_coroutine_LDADD) $(LIBS)
    347 
    348 ctxswitch-thread$(EXEEXT): $(ctxswitch_thread_OBJECTS) $(ctxswitch_thread_DEPENDENCIES) $(EXTRA_ctxswitch_thread_DEPENDENCIES)
    349         @rm -f ctxswitch-thread$(EXEEXT)
    350         $(AM_V_CCLD)$(LINK) $(ctxswitch_thread_OBJECTS) $(ctxswitch_thread_LDADD) $(LIBS)
    351 
    352 mostlyclean-compile:
    353         -rm -f *.$(OBJEXT)
    354 
    355 distclean-compile:
    356         -rm -f *.tab.c
    357 
    358 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench.Po@am__quote@
    359 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csv-data.Po@am__quote@
    360 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctxswitch-coroutine.Po@am__quote@
    361 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctxswitch-thread.Po@am__quote@
    362 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor.Po@am__quote@
    363 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched-int.Po@am__quote@
    364 
    365 .c.o:
    366 @am__fastdepCC_TRUE@    $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
    367 @am__fastdepCC_TRUE@    $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
    368 @am__fastdepCC_TRUE@    $(am__mv) $$depbase.Tpo $$depbase.Po
    369 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    370 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    371 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
    372 
    373 .c.obj:
    374 @am__fastdepCC_TRUE@    $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
    375 @am__fastdepCC_TRUE@    $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
    376 @am__fastdepCC_TRUE@    $(am__mv) $$depbase.Tpo $$depbase.Po
    377 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    378 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    379 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    380 
    381 ID: $(am__tagged_files)
    382         $(am__define_uniq_tagged_files); mkid -fID $$unique
    383 tags: tags-am
    384 TAGS: tags
    385 
    386 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
    387         set x; \
    388         here=`pwd`; \
    389         $(am__define_uniq_tagged_files); \
    390         shift; \
    391         if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
    392           test -n "$$unique" || unique=$$empty_fix; \
    393           if test $$# -gt 0; then \
    394             $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    395               "$$@" $$unique; \
    396           else \
    397             $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    398               $$unique; \
    399           fi; \
    400         fi
    401 ctags: ctags-am
    402 
    403 CTAGS: ctags
    404 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
    405         $(am__define_uniq_tagged_files); \
    406         test -z "$(CTAGS_ARGS)$$unique" \
    407           || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
    408              $$unique
    409 
    410 GTAGS:
    411         here=`$(am__cd) $(top_builddir) && pwd` \
    412           && $(am__cd) $(top_srcdir) \
    413           && gtags -i $(GTAGS_ARGS) "$$here"
    414 cscopelist: cscopelist-am
    415 
    416 cscopelist-am: $(am__tagged_files)
    417         list='$(am__tagged_files)'; \
    418         case "$(srcdir)" in \
    419           [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
    420           *) sdir=$(subdir)/$(srcdir) ;; \
    421         esac; \
    422         for i in $$list; do \
    423           if test -f "$$i"; then \
    424             echo "$(subdir)/$$i"; \
    425           else \
    426             echo "$$sdir/$$i"; \
    427           fi; \
    428         done >> $(top_builddir)/cscope.files
    429 
    430 distclean-tags:
    431         -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
     290tags TAGS:
     291
     292ctags CTAGS:
     293
     294cscope cscopelist:
     295
    432296
    433297distdir: $(DISTFILES)
     
    500364
    501365distclean: distclean-am
    502         -rm -rf ./$(DEPDIR)
    503366        -rm -f Makefile
    504 distclean-am: clean-am distclean-compile distclean-generic \
    505         distclean-tags
     367distclean-am: clean-am distclean-generic
    506368
    507369dvi: dvi-am
     
    546408
    547409maintainer-clean: maintainer-clean-am
    548         -rm -rf ./$(DEPDIR)
    549410        -rm -f Makefile
    550411maintainer-clean-am: distclean-am maintainer-clean-generic
     
    552413mostlyclean: mostlyclean-am
    553414
    554 mostlyclean-am: mostlyclean-compile mostlyclean-generic
     415mostlyclean-am: mostlyclean-generic
    555416
    556417pdf: pdf-am
     
    566427.MAKE: install-am install-strip
    567428
    568 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
    569         clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
    570         distclean-compile distclean-generic distclean-tags distdir dvi \
    571         dvi-am html html-am info info-am install install-am \
    572         install-data install-data-am install-dvi install-dvi-am \
    573         install-exec install-exec-am install-html install-html-am \
    574         install-info install-info-am install-man install-pdf \
    575         install-pdf-am install-ps install-ps-am install-strip \
    576         installcheck installcheck-am installdirs maintainer-clean \
    577         maintainer-clean-generic mostlyclean mostlyclean-compile \
    578         mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
     429.PHONY: all all-am check check-am clean clean-generic \
     430        clean-noinstPROGRAMS cscopelist-am ctags-am distclean \
     431        distclean-generic distdir dvi dvi-am html html-am info info-am \
     432        install install-am install-data install-data-am install-dvi \
     433        install-dvi-am install-exec install-exec-am install-html \
     434        install-html-am install-info install-info-am install-man \
     435        install-pdf install-pdf-am install-ps install-ps-am \
     436        install-strip installcheck installcheck-am installdirs \
     437        maintainer-clean maintainer-clean-generic mostlyclean \
     438        mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
    579439        uninstall-am
    580440
     
    605465
    606466ctxswitch-cfa_coroutine$(EXEEXT):
    607         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -DN=50000000 ctxswitch/cfa_cor.c
     467        ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/cfa_cor.c
    608468
    609469ctxswitch-cfa_thread$(EXEEXT):
    610         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -DN=50000000 ctxswitch/cfa_thrd.c
     470        ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/cfa_thrd.c
    611471
    612472ctxswitch-upp_coroutine$(EXEEXT):
    613         u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -DN=50000000 ctxswitch/upp_cor.cc
     473        ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/upp_cor.cc
    614474
    615475ctxswitch-upp_thread$(EXEEXT):
    616         u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -DN=50000000 ctxswitch/upp_cor.cc
     476        ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/upp_thrd.cc
    617477
    618478ctxswitch-pthread$(EXEEXT):
    619         @BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DN=50000000 ctxswitch/pthreads.c
     479        ${AM_V_CC}@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=50000000 ctxswitch/pthreads.c
    620480
    621481creation$(EXEEXT) :\
     
    627487
    628488creation-cfa_coroutine$(EXEEXT):
    629         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -DBENCH_N=500000000 creation/cfa_cor.c
     489        ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=500000000 creation/cfa_cor.c
    630490
    631491creation-cfa_thread$(EXEEXT):
    632         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -DBENCH_N=10000000 creation/cfa_thrd.c
     492        ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=10000000 creation/cfa_thrd.c
    633493
    634494creation-upp_coroutine$(EXEEXT):
    635         u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -DBENCH_N=50000000 creation/upp_cor.cc
     495        ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 creation/upp_cor.cc
    636496
    637497creation-upp_thread$(EXEEXT):
    638         u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -DBENCH_N=50000000 creation/upp_cor.cc
     498        ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 creation/upp_thrd.cc
    639499
    640500creation-pthread$(EXEEXT):
    641         @BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=2500000 creation/pthreads.c
     501        ${AM_V_CC}@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=250000 creation/pthreads.c
    642502
    643503sched-int$(EXEEXT):
     
    647507        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c
    648508
    649 %.run : %$(EXEEXT)
     509%.run : %$(EXEEXT) ${REPEAT}
    650510        @rm -f .result.log
    651         @./catchsig
     511        @echo "------------------------------------------------------"
     512        @echo $<
    652513        @${REPEAT} ${repeats} ./a.out | tee -a .result.log
    653         @./stat.py .result.log
     514        @${STATS} .result.log
     515        @echo "------------------------------------------------------"
    654516        @rm -f a.out .result.log
     517
     518${REPEAT} :
     519        @+make -C ${TOOLSDIR} repeat
    655520
    656521# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • src/benchmark/bench.h

    r4149d9d rb7170a64  
    3333
    3434#define BENCH(statement, output)                \
    35         size_t n = BENCH_N;                                     \
    36         if( argc > 2 ) return 1;                        \
    37         if( argc == 2 ) {                                       \
    38                 n = atoi(argv[1]);                              \
    39         }                                                                       \
    40         const unsigned int NoOfTimes = n;       \
     35        size_t n = BENCH_N;                     \
     36        if( argc > 2 ) return 1;                \
     37        if( argc == 2 ) {                               \
     38                n = atoi(argv[1]);              \
     39        }                                               \
    4140        long long int StartTime, EndTime;       \
    42         StartTime = Time();                                     \
    43         statement;                                                      \
    44         EndTime = Time();                                       \
     41        StartTime = Time();                     \
     42        statement;                                      \
     43        EndTime = Time();                               \
    4544        unsigned long long int output =         \
    46         ( EndTime - StartTime ) / NoOfTimes;
     45        ( EndTime - StartTime ) / n;
    4746
    4847unsigned int default_preemption() {
  • src/benchmark/creation/cfa_cor.c

    r4149d9d rb7170a64  
    99int main(int argc, char* argv[]) {
    1010        BENCH(
    11                 for (size_t i = 0; i < NoOfTimes; i++) {
     11                for (size_t i = 0; i < n; i++) {
    1212                        MyCoroutine m;
    1313                },
  • src/benchmark/creation/cfa_thrd.c

    r4149d9d rb7170a64  
    99int main(int argc, char* argv[]) {
    1010        BENCH(
    11                 for (size_t i = 0; i < NoOfTimes; i++) {
     11                for (size_t i = 0; i < n; i++) {
    1212                        MyThread m;
    1313                },
  • src/benchmark/ctxswitch/cfa_cor.c

    r4149d9d rb7170a64  
    1 #include <fstream>
    2 #include <stdlib>
     1#include <stdio.h>
    32#include <thread>
    43
     
    1110}
    1211
    13 void main( GreatSuspender & this )
    14 {
     12void main( GreatSuspender & this ) {
    1513        while( true ) {
    1614                suspend();
    17         }
    18 }
    19 
    20 void resumer( GreatSuspender & this, const unsigned int NoOfTimes ) {
    21         for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    22                 resume( this );
    2315        }
    2416}
     
    2820
    2921        BENCH(
    30                 resumer( s, NoOfTimes );,
     22                for (size_t i = 0; i < n; i++) {
     23                        resume( s );
     24                },
    3125                result
    3226        )
    3327
    34         sout | result | endl;
     28        printf("%llu\n", result);
    3529}
  • src/benchmark/ctxswitch/cfa_thrd.c

    r4149d9d rb7170a64  
    1 #include <fstream>
    2 #include <stdlib>
     1#include <stdio.h>
    32#include <thread>
    43
    54#include "bench.h"
    65
    7 int main() {
    8         const unsigned int NoOfTimes = N;
    9         long long int StartTime, EndTime;
     6int main(int argc, char* argv[]) {
     7        BENCH(
     8                for (size_t i = 0; i < n; i++) {
     9                        yield();
     10                },
     11                result
     12        )
    1013
    11         StartTime = Time();
    12         for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    13                 yield();
    14         }
    15         EndTime = Time();
    16 
    17         sout | ( EndTime - StartTime ) / NoOfTimes | endl;
     14        printf("%llu\n", result);
    1815}
  • src/benchmark/ctxswitch/pthreads.c

    r4149d9d rb7170a64  
    66#include "bench.h"
    77
    8 int main() {
    9         const unsigned int NoOfTimes = N;
    10         long long int StartTime, EndTime;
     8int main(int argc, char* argv[]) {
     9        BENCH(
     10                for (size_t i = 0; i < n; i++) {
     11                        sched_yield();
     12                },
     13                result
     14        )
    1115
    12         StartTime = Time();
    13         for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    14                 sched_yield();
    15         }
    16         EndTime = Time();
    17 
    18         printf("%lld\n", ( EndTime - StartTime ) / NoOfTimes );
     16        printf("%llu\n", result);
    1917}
  • src/benchmark/ctxswitch/upp_cor.cc

    r4149d9d rb7170a64  
     1#include <cstdio>
     2
     3#include "bench.h"
     4
     5_Coroutine GreatSuspender {
     6public:
     7        GreatSuspender() {
     8                resume();
     9        }
     10
     11        void do_resume() {
     12                resume();
     13        }
     14private:
     15        void main() {
     16                while( true ) {
     17                        suspend();
     18                }
     19        }
     20};
     21
     22int main(int argc, char* argv[]) {
     23        GreatSuspender s;
     24
     25        BENCH(
     26                for (size_t i = 0; i < n; i++) {
     27                        s.do_resume();
     28                },
     29                result
     30        )
     31
     32        printf("%llu\n", result);
     33}
  • src/benchmark/ctxswitch/upp_thrd.cc

    r4149d9d rb7170a64  
     1#include <cstdio>
     2
     3#include "bench.h"
     4
     5int main(int argc, char* argv[]) {
     6        BENCH(
     7                for (size_t i = 0; i < n; i++) {
     8                        uThisTask().yield();
     9                },
     10                result
     11        )
     12
     13        printf("%llu\n", result);
     14}
  • tools/Makefile.in

    r4149d9d rb7170a64  
    9292build_triplet = @build@
    9393host_triplet = @host@
    94 noinst_PROGRAMS = repeat$(EXEEXT)
     94noinst_PROGRAMS = catchsig$(EXEEXT) repeat$(EXEEXT)
    9595subdir = tools
    9696ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    104104CONFIG_CLEAN_VPATH_FILES =
    105105PROGRAMS = $(noinst_PROGRAMS)
     106am_catchsig_OBJECTS = catchsig.$(OBJEXT)
     107catchsig_OBJECTS = $(am_catchsig_OBJECTS)
     108catchsig_LDADD = $(LDADD)
    106109am_repeat_OBJECTS = repeat.$(OBJEXT)
    107110repeat_OBJECTS = $(am_repeat_OBJECTS)
     
    135138am__v_CCLD_0 = @echo "  CCLD    " $@;
    136139am__v_CCLD_1 =
    137 SOURCES = $(repeat_SOURCES)
    138 DIST_SOURCES = $(repeat_SOURCES)
     140SOURCES = $(catchsig_SOURCES) $(repeat_SOURCES)
     141DIST_SOURCES = $(catchsig_SOURCES) $(repeat_SOURCES)
    139142am__can_run_installinfo = \
    140143  case $$AM_UPDATE_INFO_DIR in \
     
    283286top_builddir = @top_builddir@
    284287top_srcdir = @top_srcdir@
     288catchsig_SOURCES = catchsig.c
    285289repeat_SOURCES = repeat.c
    286290all: all-am
     
    321325        -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
    322326
     327catchsig$(EXEEXT): $(catchsig_OBJECTS) $(catchsig_DEPENDENCIES) $(EXTRA_catchsig_DEPENDENCIES)
     328        @rm -f catchsig$(EXEEXT)
     329        $(AM_V_CCLD)$(LINK) $(catchsig_OBJECTS) $(catchsig_LDADD) $(LIBS)
     330
    323331repeat$(EXEEXT): $(repeat_OBJECTS) $(repeat_DEPENDENCIES) $(EXTRA_repeat_DEPENDENCIES)
    324332        @rm -f repeat$(EXEEXT)
     
    331339        -rm -f *.tab.c
    332340
     341@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/catchsig.Po@am__quote@
    333342@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repeat.Po@am__quote@
    334343
Note: See TracChangeset for help on using the changeset viewer.