Changeset b067d9b for longrun_tests


Ignore:
Timestamp:
Oct 29, 2019, 4:01:24 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
773db65, 9421f3d8
Parents:
7951100 (diff), 8364209 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
longrun_tests
Files:
8 added
6 moved

Legend:

Unmodified
Added
Removed
  • longrun_tests/Makefile.in

    r7951100 rb067d9b  
    9191build_triplet = @build@
    9292host_triplet = @host@
    93 subdir = src/tests/preempt_longrun
     93subdir = longrun_tests
    9494ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    95 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     95am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \
     96        $(top_srcdir)/automake/ltoptions.m4 \
     97        $(top_srcdir)/automake/ltsugar.m4 \
     98        $(top_srcdir)/automake/ltversion.m4 \
     99        $(top_srcdir)/automake/lt~obsolete.m4 \
     100        $(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac
    96101am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
    97102        $(ACLOCAL_M4)
     
    326331        $(TEST_LOG_FLAGS)
    327332am__DIST_COMMON = $(srcdir)/Makefile.in \
    328         $(top_srcdir)/automake/test-driver
     333        $(top_srcdir)/automake/test-driver $(top_srcdir)/src/cfa.make
    329334DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    330335ACLOCAL = @ACLOCAL@
    331 ALLOCA = @ALLOCA@
    332336AMTAR = @AMTAR@
    333337AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
     338AR = @AR@
    334339AUTOCONF = @AUTOCONF@
    335340AUTOHEADER = @AUTOHEADER@
    336341AUTOMAKE = @AUTOMAKE@
    337342AWK = @AWK@
    338 BACKEND_CC = @BACKEND_CC@
    339 CC = @CFA_BINDIR@/@CFA_NAME@
     343BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
     344CC = @CC@
    340345CCAS = @CCAS@
    341346CCASDEPMODE = @CCASDEPMODE@
    342347CCASFLAGS = @CCASFLAGS@
    343348CCDEPMODE = @CCDEPMODE@
     349CFACC = @CFACC@
     350CFACC_INSTALL = @CFACC_INSTALL@
     351CFACPP = @CFACPP@
    344352CFA_BACKEND_CC = @CFA_BACKEND_CC@
    345353CFA_BINDIR = @CFA_BINDIR@
     
    349357CFA_NAME = @CFA_NAME@
    350358CFA_PREFIX = @CFA_PREFIX@
    351 CFLAGS = ${BUILD_FLAGS}
     359CFLAGS = @CFLAGS@
    352360CPP = @CPP@
    353361CPPFLAGS = @CPPFLAGS@
    354362CXX = @CXX@
     363CXXCPP = @CXXCPP@
    355364CXXDEPMODE = @CXXDEPMODE@
    356365CXXFLAGS = @CXXFLAGS@
    357366CYGPATH_W = @CYGPATH_W@
    358367DEFS = @DEFS@
     368DEMANGLER = @DEMANGLER@
    359369DEPDIR = @DEPDIR@
     370DLLTOOL = @DLLTOOL@
     371DRIVER_DIR = @DRIVER_DIR@
     372DSYMUTIL = @DSYMUTIL@
     373DUMPBIN = @DUMPBIN@
    360374ECHO_C = @ECHO_C@
    361375ECHO_N = @ECHO_N@
     
    363377EGREP = @EGREP@
    364378EXEEXT = @EXEEXT@
     379FGREP = @FGREP@
    365380GREP = @GREP@
     381HAS_DISTCC = @HAS_DISTCC@
     382HOST_FLAGS = @HOST_FLAGS@
    366383INSTALL = @INSTALL@
    367384INSTALL_DATA = @INSTALL_DATA@
     
    369386INSTALL_SCRIPT = @INSTALL_SCRIPT@
    370387INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
     388LD = @LD@
    371389LDFLAGS = @LDFLAGS@
    372390LEX = @LEX@
    373391LEXLIB = @LEXLIB@
    374392LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
     393LIBCFA_TARGET_DIRS = @LIBCFA_TARGET_DIRS@
     394LIBCFA_TARGET_MAKEFILES = @LIBCFA_TARGET_MAKEFILES@
     395LIBDEMANGLE = @LIBDEMANGLE@
    375396LIBOBJS = @LIBOBJS@
    376397LIBS = @LIBS@
     398LIBTOOL = @LIBTOOL@
     399LIPO = @LIPO@
     400LN_S = @LN_S@
    377401LTLIBOBJS = @LTLIBOBJS@
    378 MACHINE_TYPE = @MACHINE_TYPE@
    379 MAINT = @MAINT@
     402LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
    380403MAKEINFO = @MAKEINFO@
     404MANIFEST_TOOL = @MANIFEST_TOOL@
    381405MKDIR_P = @MKDIR_P@
     406NM = @NM@
     407NMEDIT = @NMEDIT@
     408OBJDUMP = @OBJDUMP@
    382409OBJEXT = @OBJEXT@
     410OTOOL = @OTOOL@
     411OTOOL64 = @OTOOL64@
    383412PACKAGE = @PACKAGE@
    384413PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
     
    390419PATH_SEPARATOR = @PATH_SEPARATOR@
    391420RANLIB = @RANLIB@
     421SED = @SED@
    392422SET_MAKE = @SET_MAKE@
    393423SHELL = @SHELL@
    394424STRIP = @STRIP@
     425TARGET_HOSTS = @TARGET_HOSTS@
    395426VERSION = @VERSION@
    396427YACC = @YACC@
     
    400431abs_top_builddir = @abs_top_builddir@
    401432abs_top_srcdir = @abs_top_srcdir@
     433ac_ct_AR = @ac_ct_AR@
    402434ac_ct_CC = @ac_ct_CC@
    403435ac_ct_CXX = @ac_ct_CXX@
     436ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
    404437am__include = @am__include@
    405438am__leading_dot = @am__leading_dot@
     
    448481top_builddir = @top_builddir@
    449482top_srcdir = @top_srcdir@
     483AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
     484ACLOCAL_AMFLAGS = -I automake
     485CFACOMPILE = $(CFACC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) $(AM_CFLAGS) $(CFLAGS)
     486LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
     487        $(LIBTOOLFLAGS) --mode=compile $(CFACC) $(DEFS) \
     488        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) \
     489        $(AM_CFLAGS) $(CFLAGS)
     490
     491AM_V_CFA = $(am__v_CFA_@AM_V@)
     492am__v_CFA_ = $(am__v_CFA_@AM_DEFAULT_V@)
     493am__v_CFA_0 = @echo "  CFA     " $@;
     494am__v_CFA_1 =
     495AM_V_JAVAC = $(am__v_JAVAC_@AM_V@)
     496am__v_JAVAC_ = $(am__v_JAVAC_@AM_DEFAULT_V@)
     497am__v_JAVAC_0 = @echo "  JAVAC   " $@;
     498am__v_JAVAC_1 =
     499AM_V_GOC = $(am__v_GOC_@AM_V@)
     500am__v_GOC_ = $(am__v_GOC_@AM_DEFAULT_V@)
     501am__v_GOC_0 = @echo "  GOC     " $@;
     502am__v_GOC_1 =
     503UPPCC = u++
     504UPPCOMPILE = $(UPPCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_UPPFLAGS) $(UPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $(CFLAGS)
     505AM_V_UPP = $(am__v_UPP_@AM_V@)
     506am__v_UPP_ = $(am__v_UPP_@AM_DEFAULT_V@)
     507am__v_UPP_0 = @echo "  UPP     " $@;
     508am__v_UPP_1 =
    450509repeats = 10
    451510max_time = 600
    452511preempt = 10ul\`ms
    453512debug = -debug
    454 REPEAT = ${abs_top_srcdir}/tools/repeat
     513type = LONG
     514REPEAT = $(abs_top_builddir)/tools/repeat
     515WATCHDOG = $(abs_top_builddir)/tools/watchdog
    455516TIME = /usr/bin/time -f "%E"
    456 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -DLONG_TEST
     517UPDATED_TYPE = $(shell $(srcdir)/update-type $(type))
     518BUILD_FLAGS =
     519AM_CFAFLAGS = \
     520        -g \
     521        -Wall \
     522        -Wno-unused-function \
     523        -quiet \
     524        -O2 \
     525        -DPREEMPTION_RATE=$(preempt) \
     526        -I$(abs_top_srcdir)/tests \
     527        -I$(srcdir) \
     528        -DTEST_$(shell cat .type | tr a-z A-Z)
     529
    457530TESTS = block coroutine create disjoint enter enter3 processor stack wait yield
    458531all: all-am
    459532
    460533.SUFFIXES:
    461 .SUFFIXES: .log .test .test$(EXEEXT) .trs
    462 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
     534.SUFFIXES: .cfa .lo .log .o .test .test$(EXEEXT) .trs
     535$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/src/cfa.make $(am__configure_deps)
    463536        @for dep in $?; do \
    464537          case '$(am__configure_deps)' in \
     
    469542          esac; \
    470543        done; \
    471         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tests/preempt_longrun/Makefile'; \
     544        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign longrun_tests/Makefile'; \
    472545        $(am__cd) $(top_srcdir) && \
    473           $(AUTOMAKE) --foreign src/tests/preempt_longrun/Makefile
     546          $(AUTOMAKE) --foreign longrun_tests/Makefile
    474547Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
    475548        @case '$?' in \
     
    480553            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
    481554        esac;
     555$(top_srcdir)/src/cfa.make $(am__empty):
    482556
    483557$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
    484558        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
    485559
    486 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
     560$(top_srcdir)/configure: $(am__configure_deps)
    487561        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
    488 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
     562$(ACLOCAL_M4): $(am__aclocal_m4_deps)
    489563        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
    490564$(am__aclocal_m4_deps):
     565
     566mostlyclean-libtool:
     567        -rm -f *.lo
     568
     569clean-libtool:
     570        -rm -rf .libs _libs
    491571tags TAGS:
    492572
     
    792872clean: clean-am
    793873
    794 clean-am: clean-generic clean-local mostlyclean-am
     874clean-am: clean-generic clean-libtool clean-local mostlyclean-am
    795875
    796876distclean: distclean-am
     
    844924mostlyclean: mostlyclean-am
    845925
    846 mostlyclean-am: mostlyclean-generic
     926mostlyclean-am: mostlyclean-generic mostlyclean-libtool
    847927
    848928pdf: pdf-am
     
    859939
    860940.PHONY: all all-am all-local check check-TESTS check-am clean \
    861         clean-generic clean-local cscopelist-am ctags-am distclean \
    862         distclean-generic distdir dvi dvi-am html html-am info info-am \
    863         install install-am install-data install-data-am install-dvi \
    864         install-dvi-am install-exec install-exec-am install-html \
    865         install-html-am install-info install-info-am install-man \
    866         install-pdf install-pdf-am install-ps install-ps-am \
    867         install-strip installcheck installcheck-am installdirs \
    868         maintainer-clean maintainer-clean-generic mostlyclean \
    869         mostlyclean-generic pdf pdf-am ps ps-am recheck tags-am \
     941        clean-generic clean-libtool clean-local cscopelist-am ctags-am \
     942        distclean distclean-generic distclean-libtool distdir dvi \
     943        dvi-am html html-am info info-am install install-am \
     944        install-data install-data-am install-dvi install-dvi-am \
     945        install-exec install-exec-am install-html install-html-am \
     946        install-info install-info-am install-man install-pdf \
     947        install-pdf-am install-ps install-ps-am install-strip \
     948        installcheck installcheck-am installdirs maintainer-clean \
     949        maintainer-clean-generic mostlyclean mostlyclean-generic \
     950        mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \
    870951        uninstall uninstall-am
    871952
     
    873954
    874955
    875 .INTERMEDIATE: ${TESTS}
    876 
    877 all-local: ${TESTS:=.run}
     956.cfa.o:
     957        $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
     958        $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
     959        $(am__mv) $$depbase.Tpo $$depbase.Po
     960
     961.cfa.lo:
     962        $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
     963        $(LTCFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
     964        $(am__mv) $$depbase.Tpo $$depbase.Plo
     965
     966# .INTERMEDIATE: $(TESTS)
     967
     968all-local: $(TESTS:=.run)
     969
     970runall : $(TESTS:=.run)
     971        @ echo "All programs terminated normally"
     972
     973watchall : $(TESTS:=.watch)
     974        @ echo "All programs terminated normally"
     975
     976compileall : $(TESTS)
     977        @ echo "Compiled"
    878978
    879979clean-local:
    880         rm -f ${TESTS}
    881 
    882 % : %.c ${CC}
    883         ${AM_V_GEN}${CC} ${CFLAGS} ${<} $(debug) -o ${@}
    884 
    885 %.run : % ${REPEAT}
    886         @ time ${REPEAT} -r out.log -i -s $(repeats) timeout ${max_time} ./${<}
    887         @ rm ${<}
    888         @ echo -e "${<}: SUCCESS\n"
    889 
    890 %.time : % ${REPEAT}
    891         @ ${REPEAT} -i -s -- $(repeats) $(TIME) -a -o times.log ./${<}
    892         @ rm ${<}
    893         @ echo -e "${<}: SUCCESS\n"
    894 
    895 ${REPEAT}:
    896         @+make -C ${abs_top_srcdir}/tools/
     980        rm -f $(TESTS) core* out.log .type
     981
     982% : %.cfa $(CFACC) $(UPDATED_TYPE)
     983        $(AM_V_CFA)$(CFACOMPILE) $(<) $(debug) -o $(@)
     984
     985%.run : % $(REPEAT)
     986        @ time $(REPEAT) -r out.log -i -s $(repeats) timeout $(max_time) ./$(<)
     987        @ rm $(<)
     988        @ echo -e "$(<): SUCCESS\n"
     989
     990%.watch : % $(WATCHDOG)
     991        @ time $(WATCHDOG} ./$(<)
     992        @ rm $(<)
     993        @ echo -e "$(<): SUCCESS\n"
     994
     995%.time : % $(REPEAT)
     996        @ $(REPEAT) -i -s -- $(repeats) $(TIME) -a -o times.log ./$(<)
     997        @ rm $(<)
     998        @ echo -e "$(<): SUCCESS\n"
     999
     1000$(REPEAT): $(abs_top_builddir)/tools/Makefile
     1001        @+make -C $(abs_top_builddir)/tools/
     1002
     1003$(WATCHDOG): $(abs_top_builddir)/tools/Makefile
     1004        @+make -C $(abs_top_builddir)/tools/
    8971005
    8981006# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • longrun_tests/create.cfa

    r7951100 rb067d9b  
    1 #include <kernel>
    2 #include <thread>
    3 #include <time>
     1#include <kernel.hfa>
     2#include <thread.hfa>
     3#include <time.hfa>
     4
     5#include "long_tests.hfa"
    46
    57#ifndef PREEMPTION_RATE
     
    1921int main(int argc, char* argv[]) {
    2022        processor p;
    21         for(int i = 0; i < N; i++) {
     23        for(int i = 0; TEST(i < N); i++) {
    2224                worker_t w[7];
     25                KICK_WATCHDOG;
    2326        }
    2427}
  • longrun_tests/enter.cfa

    r7951100 rb067d9b  
    1 #include <kernel>
    2 #include <monitor>
    3 #include <thread>
    4 #include <time>
     1#include <kernel.hfa>
     2#include <monitor.hfa>
     3#include <thread.hfa>
     4#include <time.hfa>
     5
     6#define __kick_rate 75000ul
     7#include "long_tests.hfa"
    58
    69#ifndef PREEMPTION_RATE
     
    1518
    1619monitor mon_t {};
     20void foo( mon_t & mutex this ) {
     21        KICK_WATCHDOG;
     22}
    1723
    1824mon_t mon;
    19 
    20 void foo( mon_t & mutex this ) {}
    21 
    2225thread worker_t {};
    23 
    2426void main( worker_t & this ) {
    25         for( unsigned long i = 0; i < N; i++ ) {
     27        for( unsigned long i = 0; TEST(i < N); i++ ) {
    2628                foo( mon );
    2729        }
    28 }
    29 
    30 extern "C" {
    31 static worker_t * workers;
    3230}
    3331
     
    3634        {
    3735                worker_t w[7];
    38                 workers = w;
    3936        }
    4037}
  • longrun_tests/enter3.cfa

    r7951100 rb067d9b  
    1 #include <kernel>
    2 #include <monitor>
    3 #include <thread>
    4 #include <time>
     1#include <kernel.hfa>
     2#include <monitor.hfa>
     3#include <thread.hfa>
     4#include <time.hfa>
     5
     6#define __kick_rate 75000ul
     7#include "long_tests.hfa"
    58
    69#ifndef PREEMPTION_RATE
     
    1821mon_t mon1, mon2, mon3;
    1922
    20 void foo( mon_t & mutex a, mon_t & mutex b, mon_t & mutex c ) {}
     23void foo( mon_t & mutex a, mon_t & mutex b, mon_t & mutex c ) {
     24        KICK_WATCHDOG;
     25}
    2126
    2227thread worker_t {};
    2328
    2429void main( worker_t & this ) {
    25         for( unsigned long i = 0; i < N; i++ ) {
     30        for( unsigned long i = 0; TEST(i < N); i++ ) {
    2631                foo( mon1, mon2, mon3 );
    2732        }
  • longrun_tests/processor.cfa

    r7951100 rb067d9b  
    1 #include <kernel>
    2 #include <thread>
    3 #include <time>
     1#include <kernel.hfa>
     2#include <thread.hfa>
     3#include <time.hfa>
    44
    55#include <unistd.h>
     6
     7#include "long_tests.hfa"
    68
    79#ifndef PREEMPTION_RATE
     
    1315}
    1416
    15 static const unsigned long N = 5_000ul;
     17static const unsigned long N = 50_000ul;
    1618
    1719int main(int argc, char* argv[]) {
    1820        processor * p[15];
    19         write(STDERR_FILENO, "Preparing\n", sizeof("Preparing\n"));
    2021        for ( int pi = 0; pi < 15; pi++ ) {
    2122                p[pi] = new();
    2223        }
    23         write(STDERR_FILENO, "Starting\n", sizeof("Starting\n"));
    24         for ( int i = 0; i < N; i++) {
     24        for ( int i = 0; TEST(i < N); i++) {
    2525                int pi = i % 15;
    2626                delete( p[pi] );
    2727                p[pi] = new();
     28                KICK_WATCHDOG;
    2829        }
    29         write(STDERR_FILENO, "Stopping\n", sizeof("Stopping\n"));
    3030        for ( int pi = 0; pi < 15; pi++ ) {
    3131                delete( p[pi] );
    3232        }
    33         write(STDERR_FILENO, "Done\n", sizeof("Done\n"));
    3433}
  • longrun_tests/yield.cfa

    r7951100 rb067d9b  
    1 #include <kernel>
    2 #include <thread>
    3 #include <time>
     1#include <kernel.hfa>
     2#include <thread.hfa>
     3#include <time.hfa>
     4
     5#define __kick_rate 550000ul
     6#include "long_tests.hfa"
    47
    58#ifndef PREEMPTION_RATE
     
    1114}
    1215
    13 #ifdef LONG_TEST
     16#ifdef TEST_LONG
    1417static const unsigned long N = 9_750_000ul;
    1518#else
     
    2023
    2124void main(worker_t & this) {
    22         for(int i = 0; i < N; i++) {
     25        for(int i = 0; TEST(i < N); i++) {
    2326                yield();
     27                KICK_WATCHDOG;
    2428        }
    2529}
Note: See TracChangeset for help on using the changeset viewer.