Changeset 08ed947 for tests/zombies/string-perf/Makefile
- Timestamp:
- Feb 23, 2022, 6:13:02 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- afe9e45, c5af4f9
- Parents:
- cc7bbe6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/zombies/string-perf/Makefile
rcc7bbe6 r08ed947 5 5 CFA = $(CFABUILD)/driver/cfa 6 6 PERFFLAGS_CFA = -nodebug -O2 7 PERFFLAGS_CXX = -DNDEBUG -O2 7 PERFFLAGS_CXX = -DNDEBUG -O2 -Wl,--no-as-needed -ldl 8 8 9 9 … … 37 37 endef 38 38 39 OPERATIONS=pta peq 39 OPERATIONS=pta peq pbv pall pno 40 40 ALLOCS=reuse fresh 41 41 CFA_APILEVELS=hl ll … … 44 44 45 45 ifneq ($(filter cfa,$(PLATFORMS)),) 46 CFA_PERFPROGS=$(call hyphCross5,perfexp-cfa,$(CFA_APILEVELS),$(OPERATIONS),$(CFA_SHARINGS),$(ALLOCS))46 CFA_APIS=$(call hyphCross,$(CFA_APILEVELS),$(CFA_SHARINGS)) 47 47 endif 48 48 49 49 ifneq ($(filter stl,$(PLATFORMS)),) 50 STL_PERFPROGS=$(call hyphCross3,perfexp-stl,$(OPERATIONS),$(ALLOCS)) 50 STL_APIS=na-na 51 51 endif 52 52 53 53 ifneq ($(filter buhr94,$(PLATFORMS)),) 54 BUHR94_PERFPROGS=$(call hyphCross3,perfexp-buhr94,$(OPERATIONS),$(ALLOCS)) 54 BUHR94_APIS=na-na 55 55 endif 56 57 APIS = $(CFA_APIS) $(STL_APIS) $(BUHR94_APIS) 58 59 OPERATIONS_USING_ALLOCS=pta peq 60 define enrichOperationsAllocs 61 $(call hyphCross3,$(filter peq pta,$(OPERATIONS)),$(1),$(ALLOCS)) $(call hyphCross3,$(filter-out peq pta,$(OPERATIONS)),$(1),na) 62 endef 63 64 CFA_PERFPROGS=$(call hyphCross,perfexp-cfa,$(call enrichOperationsAllocs,$(CFA_APIS))) 65 STL_PERFPROGS=$(call hyphCross,perfexp-stl,$(call enrichOperationsAllocs,$(STL_APIS))) 66 BUHR94_PERFPROGS=$(call hyphCross,perfexp-buhr94,$(call enrichOperationsAllocs,$(BUHR94_APIS))) 56 67 57 68 PERFPROGS = $(CFA_PERFPROGS) $(STL_PERFPROGS) $(BUHR94_PERFPROGS) … … 59 70 all : $(PERFPROGS) 60 71 72 PP_SPLIT := $(shell echo "${PERFPROGS}" | sed -e 's/ /\\n/g') 73 echoPerfProgs: 74 echo -e '$(PP_SPLIT)' 61 75 76 perfexp-%.o: API=$(call ucHyphProj,$@,2) 77 perfexp-%.o: OPERATION=$(call ucHyphProj,$@,3) 78 perfexp-%.o: CFA_APILEVEL=$(call ucHyphProj,$@,4) 79 perfexp-%.o: CFA_SHARING=$(call ucHyphProj,$@,5) 80 perfexp-%.o: ALLOC=$(call ucHyphProj,$@,6) 81 perfexp-%.o: SCENARIO_SWITCH=-DIMPL_$(API)_$(CFA_APILEVEL)_$(CFA_SHARING) -DOP_$(OPERATION) -DALLOC_$(ALLOC) 62 82 63 perfexp-cfa-%: CFA_APILEVEL=$(call ucHyphProj,$@,3) 64 perfexp-cfa-%: OPERATION=$(call ucHyphProj,$@,4) 65 perfexp-cfa-%: CFA_SHARING=$(call ucHyphProj,$@,5) 66 perfexp-cfa-%: ALLOC=$(call ucHyphProj,$@,6) 67 perfexp-cfa-%: prog.cfa $(LIBCFA) 68 $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_$(CFA_APILEVEL)_$(CFA_SHARING) -DOP_$(OPERATION) -DALLOC_$(ALLOC) 83 perfexp-cfa-%.o: CMD=$(CFA) -c $(PERFFLAGS_CFA) $< -o $@ $(SCENARIO_SWITCH) 84 perfexp-stl-%.o: CMD=$(CXX) -c -xc++ $(PERFFLAGS_CXX) $< -o $@ $(SCENARIO_SWITCH) 85 perfexp-buhr94-%.o: CMD=$(CXX) -xc++ -c $(PERFFLAGS_CXX) $< -o $@ $(SCENARIO_SWITCH) 69 86 70 perfexp-stl-%: OPERATION=$(call ucHyphProj,$@,3) 71 perfexp-stl-%: ALLOC=$(call ucHyphProj,$@,4) 72 perfexp-stl-%: prog.cfa 73 $(CXX) -xc++ $(PERFFLAGS_CXX) $< -o $@ -DIMPL_STL -DOP_$(OPERATION) -DALLOC_$(ALLOC) 87 perfexp-cfa-peq-%.o: prog.cfa $(LIBCFA) 88 $(CMD) 89 perfexp-cfa-pta-%.o: prog.cfa $(LIBCFA) 90 $(CMD) 91 perfexp-cfa-pbv-%.o: prog-passbyval.cfa $(LIBCFA) 92 $(CMD) 93 perfexp-cfa-pb%.o: prog-passbyX.cfa $(LIBCFA) 94 $(CMD) 95 perfexp-cfa-pfi-%.o: prog-find.cfa $(LIBCFA) 96 $(CMD) 97 perfexp-cfa-pall-%.o: prog-allocn.cfa $(LIBCFA) 98 $(CMD) 99 perfexp-cfa-pno-%.o: prog-normalize.cfa $(LIBCFA) 100 $(CMD) 101 perfexp-stl-peq-%.o: prog.cfa 102 $(CMD) 103 perfexp-stl-pta-%.o: prog.cfa 104 $(CMD) 105 perfexp-stl-pbv-%.o: prog-passbyval.cfa 106 $(CMD) 107 perfexp-stl-pfi-%.o: prog-find.cfa 108 $(CMD) 109 perfexp-stl-pall-%.o: prog-allocn.cfa 110 $(CMD) 111 perfexp-stl-pno-%.o: prog-normalize.cfa 112 $(CMD) 113 perfexp-buhr94-peq-%.o: prog.cfa buhr94-string.o buhr94-VbyteSM.o 114 $(CMD) 115 perfexp-buhr94-pta-%.o: prog.cfa buhr94-string.o buhr94-VbyteSM.o 116 $(CMD) 117 perfexp-buhr94-pta-%.o: prog-passbyval.cfa buhr94-string.o buhr94-VbyteSM.o 118 $(CMD) 119 perfexp-buhr94-pall-%.o: prog-allocn.cfa buhr94-string.o buhr94-VbyteSM.o 120 $(CMD) 121 perfexp-buhr94-pno-%.o: prog-normalize.cfa buhr94-string.o buhr94-VbyteSM.o 122 $(CMD) 74 123 75 perfexp-buhr94-%.o: OPERATION=$(call ucHyphProj,$@,3) 76 perfexp-buhr94-%.o: ALLOC=$(call ucHyphProj,$@,4) 77 perfexp-buhr94-%.o: prog.cfa 78 $(CXX) -xc++ -c $(PERFFLAGS_CXX) $< -o $@ -DIMPL_BUHR94 -DOP_$(OPERATION) -DALLOC_$(ALLOC) 124 # one of the pbx cases also needs to link with not_string_res.o (handling manually) 125 perfexp-cfa-%: perfexp-cfa-%.o $(LIBCFA) 126 $(CFA) $(PERFFLAGS_CFA) $< -o $@ 127 perfexp-stl-%: perfexp-stl-%.o $(LIBCFA) 128 $(CFA) $(PERFFLAGS_CFA) $< /lib/x86_64-linux-gnu/libstdc++.so.6 -o $@ 129 perfexp-buhr94-% : perfexp-buhr94-%.o buhr94-string.o buhr94-VbyteSM.o 130 $(CXX) $(PERFFLAGS_CXX) $^ -o $@ 79 131 80 132 buhr94-string.o: … … 83 135 buhr94-VbyteSM.o: 84 136 $(CXX) -xc++ -c $(PERFFLAGS_CXX) ~/usys1/sm/string/StringSharing/src/VbyteSM.cc -o $@ 85 86 perfexp-buhr94-% : perfexp-buhr94-%.o buhr94-string.o buhr94-VbyteSM.o87 $(CXX) $(PERFFLAGS_CXX) $^ -o $@88 137 89 138 clean: … … 104 153 done ; \ 105 154 done 155 # printed=`./$$prog 10000 - 10 $$corpusbody` ; \ 156 157 CFA_EXPANSIONS=0.02 0.05 0.1 0.2 0.5 0.9 158 159 measurement2: $(MEASURE) 160 tofile=measurement-`date '+%F--%H-%M-%S'`.csv ; \ 161 for prog in $(MEASURE) ; do \ 162 for corpus in $(CORPORI) ; do \ 163 for expansion in $(CFA_EXPANSIONS) ; do \ 164 corpusbody= ; \ 165 echo ./$$prog 1000 1.006 $$expansion 10 \`cat $$corpus\` ; \ 166 done ; \ 167 done ; \ 168 done ; \ 169 echo $$tofile ; \ 170 for prog in $(MEASURE) ; do \ 171 for corpus in $(CORPORI) ; do \ 172 for expansion in $(CFA_EXPANSIONS) ; do \ 173 corpusbody=`cat $$corpus` ; \ 174 printed=`./$$prog 1000 1.006 $$expansion 10 $$corpusbody` ; \ 175 echo $$prog,$$corpus,$$expansion,$$printed >> $$tofile ; \ 176 echo $$prog,$$corpus,$$expansion,$$printed ; \ 177 done ; \ 178 done ; \ 179 done 180 181 measurement3: $(MEASURE) 182 for prog in $(MEASURE) ; do \ 183 for corpus in $(CORPORI) ; do \ 184 for expansion in $(CFA_EXPANSIONS) ; do \ 185 corpusbody=`cat $$corpus` ; \ 186 LD_PRELOAD=~/plg2/mubeen-stat-shim/malloc/mallocWrappers.so ./$$prog 1000 1.006 $$expansion 1 $$corpusbody ; \ 187 mv preload_dump.txt preload_dump--qrun1--$$corpus--expansion-$$expansion.txt ; \ 188 done ; \ 189 done ; \ 190 done
Note: See TracChangeset
for help on using the changeset viewer.