Changes in / [6395817:15e4e22]


Ignore:
Files:
10 added
16 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r6395817 r15e4e22  
    5252tools/prettyprinter/pretty
    5353tools/pretty
    54 tools/catchsig
    55 tools/repeat
    5654
    5755# generated by xfig for user manual
  • configure

    r6395817 r15e4e22  
    62816281
    62826282
    6283 ac_config_files="$ac_config_files Makefile src/driver/Makefile src/Makefile src/benchmark/Makefile src/examples/Makefile src/tests/Makefile src/tests/preempt_longrun/Makefile src/prelude/Makefile src/libcfa/Makefile tools/Makefile tools/prettyprinter/Makefile"
     6283ac_config_files="$ac_config_files Makefile src/driver/Makefile src/Makefile src/benchmark/Makefile src/examples/Makefile src/tests/Makefile src/tests/preempt_longrun/Makefile src/prelude/Makefile src/libcfa/Makefile tools/prettyprinter/Makefile"
    62846284
    62856285
     
    70487048    "src/prelude/Makefile") CONFIG_FILES="$CONFIG_FILES src/prelude/Makefile" ;;
    70497049    "src/libcfa/Makefile") CONFIG_FILES="$CONFIG_FILES src/libcfa/Makefile" ;;
    7050     "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
    70517050    "tools/prettyprinter/Makefile") CONFIG_FILES="$CONFIG_FILES tools/prettyprinter/Makefile" ;;
    70527051
  • configure.ac

    r6395817 r15e4e22  
    238238        src/prelude/Makefile
    239239        src/libcfa/Makefile
    240         tools/Makefile
    241240        tools/prettyprinter/Makefile
    242241        ])
  • src/benchmark/Makefile.am

    r6395817 r15e4e22  
    1919AM_CFLAGS = -g -Wall -Wno-unused-function -O2
    2020CC = @CFA_BINDIR@/@CFA_NAME@
    21 TOOLSDIR = ${abs_top_srcdir}/tools/
    22 REPEAT   = ${TOOLSDIR}repeat
    23 STATS    = ${TOOLSDIR}stat.py
    24 repeats  = 30
    2521
    26 .NOTPARALLEL:
    27 
    28 noinst_PROGRAMS =
     22noinst_PROGRAMS = bench$(EXEEXT) ctxswitch-coroutine$(EXEEXT) ctxswitch-thread$(EXEEXT) sched-int$(EXEEXT) monitor$(EXEEXT) csv-data$(EXEEXT)
    2923
    3024bench$(EXEEXT) :
     
    3630        rm -f ./a.out ;
    3731
     32ctxswitch-coroutine$(EXEEXT):
     33        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 CorCtxSwitch.c
     34        @rm -f .result.log
     35        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     36                ./a.out | tee -a .result.log ; \
     37        done
     38        @./stat.py .result.log
     39        @rm -f a.out .result.log
     40
     41ctxswitch-thread$(EXEEXT):
     42        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 ThrdCtxSwitch.c
     43        @rm -f .result.log
     44        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     45                ./a.out | tee -a .result.log ; \
     46        done
     47        @./stat.py .result.log
     48        @rm -f a.out .result.log
     49
     50ctxswitch-pthread$(EXEEXT):
     51        @BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -lrt -pthread -DN=50000000 PthrdCtxSwitch.c
     52        @rm -f .result.log
     53        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     54                ./a.out | tee -a .result.log ; \
     55        done
     56        @./stat.py .result.log
     57        @rm -f a.out .result.log
     58
     59sched-int$(EXEEXT):
     60        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
     61        @rm -f .result.log
     62        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     63                ./a.out | tee -a .result.log ; \
     64        done
     65        @./stat.py .result.log
     66        @rm -f a.out .result.log
     67
     68monitor$(EXEEXT):
     69        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c
     70        @rm -f .result.log
     71        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     72                ./a.out | tee -a .result.log ; \
     73        done
     74        @./stat.py .result.log
     75        @rm -f a.out .result.log
     76
    3877csv-data$(EXEEXT):
    3978        @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=50000000 csv-data.c
    4079        @./a.out
    4180        @rm -f ./a.out
    42 
    43 ## =========================================================================================================
    44 ctxswitch$(EXEEXT): \
    45         ctxswitch-pthread.run           \
    46         ctxswitch-cfa_coroutine.run     \
    47         ctxswitch-cfa_thread.run        \
    48         ctxswitch-upp_coroutine.run     \
    49         ctxswitch-upp_thread.run
    50 
    51 ctxswitch-cfa_coroutine$(EXEEXT):
    52         ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/cfa_cor.c
    53 
    54 ctxswitch-cfa_thread$(EXEEXT):
    55         ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/cfa_thrd.c
    56 
    57 ctxswitch-upp_coroutine$(EXEEXT):
    58         ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/upp_cor.cc
    59 
    60 ctxswitch-upp_thread$(EXEEXT):
    61         ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/upp_thrd.cc
    62 
    63 ctxswitch-pthread$(EXEEXT):
    64         ${AM_V_CC}@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=50000000 ctxswitch/pthreads.c
    65 
    66 ## =========================================================================================================
    67 creation$(EXEEXT) :\
    68         creation-pthread.run            \
    69         creation-cfa_coroutine.run      \
    70         creation-cfa_thread.run         \
    71         creation-upp_coroutine.run      \
    72         creation-upp_thread.run
    73 
    74 creation-cfa_coroutine$(EXEEXT):
    75         ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=500000000 creation/cfa_cor.c
    76 
    77 creation-cfa_thread$(EXEEXT):
    78         ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=10000000 creation/cfa_thrd.c
    79 
    80 creation-upp_coroutine$(EXEEXT):
    81         ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 creation/upp_cor.cc
    82 
    83 creation-upp_thread$(EXEEXT):
    84         ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 creation/upp_thrd.cc
    85 
    86 creation-pthread$(EXEEXT):
    87         ${AM_V_CC}@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=250000 creation/pthreads.c
    88 
    89 ## =========================================================================================================
    90 sched-int$(EXEEXT):
    91         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
    92 
    93 monitor$(EXEEXT):
    94         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c
    95 
    96 %.run : %$(EXEEXT) ${REPEAT}
    97         @rm -f .result.log
    98         @echo "------------------------------------------------------"
    99         @echo $<
    100         @${REPEAT} ${repeats} ./a.out | tee -a .result.log
    101         @${STATS} .result.log
    102         @echo "------------------------------------------------------"
    103         @rm -f a.out .result.log
    104 
    105 ${REPEAT} :
    106         @+make -C ${TOOLSDIR} repeat
  • src/benchmark/Makefile.in

    r6395817 r15e4e22  
    9292build_triplet = @build@
    9393host_triplet = @host@
    94 noinst_PROGRAMS =
    9594subdir = src/benchmark
    9695ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    104103CONFIG_CLEAN_VPATH_FILES =
    105104PROGRAMS = $(noinst_PROGRAMS)
     105bench_SOURCES = bench.c
     106bench_OBJECTS = bench.$(OBJEXT)
     107bench_LDADD = $(LDADD)
     108csv_data_SOURCES = csv-data.c
     109csv_data_OBJECTS = csv-data.$(OBJEXT)
     110csv_data_LDADD = $(LDADD)
     111ctxswitch_coroutine_SOURCES = ctxswitch-coroutine.c
     112ctxswitch_coroutine_OBJECTS = ctxswitch-coroutine.$(OBJEXT)
     113ctxswitch_coroutine_LDADD = $(LDADD)
     114ctxswitch_thread_SOURCES = ctxswitch-thread.c
     115ctxswitch_thread_OBJECTS = ctxswitch-thread.$(OBJEXT)
     116ctxswitch_thread_LDADD = $(LDADD)
     117monitor_SOURCES = monitor.c
     118monitor_OBJECTS = monitor.$(OBJEXT)
     119monitor_LDADD = $(LDADD)
     120sched_int_SOURCES = sched-int.c
     121sched_int_OBJECTS = sched-int.$(OBJEXT)
     122sched_int_LDADD = $(LDADD)
    106123AM_V_P = $(am__v_P_@AM_V@)
    107124am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
     
    116133am__v_at_0 = @
    117134am__v_at_1 =
    118 SOURCES =
    119 DIST_SOURCES =
     135DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
     136depcomp = $(SHELL) $(top_srcdir)/automake/depcomp
     137am__depfiles_maybe = depfiles
     138am__mv = mv -f
     139COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
     140        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
     141AM_V_CC = $(am__v_CC_@AM_V@)
     142am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
     143am__v_CC_0 = @echo "  CC      " $@;
     144am__v_CC_1 =
     145CCLD = $(CC)
     146LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
     147AM_V_CCLD = $(am__v_CCLD_@AM_V@)
     148am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
     149am__v_CCLD_0 = @echo "  CCLD    " $@;
     150am__v_CCLD_1 =
     151SOURCES = bench.c csv-data.c ctxswitch-coroutine.c ctxswitch-thread.c \
     152        monitor.c sched-int.c
     153DIST_SOURCES = bench.c csv-data.c ctxswitch-coroutine.c \
     154        ctxswitch-thread.c monitor.c sched-int.c
    120155am__can_run_installinfo = \
    121156  case $$AM_UPDATE_INFO_DIR in \
     
    124159  esac
    125160am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
    126 am__DIST_COMMON = $(srcdir)/Makefile.in
     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.
     164am__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.
     172am__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)`
     177ETAGS = etags
     178CTAGS = ctags
     179am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/automake/depcomp
    127180DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    128181ACLOCAL = @ACLOCAL@
     
    249302top_srcdir = @top_srcdir@
    250303AM_CFLAGS = -g -Wall -Wno-unused-function -O2
    251 TOOLSDIR = ${abs_top_srcdir}/tools/
    252 REPEAT = ${TOOLSDIR}repeat
    253 STATS = ${TOOLSDIR}stat.py
    254 repeats = 30
     304noinst_PROGRAMS = bench$(EXEEXT) ctxswitch-coroutine$(EXEEXT) ctxswitch-thread$(EXEEXT) sched-int$(EXEEXT) monitor$(EXEEXT) csv-data$(EXEEXT)
    255305all: all-am
    256306
    257307.SUFFIXES:
     308.SUFFIXES: .c .o .obj
    258309$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
    259310        @for dep in $?; do \
     
    288339clean-noinstPROGRAMS:
    289340        -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
    290 tags TAGS:
    291 
    292 ctags CTAGS:
    293 
    294 cscope cscopelist:
    295 
     341
     342mostlyclean-compile:
     343        -rm -f *.$(OBJEXT)
     344
     345distclean-compile:
     346        -rm -f *.tab.c
     347
     348@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench.Po@am__quote@
     349@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csv-data.Po@am__quote@
     350@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctxswitch-coroutine.Po@am__quote@
     351@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctxswitch-thread.Po@am__quote@
     352@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor.Po@am__quote@
     353@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched-int.Po@am__quote@
     354
     355.c.o:
     356@am__fastdepCC_TRUE@    $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
     357@am__fastdepCC_TRUE@    $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
     358@am__fastdepCC_TRUE@    $(am__mv) $$depbase.Tpo $$depbase.Po
     359@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     360@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     361@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
     362
     363.c.obj:
     364@am__fastdepCC_TRUE@    $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
     365@am__fastdepCC_TRUE@    $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
     366@am__fastdepCC_TRUE@    $(am__mv) $$depbase.Tpo $$depbase.Po
     367@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     368@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     369@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
     370
     371ID: $(am__tagged_files)
     372        $(am__define_uniq_tagged_files); mkid -fID $$unique
     373tags: tags-am
     374TAGS: tags
     375
     376tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
     377        set x; \
     378        here=`pwd`; \
     379        $(am__define_uniq_tagged_files); \
     380        shift; \
     381        if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
     382          test -n "$$unique" || unique=$$empty_fix; \
     383          if test $$# -gt 0; then \
     384            $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     385              "$$@" $$unique; \
     386          else \
     387            $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     388              $$unique; \
     389          fi; \
     390        fi
     391ctags: ctags-am
     392
     393CTAGS: ctags
     394ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
     395        $(am__define_uniq_tagged_files); \
     396        test -z "$(CTAGS_ARGS)$$unique" \
     397          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
     398             $$unique
     399
     400GTAGS:
     401        here=`$(am__cd) $(top_builddir) && pwd` \
     402          && $(am__cd) $(top_srcdir) \
     403          && gtags -i $(GTAGS_ARGS) "$$here"
     404cscopelist: cscopelist-am
     405
     406cscopelist-am: $(am__tagged_files)
     407        list='$(am__tagged_files)'; \
     408        case "$(srcdir)" in \
     409          [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
     410          *) sdir=$(subdir)/$(srcdir) ;; \
     411        esac; \
     412        for i in $$list; do \
     413          if test -f "$$i"; then \
     414            echo "$(subdir)/$$i"; \
     415          else \
     416            echo "$$sdir/$$i"; \
     417          fi; \
     418        done >> $(top_builddir)/cscope.files
     419
     420distclean-tags:
     421        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
    296422
    297423distdir: $(DISTFILES)
     
    364490
    365491distclean: distclean-am
     492        -rm -rf ./$(DEPDIR)
    366493        -rm -f Makefile
    367 distclean-am: clean-am distclean-generic
     494distclean-am: clean-am distclean-compile distclean-generic \
     495        distclean-tags
    368496
    369497dvi: dvi-am
     
    408536
    409537maintainer-clean: maintainer-clean-am
     538        -rm -rf ./$(DEPDIR)
    410539        -rm -f Makefile
    411540maintainer-clean-am: distclean-am maintainer-clean-generic
     
    413542mostlyclean: mostlyclean-am
    414543
    415 mostlyclean-am: mostlyclean-generic
     544mostlyclean-am: mostlyclean-compile mostlyclean-generic
    416545
    417546pdf: pdf-am
     
    427556.MAKE: install-am install-strip
    428557
    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 \
     558.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
     559        clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
     560        distclean-compile distclean-generic distclean-tags distdir dvi \
     561        dvi-am html html-am info info-am install install-am \
     562        install-data install-data-am install-dvi install-dvi-am \
     563        install-exec install-exec-am install-html install-html-am \
     564        install-info install-info-am install-man install-pdf \
     565        install-pdf-am install-ps install-ps-am install-strip \
     566        installcheck installcheck-am installdirs maintainer-clean \
     567        maintainer-clean-generic mostlyclean mostlyclean-compile \
     568        mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
    439569        uninstall-am
    440570
    441571.PRECIOUS: Makefile
    442572
    443 
    444 .NOTPARALLEL:
    445573
    446574bench$(EXEEXT) :
     
    452580        rm -f ./a.out ;
    453581
     582ctxswitch-coroutine$(EXEEXT):
     583        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 CorCtxSwitch.c
     584        @rm -f .result.log
     585        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     586                ./a.out | tee -a .result.log ; \
     587        done
     588        @./stat.py .result.log
     589        @rm -f a.out .result.log
     590
     591ctxswitch-thread$(EXEEXT):
     592        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 ThrdCtxSwitch.c
     593        @rm -f .result.log
     594        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     595                ./a.out | tee -a .result.log ; \
     596        done
     597        @./stat.py .result.log
     598        @rm -f a.out .result.log
     599
     600ctxswitch-pthread$(EXEEXT):
     601        @BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -lrt -pthread -DN=50000000 PthrdCtxSwitch.c
     602        @rm -f .result.log
     603        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     604                ./a.out | tee -a .result.log ; \
     605        done
     606        @./stat.py .result.log
     607        @rm -f a.out .result.log
     608
     609sched-int$(EXEEXT):
     610        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
     611        @rm -f .result.log
     612        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     613                ./a.out | tee -a .result.log ; \
     614        done
     615        @./stat.py .result.log
     616        @rm -f a.out .result.log
     617
     618monitor$(EXEEXT):
     619        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c
     620        @rm -f .result.log
     621        @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
     622                ./a.out | tee -a .result.log ; \
     623        done
     624        @./stat.py .result.log
     625        @rm -f a.out .result.log
     626
    454627csv-data$(EXEEXT):
    455628        @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=50000000 csv-data.c
     
    457630        @rm -f ./a.out
    458631
    459 ctxswitch$(EXEEXT): \
    460         ctxswitch-cfa_coroutine.run     \
    461         ctxswitch-cfa_thread.run        \
    462         ctxswitch-upp_coroutine.run     \
    463         ctxswitch-upp_thread.run        \
    464         ctxswitch-pthread.run
    465 
    466 ctxswitch-cfa_coroutine$(EXEEXT):
    467         ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/cfa_cor.c
    468 
    469 ctxswitch-cfa_thread$(EXEEXT):
    470         ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/cfa_thrd.c
    471 
    472 ctxswitch-upp_coroutine$(EXEEXT):
    473         ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/upp_cor.cc
    474 
    475 ctxswitch-upp_thread$(EXEEXT):
    476         ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 ctxswitch/upp_thrd.cc
    477 
    478 ctxswitch-pthread$(EXEEXT):
    479         ${AM_V_CC}@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=50000000 ctxswitch/pthreads.c
    480 
    481 creation$(EXEEXT) :\
    482         creation-pthread.run            \
    483         creation-cfa_coroutine.run      \
    484         creation-cfa_thread.run         \
    485         creation-upp_coroutine.run      \
    486         creation-upp_thread.run
    487 
    488 creation-cfa_coroutine$(EXEEXT):
    489         ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=500000000 creation/cfa_cor.c
    490 
    491 creation-cfa_thread$(EXEEXT):
    492         ${AM_V_CC}${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet -DBENCH_N=10000000 creation/cfa_thrd.c
    493 
    494 creation-upp_coroutine$(EXEEXT):
    495         ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 creation/upp_cor.cc
    496 
    497 creation-upp_thread$(EXEEXT):
    498         ${AM_V_CC}u++ ${AM_CFLAGS} ${CFLAGS} ${ccflags} ${ccflags} -I. -nodebug -lrt -quiet -DBENCH_N=50000000 creation/upp_thrd.cc
    499 
    500 creation-pthread$(EXEEXT):
    501         ${AM_V_CC}@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread -DBENCH_N=250000 creation/pthreads.c
    502 
    503 sched-int$(EXEEXT):
    504         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
    505 
    506 monitor$(EXEEXT):
    507         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c
    508 
    509 %.run : %$(EXEEXT) ${REPEAT}
    510         @rm -f .result.log
    511         @echo "------------------------------------------------------"
    512         @echo $<
    513         @${REPEAT} ${repeats} ./a.out | tee -a .result.log
    514         @${STATS} .result.log
    515         @echo "------------------------------------------------------"
    516         @rm -f a.out .result.log
    517 
    518 ${REPEAT} :
    519         @+make -C ${TOOLSDIR} repeat
    520 
    521632# Tell versions [3.59,3.63) of GNU make to not export all variables.
    522633# Otherwise a system limit (for SysV at least) may be exceeded.
  • src/benchmark/bench.h

    r6395817 r15e4e22  
    11#pragma once
    22
    3 #if defined(__CFORALL__)
     3#ifdef __CFORALL__
    44extern "C" {
    55#endif
    6         #include <stdlib.h>
    76        #include <unistd.h>                                     // sysconf
    87        #include <sys/times.h>                                  // times
    98        #include <time.h>
    10 #if defined(__CFORALL__)
     9#ifdef __CFORALL__
    1110}
    1211#endif
     
    2827} // Time
    2928
    30 #ifndef BENCH_N
    31 #define BENCH_N 500 //10000000
     29#ifndef N
     30#define N 10000000
    3231#endif
    33 
    34 #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         long long int StartTime, EndTime;       \
    41         StartTime = Time();                     \
    42         statement;                                      \
    43         EndTime = Time();                               \
    44         unsigned long long int output =         \
    45         ( EndTime - StartTime ) / n;
    4632
    4733unsigned int default_preemption() {
Note: See TracChangeset for help on using the changeset viewer.