-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile_root
79 lines (65 loc) · 2.65 KB
/
Makefile_root
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
include ../../Makefile_globals
SED_CACHE_MISSES=sed -r 's/^\s*([0-9,]+).*cache-misses/CACHE_MISSES: \1/'
SED_ICACHE_MISSES=sed -r 's/^\s*([0-9,]+).*L1-icache-load-misses/L1_ICACHE_MISSES: \1/'
SED_DTLB_MISSES=sed -r 's/^\s*([0-9,]+).*dTLB-load-misses/DTLB_MISSES: \1/'
SED_ITLB_MISSES=sed -r 's/^\s*([0-9,]+).*iTLB-load-misses/ITLB_MISSES: \1/'
# Build sequential apps with liteprof
build-seq-apps-liteprof:
cd ..;./setup.sh liteprof
cd ../instrumented; make clean;\
make CFLAGS="$(LITEPROF_CFLAGS)" LDFLAGS=$(LITEPROF_LD)
build-seq-apps-plain:
cd ..; ./setup.sh
cd ../instrumented;\
make CFLAGS="$(CFLAGS)" LDFLAGS=$(LDFLAGS)
build-par-apps-liteprof:
cd ..; ./setup.sh liteprof
cd $(SRCS); make clean;\
make CFLAGS="$(LITEPROF_CFLAGS)" LDFLAGS=$(LITEPROF_LD)
build-par-apps-plain:
cd $(SRCS); make clean;\
make CFLAGS="$(CFLAGS)" LDFLAGS=$(LDFLAGS)
run-seq-plain:
(cd ../instrumented;\
/usr/bin/time -f "SELFTIMED %e\nuser %U\nsys %S\nRES_SIZE: %M\n" -o res.out $(APPCMD))
run-seq-liteprof:
(cd ../instrumented;\
export LD_LIBRARY_PATH=$(CURDIR)/../../../../build/lib/:$(LD_LIBRARY_PATH);\
/usr/bin/time -f "SELFTIMED %e\nuser %U\nsys %S\nRES_SIZE: %M\n" -o res.out $(APPCMD))
run-seq-perf-plain:
(cd ../instrumented;\
perf stat -e r4C3,L1-icache-load-misses,dTLB-load-misses,iTLB-load-misses,cache-misses,faults $(APPCMD) 2>&1 | \
$(SED_CACHE_MISSES) | \
$(SED_ICACHE_MISSES) | \
$(SED_DTLB_MISSES) | \
$(SED_ITLB_MISSES))
run-seq-perf-liteprof:
(cd ../instrumented;\
export LD_LIBRARY_PATH=$(CURDIR)/../../../../build/lib/:$(LD_LIBRARY_PATH);\
perf stat -e r4C3,L1-icache-load-misses,dTLB-load-misses,iTLB-load-misses,cache-misses,faults $(APPCMD) 2>&1 | \
$(SED_CACHE_MISSES) | \
$(SED_ICACHE_MISSES) | \
$(SED_DTLB_MISSES) | \
$(SED_ITLB_MISSES))
run-par-plain:
(cd $(SRCS);\
/usr/bin/time -f "SELFTIMED %e\nuser %U\nsys %S\nRES_SIZE: %M\n" -o res.out $(APPCMD))
run-par-liteprof:
(cd $(SRCS);\
export LD_LIBRARY_PATH=$(CURDIR)/../../../../build/lib/:$(LD_LIBRARY_PATH);\
/usr/bin/time -f "SELFTIMED %e\nuser %U\nsys %S\nRES_SIZE: %M\n" -o res.out $(APPCMD))
run-par-perf-plain:
(cd $(SRCS);\
perf stat -e r4C3,L1-icache-load-misses,dTLB-load-misses,iTLB-load-misses,cache-misses,faults $(APPCMD) 2>&1 | \
$(SED_CACHE_MISSES) | \
$(SED_ICACHE_MISSES) | \
$(SED_DTLB_MISSES) | \
$(SED_ITLB_MISSES))
run-par-perf-liteprof:
(cd $(SRCS);\
export LD_LIBRARY_PATH=$(CURDIR)/../../../../build/lib/:$(LD_LIBRARY_PATH);\
perf stat -e r4C3,L1-icache-load-misses,dTLB-load-misses,iTLB-load-misses,cache-misses,faults $(APPCMD) 2>&1 | \
$(SED_CACHE_MISSES) | \
$(SED_ICACHE_MISSES) | \
$(SED_DTLB_MISSES) | \
$(SED_ITLB_MISSES))