Ebrahim Byagowi | 53dc8d9 | 2019-12-10 21:53:30 +0330 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | CXX=clang++ |
| 3 | FONT=fonts/NotoNastaliqUrdu-Regular.ttf |
Behdad Esfahbod | 2c781a6 | 2019-12-10 12:43:42 -0600 | [diff] [blame] | 4 | TEXT=texts/fa-monologue.txt |
Ebrahim Byagowi | 53dc8d9 | 2019-12-10 21:53:30 +0330 | [diff] [blame] | 5 | |
| 6 | $CXX ../util/hb-shape.cc ../util/options.cc ../src/harfbuzz.cc \ |
| 7 | -lm -fno-rtti -fno-exceptions -fno-omit-frame-pointer -DHB_NO_MT \ |
| 8 | -I../src $FLAGS $SOURCES \ |
| 9 | -DPACKAGE_NAME='""' -DPACKAGE_VERSION='""' \ |
| 10 | -DHAVE_GLIB $(pkg-config --cflags --libs glib-2.0) \ |
| 11 | -o hb-shape -g -O2 # -O3 \ |
| 12 | #-march=native -mtune=native \ |
| 13 | #-Rpass=loop-vectorize -Rpass-missed=loop-vectorize \ |
| 14 | #-Rpass-analysis=loop-vectorize -fsave-optimization-record |
| 15 | |
| 16 | # -march=native: enable all vector instructions current CPU can offer |
| 17 | # -Rpass*: https://llvm.org/docs/Vectorizers.html#diagnostics |
| 18 | |
| 19 | #sudo rm capture.syscap > /dev/null |
| 20 | #sysprof-cli -c "./a.out $@" |
| 21 | #sysprof capture.syscap |
| 22 | |
| 23 | perf stat ./hb-shape -o /dev/null $FONT --text-file $TEXT --num-iterations=100 --font-funcs=ot |
| 24 | #perf record -g ./hb-shape -O '' -o /dev/null $FONT --text-file $TEXT --num-iterations=100 --font-funcs=ot |
| 25 | #perf report -g |