Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
539 changes: 539 additions & 0 deletions src/counter_analysis_toolkit/CMakeLists.txt

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions src/counter_analysis_toolkit/README

This file was deleted.

45 changes: 45 additions & 0 deletions src/counter_analysis_toolkit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Description
Benchmarks for helping in the understanding of native events
by stressing different aspects of the architecture selectively.

The following flags specify the corresponding benchmarks:<br>
<pre>
-branch Branch kernels.
-dcr Data cache reading kernels.
-dcw Data cache writing kernels.
-flops Floating point operations kernels.
-ic Instruction cache kernels.
-vec Vector FLOPs kernels.
-instr Instrution kernels.
</pre>

Each line in the event-list file should contain ether the name of a base
event followed by the number of qualifiers to be appended, or a
fully expanded event with qualifiers followed by the number zero, as in
the following example:

```
L2_RQSTS 1
ICACHE:MISSES 0
ICACHE:HIT 0
OFFCORE_RESPONSE_0:DMND_DATA_RD:L3_HIT:SNP_ANY 0
```

# Build Instructions
## CMake Compilation (Recommended):
```
mkdir build && cd build
cmake -DPAPI_DIR=/path/to/your/papi/installation ..
make
```

## Legacy Compilation
```
cd counter_analysis_toolkit/src
make PAPI_DIR=/path/to/your/papi/installation
```

# Running the Benchmarks
```
./cat_collect -in event_list.txt -out OUTPUT_DIRECTORY -branch -dcr
```
6 changes: 0 additions & 6 deletions src/counter_analysis_toolkit/replicate.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PAPIDIR?=${PAPI_DIR}
PAPI_DIR?=${PAPI_DIR}
USEMPI?=false
LDFLAGS=-L$(PAPIDIR)/lib -lpapi -lm -lpthread -ldl -lrt
INCFLAGS=-I$(PAPIDIR)/include
LDFLAGS=-L$(PAPI_DIR)/lib -lpapi -lm -lpthread -ldl -lrt
INCFLAGS=-I$(PAPI_DIR)/include
CFLAGS+=-g -Wall -Wextra
OPT0=-O0
OPT1=-O1
Expand Down Expand Up @@ -62,11 +62,11 @@ ifeq ($(ARCH),ARM)
endif

all: branch.o d_cache eventstock.o flops i_cache instr vector
make cat_collect PAPIDIR=$(PAPIDIR)
make cat_collect PAPI_DIR=$(PAPI_DIR)

d_cache: timing_kernels.o prepareArray.o compar.o dcache.o

i_cache: icache.o icache_seq_kernel_0.o
i_cache: icache.o icache_seq_kernel.o

vector: weak_symbols.o vec.o vec_scalar_verify.o $(VECSRC)

Expand All @@ -92,15 +92,15 @@ flops: flops.c flops.h cat_arch.h
$(CC) $(CFLAGS) $(FLOP) $(OPT1) $(INCFLAGS) -c flops.c -o flops.o

icache.o: icache.c icache.h
bash gen_seq_dlopen.sh
bash gen_seq_dlopen.sh ${PWD}
$(CC) $(CFLAGS) $(OPT0) $(INCFLAGS) -c icache.c -o icache.o

icache_seq_kernel_0.o: icache_seq.c icache_seq.h
icache_seq_kernel.o: icache_seq.c icache_seq.h icache_seq_kernel.c
$(CC) $(CFLAGS) $(OPT0) $(INCFLAGS) -c icache_seq.c -o icache_seq.o
$(CC) $(CFLAGS) $(OPT0) $(INCFLAGS) -fPIC -c icache_seq_kernel.c -o icache_seq_kernel_0.o
$(CC) $(CFLAGS) $(OPT0) -shared -o icache_seq_kernel_0.so icache_seq_kernel_0.o
bash replicate.sh
rm icache_seq_kernel_0.o
$(CC) $(CFLAGS) $(OPT0) $(INCFLAGS) -fPIC -c icache_seq_kernel.c -o icache_seq_kernel.o
$(CC) $(CFLAGS) $(OPT0) -shared -o icache_seq_kernel_0.so icache_seq_kernel.o
bash replicate.sh ${PWD}
rm ${PWD}/icache_seq_kernel.o

instr: instructions.c instr.h
-$(CC) -c $(CFLAGS) $(OPT2) -ftree-vectorize $(FLOP) $(INSTR) $(INCFLAGS) instructions.c -o instructions.o
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/bash

DRV_F=icache_seq.c
KRN_F=icache_seq_kernel.c
HEAD_F=icache_seq.h
if [ $# -lt 1 ]
then
printf "gen_seq_dlopen.sh: Must supply output dir for generated source!\n"
exit 1
fi
DRV_F=$1/icache_seq.c
KRN_F=$1/icache_seq_kernel.c
HEAD_F=$1/icache_seq.h

TRUE_IF=1
FALSE_IF=0
Expand Down
10 changes: 10 additions & 0 deletions src/counter_analysis_toolkit/src/replicate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

if [ $# -lt 1 ]
then
printf "replicate.sh: Must supply output dir for generated source!\n"
exit 1
fi
for ((i=1; i<12; i++)); do
cp $1/icache_seq_kernel_0.so $1/icache_seq_kernel_${i}.so
done
Loading