Ignore:
Timestamp:
Nov 22, 2021, 3:54:54 PM (10 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
enum, master, pthread-emulation, qualifiedEnum
Children:
94647b0
Parents:
97d58dc
Message:

String perf append test now compares stretch phase (alloc=fresh) with steady-state (alloc=reuse). Make gets rid of explicit list of targets. Running these with copori up to mean-500 lenght.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/zombies/string-perf/Makefile

    r97d58dc rfefd77a  
    88
    99
    10 PERFPROGS = \
    11         perfexp-cfa-hl-pta-share \
    12         perfexp-cfa-hl-peq-share \
    13         perfexp-cfa-ll-pta-share \
    14         perfexp-cfa-ll-peq-share \
    15         perfexp-cfa-hl-pta-noshare \
    16         perfexp-cfa-hl-peq-noshare \
    17         perfexp-cfa-ll-pta-noshare \
    18         perfexp-cfa-ll-peq-noshare \
    19         perfexp-stl-pta \
    20         perfexp-stl-peq \
    21         perfexp-buhr94-pta \
    22         perfexp-buhr94-peq
    23 
    24 all : $(PERFPROGS)
    25 
    26 # upper-case conversion function
     10# function: convert to upper case
    2711define uc
    2812$(shell echo $(1) | tr  '[:lower:]' '[:upper:]')
    2913endef
    3014
    31 perfexp-cfa-%: APILEVEL=$(call uc,$(word 3,$(subst -, ,$@)))
    32 perfexp-cfa-%: OPERATION=$(call uc,$(word 4,$(subst -, ,$@)))
    33 perfexp-cfa-%: SHARING=$(call uc,$(word 5,$(subst -, ,$@)))
     15# function: project numbered element of filename named by hyphen-delimited tuple
     16# (call hyphProj,q-w-e-r.txt,1) is Q
     17define ucHyphProj
     18$(call uc,$(word $(2),$(subst -, ,$(basename $(1)))))
     19endef
     20
     21# function: cross two lists, adding hyphen delimiters
     22# (call hyphCross,a b c,1 2) is a-1 a-2 b-1 b-2 c-1 c-2
     23define hyphCross
     24$(foreach x,$(1),$(foreach xs,$(2),$(x)-$(xs)))
     25endef
     26
     27define hyphCross3
     28$(call hyphCross,$(1),$(call hyphCross,$(2),$(3)))
     29endef
     30
     31define hyphCross4
     32$(call hyphCross,$(1),$(call hyphCross3,$(2),$(3),$(4)))
     33endef
     34
     35define hyphCross5
     36$(call hyphCross,$(1),$(call hyphCross4,$(2),$(3),$(4),$(5)))
     37endef
     38
     39OPERATIONS=pta peq
     40ALLOCS=reuse fresh
     41CFA_APILEVELS=hl ll
     42CFA_SHARINGS=share noshare
     43PLATFORMS=cfa stl buhr94
     44
     45ifneq ($(filter cfa,$(PLATFORMS)),)
     46        CFA_PERFPROGS=$(call hyphCross5,perfexp-cfa,$(CFA_APILEVELS),$(OPERATIONS),$(CFA_SHARINGS),$(ALLOCS))
     47endif
     48
     49ifneq ($(filter stl,$(PLATFORMS)),)
     50        STL_PERFPROGS=$(call hyphCross3,perfexp-stl,$(OPERATIONS),$(ALLOCS))
     51endif
     52
     53ifneq ($(filter buhr94,$(PLATFORMS)),)
     54        BUHR94_PERFPROGS=$(call hyphCross3,perfexp-buhr94,$(OPERATIONS),$(ALLOCS))
     55endif
     56
     57PERFPROGS = $(CFA_PERFPROGS) $(STL_PERFPROGS) $(BUHR94_PERFPROGS)
     58
     59all : $(PERFPROGS)
     60
     61
     62
     63perfexp-cfa-%: CFA_APILEVEL=$(call ucHyphProj,$@,3)
     64perfexp-cfa-%: OPERATION=$(call ucHyphProj,$@,4)
     65perfexp-cfa-%: CFA_SHARING=$(call ucHyphProj,$@,5)
     66perfexp-cfa-%: ALLOC=$(call ucHyphProj,$@,6)
    3467perfexp-cfa-%: prog.cfa $(LIBCFA)
    35         $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_$(APILEVEL)_$(SHARING) -DOP_$(OPERATION)
     68        $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_$(CFA_APILEVEL)_$(CFA_SHARING) -DOP_$(OPERATION) -DALLOC_$(ALLOC)
    3669
    37 perfexp-stl-%: OPERATION=$(call uc,$(word 3,$(subst -, ,$@)))
     70perfexp-stl-%: OPERATION=$(call ucHyphProj,$@,3)
     71perfexp-stl-%: ALLOC=$(call ucHyphProj,$@,4)
    3872perfexp-stl-%: prog.cfa
    39         $(CXX) -xc++ $(PERFFLAGS_CXX) $< -o $@ -DIMPL_STL -DOP_$(OPERATION)
     73        $(CXX) -xc++ $(PERFFLAGS_CXX) $< -o $@ -DIMPL_STL -DOP_$(OPERATION) -DALLOC_$(ALLOC)
    4074
    41 perfexp-buhr94-%.o: OPERATION=$(call uc,$(word 3,$(subst -, ,$(basename $@))))
     75perfexp-buhr94-%.o: OPERATION=$(call ucHyphProj,$@,3)
     76perfexp-buhr94-%.o: ALLOC=$(call ucHyphProj,$@,4)
    4277perfexp-buhr94-%.o: prog.cfa
    43         $(CXX) -xc++ -c $(PERFFLAGS_CXX) $< -o $@ -DIMPL_BUHR94 -DOP_$(OPERATION)
     78        $(CXX) -xc++ -c $(PERFFLAGS_CXX) $< -o $@ -DIMPL_BUHR94 -DOP_$(OPERATION) -DALLOC_$(ALLOC)
    4479
    4580buhr94-string.o:
     
    66101                        printed=`./$$prog 100 10 $$corpusbody` ; \
    67102                        echo $$prog,$$corpus,$$printed  >>  $$tofile ; \
     103                        echo $$prog,$$corpus,$$printed  ; \
    68104                done ; \
    69         done ; \
    70         cat $$tofile
     105        done
Note: See TracChangeset for help on using the changeset viewer.